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
  1. Home
  2. Controllers
  3. Domoticz
  4. different information

different information

Scheduled Pinned Locked Moved Domoticz
9 Posts 2 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • BarnaB Offline
    BarnaB Offline
    Barna
    wrote on last edited by
    #1

    Hi,
    Could you help me, what the problem is ?
    The log and detailed data time-stamps are not some.
    LOG:
    2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
    2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
    2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)
    2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)

    DATA:
    2017-12-09 22:00:00 63 1
    2017-12-09 22:05:00 63 1
    2017-12-09 22:10:00 63 1
    2017-12-09 22:15:00 63 1
    2017-12-09 22:20:00 63 1
    2017-12-09 22:25:00 63 1
    2017-12-09 22:30:00 59 0.7
    2017-12-09 22:35:00 59 0.7
    2017-12-09 22:40:00 59 0.7
    2017-12-09 22:45:00 59 0.7
    2017-12-09 22:50:00 59 0.7
    2017-12-09 22:55:00 59 0.7
    2017-12-09 23:00:00 56 0.8
    2017-12-09 23:05:00 56 0.8
    2017-12-09 23:10:00 56 0.8

    code:
    unsigned long SLEEP_TIME = 900000;
    send(msgTemp.set(DHT.temperature, 1));
    send(msgHum.set(DHT.humidity, 1));
    delay(SLEEP_TIME);

    The node must send data by 15min, Domonicz receives it by 30min, detailed data contains 5min data.
    Does the Domonicz feel 30min gap every 5min ?

    thanks

    Barna

    M 2 Replies Last reply
    0
    • BarnaB Barna

      Hi,
      Could you help me, what the problem is ?
      The log and detailed data time-stamps are not some.
      LOG:
      2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
      2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
      2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)
      2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)

      DATA:
      2017-12-09 22:00:00 63 1
      2017-12-09 22:05:00 63 1
      2017-12-09 22:10:00 63 1
      2017-12-09 22:15:00 63 1
      2017-12-09 22:20:00 63 1
      2017-12-09 22:25:00 63 1
      2017-12-09 22:30:00 59 0.7
      2017-12-09 22:35:00 59 0.7
      2017-12-09 22:40:00 59 0.7
      2017-12-09 22:45:00 59 0.7
      2017-12-09 22:50:00 59 0.7
      2017-12-09 22:55:00 59 0.7
      2017-12-09 23:00:00 56 0.8
      2017-12-09 23:05:00 56 0.8
      2017-12-09 23:10:00 56 0.8

      code:
      unsigned long SLEEP_TIME = 900000;
      send(msgTemp.set(DHT.temperature, 1));
      send(msgHum.set(DHT.humidity, 1));
      delay(SLEEP_TIME);

      The node must send data by 15min, Domonicz receives it by 30min, detailed data contains 5min data.
      Does the Domonicz feel 30min gap every 5min ?

      thanks

      Barna

      M Offline
      M Offline
      manutremo
      wrote on last edited by
      #2

      @barna Domoticz always saves the data in 5 minutes summaries, regardless of at which frequency it is actually received.

      I'm not sure I understand the part "Domonicz receives it by 30min". Regardless of what is finally stored, you should still see the values in the devices displayed correctly when a new data point arrives.

      1 Reply Last reply
      0
      • BarnaB Offline
        BarnaB Offline
        Barna
        wrote on last edited by
        #3

        The 5min summaries was new for me, thanks the info.
        But I do not understand if the node wakes up in every 15min, why the Domonicz receives data only by 30min only.

        1 Reply Last reply
        0
        • BarnaB Barna

          Hi,
          Could you help me, what the problem is ?
          The log and detailed data time-stamps are not some.
          LOG:
          2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
          2017-12-09 22:27:01.131 (mysensor_gate) Temp + Humidity (Udvar)
          2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)
          2017-12-09 22:57:03.681 (mysensor_gate) Temp + Humidity (Udvar)

          DATA:
          2017-12-09 22:00:00 63 1
          2017-12-09 22:05:00 63 1
          2017-12-09 22:10:00 63 1
          2017-12-09 22:15:00 63 1
          2017-12-09 22:20:00 63 1
          2017-12-09 22:25:00 63 1
          2017-12-09 22:30:00 59 0.7
          2017-12-09 22:35:00 59 0.7
          2017-12-09 22:40:00 59 0.7
          2017-12-09 22:45:00 59 0.7
          2017-12-09 22:50:00 59 0.7
          2017-12-09 22:55:00 59 0.7
          2017-12-09 23:00:00 56 0.8
          2017-12-09 23:05:00 56 0.8
          2017-12-09 23:10:00 56 0.8

          code:
          unsigned long SLEEP_TIME = 900000;
          send(msgTemp.set(DHT.temperature, 1));
          send(msgHum.set(DHT.humidity, 1));
          delay(SLEEP_TIME);

          The node must send data by 15min, Domonicz receives it by 30min, detailed data contains 5min data.
          Does the Domonicz feel 30min gap every 5min ?

          thanks

          Barna

          M Offline
          M Offline
          manutremo
          wrote on last edited by
          #4

          @barna In order to do understand that we'd need to see the node and gateway logs, and the full sketch.

          1 Reply Last reply
          0
          • BarnaB Offline
            BarnaB Offline
            Barna
            wrote on last edited by
            #5

            I have checked the node log, the Domonicz is correct, the node sends message every 30min, but why if 900000 = 15min ?

            1 Reply Last reply
            0
            • BarnaB Offline
              BarnaB Offline
              Barna
              wrote on last edited by
              #6

              #define MY_DEBUG

              // Enable and select radio type attached
              #define MY_RADIO_NRF24
              //#define MY_RADIO_RFM69

              #include <MySensors.h>
              #include <SPI.h>
              #include <dht.h>

              #define CHILD_ID_HUM 14
              #define CHILD_ID_TEMP 15
              #define HUMIDITY_SENSOR_DIGITAL_PIN 5
              unsigned long SLEEP_TIME = 900000; // Sleep time between reads (in milliseconds)
              int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point
              int oldBatteryPcnt = 0;

              dht DHT;
              float lastTemp;
              float lastHum;
              boolean metric = true;
              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("TemperatureAndHumidity DHT21", "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()
              {
              Serial.println("DHT TEST PROGRAM ");
              Serial.print("LIBRARY VERSION: ");
              Serial.println(DHT_LIB_VERSION);

              // use the 1.1 V internal reference
              

              #if defined(AVR_ATmega2560)
              analogReference(INTERNAL1V1);
              #else
              analogReference(INTERNAL);
              #endif

              }

              void loop()
              {
              //-------------------- battery

              // get the battery Voltage
              int sensorValue = analogRead(BATTERY_SENSE_PIN);
              

              #ifdef MY_DEBUG
              Serial.println(sensorValue);
              #endif

              int batteryPcnt = sensorValue / 10;

              #ifdef MY_DEBUG
              float batteryV = sensorValue * 0.003363075;
              Serial.print("Battery Voltage: ");
              Serial.print(batteryV);
              Serial.println(" V");

              Serial.print("Battery percent: ");
              Serial.print(batteryPcnt);
              Serial.println(" %");
              

              #endif

              if (oldBatteryPcnt != batteryPcnt) {
                  // Power up radio after sleep
                  sendBatteryLevel(batteryPcnt);
                  oldBatteryPcnt = batteryPcnt;
              }
              

              //-------------------- DHT

              // READ DATA
              Serial.print("DHT21, \t");
              int chk = DHT.read21(HUMIDITY_SENSOR_DIGITAL_PIN);
              switch (chk)
              {
              case DHTLIB_OK:
                  Serial.print("OK,\t");
                  break;
              case DHTLIB_ERROR_CHECKSUM:
                  Serial.print("Checksum error,\t");
                  break;
              case DHTLIB_ERROR_CONNECT:
                  Serial.print("Connect error,\t");
                  break;
              case DHTLIB_ERROR_ACK_L:
                  Serial.print("Ack Low error,\t");
                  break;
              case DHTLIB_ERROR_ACK_H:
                  Serial.print("Ack High error,\t");
                  break;
              default:
                  Serial.print("Unknown error,\t");
                  break;
              }
              // DISPLAY DATA
              Serial.print(DHT.humidity, 1);
              Serial.print(",\t");
              Serial.println(DHT.temperature, 1);
              
              send(msgTemp.set(DHT.temperature, 1));
              send(msgHum.set(DHT.humidity, 1));
              

              delay(SLEEP_TIME);
              }

              1 Reply Last reply
              0
              • M Offline
                M Offline
                manutremo
                wrote on last edited by
                #7

                @barna I just noticed you are using delay() for the wait. It is recommended to use the mysensors function wait() instead of delay().

                See here.

                If using wait() doesn't fix it, the only option I can think of at this moment is if you were using a 8Mhz board but compiled the program for a 16MHz...

                1 Reply Last reply
                0
                • BarnaB Offline
                  BarnaB Offline
                  Barna
                  wrote on last edited by
                  #8

                  I have replaced the delay() by sleep() and every problem was resolved :)

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    manutremo
                    wrote on last edited by
                    #9

                    Yes, sleep is the equivalent to wait if you want to put the arduino to sleep. If it fixed it, wait should too.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    6

                    Online

                    11.7k

                    Users

                    11.2k

                    Topics

                    113.0k

                    Posts


                    Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                    • Login

                    • Don't have an account? Register

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