πŸ’¬ Air Humidity Sensor - DHT



  • @tiana well you could simply calibrate the value you get in your sketch for every DHT on it's own. But you have to do a calibraton, meaning measure all of them at multiple temperatures and humidities.
    If it's only a offset you can also use

    // Set this offset if the sensor has a permanent small offset to the real temperatures
    #define SENSOR_TEMP_OFFSET 0
    

    to correct for this, otherwise you have to implement your calibration function on your own.



  • For some sensors is possible to make with offset, but some of the sensors changing their values 2 times in minute with + - 2 degree Celsius some times show more sometimes show less.



  • well I think this kind of noise can not be calibrated. I thought they all have different values, but with offset, linear oder squared function for deviation.



  • I read datasheet for DHT11 and 2 degree deviation is ok for them. Now i playing with DHT22 I try this #define SENSOR_TEMP_OFFSET -1.3, but nothing is changed the sensor still give me same value.


  • Mod

    @tiana try setting SENSOR_TEMP_OFFSET to a really big value, for example -30.8 to make sure that the change is large enough to be noticeable.



  • Where i can found good DHT library for this sketch ?


  • Mod

    @pepson how about the library linked from the build page?



  • sorry i found



  • Using library linked above
    Getting: no matching function for call to 'DHT::readSensor(bool)'



  • @hek
    hi, how do I change the readings from C to F?
    My sensor works fine, by I get the readings I celsius



  • @ramoncarranza
    Change the line in the sketch:

    temperature = dht.toFahrenheit(temperature);

    to

    temperature = dht.toCelsius(temperature);

    probably? I haven't checked it, just looked at the DHT library. You may need to comment the isMetric line earlier in the sketch too. But I think that's how you do it.



  • @mikeS Thanks so much for your reply, it's working perfectly now.



  • @Jim Danforth
    Getting the same, have tried a number of different DHT libraries and cant get it to compile.



  • @meanmrgreen The only DHT library that will work is the one from the link before the sketch. If you have used others chances are you need to move or rename those other DHT libraries as that is why the sketch cannot call that function.



  • @mikeS

    Ive tried to reinstall and start frΓ₯n scratch but i guess i Missed something.



  • @meanmrgreen sometimes windows puts libraries in your documents folder, so they may be located in 2 or more places. Use windows search to find them all. I have 3 DHT libraries, the mysensors one, the adafruit(I think) and another that came with an MQTT based sketch for an ESP board. I just rename them. Incidentally the mysensors DHT library gives me the most accurate results, as much as 2 degrees and 10% out on the same sensor using a different library.
    Also don't update the DHT library if you are told there is an update!
    As you can tell I had a few problems myself before I got this working, it almost made me disregard the whole project. Keep trying , it's worth it.



  • @mikeS thanks alot!
    I'll keep that in mind. Should be getting my "starter kit" order soon from eBay so we'll see how it goes πŸ˜‰



  • Finaly got it to compile.
    I tried the library link above but no go, cleared out everything about ardouino on the pc, no go.

    I finaly stubled onto this:
    https://github.com/mysensors/MySensorsArduinoExamples
    Downloaded all the expample libraries, loaded the scetch and it worked!

    Something is up with the linked library on this page i think


  • Mod

    @meanmrgreen the link pointed to a folder on GitHub. If that folder is downloaded, you get the MySensorsExamples. But in that folder, there is also a link to the original DHT library. If that link is followed, the wrong library will be downloaded.

    Several people have been bitten by this so I have now changed the link to point directly to the MySensorsExamples zip file.



  • Could someone explain me why "Must be >1000ms for DHT22 and >2000ms for DHT11" when sampling rate is once per sec for DHT11 (once per 1000ms) and twice per sec for DHT22 (once per 500ms)?



  • In Wiring Things Up and screen are used DATA_PIN 3, but in example is wrote #define DHT_DATA_PIN 2 πŸ™‚ ...please correct it.


  • Admin

    @Amput,

    Thanks, updated.



  • @hek

    No it is not fixed!



  • @hek how do I change fro C to F?


  • Mod

    @hek I think @skywatch meant that the text is updated, but not the picture. The picture is still using pin 3.


  • Mod

    @ramoncarranza set your controller to use non-metric.


  • Admin

    Yes, didn't see that one @mfalkvidd. Hmm.. Not sure I have the source photoshop psd available any more.


  • Mod

    @hek you mean you delete files? 😨


  • Admin

    Ha, probably not, just a matter of find it. πŸ˜“



  • What @Skywatch meant was that "#define DHT_DATA_PIN 2" is STILL in the example code on this page. Anyone who even gets as far as working it all out and wiring it all up and it still it won't work like that! - Not when it needs to be connected to PIN 3 instead (esp if the NRF is using pin 2, which is likely).
    Happy New Year to you all! πŸ™‚



  • Just a note, tried following this for adding a DHT11 to the ESP8266 MQTT gateway. The MySensors example lib does not work with esp8266 (temperatures around 17000+). However the adafruit DHT library 1.3.0 works just fine.Any reason that couldn't be used here?


  • Admin

    Nope. Most of the examples were only verified using Atmega. If you find a better lib working on both platforms, please create a pull request including the updated example and library.



  • Ok! I just have to verify it on Atmega first. I'll be back..



  • DHT sketch version 2.1.0 no data i IDE seiel

    And if i use DHT example sketch then I get data temp / hum

    Did not have permission to post in the forum



  • @hek @mfalkvidd I read that you discussed about PIN 2 and 3.

    Code say PIN 2, Wiring things up say PIN 2 and picture shows PIN 3.

    It can't use PIN 2 or can it, PIN 2 is used by the radio, or am I to tired :)?



  • @flopp

    thats the irq pin in the radio post.
    Not used by the radio



  • @meanmrgreen said:

    @flopp

    thats the irq pin in the radio post.
    Not used by the radio

    I must have missed something or forgot. Is PIN 2 only used on Gateways?
    Is it different between MyS version 1.x and 2.x?


  • Admin

    Tried to follow the history on the humidity file back in time on github.
    At some point (2.0 release) the example was switched from HumiditySensor.ino (using pin 3) to DhtTemperatureAndHumiditySensor.ino (pin 2) created by @mozzbozz.

    Not sure why the pin was switched, but you can run without the radio/IRQ-pin connection as long as not activating the MY_RX_MESSAGE_BUFFER_FEATURE.



  • @hek
    All other examples are using PIN 3. Wouldn't it be easier to use PIN 3 for all examples? Maybe we shall wait and see if mozzbozz know why he changed to PIN 2.


  • Admin

    Ok, updated the example on github and instructions on the page back to pin 3.



  • Hurrah! πŸ™‚

    Now I can sleep at night again πŸ˜‰

    Good job!


  • Admin

    @skywatch said:

    Now I can sleep at night again

    Haha, yeah, good to hear you will get a good nights sleep again.



  • @skywatch said:

    Hurrah! πŸ™‚

    Now I can sleep at night again πŸ˜‰

    Good job!

    haha, me too πŸ™‚



  • Hello. Maybe someone could help πŸ™‚ hopefully..
    I have arduino1 with 1 DHT22, which is over arduinoGW connected to RSPi with latest domoticz.
    when i connect stuff up, after some time i see some strange childids, not related to this arduino1 in no way.
    Lots of unknown!, with V_TEMP values, with V_HUM values, even V_FORECAST, V_PRESSURE and etc. which arduino1 should not send (or no other arduino on my area).

    Illustration:
    <img href="http://www.lstudio.lt/wp-content/uploads/dht22problem.png">
    http://www.lstudio.lt/wp-content/uploads/dht22problem.png

    my code is quite simple (for ex only temperature is shown)

    #define CHILD_DESCR "TEMP3"
    #undef CHILD_ID
    #define CHILD_ID 31
    present(CHILD_ID, S_TEMP, CHILD_DESCR);
    delay(250) ;
    
    loop:
    
      temp3=dht3.readTemperature();
    
    if (temp3 >= 120) {temp3 = lasttemp3;}
    if (temp3 <= -50) {temp3 = lasttemp3;}
    MyMessage msg31(CHILD_ID,V_TEMP);
    send(msg31.set(temp3,1));
    

    so.. that is basically all



  • @Pavel-Larkin

    I have also seen this, I noticed it last week. Some of my Nodes have those Unknown-child, but it is working correctly anyway.
    DZ 3.5877, MyS 1.5.1, RPi 2



  • Hello,
    i have a problem with this sketch.
    After downloading DTH.h froom Mysensors Examples, i have this error :
    DhtTemperatureAndHumiditySensor:85: error: 'getConfig' was not declared in this scope

    metric = getConfig().isMetric;

    Any Idea of my mistake ?...


  • Admin

    It isn't your mistake, it's ours. The examples hasn't been updated correctly to reflect the most recent change in the api.

    It should say getControllerConfig().isMetric



  • I have the dht22 sensor hooked up and working on a pro mini on pin 3 I get a normal temp reading but the humidity always stays at 1.0 does not read.


  • Mod



  • Hello everybody,
    hope, someone could help a newby πŸ™‚
    I've installed the MQTT - GW and would use the Air/Humidity - sensor. But it doesn't work properly.
    The Connection to the Gateway seems to be okay. But I get no Air/Humidity - Information.
    The sensor does not measure anything.
    I've tried to change the data - pin, I've tried the DHT11 and DHT22 - sensor. No choice.
    I'm getting mad πŸ™‚

    Thanks a lot.


  • Mod

    Have you tried the basic arduino sketch that prints data to serial port?



  • Hello,
    thanks a lot for your answer.
    Yes, I did. It produced the Messages as excepted.


  • Mod

    So you'd better post your code so we can take a look at what is wrong with it.



  • ...sorry, Typo.
    As expected πŸ™‚



  • ...no Problem:

    /**
     * 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 <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://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: Henrik EKblad
     * Version 1.1 - 2016-07-20: Converted to MySensors v2.0 and added various improvements - Torben Woltjen (mozzbozz)
     * 
     * DESCRIPTION
     * This sketch provides an example of how to implement a humidity/temperature
     * sensor using a DHT11/DHT-22.
     *  
     * For more information, please visit:
     * http://www.mysensors.org/build/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 <SPI.h>
    #include <MySensors.h>  
    #include <DHT.h>
    
    // Set this to the pin you connected the DHT's data pin to
    #define DHT_DATA_PIN 2
    
    // Set this offset if the sensor has a permanent small offset to the real temperatures
    #define SENSOR_TEMP_OFFSET 0
    
    // Sleep time between sensor updates (in milliseconds)
    // Must be >1000ms for DHT22 and >2000ms for DHT11
    static const uint64_t UPDATE_INTERVAL = 30000;
    
    // Force sending an update of the temperature after n sensor reads, so a controller showing the
    // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
    // the value didn't change since;
    // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
    static const uint8_t FORCE_UPDATE_N_READS = 10;
    
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    
    float lastTemp;
    float lastHum;
    uint8_t nNoUpdatesTemp;
    uint8_t nNoUpdatesHum;
    bool metric = true;
    
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    DHT dht;
    
    
    void presentation()  
    { 
      // Send the sketch version information to the gateway
      Serial.println("Presentation");
      sendSketchInfo("TemperatureAndHumidity", "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 = getConfig().isMetric;
    }
    
    
    void setup()
    {
      Serial.println("vor Presentation");
      
      dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
      if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
        Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
      }
      // Sleep for the time of the minimum sampling period to give the sensor time to power up
      // (otherwise, timeout errors might occure for the first reading)
      sleep(dht.getMinimumSamplingPeriod());
    }
    
    
    void loop()      
    {  
    
      Serial.println("loop Anfang");
      
      // Force reading sensor, so it works also after sleep()
      dht.readSensor(true);
      
      // Get temperature from DHT library
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
        Serial.println("Failed reading temperature from DHT!");
      } else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
        // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        // Reset no updates counter
        nNoUpdatesTemp = 0;
        temperature += SENSOR_TEMP_OFFSET;
        send(msgTemp.set(temperature, 1));
    
        #ifdef MY_DEBUG
        Serial.print("T: ");
        Serial.println(temperature);
        #endif
      } else {
        // Increase no update counter if the temperature stayed the same
        nNoUpdatesTemp++;
      }
    
      // Get humidity from DHT library
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
        Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
        // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
        lastHum = humidity;
        // Reset no updates counter
        nNoUpdatesHum = 0;
        send(msgHum.set(humidity, 1));
        
       #ifdef MY_DEBUG
        Serial.print("H: ");
        Serial.println(humidity);
       #endif
      } else {
        // Increase no update counter if the humidity stayed the same
        nNoUpdatesHum++;
      }
    
      // Sleep for a while to save energy
      sleep(UPDATE_INTERVAL); 
    }
    


  • I am using dht22 outside. Does any one know how to change to whole number not decimal. The temperature outside change a lot. Let say temp 20.2 changed to 20.4 and still sends to getaway . If I do "send(msgTemp.set(temperature, 0));" and still receive both times 20 and 20, and I want only if change to 21 or 19.


  • Mod

    @Arnold-Ε lepetis change

    float lastTemp;
    

    to

    signed int lastTemp;
    

    and

    float temperature = dht.getTemperature();
    

    to

    signed int temperature = dht.getTemperature() + 0.5; // Add 0.5 to get correct rounding
    

    and

    temperature = dht.toFahrenheit(temperature);
    

    to

    temperature = dht.toFahrenheit(temperature) + 0.5;
    

    and

    send(msgTemp.set(temperature, 1));
    

    to

    send(msgTemp.set(temperature));
    

    You might also have to handle the isnan test.



  • @mfalkvidd Thanks. It works like a charm



  • I've made a bit of an unusual observation in relationship to this script. I am running a fairly stripped-down version of it, but with the "standard" (not MySensors-customized) DHT library and its associated functions.

    Here is the code:

    // Enable debug prints
    #define MY_DEBUG
    
    // Enable and select radio type attached 
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    //#define MY_RS485
    
    #define MY_NODE_ID 47
    
    #include <SPI.h>
    #include <MySensors.h>  
    #include <DHT.h>
    
    // Set this to the pin you connected the DHT's data pin to
    #define DHT_DATA_PIN 5
    
    // Set this offset if the sensor has a permanent small offset to the real temperatures
    #define SENSOR_TEMP_OFFSET 0
    
    // Sleep time between sensor updates (in milliseconds)
    // Must be >1000ms for DHT22 and >2000ms for DHT11
    static const uint64_t UPDATE_INTERVAL = 10000;
    
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    
    bool metric = true;
    
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    DHT dht(DHT_DATA_PIN, DHT22);
    float temperature;
    float humidity;
    
    void presentation()  
    { 
      // Send the sketch version information to the gateway
      sendSketchInfo("TemperatureAndHumidity", "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;
    }
    
    
    void setup()
    {
      delay(100);
    }
    
    
    void loop()      
    {  
      
      // Get temperature from DHT library
      temperature = dht.readTemperature();
      if (isnan(temperature))
      {
        Serial.println("Failed reading temperature from DHT!");
      }
        
      else
      {
        send(msgTemp.set(temperature,0));
        #ifdef MY_DEBUG
        Serial.print("T: ");
        Serial.println(temperature);
        #endif
      }  
    
      // Get humidity from DHT library
      
      humidity = dht.readHumidity();
      if (isnan(humidity))
      {
        Serial.println("Failed reading humidity from DHT!");
      }
        
      else 
      {
        send(msgHum.set(humidity,1));
        #ifdef MY_DEBUG
        Serial.print("H: ");
        Serial.println(humidity);
        #endif
      }
    
      // Sleep for a while to save energy
      sleep(UPDATE_INTERVAL); 
    }
    

    I find that if I leave the last line as
    sleep(UPDATE_INTERVAL);
    then the sensor node ends up sending the same temperature and humidity values, over and over again, even if the actual humidity and temperature change.

    However, if I change the last line to
    delay(UPDATE_INTERVAL);
    then everything works as expected.

    This is with known good DHT22 units, so I suspect there is something funny about the sleep() function and the operation of the standard (not customized) DHT library.

    It took a lot of poking around to discover this, but is this in fact the reason why the MySensors customized DHT library is required for this script? Is that library necessary to make sleep() and DHT temperature measurements play nicely together?


  • Mod

    What libraries versions are you using?


  • Mod

    @jwosnick the example sketch has this:

      // Force reading sensor, so it works also after sleep()
    dht.readSensor(true);
    

    which is missing in your sketch. The comment suggests that it might be relevant.



  • @mfalkvidd

    Yes, absolutely. But it appears that the dht.readSensor() function is not actually part of the standard DHT library, but rather something that only appears in the MySensors-customized version of it. I'm trying to get a handle on why there is a need for a customized library.


  • Mod

    @jwosnick seems like the most recent version of the original library calls readSensor when getTemperature is called.

    Maybe the most recent version can be used if the MySensors example sketch is rewritten to just use getTemperature? Would it be possible for you to test this? It would be great if we could get rid of the MySensors-custimized version of the library and just let people install the standard DHT library.



  • @mfalkvidd said in πŸ’¬ Air Humidity Sensor:

    @jwosnick seems like the most recent version of the original library calls readSensor when getTemperature is called.

    Yes, it does... but somehow that function is not "exposed" to the outside world. With a standard DHT test sketch (nothing to do with MySensors) calling readSensor throws an error.


  • Mod

    @jwosnick yes. But since readSensor is called inside getTemperature, there should be no need to call it manually.



  • @jwosnick

    As your set sensor model

    DHT dht(DHT_DATA_PIN, DHT22);
    

    it looks like you use "Adafruit DHT-sensor-library".
    It's need dht.begin(); in setup(){ } which is missing in your sketch



  • @avgays
    Good catch -- thanks. Yes, that is the library I am using.

    Despite omitting that line, the script above works fine as long as the last line is a delay() function and not sleep(). If I use sleep(), it in fact appears to work, but sends the same temperature and humidity over and over again. So it is something about the sleep() function.

    I will add in the dht.begin() and then put sleep() back in and see what happens.



  • @avgays Confirmed that even with dht.begin(); the script still sends the same temp and humidity info, over and over again, as long as the sleep() function is in there. As soon as sleep() is replaced by delay() it all works properly.

    So I conclude from this that the MySensors-customized version of the DHT library must have something in it to make sleep() play nicely with the DHT unit. I wish I knew what that was. It would be ideal if this sensor (and the Dallas Semiconductor one) could be used with the MySensors system with their standard libraries.



  • @jwosnick
    Very strange as in my case this library work well with sleep() on battery-powered node.

    Look like it's nessesary to add delay(2000); before or after sleep() as sleep mode stops all timers, so
    currenttime - _lastreadtime =0
    and function returns with no new measurements.



  • Hi,
    I would like to use this example and reduce power consumtion by removing the regulator on the mini Pro and the power led.
    If we remove the regulator, we can power the board with 3V on Vcc. It will be OK for the mini pro and the NRF but the DHT22 needs 3.3V minimum. The solution will consist to use a step up boost module. What is the current consumtion of the step up boost?


  • Mod

    I don't know about DHT22, but NRF24 can work down to 1.8 or 1.9V so you can connect it directly to battery (take a look ad EasyPCB)


  • Hero Member

    @Digdogger it's better to get rid of the DHT and use something more reliable and operating at lower voltages. Like si7021, sht21 or Bme280



  • Thanx for your answers. @AWI, the BME280 looks great and not expansive i will replace the DHT by this one. Thank you.



  • @Digdogger
    Out of curiosity, do you expect there to be a big savings in power consumption by removing the regulator and power LED? I've never used the Mini Pro (the smallest I get to is the Nano) but I understand it already is very efficient with power usage.



  • @jwosnick: please take a look here: http://www.home-automation-community.com/arduino-low-power-how-to-run-atmega328p-for-a-year-on-coin-cell-battery/.
    You'll see that the current saving is significant (almost 40% saving)


  • Mod

    @jwosnick
    Arduino is efficient for a live node, but for a battery powered sleeping node voltage regulators have a small drain on battery; led also consumes some power. The Nano has also the usb chip that is powered but not used that also increases battery drain. So, as rule of thumb, everything that is not really used/necessary will drain some battery over time.


  • Mod

    @jwosnick with the led and regulator, battery life on 2xAA is about three weeks. Removing them will usually give you 2-5 years.



  • @mfalkvidd

    Thank you. I didn't realize the differences were so stark.

    I have some Pro Mini 3.3V units on order and hope to convert my sensors to that platform, when they arrive.



  • hello I ran it but i didnt see anthing except the garbage in com monitor


  • Hardware Contributor

    @hashem25 said in πŸ’¬ Air Humidity Sensor:

    hello I ran it but i didnt see anthing except the garbage in com monitor

    Hello, you need to change the baud rate at the bottom right of the Arduino serial monitor window until you see clear text.



  • thanks it works



  • How do i get 2 dht22's working in the code?


  • Mod

    If you already have one, it is a matter of just repeating your code for the first sensor and just change the pin number where you connected the second one



  • This example doesn't seem to be included in the latest library version - am I being blind or is this deliberate?


  • Mod

    @ianatkin that is correct. Follow the instructions under the "Example" headline on the build page.



  • @mfalkvidd Thanks πŸ™‚


  • Mod

    @ianatkin you're welcome. Great to see a new forum member πŸ™‚



  • Is it the same code that i will burn to the controller circuit. Can someone help me with a little explanation on the code for the controller circuit so as to be receiving the temperature values



  • Hi ! Thank's for working πŸ™‚
    I add the libraries in "MySensors external examples" to Arduino IDE but when I want to compile I have this one log error :

    DhtTemperatureAndHumiditySensor.ino:43:25: fatal error: MySensors.h: No such file or directory
    compilation terminated.

    In MySensors folder's libraries, I have a MySensor.h, without 's' . This is one? Do I forget something?

    Thanks


  • Mod

    @MrVince sounds like MySensors 1.x is installed. Remove the MySensors folder and install the latest version. Instructions: https://www.mysensors.org/about/arduino#installing-the-sensor-libraries



  • Please can someone help me on how I can be able to access the temperature and humidity data sent by the sensor on the gateway. I am recently working on sending temperature and humidity data to a controller. I used the above .ino code( /mysensors/MySensorsArduinoExamples/examples/DhtTemperatureAndHumiditySensor/DhtTemperatureAndHumiditySensor.ino) as it is and ensured my data pin is pin3 and for my gateway am using this(/mysensors/MySensors/examples/GatewayW5100/GatewayW5100.ino). I did not make any changes on both codes as i am new and do not have knowledge of what to do. I was receiving the following on the sensor serial monitor
    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    13 TSM:FPAR
    15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2022 !TSM:FPAR:NO REPLY
    2024 TSM:FPAR
    2026 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4034 !TSM:FPAR:NO REPLY
    4036 TSM:FPAR
    5636 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    7644 !TSM:FPAR:NO REPLY
    7646 TSM:FPAR
    7648 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    9656 !TSM:FPAR:FAIL
    9657 TSM:FAIL:CNT=1
    9659 TSM:FAIL:PDT
    19662 TSM:FAIL:RE-INIT
    19664 TSM:INIT
    19672 TSM:INIT:TSP OK
    19674 TSM:FPAR
    19676 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    21684 !TSM:FPAR:NO REPLY
    21686 TSM:FPAR
    21688 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    23696 !TSM:FPAR:NO REPLY
    23698 TSM:FPAR
    23700 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    25708 !TSM:FPAR:NO REPLY
    25710 TSM:FPAR
    27310 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    29318 !TSM:FPAR:FAIL
    29319 TSM:FAIL:CNT=2
    29321 TSM:FAIL:PDT
    39324 TSM:FAIL:RE-INIT
    39326 TSM:INIT
    39333 TSM:INIT:TSP OK
    39335 TSM:FPAR
    39337 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    41346 !TSM:FPAR:NO REPLY
    41348 TSM:FPAR
    41357 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    43365 !TSM:FPAR:NO REPLY
    43367 TSM:FPAR
    43397 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    45405 !TSM:FPAR:NO REPLY
    45407 TSM:FPAR
    45409 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    47417 !TSM:FPAR:FAIL
    47418 TSM:FAIL:CNT=3
    47420 TSM:FAIL:PDT
    57423 TSM:FAIL:RE-INIT
    57425 TSM:INIT
    57433 TSM:INIT:TSP OK
    57435 TSM:FPAR
    57437 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    59445 !TSM:FPAR:NO REPLY
    59447 TSM:FPAR
    59456 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    61464 !TSM:FPAR:NO REPLY
    61466 TSM:FPAR
    61475 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    63484 !TSM:FPAR:NO REPLY
    63486 TSM:FPAR
    63489 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    65497 !TSM:FPAR:FAIL
    65498 TSM:FAIL:CNT=4
    65500 TSM:FAIL:PDT
    75503 TSM:FAIL:RE-INIT
    75505 TSM:INIT
    75512 TSM:INIT:TSP OK
    75514 TSM:FPAR
    75516 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    77526 !TSM:FPAR:NO REPLY
    77528 TSM:FPAR
    77537 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    79545 !TSM:FPAR:NO REPLY
    79547 TSM:FPAR
    79556 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    81564 !TSM:FPAR:NO REPLY
    81566 TSM:FPAR
    81568 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    83576 !TSM:FPAR:FAIL
    83577 TSM:FAIL:CNT=5
    83579 TSM:FAIL:PDT
    93582 TSM:FAIL:RE-INIT
    93584 TSM:INIT
    93591 TSM:INIT:TSP OK
    93593 TSM:FPAR
    93595 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    95603 !TSM:FPAR:NO REPLY
    95605 TSM:FPAR
    95618 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    97625 !TSM:FPAR:NO REPLY
    97627 TSM:FPAR
    97637 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    99645 !TSM:FPAR:NO REPLY
    99647 TSM:FPAR
    99649 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    101657 !TSM:FPAR:FAIL
    101659 TSM:FAIL:CNT=6
    101661 TSM:FAIL:PDT
    111664 TSM:FAIL:RE-INIT
    111666 TSM:INIT
    111673 TSM:INIT:TSP OK
    111675 TSM:FPAR
    111678 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    113685 !TSM:FPAR:NO REPLY
    113687 TSM:FPAR
    113700 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    115709 !TSM:FPAR:NO REPLY
    115712 TSM:FPAR
    115720 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    117728 !TSM:FPAR:NO REPLY
    117730 TSM:FPAR
    and on the gateway monitor i received this:

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=1
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=2
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=3
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=4
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=5
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=6
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=7
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=7
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=7
    0;255;3;0;9;TSM:FAIL:PDT

    Please can someone tell me what to do and how I can access the sent temperature and humidity value at the gateway. If there is further code to add to the one I have referenced, please do let me know.
    Thanks


  • Hardware Contributor

    TSM:INIT:TSP FAIL

    @godwinguru - your radio on the gw isnt initialised.
    Check wiring and power.



  • Thank you @sundberg84
    I just handled it and this is what i saw at the gateway

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.178.66
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.178.66
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.178.66
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.178.66
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.178.66
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:CKU:OK,FCTRL
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    
    while on the sensor i saw this:
    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    13 TSM:FPAR
    15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2022 !TSM:FPAR:NO REPLY
    2024 TSM:FPAR
    2026 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4034 !TSM:FPAR:NO REPLY
    4036 TSM:FPAR
    4038 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    5029 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    5035 TSF:MSG:FPAR OK,ID=0,D=1
    6046 TSM:FPAR:OK
    6047 TSM:ID
    6048 TSM:ID:REQ
    6081 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    8089 TSM:ID
    8090 TSM:ID:REQ
    9690 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    11698 TSM:ID
    11699 TSM:ID:REQ
    11702 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=OK:
    13709 TSM:ID
    13710 TSM:ID:REQ
    13713 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    15720 !TSM:ID:FAIL
    15721 TSM:FAIL:CNT=1
    15723 TSM:FAIL:PDT
    25726 TSM:FAIL:RE-INIT
    25729 TSM:INIT
    25736 TSM:INIT:TSP OK
    25738 TSM:FPAR
    25740 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    27748 !TSM:FPAR:NO REPLY
    27750 TSM:FPAR
    27760 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    29768 !TSM:FPAR:NO REPLY
    29770 TSM:FPAR
    29779 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    30552 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    30557 TSF:MSG:FPAR OK,ID=0,D=1
    31788 TSM:FPAR:OK
    31789 TSM:ID
    31790 TSM:ID:REQ
    31793 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    33801 TSM:ID
    33802 TSM:ID:REQ
    35401 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    37409 TSM:ID
    37410 TSM:ID:REQ
    37413 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=OK:
    39421 TSM:ID
    39422 TSM:ID:REQ
    41022 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    43030 !TSM:ID:FAIL
    43031 TSM:FAIL:CNT=2
    43033 TSM:FAIL:PDT
    53036 TSM:FAIL:RE-INIT
    53038 TSM:INIT
    53045 TSM:INIT:TSP OK
    53047 TSM:FPAR
    53049 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=1,st=OK:
    55057 !TSM:FPAR:NO REPLY
    55059 TSM:FPAR
    55061 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    57069 !TSM:FPAR:NO REPLY
    57071 TSM:FPAR
    57073 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    58068 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    58074 TSF:MSG:FPAR OK,ID=0,D=1
    59081 TSM:FPAR:OK
    59082 TSM:ID
    59084 TSM:ID:REQ
    60684 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    62692 TSM:ID
    62693 TSM:ID:REQ
    64292 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=NACK:
    66301 TSM:ID
    66302 TSM:ID:REQ
    66306 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=2,st=OK:
    68313 TSM:ID
    68314 TSM:ID:REQ
    69913 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    71921 !TSM:ID:FAIL
    71922 TSM:FAIL:CNT=3
    71924 TSM:FAIL:PDT
    81927 TSM:FAIL:RE-INIT
    81929 TSM:INIT
    81936 TSM:INIT:TSP OK
    81938 TSM:FPAR
    81940 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=1,st=OK:
    83948 !TSM:FPAR:NO REPLY
    83950 TSM:FPAR
    83952 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    84979 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    84984 TSF:MSG:FPAR OK,ID=0,D=1
    85960 TSM:FPAR:OK
    85961 TSM:ID
    85963 TSM:ID:REQ
    85965 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    87973 TSM:ID
    87974 TSM:ID:REQ
    89574 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    91582 TSM:ID
    91583 TSM:ID:REQ
    91586 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=OK:
    93593 TSM:ID
    93594 TSM:ID:REQ
    95194 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    97202 !TSM:ID:FAIL
    97203 TSM:FAIL:CNT=4
    97205 TSM:FAIL:PDT
    107208 TSM:FAIL:RE-INIT
    107210 TSM:INIT
    107217 TSM:INIT:TSP OK
    107219 TSM:FPAR
    107223 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=1,st=OK:
    109230 !TSM:FPAR:NO REPLY
    109232 TSM:FPAR
    109235 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    111242 !TSM:FPAR:NO REPLY
    111244 TSM:FPAR
    112843 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    114851 !TSM:FPAR:NO REPLY
    114853 TSM:FPAR
    116453 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    118461 !TSM:FPAR:FAIL
    118463 TSM:FAIL:CNT=5
    118465 TSM:FAIL:PDT
    128468 TSM:FAIL:RE-INIT
    128471 TSM:INIT
    128478 TSM:INIT:TSP OK
    128480 TSM:FPAR
    128483 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    129348 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    129353 TSF:MSG:FPAR OK,ID=0,D=1
    130109 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    130490 TSM:FPAR:OK
    130491 TSM:ID
    130493 TSM:ID:REQ
    130496 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    132503 TSM:ID
    132504 TSM:ID:REQ
    134105 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    136112 TSM:ID
    136113 TSM:ID:REQ
    136116 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=OK:
    138123 TSM:ID
    138124 TSM:ID:REQ
    138127 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    140134 !TSM:ID:FAIL
    140135 TSM:FAIL:CNT=6
    140138 TSM:FAIL:PDT
    150140 TSM:FAIL:RE-INIT
    150142 TSM:INIT
    150150 TSM:INIT:TSP OK
    150152 TSM:FPAR
    150155 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    152162 !TSM:FPAR:NO REPLY
    152164 TSM:FPAR
    152167 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    154174 !TSM:FPAR:NO REPLY
    154176 TSM:FPAR
    154179 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    154945 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    154950 TSF:MSG:FPAR OK,ID=0,D=1
    156186 TSM:FPAR:OK
    156187 TSM:ID
    156189 TSM:ID:REQ
    157789 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    159797 TSM:ID
    159798 TSM:ID:REQ
    161398 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=NACK:
    163405 TSM:ID
    163406 TSM:ID:REQ
    163409 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=2,st=OK:
    165417 TSM:ID
    165419 TSM:ID:REQ
    167019 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    169026 !TSM:ID:FAIL
    169027 TSM:FAIL:CNT=7
    169030 TSM:FAIL:PDT
    229032 TSM:FAIL:RE-INIT
    229035 TSM:INIT
    229042 TSM:INIT:TSP OK
    229044 TSM:FPAR
    229047 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=1,st=OK:
    231054 !TSM:FPAR:NO REPLY
    231056 TSM:FPAR
    231065 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    232098 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    232103 TSF:MSG:FPAR OK,ID=0,D=1
    233073 TSM:FPAR:OK
    233074 TSM:ID
    233076 TSM:ID:REQ
    233079 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    235086 TSM:ID
    235087 TSM:ID:REQ
    236688 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    238695 TSM:ID
    238696 TSM:ID:REQ
    238699 TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=1,st=OK:
    240706 TSM:ID
    240707 TSM:ID:REQ
    242308 !TSF:MSG:SEND,255-255-0-0,s=255,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=NACK:
    244315 !TSM:ID:FAIL
    244316 TSM:FAIL:CNT=7
    244318 TSM:FAIL:PDT
    

    Is it now ok, how can i get my data at the gatewa?


  • Hardware Contributor

    @godwinguru - I dont know why but it seems like your gw is restarting. I dont know anything about a Raspberry GW so you need to wait for someone else to answer.

    Top of my mind is a power issue.

    Also I added ``` around your code which makes it easier for others to read. Please use this when you post logs.



  • @sundberg84, thank you for your reply, my gateway is Ethernet with arduino, am not using rhaspberry pi., thanks once again.


  • Hardware Contributor

    @godwinguru - then I would say you have a power issue. As something is using power the gw restarts due to this. What controller do you use? Do you see any connection status there? How do you power the gw? This is crucial that you use a capacitor on the radio and have a stable power supply fΓΆr the radio.



  • @sundberg84, as i said, am new to mysensors, i dont know where and how to select a controller, it is in my mind to use homegenie, but i still dont know how to integrate it with the gateway, am using adapter to power it, it may not be power problem, i think i still to know a lot about how mysensors works. This is because i used this code (/mysensors/MySensors/examples/GatewayW5100/GatewayW5100.ino) on the gateway without changing anything. i doubt if that is okay, because i never added any other thing to the code.


  • Hardware Contributor

    @godwinguru - ok, then thats your problem. The GW cant be used on its own - it require a controller to work. The controller hand out ID and collect all the data. The controller can be used on a raspberry pi for example.



  • Hello,
    problem, after each restart of gateway or restore database, all my temp/humity sensors are seen as 2 sensors.
    Seen like that:
    2017-07-15 15:23:53.758 (Mysensor) Temp (Temp)
    2017-07-15 15:23:53.763 (Mysensor) Humidity (Hum)
    Should be (on another sensor):
    2017-07-15 15:26:45.610 (Mysensor) Temp + Humidity (Salon)

    After 3 hours one sensor is still doing the same. I restarted it, no change.
    Restarted the gateway again, no change. There is still one sensor which has this behaviour and it's never the same sensor...


  • Mod

    It's a Domoticz problem, sometimes just rebooting everything can solve but try to search on domoticz forum too.


Log in to reply
 

Suggested Topics

  • 3
  • 109
  • 110
  • 347
  • 2
  • 10

57
Online

11.4k
Users

11.1k
Topics

112.7k
Posts