[RELEASE] FEIT (TUYA) Smart Wi-Fi Dimmer Device Driver

I boutght one of this FEIT Dimmer in Amazon, but found that Hubitat couldn't manage it offline.
Raw Driver:
https://github.com/Mixel/Hubitat-Feit-Smart-Wi-Fi-Dimmer-Driver/raw/main/Feit%20Smart%20Wi-Fi%20Dimmer%20Driver.groovy

Well i made a driver to manage it, but as many other tuya devices, you need to set a static IP, get the device ID and the Local Key.

Added the auto refresh capability

This driver only works with Tuya versión 3.3 (RN i don't have a 3.1 device to test)

3 Likes

How do you get the "local key"? And in the Feit app it shows the IP Address to be NOT on my network, but I guess I need to find it on my network....

John

@vaso00mx How should I get the Device ID? Currently, I added the device, but it didn't work.

Thank you @vaso00mx ! I finally was able to get this up and running. The hard part was getting the iot.tuya dev settings (navigating the site is not friendly to someone who doesn't know what their doing - eg. ME!).

That said, I can confirm that on/off commands work as expected, however the SetLevel function seems to throw some errors in the logs, and the brightness level remains unchanged.

2022-03-02 11:34:46.730 am errorgroovy.lang.MissingMethodException: No signature of method: user_driver_mixeladm_Feit_Smart_Wi_Fi_Dimmer_Driver_603.setLevel() is applicable for argument types: (java.math.BigDecimal) values: [50] Possible solutions: setLevel(int), setLevel(int, java.lang.Object) (method setLevel).

Any thoughts on what steps to take from here?

Change this "def setLevel(int level, transition = null)" to "def setLevel(level)"

1 Like

That worked beautifully! Thank you!

I just stumbled onto this. I have a couple sets of feit light strips. Think this would work for them? They are RGB. I had kind of resigned myself to thinking they weren't integratable but this gives me hope.

you have to login at iot.tuya.com

you have to login at iot.tuya.com, and find in your network usind network scanner

I don’t think the driver runs the capabilities for RGB or RGBW lights. However it might allow you to set on/off and set level without ability to set color.

Before I go any further, let me add that I’m in no way adept enough (YET!) to write code for these drivers or anything else for that matter. I’m just extremely curious and captivated by the inner workings of HE.

My take on it

looking through the driver code from @vaso00mx and comparing it to @Rmorobert 's CoCoHue driver for RGBW bulbs, it seems pretty obvious that this Feit driver, while a perfect solution for my dimmer switch, would need additional capabilities added to it.

Feit Driver Capabilities

metadata {
	definition(name: "Feit Smart Wi-Fi Dimmer Driver", namespace: "mixeladm", author: "Miguel Adame") {
		capability "Actuator"
		capability "Switch"
		capability "Sensor"
        capability "Switch Level"

		command "status"

CoCoHue RGBW driver Capabilities

metadata {
   definition(name: "CoCoHue RGBW Bulb", namespace: "RMoRobert", author: "Robert Morris", importUrl: "https://raw.githubusercontent.com/HubitatCommunity/CoCoHue/master/drivers/cocohue-rgbw-bulb-driver.groovy") {
      capability "Actuator"
      capability "ColorControl"
      capability "ColorTemperature"
      capability "Refresh"
      capability "Switch"
      capability "SwitchLevel"
      capability "LevelPreset"
      capability "ChangeLevel"
      capability "Light"
      capability "ColorMode"
      capability "LightEffects"

Link to full CoCoHue driver

Can confirm that my dimmer switch is working as expected, thanks to @vaso00mx; also thanks to @putudhony88 for their ninja-like :ninja: advice that took my non-dimmable switch to a fully functional, dimmable device in HE and in Apple home app via Homebridge.

Regarding [quote="putudhony88, post:8, topic:64100, full:true

you have to login at iot.tuya.com
[/quote] "]
This is a bit of an arduous process but was fun for me for reasons stated above.

Here’s a link to the YouTube vid that helped me walk through the Tuya dev site process to get what's needed for this driver to work properly.

In closing perhaps it'd be worth a shot adding additional Feit drivers forked from this. Not sure who to tag this to, someone please help me out here!

1 Like

I am getting an error:

org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: user_driver_mixeladm_Feit_Smart_Wi_Fi_Dimmer_Driver_601.socketStatus() is applicable for argument types: (java.lang.String) values: [send error: Connection reset] (method socketStatus)

please help

I'm using Principal Module V3.1.4 & MCU V1.0.8 and got this error message:

dev:452022-12-21 19:34:45.027errorjava.lang.NullPointerException: Cannot invoke method getBytes() on null object on line 142 (method status)

dev:452022-12-21 19:34:45.021debugPlain text command: {"gwId":"30008564c4dd5717b6c0","devId":"30008564c4dd5717b6c0","uid":"30008564c4dd5717b6c0","t":"1671669285"}

dev:452022-12-21 19:34:45.018debugSending status message

Any help would be greatly appreciate

Does anyone have a walkthrough of the process of getting a key from tuya? I looked around on the site and couldn't figure it out.

With these devices seeming to be more popular, built-in support would be cool. I suppose there's probably some type of agreement that must be made with the manufacturer.

Download the Hubitat app