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.
Although it should not be too difficult to make the MQTT Gateway with WiFi work on hardware and software level it is a bad idea on system level:
WiFi and MySensensor NRF24L01+ use the same 2.4 GHz band and with the antennas close a transmit from one will block the other and vice-versa.
I can nothing say about OpenHAB or PiDome but:
Started!
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
0;0;3;0;9;version mismatch
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
0;0;3;0;9;version mismatch
Does not look good, it seems an error from the gateway.
After more investigations I believe the problem is caused by a mqtt server connection timeout.
By default the gateway tries to send the radio message 5 times. If I lower the number of retries , 2 for example, no more loop. Probably now much more then 25 messages cause a loop.
For testing I added _MQTT_client.loop() in transportSendWrite() (MyTransport.cpp) and, no more loop with default 5 retries.
@scurb This looks very interesting and my factor now to save me from having to create my own :-). I have been planning to do the same thing (although maybe on a smaller software scale) by writing a simple Python server that would pull serial packets off of a gateway arduino (either running mysensors or something I write myself) and pipe this through MQTT to openHAB. I have two questions:
How do you interface with a sensor network? Do you go through a serial connection to read the serial packet format (a,b,c,d)? I see several implementations that put the mqtt client directly on the Arduino, but it seems much cheaper for me to just plug it into a USB port to get a virtual serial port instead of investing in a separate ethernet shield
How does an item configurations look like for a switch in openHAB? I'm looking to build a toggle switch which toggles light on or off every time it is activated, and I cannot really understand how to configure the switch to allow this behaviour for an mqtt input.
Feel free to take the second question with me directly since this might not be very interesting to the others in the forum
I am not able to install the Library . I am getting Error
Invalid library found in C:\Documents and Settings\User\My Documents\Arduino\libraries\ESP8266MQTTMesh: C:\Documents and Settings\User\My Documents\Arduino\libraries\ESP8266MQTTMesh.
I changed the name of the zipped file to ESP8266MQTTMesh as the name of .cpp file ESP8266MQTTMesh.cpp. Still it is saying Invalid Library found in ....
What could be the problem.