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.
@Eric-Buhring I found that changing the line in the my sensors program that sends the message as below allowed me to use a Contact rather than a Switch
if (value != sentValue2) {
// Value has changed from last transmission, send the updated value
send(msg2.set(value==HIGH?"OPEN":"CLOSED"));
sentValue2 = value;
}
Hi,
for everyone who reads all of this, forget about the last few posts.
I don't know why it works even when the Interrups are masked out on the radio, but it works now.
The error I had occured because of the config of the OrangePi-Gateway.
I removed:
--extra-cxxflags="-DMY_RF24_DATARATE=\(RF24_250KBPS\) -DMY_RF24_BASE_RADIO_ID=\(0x00,0xFC,0xE1,0xA8,0xA8\) -DMY_DEBUG_VERBOSE_RF24"
and wrote:
--extra-cxxflags="-DMY_RF24_DATARATE=\(RF24_250KBPS\) -DMY_DEBUG_VERBOSE_RF24"
Now I think I have an working OrangePi-Gateway without signing but with interrupt enabled.
If there are new problems I will come back here.
The next step for me is to activate signing again and bring the node into homeassistant.
And be aware of this thread where the ENC module is hanging after a while..
http://forum.mysensors.org/topic/536/problems-with-enc28j60-losing-connection-freezing-using-uipethernet-or-ethershield-read-this
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.
I think that:
It does overlap with MySensors for the wireless network. MQTT-SN assumes a network that provides a bi-directional data transfer service between any node and a particular one (a gateway). MySensors wireless network could provide data transfer but the message are really tailored to transport sensor and actuator values.
MQTT-SN for the gateway - controller interface is not needed MQTT is for that more than fine
That said I like the idea of MQTT-SN but for it a "transparent network" makes more sense.