@mfalkvidd Hi. My system here is using a RPI4B running Domoticz, one 433MHz RFXCom gateway and one 2.4 gHz ESP8266 WIFI gateway. I know I can add a 915MHz gateway, but could I add another 2.4G gateway? (I mean a nRF24l01 based system, or are there other radios MySensors uses for that frequency?). If this is possible, why would someone want it?...and how would the two gateways differentiate the traffic? Obviously, I'm not a radio guy.

Posts made by dpcons
-
RE: MQTT-Help me understand about the MQTT Gateway.
-
RE: MQTT-Help me understand about the MQTT Gateway.
@OldSurferDude Thanks for the reply. So you're going straight to the MQTT broker itself and basically bypassing a gateway? I'm using My Sensors and Domoticz and I like them. I see Domiticz is compatible with Tasmota. I'll have to do some research.
Thanks much -
RE: MQTT-Help me understand about the MQTT Gateway.
@mfalkvidd Sorry, I guess I'm dense. I didn't think you necessarily needed a radio connected to the MQTT gateway. I thought the MQTT gateway was to be used in addition to the other gateways in the system, and used to send data to the broker. If that's not the case, is there a point to having one, if I already have an esp8266 WIFI gateway with a nRF24L01. If a radio is required on the MQTT, does that mean another nRF24L01 can be connected to the system? Is that possible? I guess what you're saying is that you only need one 2.4G network, be it wifi, mqtt or serial. True?
Again thanks. -
RE: Getting system time from the controller
@mfalkvidd Thanks, I'll try that.
-
MQTT-Help me understand about the MQTT Gateway.
Th purpose of the mqtt gateway with an NRF24L01 is, I assume , to collect data from RF based sensors and pass the data through to controller. In my situation, I create a temperature node using an esp8266 and a nRF24L01. The MQTT gateway handles the data just like any other gateway. Goes anyone have an example of a sensor node that posts a mqtt message to the gateway? The GatewayESP8266MQTTClient.ino example doesn't show me much. Sorry to be a pain. just saying...
-
RE: Getting system time from the controller
@dpcons I built the Time Display example and after a little futzing, I got it to talk to my NRF24L01 system but the receiveTimez() function looks broken. It appears to respond with data that's read, but function never executes.
Looks like I'll punt for now. -
RE: Getting system time from the controller
@mfalkvidd Thanks for the response. I once built the 'Display and Time' sensor and I remember it working...but that was about 3-4 years ago and I no longer have the device. Maybe I build it back up again and give it a shot!
-
RE: Getting system time from the controller
@nagelc Thanks for responding. The response from the controller seems to be very quick. The problem is the 'receiveTime' routine never gets executed. mfalkvidd stated that the response in the serial output looked reasonable so I'm assuming the controller is responding OK. I tried adding the delay(1500) but same issue.
Again, thanks for your response. -
RE: Getting system time from the controller
@dpcons sorry...esp8266 wemos mini is the actual device.
-
RE: Getting system time from the controller
@mfalkvidd
Thanks for your response. Yes, that's the question. Did I neglect something in my code? Do I have to register the "receiveTime" routine? Is there any workaround to use the response data? This node is an ESP32 D1 mini...if that makes a difference. Does the operation depend on an interrupt?
Again, thanks -
Getting system time from the controller
Just starting on a scene controller, which I intend to use to display temperatures from a mysensors sensor unit connected to my fridge. Right now I just trying to get the system time using "requestTime()" function.
The system is communicating OK, I think. When I send the command, the "receiveTime() function never gets executed. Should I see this time request in the log??Here's the serial debug info: I don't get any error executing the requestTime() function
requesting time
450046 TSF:MSG:SEND,6-6-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
450375 TSF:MSG:READ,0-0-6,s=255,c=3,t=1,pt=0,l=10,sg=0:1740594416 ****What's this?The code follows: Anybody see any issues? Thanks for looking.
/*
Scene Controller Will be used to receive my Fridge and Freezer Temps and display on a MAX7917 7-Seg
8 Character display.
*/// Enable debug prints to serial monitor
#define MY_DEBUG// Enable and select radio type attached
#define MY_RADIO_RF24
//#define MY_RADIO_RFM69#include <TimeLib.h>
#include <SPI.h>
#include <MySensors.h>
#include <stdarg.h>#define CHILD_ID 1
MyMessage on(CHILD_ID, V_SCENE_ON);
MyMessage off(CHILD_ID, V_SCENE_OFF);bool timeReceived = false;
unsigned long lastTimeUpdate=0, lastRequest=0;
char timeBuf[20];void setup()
{
// Request time from controller.
requestTime();
}void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Fridge Temp Displays", "1.0");
present(CHILD_ID, S_SCENE_CONTROLLER);
}void loop()
{
unsigned long now = millis();
// If no time has been received yet, request it every 10 second from controller
// When time has been received, request update every hour
if ((!timeReceived && now-lastRequest > (unsigned long)101000)
|| (timeReceived && now-lastRequest > (unsigned long)601000*60)) {
// Request time from controller.
Serial.println("requesting time");
bool status = requestTime();
if(!status) Serial.println("time request failed");
lastRequest = now;
}// Update time every second
if (timeReceived && now-lastTimeUpdate > 1000) {
printTime();
lastTimeUpdate = now;
}
}// This is called when a new time value was received
void receiveTime(unsigned long time) {
// Ok, set incoming time
setTime(time);
timeReceived = true;
}void printTime() {
sprintf(timeBuf, "%02d:%02d:%02d", hour(), minute(), second());
Serial.println(timeBuf);
} -
RE: Adding Listen only device to my system.
@nagelc thanks for looking and the info.
-
RE: Compiling Sensor code using BME280 and ESP8266
Thanks for looking. What arduino ide version are you using and what version of mysensors?
-
Adding Listen only device to my system.
I'd like to add a Receive only device to get two temperatures from a working sensor box in my system where I can display the values on an LCD display. I think I see how to send data from the sensor box to a node. How do I code the Receive node. Does anyone have any examples of this??
Thanks -
Compiling Sensor code using BME280 and ESP8266
I'm getting this error compiling. MySensors.h:94:18: error: expected unqualified-id before '(' token. Any Help??
Here's the code/*********
East Yard Outside Temp, Pressure, Humidity
*********/
// Enable debug prints
#define MY_DEBUG// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
//#define MY_RS485#include <MySensors.h>
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1#define SEALEVELPRESSURE_HPA (1013.25)
unsigned long delayTime;
float temperature;
float humidity;
float pressure;
bool metric = true;
static const uint64_t UPDATE_INTERVAL = 60000;MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);void presentation()
{
// Send the sketch version information to the gateway
sendSketchInfo("East Yard THP", "1.1");// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID_HUM, S_HUM);
present(CHILD_ID_TEMP, S_TEMP);
metric = getControllerConfig().isMetric;
}
Adafruit_BME280 bme; // I2C
//Adafruit_BME280 bme(BME_CS); // hardware SPI
//Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPIvoid setup() {
Serial.begin(115200);
Serial.println(F("BME280 Sensor"));
bool status;
// default settings
// (you can also pass in a Wire library object like &Wire2)
status = bme.begin(0x76);
if (!status) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}
delayTime = 10000;Serial.println();
}void loop() {
printValues();
sleep(UPDATE_INTERVAL);
}void printValues() {
Serial.print("Temperature = ");
Serial.print(bme.readTemperature());
Serial.println(" *C");
// Convert temperature to Fahrenheit
Serial.print("Temperature = ");
Serial.print(1.8 * bme.readTemperature() + 32);
temperature = 1.8 * bme.readTemperature() + 32;
send(msgTemp.set(temperature, 1));
Serial.println(" *F");Serial.print("Pressure = ");
Serial.print(bme.readPressure() / 100.0F);
pressure = bme.readPressure() / 100.0F;
Serial.println(" hPa");Serial.print("Approx. Altitude = ");
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));
Serial.println(" m");Serial.print("Humidity = ");
Serial.print(bme.readHumidity());
humidity = bme.readHumidity();
send(msgHum.set(humidity, 1));
Serial.println(" %");
}
BME code works fine, but when I add MySensors code, I get the error. -
RE: ESP8266Wifi Gateway won't connect
@hard-shovel Thanks so much for your effort and your timely resolution. I tried going back with previous versions of the library and they didn't work or didn't compile. I greatly appreciate your help with this. I assume something similar is happening to the ESP32 version also. Again, thanks.
-
RE: ESP8266Wifi Gateway won't connect
No comm at any baud rate except trash I/O at boot time. The gateway code specifies 9600 but I've tried them all. The problem is the system is not connecting with the network.
In addition, built up a new system using an ESP32 module and an nRF24L01 module.
Tried the "GatewayESP32" example app on the known good ESP32 module. After uploading, this module spits good data out the serial port at 115200 KHz (See below:)...but never tries to connect to the network. I'm using the "GatewayESP32" example with my network credentials added.
The ESP32 appears to be getting data from my 2.4GHz sensors, but never gets to my network.16:57:05.271 -> 10009772 TSF:MSG:BC
16:57:05.271 -> 10009774 TSF:MSG:FPAR REQ,ID=12
16:57:05.271 -> 10009776 TSF:PNG:SEND,TO=0
16:57:05.271 -> 10009779 TSF:CKU:OK
16:57:05.271 -> 10009781 TSF:MSG:GWL OK
16:57:05.505 -> 10010001 !TSF:MSG:SEND,0-0-12-12,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:05.505 -> 10010008 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:57:21.018 -> 10025533 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
16:57:21.018 -> 10025539 TSF:MSG:BC
16:57:21.018 -> 10025540 TSF:MSG:FPAR REQ,ID=7
16:57:21.018 -> 10025543 TSF:PNG:SEND,TO=0
16:57:21.018 -> 10025545 TSF:CKU:OK
16:57:21.018 -> 10025547 TSF:MSG:GWL OK
16:57:21.674 -> 10026174 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
16:57:29.313 -> 10033832 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:57:31.843 -> 10036367 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.3
16:57:31.937 -> 10036433 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.5
16:57:43.934 -> 10048467 TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
16:57:43.981 -> 10048472 TSF:MSG:PINGED,ID=7,HP=1
16:57:43.981 -> 10048516 !TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
16:57:56.119 -> 10060615 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:57:56.119 -> 10060635 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:04.393 -> 10068900 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:05.190 -> 10069700 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:06.736 -> 10071270 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:-0.1
16:58:06.830 -> 10071334 TSF:MSG:READ,5-5-0,s=1,c=1,t=0,pt=7,l=5,sg=0:-19.4
16:58:35.125 -> 10099641 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:58:39.437 -> 10103962 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:58:41.640 -> 10106168 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.0
16:58:59.372 -> 10123897 TSF:MSG:READ,2-2-0,s=0,c=1,t=1,pt=7,l=5,sg=0:43.3
16:58:59.419 -> 10123914 TSF:MSG:READ,2-2-0,s=1,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:05.091 -> 10129603 TSF:MSG:READ,9-9-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.0
16:59:14.527 -> 10139033 TSF:MSG:READ,3-3-0,s=0,c=1,t=37,pt=2,l=2,sg=0:1380
16:59:16.571 -> 10141065 TSF:MSG:READ,5-5-0,s=0,c=1,t=0,pt=7,l=5,sg=0:0.1
Again, as with the ESP8266 gateway the "Advanced Web Server" for the ESP32 chip uploads nicely, connects to my network and runs as expected. I'm stopped anyway I try to go. -
RE: ESP8266Wifi Gateway won't connect
Tried on windows 11 machine Arduino 1.8.19 with latest MySensors Library. Tried on Windows 10 machine with Arduino 1.8.13 and latest MySensors library. Just an FYI. Thanks for staying with me.
-
RE: ESP8266Wifi Gateway won't connect
I tested the Advanced Web Server Sample with this setup. Works fine. I tried the GatewayESP8266 on this setup and another setup with a WEMOS Pro mini. Same results, nothing out the serial port. I also tried the gateway app on an esp8266 with no radio attached and got no serial at 115200 at all. Is this normal? Shouldn't I get some kind of error message.
I'll try setting up an app to talk to the RF24 directly and see how that goes.
Is the GatewayESP32 working for the RF24 radios? If so, maybe I'll try that. I'm quite puzzled.
This assembly worked at one time a couple of years ago on another system. -
RE: ESP8266Wifi Gateway won't connect
@mfalkvidd yes
Yes, it's defined. I also ran the advanced webserver sample and it runs fine. It connects nicely and sends status to the serial port. -
ESP8266Wifi Gateway won't connect
I'm trying to add a 2.4 GHz gateway using an 8266 nodemcu and nrf24l01 module. I wired the system according to the "Connecting the Radio" section for ESP8266 devices. I've double checked the wiring.
The system programs and runs as expected with no errors. Nothing is sent to the serial port except the initial bootloader stuff. No connection info, no nada. My SSID and password are correct. I have the My_Debug def uncommented. The system is not connecting to the network...and I'm not sure why. The 8266 is known good. I'm using the app directly from the MySensors Examples with my network credentials added. Wired up a WEMOS mini and another radio exactly the same way with the same results. I've even tried another radio on the setup...same
Does the code try to connect to the network first or does set up the radio first. I'm not seeing any debug info whatsoever? I'm using Domoticz running on a raspberry pi system. Any ideas?? Have I got the wiring wrong?Thanks,
Dan -
RE: 2.4G Gateway Posts "Unknown" nodes
Thanks electrik, for the tip. It is indeed the MQTT gateway causing the issues. I unplugged and removed the gateway and all is well now. Disabling doesn't work. It must be disconnected. I'm not sure why. I'm using the canned mQTT gateway app from the site. Something is obviously dorked with it.
Thanks again
Dan -
RE: 2.4G Gateway Posts "Unknown" nodes
Do all your gateways use separate channels and/or base radio id?
All my gateways are basically 'canned code' which I downloaded from the MySensors site. I haven't made any changes to the code. Do I need to?
Everything has been running just great for about 10 months or more.
I just started seeing these anomalies lately.Can you see any patterns in which node ids are unknown?
I see no patterns that I would recognize. Node IDs generally seen to increment, but by random amounts, but some IDs seem to be 200 or higher.Have you reflashed any of your gateways lately?
No...I added a larger 22uF cap to the power/ground on the 2.4G radio after this started happening, but it had no improvement.Are there any other messages in the log that can give a clue to what is happening?
I've sent three images. One of the Hardware/2.4G setup, One of the error list and one of a child node with an unknown temp and humidity node that shouldn't be there. I get about 10-15 Unknowns appearing every day. I just delete them and move on.Could someone else have deployed a MySensors network near you?
I'd say that's pretty unlikely but I could put out a notice on our Home owners association website.The system seems to be running normally except for this issue. If I need to make changes regarding the channels, base radio, etc. I'll certainly do it.
Thanks for the response...I appreciate it
-
2.4G Gateway Posts "Unknown" nodes
Hi All,
I'm using three gateways with various sensors connected to my RPI Domoticz Controller. Recently my 2.4G ESP8266 WiFi gateway has been logging an increasing number of "Unknown" nodes. It's also showing an annoyingly large number of "Unknown" nodes for the child sensors also. Maybe it's a Domoticz issue, but the other gateways are fine, nothing weird. It's been operating for many months till lately. Any ideas?
Thanks - Dan -
RE: Pro Mini issues
This problem has been resolved. It appears my ANKER 10 port USB Hub is the problem. It's associated with the lower 4 ports of the hub. The remaining 6 are OK. I'm not sure what the actual problem is yet. The hub has a 60W power supply attached so I doubt it's a power issue...maybe noise? I now have a 10 port Amazon Hub which works well. As for the DTR signal, I've always used it and have seldom used the reset buttons. Also, I think most of the Arduinos and clones have it implemented through the serial convertor chip as well. It's also on all the ESP32 and ESP 8266 clones I've used. Again, thanks everyone for your comments and suggestions.
-
RE: Pro Mini issues
Hey Guys,
Thanks for the response. I've uploaded a jpg to show the connections. Yes, it's a 3V device. Before I use the minis I put 5V on RAW and check VCC. I've also selected the correct 328 configuration in the Arduino IDE. I've checked DTR with a scope and it's working fine, but I've held the reset button before programming, just to be safe. I've also used different Hub ports and cables as well as different FTDI programmers and Pro Mini boards. I even went back to the old version of the Arduino AVR Library. That's the reason for the posting. I've just started using the mysensors library, so I wasn't sure if all the examples worked on all devices and I didn't want to dig in the code. If you're telling me the Mini works with this code, then I can continue to look into other areas. Again, thanks to all! I appreciate your interest.
Dan
-
Pro Mini issues
Hi All.
I'm using a 3V Pro Mini and having issues loading the BinarySwitchSleepSensor2 app straight from web site. Sketch fails after a few seconds of loading.Details:
Sketch uses 12768 bytes (41%) of program storage space. Maximum is 30720 bytes.
Global variables use 446 bytes (21%) of dynamic memory, leaving 1602 bytes for local variables. Maximum is 2048 bytes.
avrdude: verification error, first mismatch at byte 0x1c55
0x7f != 0x5f
avrdude: verification error; content mismatch
avrdude: verification error; content mismatchThe Pro Mini loads and runs Blink app and others but fails with this. The nRF24L01 radio is hooked up as shown in Guide, although this doesn't matter. Won't load without the radio attached either.
The app loads and runs just fine on the ESP8266. Has anyone else had issues with the pro mini?
Thanks,
Dan