-
-
Notifications
You must be signed in to change notification settings - Fork 2
throw
The cube is a battery powered device. To preserve battery, it doesn't always respond to incoming commands (e.g. mode toggle). The auto-response frequency is once per hour.
It'll send a dataObject247 message to indicate that it is now accepting incoming commands.
The soft mode switch works by saving a callback function to z2m memory, and then executing the callback when the cube is ready to respond (when dataObject247 message arrives).
Therefore, mode switch will also take effect within an hour, even you don't throw.
Now onto the throw.
throw causes two things to happen:
-
genMultistateInputreports thethrowaction -
aqaraOpplereportsdataObject247, indicating it is now accepting commands
BTW, The two reports come in order as listed. Therefore, throw is a perfect candidate action to automate mode toggle. The callback is scheduled (in 1), then immediately gets executed (in 2).
Of course you are free to use throw for any other automations. When dataObject247 message comes in, the system won't do anything if there's no callback scheduled. So there's no conflicts with "internal" uses.
I had a NodeRED flow that sends me a mobile notification when the response message (dataObject247) is received. The notifications came in roughly once an hour.