1.6 gateway possible error

  • I am testing MySensor 1.6 gateway with sensors and I got the following behaviour: sending ON and OFF commands receive the following on gateway:

    Message load: ON
    Message load: OFF
    Message load: ONF

    It seems like the gateway do not clear the message.data, just keep the previous value and overwrite it.

  • Mod

    Thanks for reporting this. There has been a few similar problems reported. Does http://forum.mysensors.org/topic/2688/isue-bug-in-message-getint-or-getfloat-payload-dos-not-reinitialized-completely/3 look like it is the same problem?

  • It could be related to, but I am not sure. I have encountered something similar but on node, I have posted on http://forum.mysensors.org/topic/2675/mysensors-1-6-availability/9 and later on it seems to disappear. The nodes works fine as I have tested and the tests were done with the same commands ON and OFF, so the problem I found is only in the gateway.

  • Mod

    Yes, it seems related to node problems, not gateway. Sorry.

  • I explain here what I see myself, may be I am wrong, I am not an expert in MySensors.
    So, I add sensors to the gateway - MySensors 1.6, the gateway is the only powered module, the Serial Monitor shows the incoming message to be ON, OFF then ONF and it does not work anymore for the switch.
    Power up a node and check it: it works fine, the messages are the right ones.
    I have change the message for active state from ON to ONN to be the same length with the off state and it works for the gateway.

  • Problem solved in the version 2.0.0-beta.

  • Problem found in 2.0.0-beta: the LED pins seems to be active on nodes even I didn't enable MY_LEDS_BLINKING_FEATURE in MyConfig.h, so I expect them to be unavailable and do not interfere with my sketch, but they did. How to disable them and keep the pins for my program?
    In 1.6 they are not active.

  • Admin

    There was a related PR merged a couple of days ago... could be some new bug introduced perhaps. Are you running the absolutely latest?


    Ping @tbowmo

  • I use the development version downloaded about one hour before posting, then check several times with 1.6 and 2.0 versions. I change the LED pin to 2 for all three LEDs (Rx, Tx, Err) and then my switches that use old LED PINs works fine, while a LED connected to the PIN 2 was blinking.

  • Admin

    I made a change, so that if any of the LED's where defined, then it will enable MY_LED_BLINKING_FEATURE

    Could it be that you have a define for some of the LED's somewhere?

    look for MY_DEFAULT_xx_LED defines..

    Or are they set as default somewhere in the library @hek?

  • Admin

    yes.. I see the problem now.. My bad :(

    Didn't see that we set the MY_DEFAULT_xx_LED defines for different archs if they are not defined by the user..

    I'll make the appropriate changes tonight (I'm not at my dev machine now)

  • Hardware Contributor

    @tbowmo, so does this mean that we no longer have to enable/uncomment the "MY_LED_BLINKING_FEATURE" in config.h? We are able to just assign the pins inside of the sketch (like the default sketch of the development branch shows) without touching out config file?

  • Admin


    That was the initial thought, but I now see that it will not work, as the Leds are defined in the core, if they are missing, so they will always be defined when we reach the logic that enables MY_BLINKING_LED_FEATURE. And then that will always be enabled.

  • The LEDs are still active. I solve it by set all LEDs PIN no to 200 into MyConfig.h . Not a PRO solution, but I need the PINs and now I can use them.

  • Admin


    I have fixed this today on development, so could you try updating from github (The stuff I made last night, had some build errors on ESP platform, so that's why it first came in tonight)

  • Yes, it works fine now, thank you!

Log in to reply

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.