1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.61k stars 792 forks source link

Add newremote library to take into account RC with learning mode #3

Closed 1technophile closed 7 years ago

1technophile commented 7 years ago

from https://bitbucket.org/fuzzillogic/433mhzforarduino/overview

prahjister commented 7 years ago

What will this do?

1technophile commented 7 years ago

enable more devices to work with the gateway like for example DIO remote control with learning mode

1technophile commented 7 years ago

begining of the work here: https://github.com/1technophile/NewRemoteSwitch

1technophile commented 7 years ago

Currently the library licensing is not compatible with MIT license

DenDeze commented 7 years ago

This would make a lot of people happy in the Netherlands!!!!! could you please re-open?

Fuzzillogic commented 7 years ago

Commit https://github.com/1technophile/OpenMQTTGateway/commit/7f5a6da8ccb4fdb5c0043b88fea5bcebfa8a002e fixes the issue: OpenMQTTGateway changed to GPLv3, the library is also GPLv3, so they are really compatible.

1technophile commented 7 years ago

Yes they are now licence compatible, @Dendeze could you confirm that the library as it is receive your signals and is able to replicate them?

DenDeze commented 7 years ago

@1technophile at this moment i use IMPULS http://www.voordeelmuis.nl/img/gif/1246/1246690.gif

this module codes are received and i can send them.

1technophile commented 7 years ago

@DenDeze With the newremoteswitch library on an esp8266 ?

DenDeze commented 7 years ago

Sorry, i misread your question. No i was trying today but could not get it to work.

1technophile commented 7 years ago

@DenDeze do you have an arduino uno or other so as to test it also?

DenDeze commented 7 years ago

If you want i could try to run the scripts on an arduino mega (if it still works). normaly i would only use the nodemcu but if you want feedback i can provide you with it.

Could you push me in the right direction?

Is it possible to have the old RF units and the new programmable units in the same code?

like: old skool dipswitch sockets + new fancy programmable controlled by the same nodemcu.

1technophile commented 7 years ago

What could be interesting is to load last version of @Fuzzillogic from here: https://bitbucket.org/fuzzillogic/433mhzforarduino/src/0847a6d8a9173abd5abf9cf571a1539f56588c0e/NewRemoteSwitch/examples/ShowReceivedCode/?at=default and see if it see your codes with your arduino mega

DenDeze commented 7 years ago

i saw his project today searching for some ways to implement it. i will load the code on the mega and provide you with the feedback.

DenDeze commented 7 years ago

Addr 19842046 unit 0 on, period: 269us. Addr 19842046 unit 0 off, period: 269us. Addr 19842046 unit 1 on, period: 270us. Addr 19842046 unit 1 off, period: 270us. Addr 19842046 unit 1 off, period: 270us. Addr 19842046 unit 2 on, period: 270us. Addr 19842046 unit 2 off, period: 270us. Addr 19842046 unit 2 off, period: 271us. Addr 19842046 group off, period: 270us.

https://www.50five.nl/apa3-1500r-stopcontact-doos-nl?gclid=CPbIkaDLhNUCFUkQ0wodVVQBrA

There you go!

1technophile commented 7 years ago

Great thanks, this is positive to extend the gateway possibilities!

DenDeze commented 7 years ago

@1technophile thank you for all the time spend in this project. if you can make both protocols to work on the same esp it would be great! (old and new type of hardware).

1technophile commented 7 years ago

will try, maybe with the help of @Fuzzillogic if he has some time to spend on this

DenDeze commented 7 years ago

@Fuzzillogic it would be grate if you coupe help with this!

DenDeze commented 7 years ago

@1technophile for now it would be greate if in the rf config you could choose the library that it has to use.

Fuzzillogic commented 7 years ago

I've switched to z-wave devices. Their two-way communication and encryption makes it more robust. I already had a simple little multi-role home server / htpc, which with a z-wave USB transceiver and Domoticz now gained the extra role of domotica hub. So frankly, I've lost interest in these 433MHz devices.

Also, transmitting using the library should work fine, but receiving and decoding is quite susceptible for noise and the used receiver. With proper math and physics skills that undoubtedly could be improved, unfortunately I lack both in this regard.

minnesberg commented 7 years ago

Hi. I am experiencing the exact same issue, meaning that I can receive / send codes to my 433mhz switches using the library "NewRemoteReceiver" the commands that i reviece are similar to what @DenDeze is describing above. Addr 22607914 unit 0 on Addr 22607914 unit 0 off Meaning it is the same message for all buttons on the remote but then it has additional parameters in unit and state (on / off) The outlets I am using is Nexa (very common in the nordic countries) and the manufacturer of Tellstick Duo / Net etc.

Is there any plans / progress / roadmaps regarding this ? It would be nice to be able to use this generic MQTT solution instead of buying the RFXTRX433E adapter.

Your work is much appreated. Thanks / Ronnie

1technophile commented 7 years ago

I got it working with a wemos and DIO chacon remote control, which will enable me to integrate it. As a first approach it will not possible to run RCswitch receiving and newremoteswitch with the same receiver. Regarding the emitter I didn't tested it yet.

DenDeze commented 7 years ago

@1technophile, maybe it would be possible to just choose between OLD or NEW protocol in the config? i just tested the lightshow example on an NODEMCU V3 with succes. I only changed pin number to 10 (D2 on the nodemcu). And i removed the dim level part from the example.

1technophile commented 7 years ago

Yes i will do it like that, i m going to test if we can keep both for sending.

1technophile commented 7 years ago

I confirm we can keep both for sending, nevertheless I encounter some stability issue with ESP will see.

DenDeze commented 7 years ago

If you want i can test to...

1technophile commented 7 years ago

@DenDeze thanks for proposing, I'm interested. I finish the implementation and go back to you. Currently I have a working gateway for sending MQTTtoRF2 with this kind of command: sudo mosquitto_pub -t home/commands/MQTTtoRF2/CODE_8233267/UNIT_0/PERIOD_272 -m 0

but it is not receiving yet

1technophile commented 7 years ago

ZgatewayRF2 published, I didn't implement the receiving of code to the gateway (seems to have conflict with other libraries). So as to get the code of your remotes use ShowReceivedCode from the library below https://github.com/1technophile/NewRemoteSwitch

Once you get the infos publish the parameters with mqtt like that for off: sudo mosquitto_pub -t home/commands/MQTTtoRF2/CODE_8233243/UNIT_0/PERIOD_272 -m 0 for on: sudo mosquitto_pub -t home/commands/MQTTtoRF2/CODE_8233243/UNIT_0/PERIOD_272 -m 1

Tested OK I reproduce the signal from a DIO PBT-707

larsenglund commented 7 years ago

@minnesberg I can confirm that ZgatewayRF2 works with Nexa switches and dimmers