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. Troubleshooting
  3. Sensor reading incorrect

Sensor reading incorrect

Scheduled Pinned Locked Moved Troubleshooting
9 Posts 5 Posters 2.5k 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.
  • G Offline
    G Offline
    gmccarthy
    wrote on last edited by
    #1

    Having a strange problem - got a NodeMCU running with a ESP8266 as the gateway. For a sensor I have a Arduino mini pro with a MQ-2 Gas sensor. The controller is a domoticz.

    For the past 12 hours the sensor has been logging fine, 30 mins ago it stopped logged. I then did a update to domoticz after which the gateway started logging data again but the value is incorrect.

    Sensor output on com port:

    LPG:0ppm    CO:0ppm    SMOKE:0ppm
    send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
    

    If I telnet to the esp8266 gateway on port 5003 I can see the data being logged to it but the value is wrong. Its constantly logging 536870912

    2;0;1;0;37;536870912
    

    This has happened a few times now - restarting the sensor fixes the issue.

    After sensor restart:

    2;255;3;0;11;Air Quality Sensor
    2;255;3;0;12;1.0
    2;0;1;0;37;0
    

    If the sensor reboot fixes the issue it looks like this is the problem. But looking at the com port info the correct data is being sent.

    Any ideas on this one?

    1 Reply Last reply
    0
    • TheoLT Offline
      TheoLT Offline
      TheoL
      Contest Winner
      wrote on last edited by
      #2

      Could be a power issue. I've had it with one of my sensor. When I powered the sensors directly from the adapter (instead of the Arduino) my problems were solved.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gmccarthy
        wrote on last edited by gmccarthy
        #3

        Thanks - I'll try that. Also powering it from the Arduino. Will try a separate supply and see if it helps.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gmccarthy
          wrote on last edited by gmccarthy
          #4

          Tried powering the sensor from a seperate supply. I seem to be having endless stability issues with getting this working.

          LPG:0ppm    CO:0ppm    SMOKE:0ppm
          send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
          0
          LPG:0ppm    CO:0ppm    SMOKE:0ppm
          send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
          0
          LPG:0ppm    CO:0ppm    SMOKE:0ppm
          send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
          0
          LPG:0ppm    CO:0ppm    SMOKE:0ppm
          send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
          

          The sensor starts of ok - logs to the gateway and onto Domoticz. After a random time it just stops logging now. I'm still seeing the st=ok from the sensor. Does this mean its been successfully sent to the gateway? Could the issue be from the gateway to domoticz?

          DwaltD 1 Reply Last reply
          0
          • G gmccarthy

            Tried powering the sensor from a seperate supply. I seem to be having endless stability issues with getting this working.

            LPG:0ppm    CO:0ppm    SMOKE:0ppm
            send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
            0
            LPG:0ppm    CO:0ppm    SMOKE:0ppm
            send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
            0
            LPG:0ppm    CO:0ppm    SMOKE:0ppm
            send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
            0
            LPG:0ppm    CO:0ppm    SMOKE:0ppm
            send: 2-2-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
            

            The sensor starts of ok - logs to the gateway and onto Domoticz. After a random time it just stops logging now. I'm still seeing the st=ok from the sensor. Does this mean its been successfully sent to the gateway? Could the issue be from the gateway to domoticz?

            DwaltD Offline
            DwaltD Offline
            Dwalt
            wrote on last edited by
            #5

            @gmccarthy said:

            Could the issue be from the gateway to domoticz?

            Something similar was discussed in this thread regarding integers passing from arduino to ESP. I don't know if it was resolved. I do not use ESP myself.

            Veralite UI5 :: IBoard Ethernet GW :: MyS 1.5

            1 Reply Last reply
            0
            • hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              Yes, this has been resolved in the development branch.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gmccarthy
                wrote on last edited by
                #7

                Thanks - I've updated to the latest dev version and things are looking promising.

                Been running 2 hours so far with no issues.

                1 Reply Last reply
                0
                • mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #8

                  Great news! I'm working on getting an ESP8266 working as well. Will make sure I use the development branch.
                  Speaking of that, how do you guys handle different MySensors versions? (created a separate thread to not derail this thread)

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    gmccarthy
                    wrote on last edited by gmccarthy
                    #9

                    I found the ESP8266 rock stable - been running for around 2 weeks so far. No issues.

                    The issue above also seems to be fixed - been about 24 hours now, no crashes, no odd values.

                    Update: Just done a update to Domoticz and now the value is incorrect and seems to be stuck there.

                    Sensor debug:

                    0
                    LPG:0ppm    CO:0ppm    SMOKE:0ppm
                    send: 1-1-0-0 s=0,c=1,t=37,pt=2,l=2,sg=0,st=ok:0
                    

                    Controller log:

                    subtype       = Voltcraft CO-20
                    CO2 = 536870912 ppm
                    Quality = Bad
                    2015-11-08 21:29:09.177  (ESP8266 Gateway) Air Quality (Air Quality1)
                    

                    This is the 2nd time its happened right after a domoticz update (I'm running the dev build)

                    Could this be a issue with domoticz? Its weird how it only does it now after a update. To fix it however I need to reset the sensor.

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


                    10

                    Online

                    11.7k

                    Users

                    11.2k

                    Topics

                    113.1k

                    Posts


                    Copyright 2025 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