Heartbeat and smartSleep questions.


    1. If a node calls heartbeat(), then what happens at mycontroller?
    2. What is the effect in myc of selecting smartSleep in the node properties page?

    Thanks.


  • Answering 1. above - seems that adding sendHearbeat() resets the 'last seen' time in myc, which works well for nodes that don't send or receive much data.


  • @skywatch

    1. If a node calls heartbeat(), then what happens at mycontroller?

    Your answer is almost right. heartbeat checks whether the node is online or offline. Yes resets the last seen by heartbeat response.

    1. What is the effect in myc of selecting smartSleep in the node properties page?

    For now, SmartSleep supports only for MySensors network. MySensors Sleep API information. Note: Sleep and SmartSleep are different.
    When SmartSleep node awake, MyController sends messages in the queue for that node.
    Implementation request.


  • @jkandasa

    Thank you - still tracking down my problems and trying to find solutions to them. 😉

    Am I right in thinking that smartsleep enabled is really about the message queue and that the heartbeat sent b a node in smartsleep mode will be seen by myc reglardless of wether smartsleep is checkd or not?


  • @skywatch When smartSleep enabled, heartbeat message also will be queued. However, for some time, if there is no message from the node, will be marked as down!


  • I am sorry but I am still not sure how this is working and which is the better option.

    If I use smartSleep is there a possibility that the heartbeat may not be sent by the node? Whereas if I put sendHeartbeat() in the loop it will always be sent on every time the node wakes from sleep?


  • @skywatch yes, heartbeat message will be sent when it comes from sleep. I understand that it is overhead for the sleeping node. hence I removed sending heartbeat for the sleeping node with this ticket: https://github.com/mycontroller-org/mycontroller/issues/456

    Change is available in SNAPSHOT version.


  • Aha! - That was the problem (and now I know who to blame for it) 😉

    Thanks for the clarification 🙂

    Onwards and upwards !

Suggested Topics

1
Online

599
Users

479
Topics

2.9k
Posts