AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
204 stars 52 forks source link

Is there a way to use the plugin as a dimmer, not just a switch? #56

Closed lz1kka closed 5 years ago

lz1kka commented 5 years ago

Hello,

I bought wall dimmer that works with TuyaSmart app, but with this plugin I am not able to use it as a dimmer, but instead only as a standard switch (on/off). I see another plugin "homebridge-tuya" which has such an option, but it is listed as "depreciated". So could that be done with this one? I don't need any ColorTemperature or RGB features, just ON/OFF+Dimming

Thanks in advance!

BR4DY commented 5 years ago

Have you tried changing the type to: "type": "RGBTWLight",

Rantaholic commented 5 years ago

Try this solution from a previously closed issue for the same question and possibly #37 at the bottom of that thread.

https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/19#issuecomment-472334773

lz1kka commented 5 years ago

Try this solution from a previously closed issue for the same question and possibly #37 at the bottom of that thread.

#19 (comment)

I have changed "SimpelLight" to "SimpleDimmer", then added "dp": "3" as attribute and now everything seems to be fine! Thanks a lot for your help!

I am going to buy one from those and I hope the same solution will work https://www.aliexpress.com/item/33041711803.html?spm=a2g0o.detail.1000013.13.78233a70SJkQD8&gps-id=pcDetailBottomMoreThisSeller&scm=1007.13339.128609.0&scm_id=1007.13339.128609.0&scm-url=1007.13339.128609.0&pvid=721ed1e6-c38b-4455-9614-a8f0bb079c19

AMoo-Miki commented 5 years ago

I am glad you were able to use the, then unreleased, SimpleDimmer.

I have made a release of all the devices that were tested in the past couple of months. The documentation for Supported Devices and Setup Instructions have been updated.

The latest rc release appears to be stable enough to use; give it a shot by doing npm i -g homebridge-tuya-lan@rc. It includes logic to understand this newer API.