Today ordered some parts for this project. I'm now using the NRF024 radio modules but have range issues. There are a lot of dead spots in my house, could be because I have concrete floors and walls. Also there are a lot of fake NRF modules arround,so changes are I have them also. The RFM69 does look better using the 868 Mhz band and not being copied so much.
My plan is to use a 3.3V/8Mhz Arduino Pro Micro as USB gateway on my Domoticz system, this module has the USB port build in and works on 3.3V so no level shifting is needed. Did read that it might be a challenge to get this module working, it has the mega32U4 micocontroller. Maybe there are others who also want to use the Pro Micro so I will post updates in this topic. Waiting for the parts now.
Rolo6442u
@Rolo6442u
Best posts made by Rolo6442u
-
Start with RFM69 radio module and Arduino Pro Micro as gateway
-
RE: Converting a sketch from 1.5.x to 2.0.x
@Anticimex
@scalz
Thanks, I got it working. By setting it to "soft" this sketch writes all key's to eeprom and will not look for a hardware siging module. The RFM69 uses the EAS key for encryption. I defined my own key again in the sketch.
Nice solution ! -
RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)
For comparison, I have a MQTT Gateway running on a Wemos D1 for 2 months now, with a RFM69W. Works perfect. Here is my hardware setup and code, maybe it is of any help to you. Change the networkid, MQTT broker and wifi credentials to your own setup. I use static ID's on my nodes.
// Enable debug prints to serial monitor #define MY_DEBUG // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 // Enables and select radio type (if attached) #define MY_RADIO_RFM69 //#define MY_IS_RFM69HW #define MY_RFM69_NETWORKID 83 // Own network ID, mysensors default is 100 #define MY_GATEWAY_MQTT_CLIENT #define MY_GATEWAY_ESP8266 // Set this node's subscribe and publish topic prefix #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in" // Set MQTT client id #define MY_MQTT_CLIENT_ID "mysensors-1" // Enable these if your MQTT broker requires username/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password" // Set WIFI SSID and password #define MY_WIFI_SSID "xxxxxxx" #define MY_WIFI_PASSWORD "xxxxxxxx" // Set the hostname for the WiFi Client. This is the hostname // passed to the DHCP server if not static. #define MY_HOSTNAME "ESP8266_MQTT_GW" // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP) //#define MY_IP_ADDRESS 192,168,178,87 // If using static ip you can define Gateway and Subnet address as well //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0 // MQTT broker ip address. #define MY_CONTROLLER_IP_ADDRESS 10, 0, 0, 47 //MQTT broker if using URL instead of ip address. // #define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org" // The MQTT broker port to to open #define MY_PORT 1883 // Enable inclusion mode //#define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) //#define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN D1 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err #define MY_DEFAULT_ERR_LED_PIN D4 // Red #define MY_DEFAULT_TX_LED_PIN D3 // Yellow #define MY_DEFAULT_RX_LED_PIN D2 // Green #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors here } void loop() { // Send locally attached sensors data here }
-
RE: Start with RFM69 radio module and Arduino Pro Micro as gateway
Yes, a Nano would do but then I would need level shifting, the RFM69 is not 5V tolerant. And the 3.3V output on the Nano comes from the usb-serial chip (the CH340) and is not a good powersupply, so an extra 3.3V low drop regulater is needed. With the Pro Micro I would need less parts, has full 3.3V design and the unit will be smaller, although size is not really an issue. And it's fun to see if I can get it working.
-
RE: 💬 Building a Raspberry Pi Gateway
Hi, just build an Ethernet gateway on a raspberry pi B+ following the instructions on this site. And it works! I'm running raspbian stretch lite and used the master branch. No issues. I use the RFM69 radio and this gateway has the HW model. I did have to update al my nodes to use the new RFM69 drivers but that was clearly mentioned in the article.
I have two questions:- In this section :
log_pipe=0 log_pipe_file=/tmp/mysgw.pipe
Is this correct, I think there should be a 1 to enable this type of logging.
- When a new version of mysensors is released, how do I update the gateway version on the raspberry pi?
And here is a picture of my work:
Thanks for the effort you put into this project!
-
RE: 💬 Building a Raspberry Pi Gateway
@kted Can you give me a pointer to the details of this issue? I'm willing to do some tests and report back my findings. Some info about my configuration, I have 5 nodes at this moment, all battery feeded, they are sending only nodes. They all work but they have a interval of several minutes between sending. The gateway is connected to Domoticz running on another Raspberry PI.
Latest posts made by Rolo6442u
-
RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)
For comparison, I have a MQTT Gateway running on a Wemos D1 for 2 months now, with a RFM69W. Works perfect. Here is my hardware setup and code, maybe it is of any help to you. Change the networkid, MQTT broker and wifi credentials to your own setup. I use static ID's on my nodes.
// Enable debug prints to serial monitor #define MY_DEBUG // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h #define MY_BAUD_RATE 9600 // Enables and select radio type (if attached) #define MY_RADIO_RFM69 //#define MY_IS_RFM69HW #define MY_RFM69_NETWORKID 83 // Own network ID, mysensors default is 100 #define MY_GATEWAY_MQTT_CLIENT #define MY_GATEWAY_ESP8266 // Set this node's subscribe and publish topic prefix #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out" #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in" // Set MQTT client id #define MY_MQTT_CLIENT_ID "mysensors-1" // Enable these if your MQTT broker requires username/password //#define MY_MQTT_USER "username" //#define MY_MQTT_PASSWORD "password" // Set WIFI SSID and password #define MY_WIFI_SSID "xxxxxxx" #define MY_WIFI_PASSWORD "xxxxxxxx" // Set the hostname for the WiFi Client. This is the hostname // passed to the DHCP server if not static. #define MY_HOSTNAME "ESP8266_MQTT_GW" // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP) //#define MY_IP_ADDRESS 192,168,178,87 // If using static ip you can define Gateway and Subnet address as well //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0 // MQTT broker ip address. #define MY_CONTROLLER_IP_ADDRESS 10, 0, 0, 47 //MQTT broker if using URL instead of ip address. // #define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org" // The MQTT broker port to to open #define MY_PORT 1883 // Enable inclusion mode //#define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) //#define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN D1 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err #define MY_DEFAULT_ERR_LED_PIN D4 // Red #define MY_DEFAULT_TX_LED_PIN D3 // Yellow #define MY_DEFAULT_RX_LED_PIN D2 // Green #include <MySensors.h> void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors here } void loop() { // Send locally attached sensors data here }
-
RE: 💬 Building a Raspberry Pi Gateway
@mfalkvidd
Thanks, will take a look at that. -
RE: 💬 Building a Raspberry Pi Gateway
@mfalkvidd
I did not found it, I kind of made it up, following the syntax of other options.
Looks like there is no way of changing the ID at this moment for the PI gateway. -
RE: 💬 Building a Raspberry Pi Gateway
I want to run this gateway with another networkid (RFM69) but can't find how to do this. The option --my-rfm69-networkid=105 in the config line is ignored. So maybe it should go in the mysensnsors.conf file, but what is the syntax of this option?
Thanks. -
RE: 💬 Various bootloader files based on Optiboot 6.2
Found these bootloaders and using the 1MHz for some low power experiments. I did get this error message when burning the bootloader (using USBASP programmer) :
"avrdude: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xfd instead of 0x05 (double check with your datasheet first)."
The bootloader woas succesfully burned so the message was informational. I did look into this and made the following changes in boards.txt :
I changed all the lines containing "......bootloader.extended_fuses="
There are multiples sections in the file that have these lines.old value -> new value
0x04 0xFC
0x05 0xFD
0x06 0xFE
0x07 0xFFI used this site link text
for calculating the new values for the extended fuse.
Now the error message is gone. Maybe this is of any help when using these bootloaders. -
RE: 💬 Building a Raspberry Pi Gateway
Did some tests and I do see the TX power climbing to 100% after a few transmits :
-42 :transportGetReceivingRSSI() 127 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 6 :transportGetTxPowerLevel() 77 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI) -46 :transportGetReceivingRSSI() -102 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 7 :transportGetTxPowerLevel() 80 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI) -47 :transportGetReceivingRSSI() -102 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 10 :transportGetTxPowerLevel() 90 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI) -47 :transportGetReceivingRSSI() -105 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 11 :transportGetTxPowerLevel() 93 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI) -47 :transportGetReceivingRSSI() -103 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 13 :transportGetTxPowerLevel() 100 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI) -47 :transportGetReceivingRSSI() -106 :transportGetSendingRSSI() -256 :transportGetReceivingSNR() -256 :transportGetSendingSNR() 13 :transportGetTxPowerLevel() 100 :transportGetTxPowerPercent() 0 :transportInternalToRSSI(_transportSM.uplinkQualityRSSI)
Not sure if this has a great impact on battery life, depends on how often the node sends a message. Al my nodes have an interval of about 10 minutes. I leave the gateway running for now. Having it running on this PI is a great advantage for me. Will try to do some current measurement on this node and calculate what the impact is on battery life.
-
RE: 💬 Building a Raspberry Pi Gateway
@kted I wil do some tests to check if I see this behavior. Just build a simple test node with a pushbutton, on 2 AA batteries. This node has the low power W radio module. How did you discover/measure that the max TX power was used?
-
RE: 💬 Building a Raspberry Pi Gateway
@kted Can you give me a pointer to the details of this issue? I'm willing to do some tests and report back my findings. Some info about my configuration, I have 5 nodes at this moment, all battery feeded, they are sending only nodes. They all work but they have a interval of several minutes between sending. The gateway is connected to Domoticz running on another Raspberry PI.
-
RE: 💬 Building a Raspberry Pi Gateway
Hi, just build an Ethernet gateway on a raspberry pi B+ following the instructions on this site. And it works! I'm running raspbian stretch lite and used the master branch. No issues. I use the RFM69 radio and this gateway has the HW model. I did have to update al my nodes to use the new RFM69 drivers but that was clearly mentioned in the article.
I have two questions:- In this section :
log_pipe=0 log_pipe_file=/tmp/mysgw.pipe
Is this correct, I think there should be a 1 to enable this type of logging.
- When a new version of mysensors is released, how do I update the gateway version on the raspberry pi?
And here is a picture of my work:
Thanks for the effort you put into this project!