Smart Switches – Bunnings – Deta

Ive had a variety of smart switches for a while – Wifi (Wemo), ZigBee (Generic) and Zwave (Aeotec nano) – I purchased a few different ones and had them installed over the lifetime of my house, but Ive never really found anything that sold me.

  • Wemo’s are big and bulky – and dont do anything other than a single gang light switch
  • Aeotec nano’s are nice, and work well, but are expensive and require a zwave gateway
  • ZigBee generic ones honestly scared me a little bit with how easy it would be for someone to get electrocuted with them (the terminal blocks are really exposed) – they really felt like knock offs and not well made. In hindsight Im concerned that they may not be AU certified. And they have this damn led light that cant be turned off – Its always on.

Recently Bunnings started selling the Arlec “Deta” Smart switches, at a reasonable price – 44$ for a single gang, 50$ for a double, and they have power point varieties as well. I had a few concerns because I dont want to use a cloud service for my automation – Ive done everything i can to run things locally connected to home assistant. But some google indicated that they were just “tuya” devices aka a esp8266 chip with custom firmware, reporting back to a standard cloud service – These should be flashable to tasmota or esphome.

The first one after it was installed, covered over to esphome over-the-air through “tuya-convert” which was an incredibly easy process:

  • Build configuration in esphome, and compile – copy the file to the tuya-convert files directory
  • Set up a pi with tuya-covert
  • Join a phone to the wireless network it makes
  • Put device in to paring mode (push an hold button)

The second one, however didnt want to go that way – It appears it had newer firmware which hasnt been reverse engineered yet. Open issue on github confirms. Thankfully, it was easyish to flash with wires. These are mostly my notes

  • Configure pi (disable console on serial port, disable bluetooth, enable miniuart)
  • Use the pintouts from the pi (3.3v or 5v, multiple grounds, TX and RX)
    • Ground = grey, white, lighgrey
      Transmit = blue
    • Recieve = yellow
    • Power – 3.3v (Red with male plug), 5v (Red with female plug)
  • Put device into flash mode by holding GND to both RST and GPOo
  • run esptool to erase flash
    • esptool.py –port /dev/ttyS0 erase_flash
  • Put device into flash mode by holding GND to both RST and GPOo
  • run esptool to upload firmware
    • esptool.py –port /dev/ttyS0 write_flash -fm dout 0x0 ~/src/tuya-convert/files/laundrylightswitch.bin

I did run into the problem noted in github below that when powering with 3.3v off the pi, that it would reboot constantly so the suggestion to use the 5v feed through through the existing interface worked well.

Pages i used as reference

Automated Watering System

The plan was to build an automated watering system that I can drive from Home Assistant – Ideally with some logic about when to run, and weather etc.

This page is currently a WIP as i work through things

Code is here: https://github.com/nfrankish/watersystem

High level parts list started out as

  1. RaspberrypPi – 3a
  2. FlowSensor – Seed Studio SS101990055
  3. Water Solenoid- ADA997
  4. 12V power Supply
  5. 4ch 5v Relay Board – CE05279
  6. Power Distribution Bus – ADA737

Parts i missed and had to go back for

  1. Terminal Strip – HM3194
  2. Logic Level board (3.3v to 5 v) – XC4486
  3. 12V switch – STO582

Initial test build looked like this:

Final solution

Lawn maintenance / monitoring

We’ve been discussing at work about how one would automate some of their garden maintenance. My yard isn’t really supportive of a automated mower as the majority of it is front facing, and I don;t really want one to get stolen.

Instead, I thought I’d look at what i could do regarding watering and monitoring. So far i only have the monitoring part in place – but the electronics for a watering system have been shipped.

I have two mi flora / flower care modules that I’ve hooked into my home assistant platform using a miflora-mqtt. It’s running on a raspberry pi that I’ve put in the corner of my house near the front and side yards. But the range seems good. The modules are easily a good 5-10m from the sensor and they are reporting in every 30 minutes as needed.

Ill probably push the report time out shortly to hourly or longer because I don’t need 30 minute updates on the status of the lawn, but hopefully it will be useful when the watering system is added.

The homeassistant configuration required was pretty minimal – I’ve committed back my config to git.

I also changed the miflora-mqtt daemon to force_update the last updated date to always send the current date, even if nothing has changed. This way i can monitor that the sensor is actually reporting in as needed.

Charlie – Xiaomi Roborock (Robovac)

I decided that for Chrismas 2018 I’d buy myself a robovac – just to see what they are like and if they provide much value.

I already lazy and have a house cleaner, but if the vac does a good job, I can probably get her to focus on different things.

On recommendation from people from work I got a sweet deal on the Xiaomi Roborock (Its the Gen 2 Cleaner) from Ebay with their black friday / Christmas sales.

It showed up today – It was a lot bigger then I was expecting – a bit bigger then a large pizza. It also has a name – CHARLIE – After candy mountain charlie.

Unpacking was easy enough, as was getting it to charge – Took me a while to get it set up in the App, but that was because the App kept bugging out and not actually having me logged in.

Anyway off it went – It was cool watching it detect the walls and objects it couldn’t hit – and identify the floor plan – Ive included the pics below.

Getting it into Home Assistant was another challenge all together, but I’ll just link to an existing online article for that that I used right here. Need to update the magic mirror display now to show the status of Charlie.

Havnt used the mop function yet – will update this article again when I’ve done that