Local API wish list: "wait for relay_state change, with timeout" command

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Local API wish list: "wait for relay_state change, with timeout" command

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Local API wish list: "wait for relay_state change, with timeout" command
Local API wish list: "wait for relay_state change, with timeout" command
2021-01-10 00:04:55
Model: HS200  
Hardware Version:
Firmware Version:

Hi,

 

I've installed a couple of HS200 and HS210 and have found them quite programmable given the open source software available. There is one major shortcoming to the local API, i'm wondering if TP-Link would consider addressing it:

 

It would be infinitely more useful if each smart switch/plug/etc would support a "wait for relay_state change, with timeout" command. Here is how this command could work:

 

Case #1: when nobody presses the physical switch

 

Local Client                                    HS200

{"wait_for_state_change": {"timeout": 5}} ----->

 

               ... HS200 waits for 5 seconds ...

 

               <----  {"error": 0, status: "timeout"}

 

Case #2: when someone presses the physical switch

{"wait_for_state_change": {"timeout": 5}} ----->

 

               ... 3 seconds elapse ...

 

      Physical switch pressed, HS200 e.g. turns lights on

                            -or-

               HS210 detects 3-way line change

 

               <----  {"error": 0, status: "changed", relay_state: 1}

 

Ideally, timeout could be something from e.g. 1 second to hours, but it's understandable that it may need to be short to allow the plug to do routine tasks. In my typical use case, I imagine I would prefer to set timeout to 30 seconds.

 

Is this possible with HS200 switches, or something TP-Link is interested in adding? It would make them infinitely more useful with home hubs such as Home Assistant, because it would mean hubs like Home Assistant could discover within milliseconds that a switch had physically been turned on without much increase on the local network traffic.

 

Thanks!

  0      
  0      
#1
Options
1 Reply
Re:Local API wish list: "wait for relay_state change, with timeout" command
2021-01-10 19:02:44 - last edited 2021-01-10 19:03:12
  0  
  0  
#2
Options

Information

Helpful: 0

Views: 408

Replies: 1

Related Articles