Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
dpconsD

dpcons

@dpcons
About
Posts
30
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MQTT-Help me understand about the MQTT Gateway.
    dpconsD dpcons

    @OldSurferDude Thanks for the tips. I've download Tasmota and have it running on an Wemos Mini. Have it turning on and off a virtual switch. Maybe Mqtt soon...

    Development

  • MQTT-Help me understand about the MQTT Gateway.
    dpconsD dpcons

    @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.

    Development

  • MQTT-Help me understand about the MQTT Gateway.
    dpconsD dpcons

    @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

    Development

  • MQTT-Help me understand about the MQTT Gateway.
    dpconsD dpcons

    @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.

    Development

  • Getting system time from the controller
    dpconsD dpcons

    @mfalkvidd Thanks, I'll try that.

    Troubleshooting

  • MQTT-Help me understand about the MQTT Gateway.
    dpconsD dpcons

    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...

    Development

  • Getting system time from the controller
    dpconsD dpcons

    @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.

    Troubleshooting

  • Getting system time from the controller
    dpconsD dpcons

    @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!

    Troubleshooting

  • Getting system time from the controller
    dpconsD dpcons

    @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.

    Troubleshooting

  • Getting system time from the controller
    dpconsD dpcons

    @dpcons sorry...esp8266 wemos mini is the actual device.

    Troubleshooting

  • Getting system time from the controller
    dpconsD dpcons

    @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

    Troubleshooting

  • Getting system time from the controller
    dpconsD dpcons

    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)60
    1000*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);
    }

    Troubleshooting

  • Adding Listen only device to my system.
    dpconsD dpcons

    @mfalkvidd Thanks for the info!

    Development

  • Adding Listen only device to my system.
    dpconsD dpcons

    @nagelc thanks for looking and the info.

    Development

  • Compiling Sensor code using BME280 and ESP8266
    dpconsD dpcons

    Thanks for looking. What arduino ide version are you using and what version of mysensors?

    Troubleshooting

  • Adding Listen only device to my system.
    dpconsD dpcons

    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

    Development

  • Compiling Sensor code using BME280 and ESP8266
    dpconsD dpcons

    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 SPI

    void 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.

    Troubleshooting

  • ESP8266Wifi Gateway won't connect
    dpconsD dpcons

    @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.

    Troubleshooting

  • ESP8266Wifi Gateway won't connect
    dpconsD dpcons

    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.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular