Is there anyone using MQTT as gateway for connecting to openHab running on another Rpi. If so please help with any links, post or any information to direct me on the right path.
@nrf24_is_hard When I sent data between an Aduino and the RPi I discovered that I have to make the the receiving and the sending structs the same size AND the variables be on 4 byte boundaries. Change your char name[15] to char name[16]
Another challenge is that the number of bytes of type int are different. If I remember correctly, Arduino Uno is 2 bytes and RPi is 4 bytes.
To make matters worse, some compilers make the least significant byte the first byte of a word and others make it the last byte of a word. eg, sending the value 1 would be received as 16777216 (0x00000001 vs 0x01000000)
There are a lot more gotcha's
OSD
Just one final question... is the approach to MQTT correct or should I stick with simple Ethernet? I was planning on using OpenHab or Home Assistant.
Thank You all