How to make your your dumb device smart

There are no shortage of Internet Of Things (IoT) devices in the big box stores that promise that their app or Alexa and/or Google integration will make your home smart.  There is no doubt you can walk into Walmart or Best Buy and walk out with a smart switch or outlet or LED strip or whatever.

Pretty soon though you end up with a multitude of apps and instead it is chaos instead of convenience.   Also if you add something to Alexa, and remove it then add it again you may have two instances in your Device log with the same name which will cause problems.

Another problem I have with these devices is that they are mostly all made in China, and so is the app.  A few years ago when I first started doing home automation there was a popular plug (which is still around) that one geekster used a packet sniffer and proved the device was sending your network credentials back to its server in China.  I won’t dwell here too much but if someone has a back door in the software of a device that resides on your network………..THEY ARE IN YOUR WHOLE NETWORK.

My requirements for a smart device are this:

  1. The ability to remove their firmware and flash it with Open Source firmware.  This is number 1 on my list for a reason.  Security.  Many devices with IoT chips are now blocking the ability to reprogram their devices.  Tuya, which makes about a zillion guts for smart devices has been doing this for a couple years.
  2. The ability to incorporate the device into my Home Automation.  I use a program called  HomeAssistant.  I don’t necessarily want the Googler or the foreign agent, Alexa running the whole show.  I want a web interface, dashboard that I can control from FAR AWAY.  Can’t tell Alexa to turn the thermostat down if you aren’t in the house.   And again this goes back to my previous point of having multiple smart apps = chaos and confusion.
  3. The ability to control it manually should automation break.. If it breaks 100% when the internet goes down………what good is it?

Now, lets get on with making dumb stuff smart.

Quick backstory. We just moved into a new home.  The previous owner had a nice back patio built with a stone wall.  Built into the wall are recessed lights which are hooked to a landscape, low-voltage transformer.

Portfolio 200 watt landscape transformer

These are really simple devices that have an LED, a photocell, and 2 buttons on them.

You hook your lights up and push a button and you have 11 choices.

Button pushes 1 through 9 are the number of hours it will stay on when it gets dark. 1-9.

Then there is an automatic mode which comes on at dark and stays on until sunrise.

Finally there is a manual mode which turns on and off with a button push.

Hey, its kinda smart already but it stands alone.  You have to touch it to make changes. However, to make this device super smart, all you need is an outdoor smart outlet. Home Depot had these Wyze Outdoor Plugs for about $16.

Wyze Outdoor Plug

These can be:

  • Manually controlled (there are buttons on the other side)
  • Have an IP65 water resistance rating
  • Can be flashed with Open Source firmware
  • Work with Machine to Machine protocol (MQTT)

What’s not to love?  In the small pic above you can see I popped the rubber caps off to expose the screws which are oddly enough, triangle security screws.  I don’t have a triangle bit, but there are a million ways to remove them easily.  A #7 Torx driver works perfectly.

The only way to flash these devices is by computer via USB and using an FTDI controller. 5 temporary solder connections need to be made:

  • 3.3 volts
  • Boot
  • Rx (receive)
  • Tx (transmit)
  • Ground

We are going to flash with Tasmota and the info page for that is here.

By far the best information and the best template to configure the device can be found at the website of Digiblur (cross linked with permission).

For this plug we need TASMOTA32not regular Tasmota.  I also found out that you should use the stable version (tasmota32.bin).

Flashing Wyze Smart Plug (click to enlarge pic)

You can barely see the 3.3v connection under the power cord.; Hook to your USB FTDI controller as follows:

  • 3.3v to Vcc
  • Ground to Ground
  • Rx to Tx
  • Tx to Rx
  • Hold Boot wire to the ground wire while powering up.

Yep, it isn’t much fun to solder the wires on the small pads and it is less fun trying to plug in the FTDI controller while holding the boot wire onto the ground point……….but hey, you’ve got time.

Flashing the ESP chip (click pic to enlarge)

As you can see there is a lot going on there.  It is much easier if you have someone to plug the USB controller in for you.  Still, it can be done.

Once it flashes successfully it creates a wifi hotspot called “Tasmota” with a bunch of numbers behind it.  Connect to this wifi then navigate to in a browser.  A page will populate asking for your wifi credentials so it can hook to your network.  Then you can configure the device.  The easiest way to do this is to apply the template file.   The template configuration on the Tasmota Wyze Outlet page IS NOT THE BEST ONE.  Since the incorporation of Tasmota 9.5 manual button pushes (resistive pull up) is now supported.

To apply the Template go to Configuration > Configure Other

Template for Wyze Outdoor Outlet (click pics to enlarge)

then paste in this Template.

{"NAME":"Wyze Outdoor Plug","GPIO":[0,0,0,0,0,576,0,0,0,0,0,224,321,7713,7712,320,0,0,0,0,0,2624,2656,2720,0,0,0,0,225,0,4704,0,0,0,0,0],"FLAG":0,"BASE":1}

Be sure to click the Activate button before hitting save.

To configure for Home Assistant you need to set an MQTT broker, give it a topic name, then put the following code in your configuration.yaml file.

- platform: mqtt
    name: "Wall Lights"
    state_topic: "stat/wyzeswitch/POWER1"
    command_topic: "cmnd/wyzeswitch/POWER1"
    qos: 0
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"

Then it can be added to the dashboard.

Wall Lights

I set my landscape transformer in Manual mode so it is always on and turn power on and off via Alexa or the HomeAssistant dashboard.  “Alexa, Turn on Wall Lights”.  BAM!

Your dumb old transformer is now smart as a whip!

The other two lights above it are two landscape light runs from a Sonoff 4 channel wifi relay (also flashed with Tasmota).  I made a group called Backyard Lights and saying “Alexa, Turn on Backyard Lights” turns on ALL the landscape lights at once.

So you kind of see the whole point of this post………..some of my landscape lights were smart and that original system on the transformer was NOT smart.  That is why I did what I did here.


Leave a Reply

Your email address will not be published. Required fields are marked *