razorRun / node-red-contrib-smartlifeair

Allow you to integrate any[almost] tuya, smart life supported devices to node-red. However, you will have to enrol these devices via Smart life air mobile app. https://www.smartlife.nz/smartlife-labs
https://roshan.digital/
13 stars 1 forks source link

Any plans to add query comand to the node? #11

Closed Nodi-Rubrum closed 3 years ago

Nodi-Rubrum commented 3 years ago

Any plans to add query command to the node? So a node red flow could get the initial state of the device?

razorRun commented 3 years ago

On startup, it should spit up initial state automatically.

On Wed, Sep 23, 2020 at 8:07 AM Nodi-Rubrum notifications@github.com wrote:

Any plans to add query command to the node? So a node red flow could get the initial state of the device?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72ECATU2SGSOL6KCT3J3SHD7YRANCNFSM4RWGEL7A .

Nodi-Rubrum commented 3 years ago

Right. But if I needed or wanted to query state at some future point, the only way to get the state returned is to initiate a command, say power on or off for example. TUYA API has a request/query call that can retrieve the device state on demand.

dachshund-digital commented 3 years ago

Thanks for working on this, greatly appreciated.

dachshund-digital commented 3 years ago

Just a friendly nudge on when this might be implemented?

razorRun commented 3 years ago

Hey Guys I just added this. All you got to do pass string "?" to get the last status. Can you check and let me know

razorRun commented 3 years ago

@Nodi-Rubrum do you mind closing this issue after testing this for me. Also, I added a new option to enable disable debug messages. I think you requested it eh ?

Nodi-Rubrum commented 3 years ago

Sure, will do! I will test this tomorrow and it works, close the issue. Thanks for adding this!

Nodi-Rubrum commented 3 years ago

Just tested it, sorry took me a few days to get to this. Works fine, passing '?' returned the state of the device. Thanks! This lets me setup a NR flow that can scan the devices to get their active state. Nice.

FYI, I know dachshund-digital, will make sure he knows of the update as well.

Nodi-Rubrum commented 3 years ago

Closing issue.