Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Lu Ji edited this page Jan 30, 2023 · 2 revisions

Sponsor Sponsor

A bit more on 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:

  1. genMultistateInput reports the throw action
  2. aqaraOpple reports dataObject247, 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.

How did I figure the response frequency?

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.

Clone this wiki locally