RFM to MQTT

This is an interesting read - https://harizanov.com/2015/11/rfm69-to-mqtt-gateway-using-esp8266/
I seem to recall that Martin designed the original RFM2Pi module, and this development appears to open all sorts of opportunities.

Paul

Bill Thomson's picture

Re: RFM to MQTT

After reading Martin's article, I posted a comment on his page asking him:
I’d like to make a suggestion based on some user feedback I’ve seen on the OpenEnergyMonitor forum. When an OEM user runs more than one RF link, sometimes they lose data because of packet collisions. The idea I had in mind was to have the RFM69 receiver listen before transmitting. Something similar to the way Ethernet collision detection works. From as simple as detecting a carrier, to as sophisticated as detecting data. Is this a function that’s already present? If not, is it possible to incorporate it into the RFM69 code?

To which Martin replied:
Interesting, can you point me to that discussion? Generally it shouldn’t be a problem if the remote node requires ACK, as it will resend in case of non receipt. The RFM69 is capable of monitoring RSSI, in theory it could wait for the air to clear before transmission, but that would include buffering the packets and more complex handling. Also, what are the chances that a 30ms transmission that happens every 5min for example collides with another one?If packet loss is a problem, a dual gateway could be considered, one for incoming and the other for outgoing transmissions.

Another user commented:
The LowPowerLab driver implements CSMA (Carrier Sense Multiple Access) [https://github.com/LowPowerLab/RFM69/blob/master/RFM69.cpp#L210]. It does not however implement Collision Avoidance (CSMA/CA) needed to prevent nodes B and C from colliding once they both detect node A has stopped transmitting. Even if you only have a few nodes in your OEM system your home security system will cause disturbance at 868MHz, as well as your neighbors and so on. CSMA/CA and ACKs are crucial for a reliable RF-link. (emphasis mine)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.