Quantcast
Channel: tcpmeta – The IT Garage
Viewing all articles
Browse latest Browse all 90

Cheap Smart Power Strip to run Tasmota

$
0
0

Couple of years ago I bought two cheap WiFi smart power strips. The “brand” is AHRise and the model is AHR-083. This same power strip has many brands. It uses that crappy Tuya app to control it. Well I don’t want stuff on the “Cloud” so I decided to toss Tasmota on it.

The Power Strip has the Tuya TYWE3S module that is basically a ESP-12 module. I cracked the power strip open and soldered wired to 3.3V, GND, RX, TX, EN and GPIO0. I have one of those ESP8266 breakout programmers so I could flash it. I used wire wrapping wire and just wrapped the wires to the programmer. Keep in mind you do not have the power strip plugged into the wall while it is open.

Anyway, tie all of the connections to the programmer but tie GPIO0 to Ground. I then went to the Tasmota Web-installer using Chrome (Yes, I know I hate Chrome too). I was able to Flash it and when it rebooted you can hear the relays click on and off. Used my phone to access the power strip and had it connect to my WiFi then accessed the Web UI from my PC to program it.

Programming was a bit hard. Each time I tried to add the button to GPIO5 it would reset itself. So I have it programmed like this. Using a Generic template.

GPIO4 - LED_i
GPIO12 - Relay 2
GPIO13 - Relay 1
GPIO14 - Relay 3
GPIO15 - Relay 4

Works a treat as long as you don’t enable the reset button on GPIO5.

My plan is to automate my mini shop but I don’t want to use Home Assistant. I just want to use a Pi and a touch screen and issue HTTP API commands.

For the HTTP API command I can issue this

http://<IP>/cm?cmnd=Power1 TOGGLE

Just replace <IP> with the IP address of the device. This will make Relay 1 Toggle whatever state it is in. I could also replace the TOGGLE with ON or OFF. Also replace Power1 with Power2 or Power3 or Power4 to control the different outlets on the power strip.

For the Linux side of me I can issue the same commands using Curl from a terminal.

curl http://<IP>/cm?cmnd=Power1%20TOGGLE

Could be handy if I want to go retro with it.


Viewing all articles
Browse latest Browse all 90

Trending Articles