Recommendation for a cheap smart plug

I’m looking for a cheap smart plug that is compatible with homeassistant. I seen some older discussions on some that might be hackable but I’m hoping for one that is ready to go that I can buy a bunch of without breaking the bank.

These work:
https://www.amazon.com/gp/product/B0796W3YPF/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
They are not that smart but they do turn on and off. About $9 each.

Sonoff is the cheapest option by far. Replacing the firmware is not difficult: https://youtu.be/MOEmVYn4I8A

Sonoff S31s are very cheap, they can monitor energy usage, and they are small enough that you can fit two of them in a standard US-type double wall socket. I also have a TP-link HS110, but it is very big and you can only fit one of them in a wall socket.

Sonoffs can be flashed with Tasmota firmware, which greatly increases their hackability. You do need to do some soldering work to flash the firmware. I just bought 3 of them and had a fun time soldering them, even though I hadn’t touched a soldering iron in 30 years:

1 Like

I second the S31 vs. HS110.
I own two HS110 and I like the energy monitoring functionality, but they are quite bulky and everything else I have from TP-Link does not do provide the monitoring option.

My next purchase will be some S31s because they offer both, the better form factor AND the energy monitoring, even though I will have to start the ‘flashing game’.

I get that some people are scared to death of flashing… I really do. However you can use the Sonoffs off the shelf without flashing by using the eWelink software and IFTTT. It’s not as clean as flashing them (which is pretty simple) but I used mine like that for a bit while I was waiting for the stuff to arrive on the slow boat from china to flash them. So if you really don’t want to flash or if maybe it’s something you might want to do in the future you can.

I do recommend the Sonoffs…

In Canada, Costco has CE SmartHome switches ( 2 for $25CDN) that can be connected to Tuya and easily integrated to Home Assistant. I believe that they can be flashed with Tasmota as well.

1 Like

Does Tuya require an online service to be able to connect to the smart plugs or is is strictly local?

It needs a connection to a cloud server.

1 Like

Thanks, @tom_l - then it’s not for me.
Basically noe of my IOT devices ae allowed internet access.

2 Likes

Likewise. I was looking at the Tuya/Kogan glass panel heaters until I discovered that.

AFAIR, there is a GitHub project that has figured out the Tuya protocol, and can communicate directly with the devices. I’ve not tried it but I’ve read of others who’ve been successful. You might have to search a bit.

Just a quick - and unfortunately rather frustrated - update:

I received 2 S31s earlier today and have since tried to make them work.

After a lot of trial & error I finally managed to flash one of them with the Tasmota firmware:
Simplest way to flash ESP8266 and Sonoff | No command line here!

Took me a while to figure out that you need to hold the on/off button while plugging in the USB connection - which is also not easy to do when you only have two hands,

What I’m still struggling with, though, is to get the S31 connected to the built-in HA MQTT server - all my other MQTT challenges were, while not without the occasional hiccup, much easier to figure out.

Here I’m now stuck with the error message in the console:
MQT: Connect failed to 192.168.7.14:1883, rc -4. Retry in 10 sec
and I cannot figure out how to fix it - I have no idea why my config would result in a MQTT_CONNECTION_TIMEOUT.

I don’t use any credentials on my mqtt server and I am concerned it might have to do with that.

Perhaps a screenshot of the Configure MQTT screen in your S31 may be useful?

I’m using the Mosquitto broker, by the way, as the HA documentation recommended using something other than the built-in version.

Here you go - screenshot of the config screen as well as of the message I see in the console panel when I amend the configuration.

Config screen - whenever I delete the entries in the user and password fields, the get re-populated as shown.:

Console message - seems to push user name and password although they both are supposed to be empty:

Is there a way to push the config manually in the console with the correct parameters?

Okay, found it :+1:

After setting everything else through the config interface (web) I sent these two commands through the console:

  • MqttPassword 0
  • MqttUser 0

Not sure, if it can be set in the GUI as well, will try it with the 2nd plug I have once I flashed it.

1 Like

And: yes!
The configuration with no user and no password can be done from teh GUI as well.
Just enter 0 in the User and 0 in the Password fields.

Wish this was documented somewhere so that one could actually find it easily, e.g. in the interface itself :wink:

how did you add the LITPED Wifi Smart Plug to HA? sorry for the very basic question as I’m very new to HA. I’ve been able to add devices by adding lines to configuration.yaml but I don’t know what to add for this plug

I configured them with the smart-life/tuya app that came with it. Set up the interface in my configuration.yaml:

tuya:
  username: !secret tuya_username
  password: !secret tuya_password
  country_code: 1
  platform: smart_life

and voila… I see the switches in my attributes in HA with really funky names: (i.e.: switch.06200046bcddc2e63c3b)

Thanks Dixey that worked
these switches seem to need internet access to work. I have a tplink where I used their app to set it up then from my router I assigned it a static ip and blocked the ip from internet access. It stopped working via the tplink app but it still works in HA. I guess I can’t do something like that with these.