mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
147 stars 90 forks source link

Implements pending command to node that uses smartSleep #208

Closed pebri86 closed 7 years ago

pebri86 commented 8 years ago

Please implements smartSleep feature on MySensors v2.0.0beta, all of mysensors nodes use this feature to save battery. This feature is really depends on controller support.

thanks,

cimba007 commented 8 years ago

Just to sum up what smartSleep does (according to the mysensor-code):

int8_t smartSleep(unsigned long ms) {
    int8_t ret = sleep(ms);
    // notifiy controller about wake up
    sendHeartbeat();
    // listen for incoming messages
    wait(MY_SMART_SLEEP_WAIT_DURATION);
    return ret;
}

As mycontroller does not know if the node is using smartsleep the following should be done:

This is not consistent if mycontroller does not know if the other nodes use smartsleep so at best this feature had to be implemented in the mysensor-mqtt gateway.

If it had to be implemented on mycontroller .. it would be best to make a checkbox for each node and queue up commands until there is a heartbeat message ..

PS: Sending all queueud commands at once might cause congestions .. so this is no simple topic .. maybe add a configurable delay to the send-queue

fab33 commented 7 years ago

+1

jkandasa commented 7 years ago

@pebri86 @cimba007 @fab33 smart sleep support added, but not tested fully. Supports other than stream message types. When node sends Heartbeat response to controller. Controller sends available messages for that node. We have to enable Smart sleep enabled on node edit page of controller.

NOTE: When you enabled Smart sleep enabled, Controller never send message to that particular node. Only sends when controller receives Heartbeat response from that node.

image

SNAPSHOT build is available here

jkandasa commented 7 years ago

closing this request, as this feature has implemented.

iotmodules commented 7 years ago

@jkandasa Hi and thanks for the link to the snapshot build. I have tried to test the support for SmartSleep however on the update node screen i don't get the Smart Sleep Enabled checkbox to tell the node it supports it.

I'm Using

MyController Version 0.0.3.Alpha2 Database version 1.02.10 - 2016 Jul 29 Git commit:branch e8afb0266ab685dcfc59b0691ec301d3a17d3fd6:master Built on 2016-07-30T01:04:37+0530 Build JDK 1.8.0_92 Build tool Apache Maven 3.3.9 Java virtual machine specification VM vendor Oracle Corporation VM name Java HotSpot(TM) Client VM VM version 1.8.0_65-b17 Java home /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre Operating system Operating system Linux Architecture arm Version/Kernel 4.4.21-v7+

jkandasa commented 7 years ago

@iotmodules Your version indicates older one 0.0.3.Alpha2

You should download and install from here

iotmodules commented 7 years ago

Hi have installed from the location you recommended still no sign of the checkbox for smartsleep

Version0.0.3.Final-SNAPSHOTDatabase version1.03.04 - 2016 Oct 19Git commit:branch2246de227ec1f6f6937972242a719e27cdb617ea:developmentBuilt on 2016-11-15T14:43:35+0530Build JDK1.8.0_111Build toolApache Maven 3.3.9

On 14 November 2016 at 07:46, Jeeva Kandasamy notifications@github.com wrote:

@iotmodules https://github.com/iotmodules Your version indicates older one 0.0.3.Alpha2

You should download and install from here https://drive.google.com/drive/u/0/folders/0BzuumrtRA7p6Z0hCX2V6cVh2ckU

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mycontroller-org/mycontroller/issues/208#issuecomment-260268675, or mute the thread https://github.com/notifications/unsubscribe-auth/AMOFNZrYfRgLRcDoLnl6XzBg99K1Kuc5ks5q-BHpgaJpZM4InRpC .

jkandasa commented 7 years ago

@iotmodules I guess you are facing GUI casing issue. Can you try to clear your browser cache? GUIDE: http://forum.mycontroller.org/topic/47/gui-caching-issue-problem

iotmodules commented 7 years ago

Hi

That sorted it the cache cleared and the new pages now show.

Cheers

Doug

Sent from my iPhone

On 16 Nov 2016, at 01:00, Jeeva Kandasamy notifications@github.com wrote:

@iotmodules I guess you are facing GUI casing issue. Can you try to clear your browser cache? GUIDE: http://forum.mycontroller.org/topic/47/gui-caching-issue-problem

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

seant100 commented 7 years ago

Hi

If smartSleep is enabled for a node then a request for time is not sent by MyController. Is there a way to receive a time request for a node that sleeps.

Thanks