Thanks for this very concise video! I am using ESP32+ Lora Ra-02 (RFM95 radio) for an WIFI&MQTT Gateway with Home assistant (Hassio on an R-pi). Mysensors works really well! Its a fully working RF tree network with many options including RF repeating for extended range. My first sensor Node is a Arduino Pro-mini (3.3V) with the Mysensors Door/Button Sketch and the RFM95 radio selected. The AI Thinker RA-02 (Lora Radio) works very well on 434MHz. Tips: 1) Make sure your radio pins config is correct. 2) Make sure your Arduino is the correct voltage for your radio (3.3/5V) 3) Use the examples 4) keep track of all your configs and dependencies! 5) Some Arduino sketches use external libs 6) If you use the 433/868MHz radios, use an RTLSDR radio (with SDR software like HDSDR) to monitor off-air the radio bursts. 7) Experiment with antennas for increased range.
Hi P, that sounds great! Thanks for providing your project, if you want to share it also to our Elektor community in our Labs network, www.elektormagazine.com/labs?q=lora, feel free to do so. We are always curious about new electronics technology projects. ;)
Hello P, your project is great . I am a lot interested. Could you please share the schematics and the software ( ESP32 Gateway , gateway integration in Hassio and sktech for your sensor) ? Thanks a lot. JC from France
@@kanumera06 Gate way: //887 //Hardware: ESP32 ESP-Vroom-32 board: Dev Kit modual 1.0.4 and AI Thinker RA-02 (433MHZ LoRa) Mysensors: 2.3.2 /* * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad * Copyright (C) 2013-2019 Sensnology AB * Full contributor list: github.com/mysensors/MySensors/graphs/contributors * * Documentation: www.mysensors.org * Support Forum: forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - tekka * * DESCRIPTION * The ESP32 gateway sends data received from sensors to the WiFi link. * The gateway also accepts input on ethernet interface, which is then sent out to the radio network. * * Make sure to fill in your ssid and WiFi password below. */ // Enable debug prints to serial monitor #define MY_DEBUG #define MY_SPECIAL_DEBUG #define MY_DEBUG_VERBOSE #define MY_TRANSPORT_SANITY_CHECK #define MY_SIGNAL_REPORT_ENABLED #define MY_RFM95_ATC_MODE_DISABLED//for max TX power #define MY_DEBUG_VERBOSE_RFM95 //#define MY_DEBUG_VERBOSE_RFM95_REGISTERS //--------------------------------------------------------------------------------------------------------------------- // LORA Radio CONFIG - Modules: RA-02, HPD14A, Rfm98 - All 433 MHz //--------------------------------------------------------------------------------------------------------------------- //www.mysensors.org/apidocs/group__RFM95SettingGrpPub.html#gae2ce44111f1addacd3c997b153b38641 //docs.google.com/spreadsheets/d/1voGAtQAjC1qBmaVuP1ApNKs1ekgUjavHuVQIXyYSvNc //ua-cam.com/video/RwMASJiN7uA/v-deo.html #define MY_RADIO_RFM95// use this for Modules: RA-02, HPD14A, Rfm98 - All 433 MHz //#define MY_RFM95_ATC_TARGET_RSSI (-70) // target RSSI -70dBm //#define MY_RFM95_MAX_POWER_LEVEL_DBM (20) // max. TX power 10dBm = 10mW //#define MY_TRANSPORT_STATE_TIMEOUT_MS (3*1000ul)//increase for slower spreading factor phy //#define RFM95_RETRY_TIMEOUT_MS (3000ul) #define MY_RFM95_FREQUENCY 433225000ul //------------------------------------------------------------ //Frequency selection: Local (Cape Town) LoRa (125 khz) 433 mhz seporate ISM band channels //channel Frequency (MHz) //1 433.100 //2 433.225 - MY SELECTED FREQUENCY //3 433.350 //4 433.475 //5 433.600 //6 433.725 //7 433.850 not used (ISM too close to noise on 433.920) //8 433.975 not used (ISM too close to noise on 433.920) //9 434.100 //10 434.225 //11 434.350 //12 434.475 //13 434.600 not used (local ham repeater(cape town)) //14 434.725 //----------------------------------------------------------- //#define MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW125CR45SF128) //- This is the default //Other settings: all radio must be the same!, carefully select the best frequency (above) is you change to a different bandwidth! // BW125CR45SF128 Default, medium range 50ms // BW500CR45SF128 Fast, short range 15ms // BW31_25CR48SF512 Slow, long range 900ms // BW125CR48SF4096 Slow, long range 1500ms //Module Pins #define MY_RFM95_IRQ_PIN 2 //on my old Open MQTT Gateway ESP32 board #define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN //wireup - RA-02/hpd14A/Rfm98 to ESP32 --------- Careful of the module voltages! 3.3 V // ESP32 RA-02/hpd14A/Rfm98 modules //----------- ------------------------- //D15 (GPIO15) CS/NSS NSS //D13 (GPIO13) MOSI MOSI //D12 (GPIO12) MISO MISO //D14 (GPIO14) CLK SCK //D2 (GPIO 2) IRQ DIO0 // GND GND // 3.3V +3.3V //-------------------------------------------------------------------------------------------------------------------- #define MY_GATEWAY_MQTT_CLIENT #define MY_GATEWAY_ESP32 // 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"//add hassio device ID here and setup topics for hassio properly // Enable these if your MQTT broker requires usenrame/password #define MY_MQTT_USER "gemini" #define MY_MQTT_PASSWORD "password1" ///no LWT setup! // Set WIFI SSID and password #define MY_WIFI_SSID "Gemini" #define MY_WIFI_PASSWORD "A850F3619G" // Set the hostname for the WiFi Client. This is the hostname // passed to the DHCP server if not static. #define MY_HOSTNAME "887" // 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 192, 168, 88, 249 // The MQTT broker port to to open #define MY_PORT 1883 #include void setup() { // Setup locally attached sensors } void presentation() { // Present locally attached sensors here } void loop() { // Send locally attech sensors data here }
Hi, nice video but got a question. I have a self built mysensors-based component that sends temp, hum data from a sensor connected to an arduino with RF24 radio. I used so far openHAB where the mysensors my-gateway was listening and was communication via MQTT to the mosquitto to send the measurements. In your video you mentioned there was no HomeAssistant add-on. So my question is, how did you make this work?
How much range are you getting from nRF24L01+? I'm using MySensors library with two of these modules with the best optimal settings: PA_MAX, 250KBPS (for longer range), CHANNEL 108 (2.508GHz) which is within the lowest interference zone. Tested with a maximum of 50 feet (15 meters) in open area. And in indoor, it can barely pass through one wall (drywall). Are you getting a better result with these RF24 modules? If so, please let me know your settings.
What you are seeing sounds familiar. You can buy nRF24 modules with power amplifiers to improve the range. But more power means, of course, shorter battery life :-(.
I have Home assistant installed on my RPI3 (Model B). How should I integrate the serial gateway and the HA together ? Should I plug the serial gateway into one of the RPI3 ports and edit the yaml file ?
Hello I am trying to show up my node in HA but no results. I am trying to follow your tutorial but it's not so clear. Can you address me a place where this is explained clearly in a step by step type of process? I am ot familiar wih YAML
This was very helpful in making the setup less daunting. They have made it even easier in Home Assistant now, and I have my first node set up!
Super super handy. I'm building a pool management system at the moment and this looks to solve a key problem.
I wasn't aware that these existed. Great content.
Can we please get an update, many things have changed since 2 years and I have the feeling the process since then is simplified.
Thanks for this very concise video! I am using ESP32+ Lora Ra-02 (RFM95 radio) for an WIFI&MQTT Gateway with Home assistant (Hassio on an R-pi). Mysensors works really well! Its a fully working RF tree network with many options including RF repeating for extended range. My first sensor Node is a Arduino Pro-mini (3.3V) with the Mysensors Door/Button Sketch and the RFM95 radio selected.
The AI Thinker RA-02 (Lora Radio) works very well on 434MHz.
Tips:
1) Make sure your radio pins config is correct.
2) Make sure your Arduino is the correct voltage for your radio (3.3/5V)
3) Use the examples
4) keep track of all your configs and dependencies!
5) Some Arduino sketches use external libs
6) If you use the 433/868MHz radios, use an RTLSDR radio (with SDR software like HDSDR) to monitor off-air the radio bursts.
7) Experiment with antennas for increased range.
Hi P, that sounds great! Thanks for providing your project, if you want to share it also to our Elektor community in our Labs network, www.elektormagazine.com/labs?q=lora, feel free to do so. We are always curious about new electronics technology projects. ;)
Hello P, your project is great . I am a lot interested. Could you please share the schematics and the software ( ESP32 Gateway , gateway integration in Hassio and sktech for your sensor) ? Thanks a lot. JC from France
@@kanumera06 Gate way:
//887
//Hardware: ESP32 ESP-Vroom-32 board: Dev Kit modual 1.0.4 and AI Thinker RA-02 (433MHZ LoRa) Mysensors: 2.3.2
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad
* Copyright (C) 2013-2019 Sensnology AB
* Full contributor list: github.com/mysensors/MySensors/graphs/contributors
*
* Documentation: www.mysensors.org
* Support Forum: forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - tekka
*
* DESCRIPTION
* The ESP32 gateway sends data received from sensors to the WiFi link.
* The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
*
* Make sure to fill in your ssid and WiFi password below.
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
#define MY_SPECIAL_DEBUG
#define MY_DEBUG_VERBOSE
#define MY_TRANSPORT_SANITY_CHECK
#define MY_SIGNAL_REPORT_ENABLED
#define MY_RFM95_ATC_MODE_DISABLED//for max TX power
#define MY_DEBUG_VERBOSE_RFM95
//#define MY_DEBUG_VERBOSE_RFM95_REGISTERS
//---------------------------------------------------------------------------------------------------------------------
// LORA Radio CONFIG - Modules: RA-02, HPD14A, Rfm98 - All 433 MHz
//---------------------------------------------------------------------------------------------------------------------
//www.mysensors.org/apidocs/group__RFM95SettingGrpPub.html#gae2ce44111f1addacd3c997b153b38641
//docs.google.com/spreadsheets/d/1voGAtQAjC1qBmaVuP1ApNKs1ekgUjavHuVQIXyYSvNc
//ua-cam.com/video/RwMASJiN7uA/v-deo.html
#define MY_RADIO_RFM95// use this for Modules: RA-02, HPD14A, Rfm98 - All 433 MHz
//#define MY_RFM95_ATC_TARGET_RSSI (-70) // target RSSI -70dBm
//#define MY_RFM95_MAX_POWER_LEVEL_DBM (20) // max. TX power 10dBm = 10mW
//#define MY_TRANSPORT_STATE_TIMEOUT_MS (3*1000ul)//increase for slower spreading factor phy
//#define RFM95_RETRY_TIMEOUT_MS (3000ul)
#define MY_RFM95_FREQUENCY 433225000ul
//------------------------------------------------------------
//Frequency selection: Local (Cape Town) LoRa (125 khz) 433 mhz seporate ISM band channels
//channel Frequency (MHz)
//1 433.100
//2 433.225 - MY SELECTED FREQUENCY
//3 433.350
//4 433.475
//5 433.600
//6 433.725
//7 433.850 not used (ISM too close to noise on 433.920)
//8 433.975 not used (ISM too close to noise on 433.920)
//9 434.100
//10 434.225
//11 434.350
//12 434.475
//13 434.600 not used (local ham repeater(cape town))
//14 434.725
//-----------------------------------------------------------
//#define MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW125CR45SF128) //- This is the default
//Other settings: all radio must be the same!, carefully select the best frequency (above) is you change to a different bandwidth!
// BW125CR45SF128 Default, medium range 50ms
// BW500CR45SF128 Fast, short range 15ms
// BW31_25CR48SF512 Slow, long range 900ms
// BW125CR48SF4096 Slow, long range 1500ms
//Module Pins
#define MY_RFM95_IRQ_PIN 2 //on my old Open MQTT Gateway ESP32 board
#define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
//wireup - RA-02/hpd14A/Rfm98 to ESP32 --------- Careful of the module voltages! 3.3 V
// ESP32 RA-02/hpd14A/Rfm98 modules
//----------- -------------------------
//D15 (GPIO15) CS/NSS NSS
//D13 (GPIO13) MOSI MOSI
//D12 (GPIO12) MISO MISO
//D14 (GPIO14) CLK SCK
//D2 (GPIO 2) IRQ DIO0
// GND GND
// 3.3V +3.3V
//--------------------------------------------------------------------------------------------------------------------
#define MY_GATEWAY_MQTT_CLIENT
#define MY_GATEWAY_ESP32
// 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"//add hassio device ID here and setup topics for hassio properly
// Enable these if your MQTT broker requires usenrame/password
#define MY_MQTT_USER "gemini"
#define MY_MQTT_PASSWORD "password1"
///no LWT setup!
// Set WIFI SSID and password
#define MY_WIFI_SSID "Gemini"
#define MY_WIFI_PASSWORD "A850F3619G"
// Set the hostname for the WiFi Client. This is the hostname
// passed to the DHCP server if not static.
#define MY_HOSTNAME "887"
// 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 192, 168, 88, 249
// The MQTT broker port to to open
#define MY_PORT 1883
#include
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attech sensors data here
}
@@kanumera06 The link you want is mentioned in the video description: www.elektormagazine.com/labs/mysensors-home-assistant-howto
Have you any information on how to use the micro:bit instead for this?
Hi, nice video but got a question.
I have a self built mysensors-based component that sends temp, hum data from a sensor connected to an arduino with RF24 radio.
I used so far openHAB where the mysensors my-gateway was listening and was communication via MQTT to the mosquitto to send the measurements.
In your video you mentioned there was no HomeAssistant add-on. So my question is, how did you make this work?
See this page, section Integrating MySensors: www.elektormagazine.com/labs/mysensors-home-assistant-howto
How much range are you getting from nRF24L01+? I'm using MySensors library with two of these modules with the best optimal settings: PA_MAX, 250KBPS (for longer range), CHANNEL 108 (2.508GHz) which is within the lowest interference zone. Tested with a maximum of 50 feet (15 meters) in open area. And in indoor, it can barely pass through one wall (drywall). Are you getting a better result with these RF24 modules? If so, please let me know your settings.
What you are seeing sounds familiar. You can buy nRF24 modules with power amplifiers to improve the range. But more power means, of course, shorter battery life :-(.
In the wrapping up part you state "Programming and soldering is limited to a MAXIMUM"? I suppose you mean MINIMUM, correct?
Yes, sorry for mixing "Limited a maximum" and "limited to a minimum"
I have Home assistant installed on my RPI3 (Model B). How should I integrate the serial gateway and the HA together ? Should I plug the serial gateway into one of the RPI3 ports and edit the yaml file ?
Yes. Here is a discussion about it: forum.mysensors.org/topic/10718/need-help-with-hass-io-and-serial-gateway
Thank you.
Hello I am trying to show up my node in HA but no results. I am trying to follow your tutorial but it's not so clear. Can you address me a place where this is explained clearly in a step by step type of process? I am ot familiar wih YAML
A text version is here: www.elektormagazine.com/labs/mysensors-home-assistant-howto
@@ElektorTV thanks, I bookmarked it and I will try to use this text version to make it work as it should.