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. Humidity Sketch causes Vera App to crash

Humidity Sketch causes Vera App to crash

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 4 Posters 5.2k Views 4 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #6

    Strange. You could also try converting it to a string before sending.

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

      You did remove the number-of-decimal argument?

      msgHum.set(humidity, 1) -> msgHum.set(humidity)

      B 1 Reply Last reply
      1
      • hekH hek

        You did remove the number-of-decimal argument?

        msgHum.set(humidity, 1) -> msgHum.set(humidity)

        B Offline
        B Offline
        Bradley A
        wrote on last edited by
        #8

        @hek Ah Hah! That did the trick. I had only changed the variable to an int but had not removed the decimal argument. Works perfectly now! Thanks @hek !!

        1 Reply Last reply
        0
        • jeylitesJ Offline
          jeylitesJ Offline
          jeylites
          wrote on last edited by
          #9

          I have the same issue. Will work on the fix when I get back.

          B 1 Reply Last reply
          0
          • jeylitesJ jeylites

            I have the same issue. Will work on the fix when I get back.

            B Offline
            B Offline
            Bradley A
            wrote on last edited by
            #10

            @jeylites said:

            I have the same issue. Will work on the fix when I get back.

            The fix is pretty simple, as @hek said the DHT sensors arent extremely accurate anyway (DHT11 is +/- 5% accurate), just change msgHum.set(humidity,1) to msgHum.set(humidity) in the sensor sketch to drop the decimal all together. Worked perfect for me and has been running flawless since yesterday now

            jeylitesJ 1 Reply Last reply
            0
            • B Bradley A

              @jeylites said:

              I have the same issue. Will work on the fix when I get back.

              The fix is pretty simple, as @hek said the DHT sensors arent extremely accurate anyway (DHT11 is +/- 5% accurate), just change msgHum.set(humidity,1) to msgHum.set(humidity) in the sensor sketch to drop the decimal all together. Worked perfect for me and has been running flawless since yesterday now

              jeylitesJ Offline
              jeylitesJ Offline
              jeylites
              wrote on last edited by jeylites
              #11

              @Bradley-A
              @hek

              The fix seem pretty easy to follow. But when I exclude the "1" and recompile, I get a bunch of error messages.

              
              Build options changed, rebuilding all
              HumiditySensor.ino: In function 'void loop()':
              HumiditySensor.ino:56:34: error: call of overloaded 'set(float&)' is ambiguous
              HumiditySensor.ino:56:34: note: candidates are:
              In file included from /Users/Jey/Documents/Arduino/libraries/MySensors/MySensor.h:17:0,
                               from HumiditySensor.ino:2:
              /Users/Jey/Documents/Arduino/libraries/MySensors/MyMessage.h:161:13: note: MyMessage& MyMessage::set(uint8_t)
                MyMessage& set(uint8_t value);
                           ^
              /Users/Jey/Documents/Arduino/libraries/MySensors/MyMessage.h:163:13: note: MyMessage& MyMessage::set(long unsigned int)
                MyMessage& set(unsigned long value);
                           ^
              /Users/Jey/Documents/Arduino/libraries/MySensors/MyMessage.h:164:13: note: MyMessage& MyMessage::set(long int)
                MyMessage& set(long value);
                           ^
              /Users/Jey/Documents/Arduino/libraries/MySensors/MyMessage.h:165:13: note: MyMessage& MyMessage::set(unsigned int)
                MyMessage& set(unsigned int value);
                           ^
              /Users/Jey/Documents/Arduino/libraries/MySensors/MyMessage.h:166:13: note: MyMessage& MyMessage::set(int)
                MyMessage& set(int value);
                           ^
              Error compiling.```
              1 Reply Last reply
              0
              • hekH Offline
                hekH Offline
                hek
                Admin
                wrote on last edited by
                #12

                You must cast the value to int.

                gw.send(msg.set((int)xx));

                1 Reply Last reply
                0
                • jeylitesJ Offline
                  jeylitesJ Offline
                  jeylites
                  wrote on last edited by jeylites
                  #13

                  @hek

                  I'm not following that part ... is it like this

                  gw.send(msgHum.set((int)humidity));

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

                    The compile can't find a method matching the argument you're calling the overloaded method "set" with.

                    It looks at the type of the argument (float in your case).

                    So you can either change "humidity" to be a int when you declare it or cast it to an int.

                    1 Reply Last reply
                    0
                    • ThomasDrT Offline
                      ThomasDrT Offline
                      ThomasDr
                      wrote on last edited by
                      #15

                      Hello,

                      i see this is a old posting, but i have the same problem. But i found an error.
                      I use

                      send(summsg.set(sum));
                      

                      but this work:

                      send(summsg.set(sum,5));
                      

                      regards
                      ThomasD

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


                      19

                      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