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

No Inputs / Outputs available[ Read this before logging a new issue] -- Can't Turn on or off My Tuya Smart LED Plug #16

Open yasurok opened 3 years ago

yasurok commented 3 years ago

First of all, thanks a billion for making this available for us. Its significance is even greater now that all TuyAPI-based custom nodes are not really usable any more because Tuya seems to have installed a new restriction on free developer accounts.

I have a Tuya's smart LED plug. I can turn on and off its LED using node-red-contrib-smartlifeair, which I think is fantastic. However, its "Device Node" does not give me a choice of controlling the power supply of the smart plug. Please see the screenshot below.

Input

Am I missing something? I was expecting an obvious "Power" entry, but perhaps I should use something else?

Please enlighten me. Thanks!

Yasuro

razorRun commented 3 years ago

That indeed a wired one 😆.

I would try updating the firmware. It’s probably just an another manufacturer trying to be clever without using proper api patterns.

What I would suggest, just set up a smart logic in Air app to control the power plug when the led value change. Then from node red you can control the led. Power switch with follow that status.

Cheers

On Wed, 21 Oct 2020 at 12:25 AM, yasurok notifications@github.com wrote:

First of all, thanks a billion for making this available for us. Its significance is even greater now that all TuyAPI-based custom nodes are not really usable any more because Tuya seems to have installed a new restriction on free developer accounts.

I have a Tuya's smart LED plug. I can turn on and off its LED using node-red-contrib-smartlifeair, which I think is fantastic. However, its "Device Node" does not give me a choice of controlling the power supply of the smart plug. Please see the screenshot below.

[image: Input] https://camo.githubusercontent.com/02bde7aa93847f2c60f671e59c71a02d5233973f/68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f70772f414374432d3366585950572d594a7a7746646959696962574b667876374f32684a4c56714d46412d344c4f5a4367446a7874615a646e7565306c475a354f746f2d6e44522d7947496e684e41524e7059704e476e574478497230665a6b7a32673963694b68496b656b4f626c4133686936714765476e5959366a445030696466744b526a325a6a36463732774b4330776b58504c674d74795a2d37315a773d773630302d6e6f2d746d702e6a7067

Am I missing something? I was expecting an obvious "Power" entry, but perhaps I should use something else?

Please enlighten me. Thanks!

Yasuro

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

razorRun commented 3 years ago

Thanks for using the smart life air. If you’re enjoying the node don’t forget to give a git star.

On Wed, 21 Oct 2020 at 4:31 AM, roshan milinda gunasingha < rmilinda@gmail.com> wrote:

That indeed a wired one 😆.

I would try updating the firmware. It’s probably just an another manufacturer trying to be clever without using proper api patterns.

What I would suggest, just set up a smart logic in Air app to control the power plug when the led value change. Then from node red you can control the led. Power switch with follow that status.

Cheers

On Wed, 21 Oct 2020 at 12:25 AM, yasurok notifications@github.com wrote:

First of all, thanks a billion for making this available for us. Its significance is even greater now that all TuyAPI-based custom nodes are not really usable any more because Tuya seems to have installed a new restriction on free developer accounts.

I have a Tuya's smart LED plug. I can turn on and off its LED using node-red-contrib-smartlifeair, which I think is fantastic. However, its "Device Node" does not give me a choice of controlling the power supply of the smart plug. Please see the screenshot below.

[image: Input] https://camo.githubusercontent.com/02bde7aa93847f2c60f671e59c71a02d5233973f/68747470733a2f2f6c68332e676f6f676c6575736572636f6e74656e742e636f6d2f70772f414374432d3366585950572d594a7a7746646959696962574b667876374f32684a4c56714d46412d344c4f5a4367446a7874615a646e7565306c475a354f746f2d6e44522d7947496e684e41524e7059704e476e574478497230665a6b7a32673963694b68496b656b4f626c4133686936714765476e5959366a445030696466744b526a325a6a36463732774b4330776b58504c674d74795a2d37315a773d773630302d6e6f2d746d702e6a7067

Am I missing something? I was expecting an obvious "Power" entry, but perhaps I should use something else?

Please enlighten me. Thanks!

Yasuro

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

yasurok commented 3 years ago

Thanks for the reply. I think it is indeed a very clever idea to make the LED switch and the power switch work in sync, and effectively control the power by way of the LED manipulation. I have put this to test, and it indeed works, except that I linked work_mode with power.

My SmartLife Air app reports my smart plug has the latest firmware (1.0.1). Are you implying there exists newer firmware that should allow me to directly turn on or off power? Are you aware of a Tuya smart plug that lets you do this?

If direct power control is not supported, you might want to mention that in the document, along with this brilliant workaround.

Thanks again.

Yasuro

razorRun commented 3 years ago

Feel free to contribute to the documentations. That will be a great help for others. I am bit tied up at the moment but I will definitely merge those. Have a look at the node red forms under smartlife air. Someone had the same issue and they bought a one that works from amazon

Cheers

On Wed, 21 Oct 2020 at 5:06 AM, yasurok notifications@github.com wrote:

Thanks for the reply. I think it is indeed a very clever idea to make the LED switch and the power switch work in sync, and effectively control the power by way of the LED manipulation. I have put this to test, and it indeed works, except that I linked work_mode with power.

My SmartLife Air app reports my smart plug has the latest firmware (1.0.1). Are you implying there exists newer firmware that should allow me to directly turn on or off power? Are you aware of a Tuya smart plug that lets you do this?

If direct power control is not supported, you might want to mention that in the document, along with this brilliant workaround.

Thanks again.

Yasuro

— 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/16#issuecomment-712960878, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFB72EDJF7M6JBLEGT2KZGTSLWYRNANCNFSM4SYFM5TA .

yasurok commented 3 years ago

I did create a brief writeup and described how I took advantage of your advice and implemented power turning on and off from Node-RED. There's a little problem, though --- I wrote it in Japanese. 😁 Another problem is that I wrote it for myself, so it is not intended as a guide.

I am a complete noob as to Node-RED and JavaScript. That's why my "code" literally looks like spaghetti. When I get reasonably versed in this, I will try to create a writeup in English.

While we're on this topic, may I ask you another question? You say the reason my Tuya smart plug does not expose a power-on/off interface through your node is that its manufacturer is using a non-standard use of the API. That may be so, but in that case, how is that I can turn on power or off using the SmartLife Air app?

razorRun commented 3 years ago

Well, that has a UI that can directly talk to it. Unfortunately, the general API does not have that luxury. So the way around is to tie up something with logic.

DrDuk commented 2 years ago

It seems that it is no longer possible to add new devices and see the inputs/outputs. It may be a problem on the Smartlife Air side. The virtual id of the device is no longer being sent to Smartlife Air (only the MAC address). Therefore, I am limited to the devices that I have already added.