I've been able to get MySensors working with HomeGenie using the MQTT gateway. It doesn't have two-way communication or software-based pairing yet, but I'll work on those in the future.
I use a cheap Chinese 5100 module together with the MQTT gateway and it is warm but have not measured any actual temperature. Works 24 hours a day (now for a couple of months). Most problems have been due to the MQTT code implementation itself . But for most "simple" sensors it runs OK with Openhab.
@kunall the best recommendation against openhab for me was ugly interface and problems with running it (java). I was using domoticz since early version with own interface on arduino,now I've switched everything for MySensors.
It still lacks some functions but Inwait for further development as even programmers of domoticz start to use MyS hardware
@OldSurferDude use a host name for the broker in the configure command (--my-controller-url-address=). Add the host name to /etc/hosts on the rpi where the gateway is. Start the MySensors gatway.
When you want to switch brokers, modify /etc/hosts again and restart the MySensors gateway.
Thanks for your fast reply.
That sounds easy.
And you think that the communication between sensor nodes and Gateway are still possible via wired RS485?
I tried to find an example on this site for sending Information from Gateway to sensor nodes. (via SendMessage ?)
For example I like to Switch on/off an light that is connected to an relay board at my sensor node.
Communcation Flow:
OpenHab2 --> MQTT --> Gateway --> RS485 --> Sensor Node --> Relay Board
Currently I have an working RS485 Connection between my Arduino Uno's with the use from SoftwareSerial library.
During my testings I realized, that the message that I triy to send "Hello" will be sent to the other arduino char by char. Is that true?
Because I tried to raise up an pin on HIGH with "if(msg == "Hello")..." But it doesn't worked.
Will the sendMsg method from the MySensor library handle this out of the box?
Regards,
Simon
I have posted a question regarding what i think could be the fix to my issue over at: https://community.openhab.org/t/push-state-of-one-mqtt-topic-to-another/27597
Not sure if it will become of anything though. If anyone else has any experience with MQTT and openhab2 over here, then please be sure to shout a thought. It seems that not many people have got this sketch to work with openhab, google searches are bringing up posts from a year or two ago made on our forum here regarding this issue with no clear/simple solution.
wdt.h is included on Arduino IDE.
This example show how it's work:
#include <avr/wdt.h>
int counter=0;
void setup(){
wdt_disable();
Serial.begin(9600);
Serial.println("Starting...");
delay(1000);
wdt_enable(WDTO_8S);
}
void loop(){
wdt_reset();
Serial.println(counter);
counter++;
if(counter==5){
while(true){}
}
delay(500);
}```