Skip to content

KurtSanders/Hubitat-Dywarmic-Integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hubitat Dywarmic Towel Warmer Integration

Version 0.0.3 (May 19, 2025)

This Hubitat integration provides local network control and the status of the Dywarmic towel warmer (tuya category: mjj).

tuya Tested Towel Warmers

See it on Amazon USA

Features:

Feature Description
Hubitat local direct device API access Local WiFi connectivity which eliminates cloud dependency
Switch * Turn On
* Turn Off
Set/Change Countdown Duration Timer * Set/Cancel warming duration in intervals of 20-minute increments
Set Countdown Duration Timer Default * Set countdown duration timer default value when towel warmer is switched on
Reduce hub events * Reduce frequent 'current temperature' events by only creating an event to the hub every ± delta N° units.
* Ignore nonessential towel warmer events.
Device API Debugging * Custom Data To Device
* Send Custom JSON Object
Set Features * Child Lock
* Eco
* Light
Refresh Updates device states

Prerequisites

Installation

Install the Dywarmic Towel Warmer Application on your Hubitat Hub

  • Add the Dywarmic Towel Warmer application using Hubitat Package Manager by selecting 'Install' and searching for 'Dywarmic Towel Warmer' or by tags 'Bathroom', 'Temperature', or 'Pools & Spas.'
  • Allow HPM to automatically launch the Dywarmic Towel Warmer app, which will create a virtual child device (Dywarmic Towel Warmer device driver) that you can name, i.e., 'Towel Warmer.'
  • Verify this new device has been created in your devices view

Preparation

  1. Read tuya IoT Platform Configuration documentation
  2. Driver username and password: The username and password of the Tuya Smart or Smart Life app that you used to link devices on the Tuya IoT Platform.
  3. Driver accessId and accessKey are your cloud project's Access ID and Access Secret, respectively. Go to the Tuya IoT Platform and select your cloud project. Click Project Overview and find the Access ID and Access Secret.
  4. Determine the local key for your towel warmer.

tuya Wifi Hubitat device Drivers

  • This integration utilizes the Tuya API protocol, which connects directly to the device on the local network (i.e., not via the Tuya servers) to control and read the status of devices. This Hubitat device driver supports versions 3.1 - 3.4 of the Tuya API protocol.

    • The Dywarmic Towel Warmer uses the tuya API protocol 3.4
  • All Tuya devices communicate over the network using AES ECB encryption. The key for encrypting and decrypting is created to pair the device with the SmartLife mobile app. To use the Hubitat device driver, you need to obtain this key.

How to Get the Hubitat Tuya Integration Working?

  1. You need to get the Dywarmic Towel Warmer device ID, device key, device local ip-address, and device endpoints by following this tuya Guide and the 'Install steps' listed below.

Be aware that a new local key may be generated when a new device is added to or paired with the SmartLife app; hence, it must be updated when/if you get another device and add it to Smart Life!

Install Steps

  1. Install the latest version of Python on a computer, if needed.
  2. Install the Tinytuya module on this same computer.
  3. Install the Smart Life app (Apple or Google) and pair all devices you want to use in Hubitat. Refer to the device user guide on how to pair the device.
  4. Scan your network for the paired Tuya devices by writing the following in the Unix/Dos command line: python -m tinytuya scan
  5. Create a iot.tuya.com developer account and log in. Connect your SmartLife app to this developer account using these instructions.
  6. Run the tinytuya wizard
  7. Now you should have a complete overview of everything you need to get the Hubitat device driver working
  8. In Hubitat, open "Devices", then click "Add Device", and click "Virtual".
  9. Assign a Device Name and select the Type: "Hubitat SmartLife Integration." Then, click "Save Device."
  10. Now, add the "Device IP", "Device ID", "Device local Key", and select the Tuya protocol version that you got from point 6.
  11. Lastly, set the Endpoint you want to control. During step 6, you should see something called "Status" together with each device, something like this: Status: {'1': False, '2': False, '3': False, '5': 0}, the endpoints are the numbers in front of the False. This status block is for a "Dywarmic Towel Warmer," where each number corresponds to the status of the device.
  12. Click "Save Preferences."
  13. You should now be able to control your Towel Warmer device via Hubitat on the local network only.
  • It is highly recommended that you lock a static IP on your (wifi)router to the towel warmer device so it does not change its IP address. If it gets a new ip address, then this Hubitat integration won't be able to find the device, and you will need to change the ip address in the device driver preferences.

FAQ

Q: Will I be billed after the 1-year free trial of the API product expires?

A: After expiration, you can renew the subscription for free. The Trial Edition allows you to use all free API products but limits the quota of API calls. For more information about the quota, see Pricing.

Q: Issues / Limitations

A: Updates to a towel warmer firmware or API may render this custom device driver's connectivity in the future. Please report to Habitat's open forum support thread.

Version 0.0.3 (5/19/2024)

  • Added some debugging information for when the TCP/IP pipe raw socket is disconnected
  • Added capability "PresenceSensor" to track device connectivity state
|Filename|Type|Version| |---|:---:|:---:| |SanderSoft-Library.groovy|Library|0.0.5| |Dywarmic Towel Warmer Integration.groovy|App|0.0.3| |Dywarmic Towel Warmer.groovy|Driver|0.0.2|

About

Hubitat Tuya Integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages