I've referenced this a few times in the past---it's a roundabout way to get SmartLife switches working locally (without flashing!)
The methodology to get this working is somewhat advanced. I can't promise to support it, but I'll do my best to help.
Pre-Requisites...
You'll need to use your packet capture app of choice. I use iOS, so I have to tether my phone, *RVICTL*, and WireShark.If you're on Android, you should be able to use something like Packet Capture , zAnti , or cSploit .
Capturing packets...
- You'll need to be on the local wifi network of the switches.
- In the Tuya/SmartLife/Whatever app, open the device page of the switch you want to control.
- Turn it off, and on. Again, make sure you do this from the individual device page
- At this point, you can stop capturing packets, and start looking through them.
- You may want to export the data for viewing on a desktop.
- Sort the packets by those sent to your device's IP.
The packets you want to find will usually have a length of ~300-400 bytes, and will begin and end like this:
0x45, 0x00, 0x00, 0xeb, 0x00 .... 0x00, 0x00, 0xaa, 0x55
The packets will be pretty long, but not consistent in length.
Test which packets work for on/off by using Packet Sender on a desktop. Enable persistent TCP for this step, or the tests will likely fail.
After a while of testing, you should find a packet for on, and a packet for off.
After you've captured and found your packets...
Take those packets, remove all of the brackets, braces, etc., and create a hex stream. Split the hex stream into four equal parts: Then, install the driver:
After Installation
- Create a new virtual device
- Assign the Tuya/SmartLife driver
- Add your device's IP
- Add your eight (four for on, four for off) hex strings to the settings:
... then, hit save!
You can now turn your Tuya/Smartlife device on and off from Hubitat. This communication is one-way only, so buckle up!