Thanks a lot. I checked out the example scripts, also ble-shelly-motion.js, but they all do not exactly replicate what the simple scene does via the shelly cloud.
I want that motion triggers the switch on/off only during certain times.
I got frustrated trying to figure out how to add that to the script. Sys.GetStatus() requires the use of callbacks, and thats the first part then of becoming a javascript expert.
I am also worried about the unreliability of BLE. The way i understand it, the BLE motion would only send a message when it changes state, e.g.: from motion to non-motion or back.
So what happens when the nomotion event is lost ? My switch would stay on for very long time, which is very undesirable.
I guess somehow one would need to make sure the BLE motion would send motion events periodically, and then be an expert javascript developer write a script that re-triggers a timeout event after a motion event. And check the time...
I have opened an issue against this, but i do not expect that ALLTERCO would provide a response
Maybe the motion event is already sent periodically ? Who knows... could not find documentation about that.
https://github.com/ALLTERCO/shelly-script-examples/issues/75