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. Bug Reports
  3. [SOLVED] msg.getBool() issue related to string length

[SOLVED] msg.getBool() issue related to string length

Scheduled Pinned Locked Moved Bug Reports
4 Posts 3 Posters 1.7k Views 3 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.
  • BartEB Offline
    BartEB Offline
    BartE
    Contest Winner
    wrote on last edited by Yveaux
    #1

    Playing around with my RGB controller, the module sometimes gets in a state in which i can not power off the lights.

    After sending a number of V_RGB message i'm sending a V_STATUS message with payload "0" which is not correct decoded by getBool()

    This is the logging:

    read: 0-0-9 s=1,c=1,t=2,pt=0,l=1,sg=0:0
    send: 9-9-0-0 s=1,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
    Message: 2
    Payload: 
      getBool: 1
      getString: 01EBC6D600r
      getInt: 1
      getByte: 1
    

    Generated by this peace of code

    Serial.print("Message: ");
    Serial.println(message.type);
    
    Serial.println("Payload: ");
    Serial.print("  getBool: ");
    Serial.println(message.getBool());
    Serial.print("  getString: ");
    Serial.println(message.getString());
    Serial.print("  getInt: ");
    Serial.println(message.getInt());
    Serial.print("  getByte: ");
    Serial.println(message.getByte());
    

    It look that the payload length is not correctly used when decoding the message but correctly is displayed in the debug string
    I'm using MySensors version 1.5.3

    YveauxY 1 Reply Last reply
    0
    • BartEB BartE

      Playing around with my RGB controller, the module sometimes gets in a state in which i can not power off the lights.

      After sending a number of V_RGB message i'm sending a V_STATUS message with payload "0" which is not correct decoded by getBool()

      This is the logging:

      read: 0-0-9 s=1,c=1,t=2,pt=0,l=1,sg=0:0
      send: 9-9-0-0 s=1,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
      Message: 2
      Payload: 
        getBool: 1
        getString: 01EBC6D600r
        getInt: 1
        getByte: 1
      

      Generated by this peace of code

      Serial.print("Message: ");
      Serial.println(message.type);
      
      Serial.println("Payload: ");
      Serial.print("  getBool: ");
      Serial.println(message.getBool());
      Serial.print("  getString: ");
      Serial.println(message.getString());
      Serial.print("  getInt: ");
      Serial.println(message.getInt());
      Serial.print("  getByte: ");
      Serial.println(message.getByte());
      

      It look that the payload length is not correctly used when decoding the message but correctly is displayed in the debug string
      I'm using MySensors version 1.5.3

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @BartE Update to 1.5.4. This is why 1.5.4 was released today ;-)

      http://yveaux.blogspot.nl

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

        Could you test the same on 1.5.4?
        https://github.com/mysensors/Arduino/releases/tag/1.5.4

        We had a regression that recently was fixed by @Anticimex .

        Edit: Damn, I didn't scroll down all the way to @Yveaux answer.. ;)

        1 Reply Last reply
        0
        • BartEB Offline
          BartEB Offline
          BartE
          Contest Winner
          wrote on last edited by
          #4

          @Yveaux and @hek bingo! That line in v 1.5.4 does solve the issue.
          Thx a lot for the support.

          read: 0-0-9 s=1,c=1,t=2,pt=0,l=1,sg=0:0
          send: 9-9-0-0 s=1,c=1,t=2,pt=0,l=1,sg=0,st=ok:0
          Message: 2
          Payload: 
            getBool: 0
            getString: 0
            getInt: 0
            getByte: 0
          OFF: Switch colors off
          
          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          26

          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