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

Need instructions on options available #22

Closed peliopoulos closed 3 years ago

peliopoulos commented 3 years ago

Thanks for all your work on this project. I really appreciate that you have put this together!

I have a "Bright"-branded plug that I want to be able to turn off using Node-Red triggered by a command from Join. However, the inputs and outputs are not clear and don't seem to affect the LED/power state of the plug:

Input options (while device is on): switch_1 ==> Values:Boolean countdown_1 ==> Values:Integer ("unit":"s","min":0,"max":86400,"scale":0,"step",1)

Output options countdown_1 ==> Value:0 switch_1 ==> Value:true All Output Channels as a JSON

I have tried lots of combinations and none of them change the status of the plug. What do I select? Does the output from the Join command matter?

Thanks in advance

razorRun commented 3 years ago

What happens when you connect a debug node to output and select JSON? Also, can you share your device ID?

On Sun, Jan 3, 2021 at 6:53 PM peliopoulos notifications@github.com wrote:

Thanks for all your work on this project. I really appreciate that you have put this together!

I have a "Bright"-branded plug that I want to be able to turn off using Node-Red triggered by a command from Join. However, the inputs and outputs are not clear and don't seem to affect the LED/power state of the plug:

Input options (while device is on): switch_1 ==> Values:Boolean countdown_1 ==> Values:Integer ("unit":"s","min":0,"max":86400,"scale":0,"step",1)

Output options countdown_1 ==> Value:0 switch_1 ==> Value:true All Output Channels as a JSON

I have tried lots of combinations and none of them change the status of the plug. What do I select? Does the output from the Join command matter?

Thanks in advance

— 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/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EEUR46T2OGQWBKFKHTSYAA63ANCNFSM4VRTQPOQ .

peliopoulos commented 3 years ago

my device ID is 58776028d8f15bc474bd

The output that I get when I hit deploy from the SmartLife Air node is:

"User Authenticated as peliopoulos@gmail.com"

countdown_1: 0
switch_1: false

However, while I get output from my Join Node, nothing seems to be triggered in the SmartLife Air node. I have also tried a webhook trigger that works great with my other flows and no luck. Do I need some special form of input?

razorRun commented 3 years ago

Does this emit again and again when you press something on the plug? And can the plug be operated from the mobile app?

On Mon, 4 Jan 2021 at 6:09 AM, peliopoulos notifications@github.com wrote:

my device ID is 58776028d8f15bc474bd

The output is :

countdown_1: 0 switch_1: false

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22#issuecomment-753647444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EF6KIESEDCLZETUBX3SYCQENANCNFSM4VRTQPOQ .

peliopoulos commented 3 years ago

Yes, when I turned the plug on, the output changed switch_1 to true one time. And then again to false when I turned off the plug.

The app controls the switch with no issues.

razorRun commented 3 years ago

Ok so that's mean output is working correctly Isn't it?

For the input select switch 1 and send just a boolean value

On Mon, 4 Jan 2021 at 7:14 AM, peliopoulos notifications@github.com wrote:

Yes, when I turned the plug on, the output changed switch_1 to true one time. And then again to false when I turned off the plug.

The app controls the switch with no issues.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22#issuecomment-753655828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EERRHXVXNX4ESAI22TSYCXZDANCNFSM4VRTQPOQ .

razorRun commented 3 years ago

Just try with 2 inject nodes with true and false. Connect them to the node input and select switch_1 and deploy and press those inject buttons

On Mon, 4 Jan 2021 at 7:17 AM, Roshan Milinda rmilinda@gmail.com wrote:

Ok so that's mean output is working correctly Isn't it?

For the input select switch 1 and send just a boolean value

On Mon, 4 Jan 2021 at 7:14 AM, peliopoulos notifications@github.com wrote:

Yes, when I turned the plug on, the output changed switch_1 to true one time. And then again to false when I turned off the plug.

The app controls the switch with no issues.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22#issuecomment-753655828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EERRHXVXNX4ESAI22TSYCXZDANCNFSM4VRTQPOQ .

peliopoulos commented 3 years ago

My input was the problem, thanks for helping me troubleshoot it! Now I just need to get Join to spit out a Boolean value.

For troubleshooting purposes, I used the Inject node, Payload type to boolean and value of true. I also turned on the "Inject once after 60 seconds" option to allow for the SmartLife to login.

razorRun commented 3 years ago

Can you see if your NR system log spit out any errors on startup?

Also this could be because switch_1 is controlling something not visible.

Check this https://github.com/razorRun/node-red-contrib-smartlifeair/issues/16

On Mon, 4 Jan 2021 at 7:41 AM, peliopoulos notifications@github.com wrote:

My input was the problem, thanks for helping me troubleshoot it! Now I just need to get Join to spit out a Boolean value.

For troubleshooting purposes, I used the Inject node, Payload type to boolean and value of true. I also turned on the "Inject once after 60 seconds" option to allow for the SmartLife to login.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22#issuecomment-753659185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72ED7F7BW2VEJCHDOC4TSYC25LANCNFSM4VRTQPOQ .

peliopoulos commented 3 years ago

Everything is working perfectly now, thanks so much!

I have my phone using Tasker to send a Joaoapps Join messages to Node-Red. I use a function to process the Join message to a True or False value which feeds to the SmartLife Air nodes. In turn, the plugs are turned on or off.

razorRun commented 3 years ago

Awesome, thanks!

Btw what did you change to fix it?

On Tue, 5 Jan 2021 at 11:49 AM, peliopoulos notifications@github.com wrote:

Closed #22 https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/razorRun/node-red-contrib-smartlifeair/issues/22#event-4167110007, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EB5O5H7HHZGCP3Y3QTSYJAXNANCNFSM4VRTQPOQ .

peliopoulos commented 3 years ago

I wasn't feeding it a boolean value correctly. Once I fixed that, it worked fine, then just a matter of turning my trigger into boolean.