Hi there
I have no experience with RFM69 chips and the libraries. I only played around a bit with ESP8266 for home automation.
Since the ESP8266 uses quite a lot of power for WIFI, I thought of something different.
I've got a bunch of RFM69 Chips lying around and want to use them as low power sensors for my MQTT enabled server.
The question is: Where to get started, especially what combination to use to get the data to the MQTT queue.
I've previously had problems getting the RFM69 library running on an ESP8266 (Wemos D1 Mini), so I'm not sure what
I should use for the gateway.
Can anyone maybe give me a hint where to get started or provide/point me at some code samples?
Thank you very much!
I'm also interested in this topic. My idea is to use Felix's Pi Gateway Dashboard on a Pi3 in addition to OpenHAB running on the same Pi. I would use a Moteino USB with the RFM69 transceiver married to it as the gateway. Then my sensor nodes around the house would be standard Moteinos also with RFM69. Under this scenario, I don't think MQTT is needed. I'm already using Felix's Gateway dashboard this way (no MQTT). For OpenHAB, I think I need to enable the Serial Binding and also ensure user "openhab" is allowed to access the USB port. In my case the USB port is ttyUSB0.
See note 4 in this link about the setup of Serial Binding. https://github.com/openhab/openhab/wiki/Serial-Binding (https://github.com/openhab/openhab/wiki/Serial-Binding)
I use a remote MQTT Broker in the Cloud with my Moteinos to record temperature and Humidity conditions in and outside to optimize my heating in the house.
Moteino Sensors ----------->>Wireless RFM69------------->>MoteinoUSB>>---->>Raspi--->>Node.Red Flows ------>>MQTT over Inet----->>Cloud MQTT Broker-->>Apps subscribed to Events
Moteino Actors <<-------Wireless RFM69-------------MoteinoUSB<<----Raspi---<<Node.Red Flows <<------MQTT over Inet<<------------Cloud MQTT Broker<<----Apps sending Commands
You could use Node.red to bridge Moteino Messages from or to the Devices with MQTT and connect to your local Broker like Mosquito. You could run the Broker also on the Pi.
My approach is that the Raspi has te logic to translate from and to MQTT (using Node.red or plain MQTT node.js libs). The Moteinos have their own internal logical protocol on top of RFM69 Lib.
If everything is local and only Moteino than MQTT would be overkill. But in my case I have subscribers outside my own network like an App on a mobile Phone which gets push messages from a server MQTT subscriber App when temperature is outside safe conditions. Also I have other sensors connected like Z->Wave where MQTT is the common communication layer so my MQTT broker is the central hub to all Home Automation actors sensors regardless of technology, and I could use the MQTT Hub from services like IFTTT. MQTT depends higly on the Use Cases.
+1 Interested in this topic. Following
Quote from: overlord on December 17, 2016, 04:13:45 AM
I use a remote MQTT Broker in the Cloud ..
Which one? I'm looking to find one that's good at both storing data and graphing it.
Did anyone find people that actually tried/did this?
You might want to look at MySensors (https://www.mysensors.org/). It's compatible with lots of software automation packages, MQTT, RFM and NRF radios, and works fine with Moteinos. There are lots of topics in their forum about using MQTT for sensor messages. The LowPowerLab code examples generally lower level - which can be better but requires more work on the user end. The reason I suggest MySensors is that converting radio messages to MQTT should be straight forward (build gateway with an internet connection and a radio, convert radio data to MQTT) but if it doesn't seem that way, MySensors already does this for you so it might be a good option.
I'm not looking for readymade stuff, and I don't mind if it's low level. The problem is not the conversion to MQTT messages but getting the library to run on a Wemos D1 Mini/ESP8266 so I can directly connect the
RFM69
Quotegetting the library to run on a Wemos D1 Mini/ESP8266 so I can directly connect the
RFM69
This is really simple. Just wire up the RFM69 SPI to the HSPI pins on the ESP8266, use e.g. GPIO4 for DIO0, done.
I had a problem during compile time because there was something missing on the Wemos. But have to try again.
What I came across is also that the RFM69 cannot use 5V on the inputs, won't this be a problem with the wiring you explained?
QuoteI had a problem during compile time because there was something missing on the Wemos. But have to try again.
When I tried this to my amazement really the only change necessary was to tell RFM69 to pick the right irq number and gpio pin for your DIO0 wiring.
QuoteWhat I came across is also that the RFM69 cannot use 5V on the inputs, won't this be a problem with the wiring you explained?
In all boards I know - certainly the ones I make - the esp8266 runs at most at 3.3V.
Thanks, I will give it another try tomorrow
Somehow the example compiled now:
https://gist.github.com/solars/06e840148a2d2b8af8674386901b1b53
Is this wiring correct for the Wemos D1 Mini (http://escapequotes.net/wp-content/uploads/2016/02/d1-mini-esp8266-board-sh_fixled.jpg)
RFM - Wemos
MISO > D6
MOSI > D7
NSS > D8
SCK > D5
DI00 > D2
I'm unsure how to adapte the sample code to match this
That's the correct wiring. Now just define the Irq and dio0 pins for rfm69. Just look at the source how that's done.
Thanks
I tried with the following now: https://gist.github.com/solars/59f82edd63b0c035f46b34bae298f4be
(D2 is input 4) but I did not find any information on IRQN for the D1 Mini