Ok so I think it’s because in discovery.py, the from .plug import EcoPlug wasn’t loading right because of an error saying python couldn’t find a relative file. At least from my research on the error I saw.
I copy and pasted everything from plug.py into discovery.py, and then added any missing import commands.
The result was the earlier message that now shows my “pool” plug. I’m wondering if that from .plug import EcoPlug was hanging up the discovery process? Keep in mind I learned python today… and github for that matter.
What I don’t understand is how the my raspberry pi, running HASS at home, knows what discovery.py is. I don’t see it on my file structure in HASS. I only see it on github. Does that mean my HASS has to reach out to github to run discovery.py? If so, how can I make it reference my new github fork to test this?
I have the DEWENWILS model. Version 2.2.5 according to the Eco Plugs Android App.
Based on some Wireshark captures, I think this plug works differently. It may be vendor and/or firmware specific.
The plug broadcasts UDP to port 10228 about every 2 seconds. I think this is part of local discovery, though there is some communication to server1.eco-plugs.net
The App talks to the plug using UDP source port 9090 to destination port 1022. It doesn’t look like any discovery is done, presumably it learns the IP from the port 10228 broadcasts. The data size is 152 not 128. It’s just padded with zeros so probably nothing new added. Responses from the plug are also 152 bytes to UDP/9090 - I think this is also different - looks like it’s expecting 408 bytes.
I’ve have this one bought in 2019, it shows as ECO-780Bxxxx (V:1.7.1) in the app. I have it functioning with Home Assistant at the moment, so could potentially grab debug logs if useful.
Some day I’ll probably flash it with Tasmota if I get up the nerve. (found a template here). I just did this with a Nexx Garage unit, now I’m out of their eco system and local only. They had a major security breach and took my device offline for over 4 days, that was my motivation to flash it.
I was successfully able to flash my Dewenwils switch with Both ESPHome and Tasmota. I just created a write up on ESPHome seen here and also the Tasomta flash from here worked perfectly as well. I will be creating a couple other write ups on ESPHome for other branded ECO-Plugs soon.
Thanks for posting this, you’re giving me even MORE incentive to get up the nerve. Pretty easy to get that board out? Wondering if I can leave the main unit wired in place, and just pull the board, and flash it upstairs.
Yes, this was straight forward, I bench tested everything on an EcoPlug wall outlet plug first. Since my Dewenwils switch is outside I turned off power and was able to solder in the wires without disconnecting the main unit. Once it was hooked up to the USB serial, I was able to create the device in ESPHome via Homeassistant, Add the Yaml to the device config and hit install. You’ll notice the photo in the esphome write up that the main board looks slightly different, however the “ECO-Plug / PAGECO-PLUGS” board is identical.
Hey - I’m trying to flash in a similar manner to you, but I don’t seem to be able to get the board into programming mode. Do you just hold the reset button down or did you do GPIO0 → ground? And for how long or at what step of the process?
any updates? i current have 1 out of 10 devices(the other 9 are in a storage box collecting dust, will dig them out and see if i can get them connected) working in home assistant
Hold GPIO0 to ground, then apply power. My connections were soldered, so I left GPIO0 connected to ground for the duration of the flash. once log showed a successful flash I removed the GPIO0, TX and RX pins and rebooted device. I will update my write up to add this. Please let me know if this helps or if there is anything else i should add.
Hi there, do you have any troubles using this repo because of the lack of unique id ?
I always need to use scenes to control my ecoplugs switches in automations
I saw the same thing but I was able to get it to work in automations just fine.
Now I’ve had the device die and need to be RMA’ed. The new one is installed and I can’t get it to show up again! Fun times with this one. It seems that the discovery still isn’t really working but I can’t be sure. I don’t know enough about coding python.
Ugh, it’s broken again for me. Switch is still working in the app, but the switch entity in HA is nowhere to be found. No errors in the HA log. If it was warmer / dryer I’d just go flash it with ESPHome… (hard wired into my pool pump)
EDIT: Found the culprit, can’t use this if you have Unifi stuff:
There is currently no working script to make this device work. What I did was install the homebridge server, which recognizes the ecoplug or wion switch without problems. then home assistant recognizes the homebrige server and all its devices.
One thing I recently discovered, pretty sure it’s doing broadcast or multicast, because I tried moving the Eco Plug to my IoT VLAN and my phone (and HA) couldn’t see it. As soon as I moved it back to my main network it popped up immediately.
I still plan on flashing it, but going to wait until it warms up. (Pool plug, in Jersey, it’s Winter here)
I should also add I had to switch wifi networks, so I recently reset it, and the integration was still able to find it.
I moved both my Ecoplug (Woods) in the fall to an IoT network and had issues until my HA was moved over. It scares me every time I do something in HA I will loose the integration and I won’t know until late spring when I turn my pool equipment back on. (live in Canada)
but how hard is it to flash? I am getting more comfortable with ESP32s but how do I plug in a usb to flash this?