Python Emmesteel Integration
Project description
Emmesteel
Library for connecting to Emmesteel Digital Heat Controller. This is the Digital Controller used in the italian-made towel warmers sold by Amba like the modello i, etc
Motivation
They make nice towel warmers for sure, but for a $300 controller the "smart" side of this controller failed to deliver.
No Home Network
The device spins up its own Wifi AP and once connected, it launched a UI to control it using a captive portal. It does not allow you to provide a wifi settings. To make any changes to the device settings or remotely control it, you must always temporarily connec to the device AP.
No Scheduling
They only controls offered are on/off, temperature and a count down shut-off timer. It does not allow scheduling start/end times so you can, for example, turn it own in the morning, and off in the evening.
Solution
This library can communicate and control the device via a short-lived websocket connection. For the Wifi AP problem, it documents how to use RaspberryPi (Pi) as a proxy. The Pi connects to both networks simutaneously, and then proxies home network requests to the device's own dedicated wifi. The Pi proxy also helps solve a very low wifi signal that is caused by the controller being inside a metal junction box.
Finally, a minimal Home Assistant Integration allows to easily remotely control the device, see history and include in any desired home automation.
Network Setup - Summary
- Setup a RaspberryPi with default OS and connect it to your home wifi
- Use NetworkManager and a second wifi dongle to connect the pi to the towel warmer SSID (e.g.
EMMESTEEL_24TS00112) - Use iptables to proxy home network requests to the device on
EMMESTEEL_24TS00112
Step-by-step
Network Manager
sudo nmcli connection add type wifi ifname wlan1 con-name EMMESTEEL_<SERIAL> ssid EMMESTEEL_<SERIAL>
sudo nmcli connection modify EMMESTEEL_<SERIAL> wifi-sec.key-mgmt wpa-psk
sudo nmcli connection modify EMMESTEEL_<SERIAL> wifi-sec.psk "<PWD>"
sudo nmcli connection up EMMESTEEL_<SERIAL>
Iptables
Setup Ip Forwarding
sudo sysctl net.ipv4.ip_forward
If not 1 use sudo sysctl -w net.ipv4.ip_forward=1 and uncomment line in /etc/sysctl.conf to make it permanent`
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j DNAT --to-destination 192.168.X.X:80
sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
sudo apt install iptables-persistent
sudo mkdir -p /etc/iptables
sudo iptables-save | sudo tee /etc/iptables/rules.v4
sudo nano /etc/rc.local
sudo iptables-restore < /etc/iptables/rules.v4
sudo chmod +x /etc/rc.local
sudo iptables-save > /etc/iptables/rules.v4
sudo reboot
Verify
- Laptop can ping pi proxy
- Pi is connected to
EMMESTEEL_(iwconfig) - Pi can curl
192.168.1.1which isEMMESTEEL_router ip. - Assuming the above is working and iptables routing is correct,
- curl
<pi-ip>/should return the emmesteel UI.
Take Control
Finally, you can use the home-assistant custom integration to see the status, power on/off, adjust heating level, etc.
Troubleshooting
"Requirements not found: ['websockets==13.1']"
After a HA update, the integration may fail to load with this error because HA bundles its own version of websockets and won't install a conflicting pinned version for custom integrations. The fix is to remove websockets from the requirements list in manifest.json, since pyemmesteel already depends on it and HA's bundled version is compatible.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyemmesteel-0.0.2.tar.gz.
File metadata
- Download URL: pyemmesteel-0.0.2.tar.gz
- Upload date:
- Size: 16.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
146ccc36d7ba8f0e84fb5a57820b127faf700650415fdd991e418cf290e233cc
|
|
| MD5 |
b3ae5c773851c286d062468e862ec9ae
|
|
| BLAKE2b-256 |
d1314a846132e55af9bcbbdf66fe283b7aecfda0d4b0a14676bc745ab3284af5
|
File details
Details for the file pyemmesteel-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyemmesteel-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cce00b65f30ad194fa48a3810ac3473c5260831a167c136996c86d6ff654a73
|
|
| MD5 |
b579aeeaab8252484c88bf57bd1d86f8
|
|
| BLAKE2b-256 |
6400fb7c65112ec90002d0dd30a63cab4fb50550d8362a671391f2c40ad5d457
|