Accéder au contenu principal

Major version of 433toMQTTto433 gateway --> OpenMQTTGateway

A new version of the gateway is available on github:
https://github.com/1technophile/OpenMQTTGateway




This version introduce the following changes:

  • esp8266 and arduino compatibility with the same code
  • code SRAM load optimization for arduino uno
  • group user and other parameters
  • remove duplicate for IR
  • RF protocols definition in subject
  • RF pulse length definition in subject
  • acknowledgement inside a subtopic
  • code refactoring
  • handle MQTT authentication automaticaly if user set
  • put parameters on an user_config.h file


Major change is the arduino and esp8266 compatibility with the same code, the goal is to be able to maintain the gateway for both platform on a more easy way.

You will notice also that the code has been optimized and the sram footprint also.

It is now possible to define into the topic some rcswitch parameters like protocol and pulselength.

I add some requests about adding direct modules like DHT sensor or fan on the gateway but wouldn't like to drift the code from what it is first ... a gateway. So as to do that, Addons modules can be now added with an extra file called Zaddon... it must have its parameters on its own.

The user and setup guide is now on the github wiki. This new version is on a beta state at this time.

Commentaires

  1. Hi, I'm using your project in my 433MHz setup and it works flawlessy on my local test MQTT Server, but it isn't working on my main MQTT Server wich is SSL protected, any ways to solve this? Thanks in advance

    RépondreSupprimer
    Réponses
    1. Hi, could you plug the gateway to your computer, open your IDE serial monitor and indicate me where it stop?

      Supprimer
    2. WiFi connected
      client mqtt not connected, trying to connect
      Attempting MQTT connection...
      failed, rc=
      -4
      try again in 5 seconds
      Attempting MQTT connection...

      This is the error I get!

      Supprimer
    3. As you proposed please change the mqtt port, if you download the latest code I added a constant to define it:
      #define mqtt_port 8883

      most of the time the port is 8883 for SSL MQTT, please check your broker what is the good port

      Supprimer
    4. Hi, I tried earlier to modify the port in here:

      PubSubClient client(mqtt_server, 1883, callback, eClient);

      without any success, I think it might be a limitation with PubSubClient but I'm at level 0 with C unfortunatly

      Supprimer
    5. Hi,
      I confirm that SSL is not supported by the pubsubclient used by the gateway
      https://github.com/knolleary/pubsubclient/issues/23

      As the SSL can't be handle by the arduino Uno

      Supprimer
  2. Ce commentaire a été supprimé par l'auteur.

    RépondreSupprimer
  3. Ce commentaire a été supprimé par l'auteur.

    RépondreSupprimer
  4. Hi,
    I was wondering if it can do different bit? Some of my rf devices are 12bit & 32bit for the code. I have read the codes using a nano & rc_switch to get the codes + bit + protocol. I can see that you can set protocol using the 433_* in the topic.
    Thanks
    Matt

    RépondreSupprimer
    Réponses
    1. Hi,

      Could you post the result from receive demo advanced, I will check?

      Supprimer
    2. Ceiling Fan & Light controller
      Light ON
      Decimal: 3069 (12Bit) Binary: 101111111101 Tri-State: not applicable PulseLength: 386 microseconds Protocol: 6
      Raw data: 8916,328,688,308,324,684,696,192,248,324,56,36,268,40,528,348,132,16,540,308,692,300,684,308,688,

      Decimal: 3069 (12Bit) Binary: 101111111101 Tri-State: not applicable PulseLength: 386 microseconds Protocol: 6
      Raw data: 9072,332,688,316,428,592,696,88,704,144,872,276,684,708,280,132,256,272,164,24,144,228,84,516,332,

      Light Off
      Decimal: 3581 (12Bit) Binary: 110111111101 Tri-State: 1F111F PulseLength: 386 microseconds Protocol: 6
      Raw data: 8908,324,688,300,684,308,324,680,696,300,688,308,688,300,692,300,692,304,692,304,296,300,324,688,692,

      Supprimer
    3. I got the 32 bit to work by changing mySwitch.send(data, 24);
      to mySwitch.send(data, 32);

      Supprimer
    4. BAUHN Remote Control Power Point
      Channel 1 On
      Decimal: 3505196978 (32Bit) Binary: 11010000111011010000111110110010 Tri-State: not applicable PulseLength: 262 microseconds Protocol: 1
      Raw data: 8344,720,276,716,276,232,764,716,276,244,748,236,760,236,756,240,752,720,276,716,276,724,268,240,752,724,272,720,276,236,756,720,272,240,756,236,756,236,760,236,756,720,272,720,272,724,268,724,272,716,280,236,756,716,276,720,276,240,744,740,100,136,188,144,160,

      Channel 1 Off
      Decimal: 3505194938 (32Bit) Binary: 11010000111011010000011110111010 Tri-State: not applicable PulseLength: 262 microseconds Protocol: 1
      Raw data: 8144,716,276,720,276,232,760,716,280,232,760,236,756,236,756,236,756,720,276,716,276,716,276,240,752,720,276,716,276,236,756,720,276,236,756,236,760,236,756,236,756,236,756,720,272,720,276,716,276,720,276,236,756,716,276,720,272,724,272,236,756,720,276,236,748,

      Supprimer
    5. Fan Controller Light On
      Decimal: 3069 (12Bit) Binary: 101111111101 Tri-State: not applicable PulseLength: 386 microseconds Protocol: 6
      Raw data: 8920,48,968,332,680,312,328,680,700,296,700,292,700,300,680,312,696,300,688,308,684,308,696,300,700,

      433tomqttto433 via node-red
      Decimal: 3069 (32Bit) Binary: 00000000000000000000101111111101 Tri-State: not applicable PulseLength: 353 microseconds Protocol: 6
      Raw data: 204,76,752,332,420,636,368,672,376,772,348,708,360,336,660,752,352,208,664,360,692,352,700,348,704,340,720,416,640,824,268,196,16,552,236,328,92,232,384,868,180,868,180,876,460,400,656,392,672,516,544,368,268,40,4108,48,524,20,88,216,372,48,340,496,164,

      Supprimer
    6. Hello,

      And when you put a 12 bit value by mqtt like 3069 without changing mySwitch.send(data, 24); does it work?

      Supprimer
    7. No response, I even tried changing it to myswitch.send(data,12) & it still doesn't work.
      I was also wondering if anyone has used a serial 433 mhz transcevier like SI4463?

      Supprimer
    8. Ce commentaire a été supprimé par l'auteur.

      Supprimer
    9. If i sum up:
      It works with 32 bits codes if you change 24 to 32 in the gateway code
      It doesn't work with 12 bit codes if you change 24 to 12 in the gateway code ?

      Never tested with SI4463, but have two instock I will try

      Supprimer
  5. Yes to 24 to 32 bit (RF Switch/power points).
    Would it be easy to add a 3rd variable to ie BIT_12 or BIT_24 or BIT_32 that would force the the bit to a different value mySwitch.send(data,bit)?
    I think the 12 bit one may also be to do with timing (386ms which I tried setting). I am going to try my 3 other fan controllers & see if they work, they are from a different manufacturer.
    Thanks for your help, it is very appreciated, I ,am new to all this so have had a steep learning curve.
    I am trying to increase my wife's appreciation factor for automating our house.

    RépondreSupprimer
    Réponses
    1. I think by putting 32 for all cases it should work, let's see your results

      Supprimer
  6. Awesome project !!!
    Although i can't get 433ghz receiver to snif anything, IR works fine.
    Could you add support for AC's maybe, like Mitsubishi.
    ex: https://github.com/markszabo/IRremoteESP8266

    thank you for work, keep it up :D !

    RépondreSupprimer
    Réponses
    1. hi,

      Thanks for the feedback!

      I have added your request to the request list:
      https://github.com/1technophile/OpenMQTTGateway/issues/33

      Supprimer
  7. Please tell me if everything is connected or only in turn?
    (433 -> <- ) && (IR -> <-) && (BLU -> <-)
    OR
    (433 -> <- ) OR (IR -> <-) OR (BLU -> <-)

    RépondreSupprimer
    Réponses
    1. You can have RF, IR and BLE on the same chip:
      (433 -> <- ) && (IR -> <-) && (BLU -> <-)

      Supprimer

Enregistrer un commentaire

Posts les plus consultés de ce blog

433toMQTTto433 - Bidirectional ESP8266 NodeMCU gateway between RF 433Mhz signal and MQTT

The goal  is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets) with software like openhab.

List of compatible sensors here

The interest of putting this gateway to an ESP8266 and not on a raspberry pi is to be able to manage security actions at gateway level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions.

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway

You need:

Software:

MosquittoArduino IDE latest version (tested ok with 1.6.10)esp8266 board added to t…

Infrared IR, 433mhz and MQTT on ESP8266 bidirectional gateway OpenMQTTGateway

Following discussions on the home assistant forum people gave me the idea to add Infrared communication to the 433mhz gateway. 

The goal is to act as a gateway between 433Mhz sensors, infrared remote controls and a MQTT broker or between the MQTT broker and 433Mhz actuators, infrared devices, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal receive MQTT data from a topic and send infrared signal corresponding to the received MQTT data publish MQTT data to a different topic related to received infrared signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets), your tv, home cinema, hifi ... with software like openhab or home assistant.

List of compatible RF sensors here

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQT…

433toMQTTto433 - Bidirectional Arduino gateway between RF 433Mhz signal and MQTT

The goal of the Arduino 433toMQTTto433 is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators with software like openhab.

The interest of putting this gateway to an arduino and not on a raspberry pi is to be able to manage security actions at arduino level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions.

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway

You need:
Arduino UNO W5100 Ethernet shield 433Mhz Receiver XD RF 5V and transmitter FS1000A 
Transmitter VCC must be p…