Cannot remotely reboot a node



  • First of all - thanks a lot for the beatiful library!

    Here is my issue.
    Cannot restart node using MYSController_0_1_2_280.

    Is it only me who has such issue? Where to look in order to find source?

    Here is what i have done:

    • there is serial gateway connected to the computer and one node

    • added section to my arduino ide boards.txt

    • burned MYSBootloader.hex which came with MYSController as a bootloader

    • have uploaded DallasTemperatureSensor example to the node.

    • it seems working fine and sends data to the controlloer

    • it also gets some packets back from the controller;

    • made a minor modification to it to make it sending temperature every 10 seconds even if temperature was not changed and indicate (just print 'starting') the reboot;

    • it seems reporting fine to MYSController;

    • trying to reboot node from the MYSController, i.e. right click node -> click at 'reboot' menu item;

    • node does not restart and continue working;

    I tried to use bootloaders from the MySensor git repository (either Bootloader and MYSBootloader), but result is the same.

    Thanks a lot for the advice!


  • Admin

    @coldpower
    The node is sleeping during the majority of the time and doesn't process incoming commands.
    Substituting gw.sleep() with gw.wait() should do the trick (gw.wait() calls gw.process() while waiting).

    A second option for battery-powered sensors that saves battery life:

    • add gw.wait(200) after the last send command and keep gw.sleep()
    • in MYSController, select Battery powered in node properties

    What happens now: The node listens during 200ms for incoming commands and then goes to sleep. MYSController will send commands once it receives a message from the node.



  • I did not realize that sample is for battery powered node. Now it works fine, thank you for the advice!


 

330
Online

7.5k
Users

8.4k
Topics

90.3k
Posts