A $5 Motion Sensitive Coca Cola Night Light (That Can Double as a Soap Dispenser)


Here’s a simple project.

Home Depot is currently selling this “Soap Brite Lighted Soap Dispenser” which acts as a night lite, lighting up the liquid soap with one of 7 colors when it senses motion.

It will set you back a grand total of $3.88 plus tax. The led lighting is contained in the base and shines up through the plastic container to illuminate the soap. There’s a button on the base which can rotate through the seven colors. By itself, and for the cost, the dispenser is pretty cool, but you can give it a simple upgrade by replacing the container with a one pint Mexican bottled glass coke bottle. I found mine at a local grocery store for $1. The dispenser’s container simply lifts off the base (no screws). The base fits the pint Coke bottle exactly. Find a pump that fits the Coke bottle, and it can continue its use as a soap dispenser (I was able to snatch one from another soap dispenser we had lying around which fit perfectly).

No pump ? Than simply put it on a shelf with the cap back on and you have an interesting night light!

Caution: If you are going to use the glass Coke bottle as a soap dispenser, be careful as it is a little top heavy and may fall if one is not careful when using. Suggest using superglue to glue the base. Not recommended for kids.
Please follow and like us:
error0

Hacking the Atomi Smart Wifi Plugs and How to Identify Whether IOT Firmware Can be Flashed

The ESP family of wifi chips is manufactured by Espressif. The chips are ubiquitous in Chinese manufactured IOT devices. The firmware on many of these devices can be replaced by open source alternatives like Tasmota or Esp Home. So how do you know if a device advertised as being Wifi-enabled is able to be flashed ? You can try to find reviews but the average reviewer doesn’t flash firmware. In addition, many devices are popping up all the time so that it may be some time before some hacker opens up the device to find out.

I was in Aldi’s a few days after Christmas and saw a package of two outlet plugs branded “atomi” and marketed as WiFi-enabled Christmas light timers:

The package was marked down to $12. One was an indoor plug with two 2.4 integrated USB ports as shown above, the second was a heavy duty black outdoor plug:

 

 

A quick search revealed that Amazon was selling the inside plug alone as the “Atomi Smart Wifi Plug” for $20.

 

 

The biggest question was were they able to be flashed with Tasmota ? Based on the little known name I guessed these were probably ESP8266 type chips but none of the reviews mention being able to flash the device firmware. A google search did not reveal anybody flashing either of these plugs.

 

 

Looking at the back of the package reveals that the plugs are ETL certified for the United States (equivalent to UL approved, good!) with an Intertek Number of 5001673.

 

 

There was no FCC ID but the bar code stated it was “13820-Smart Plug Holiday Pack”.

 

 

Going to the Intertek website for ETL Listed Products and typing in “5001673” revealed nothing. But plugging in the model number “13820” produced a couple of listings with the first being by “SHENZHEN FENERGY TECHNOLOGY CO., LTD” conforming to  a UL standard.

 

After some googling to find the FCC ID number, I tried “fcc model AT1217 SHENZHEN FENERGY TECHNOLOGY CO., LTD. – Shenzhen, Guangdong CHINA” and came up with the listing.

Photos and other information confirmed it was the same plug:

 

There’s also a “Letter of Declaration Model Difference” stating that AT1217 and At1249 models are the same (google reveals that AT1249 is sold at Home Depot also as an Atomi Smart Wifi Plug )

 

Clicking on the “internal photos” link in the FCC document shows the inside of the plug and reveals this interesting photo:

And another photo of the other side of the chip showing the four contacts required to flash:

 

 

Here’s a drawing found online:

So I bought the outlets, brought them home and opened up the interior one (removed the four screws on the bottom and wedged open the case).  I found the TYW2ES chip but the contacts were oriented down and not exposed: 

 

A quick google of “TYWE2s” shows a tutorial on the Tasmota website flashing an outlet having the same wifi module using the hard wired method.  I tried to grind through the bottom of the white outlet with a rotary tool to expose the contacts ( a dangerous and unnecessary [as explained below) step – do NOT do this!):

 

 

 

and to flash it with an FTDI usb/serial tool.  But since I didn’t want to take the time of properly soldering the contacts and/or using a jumper, it was an exercise in frustration. I finally remembered that there were some successful OTA (over the air) methods of flashing these chips, did a google search and found TUYA Convert. I quickly confirmed that the TYWE2S chip is a TUYA and proceeded to flash using the TUYA Convert instructions. Since you need to do this in Linux, I first tried running TUYA Convert in Windows’ WSL but kept getting an error questioning whether my Wifi adapter could be used as an access point. I then ssh’d in to a headless Raspberry Pi I had in the other room and ran the scripts on that machine.  I got the same error.

 

 I then found this note on prerequisite steps for  a pi, followed those steps, then the main installation steps, and it worked like a charm!

Here is the linux session running TUYA Convert:

Both outlets were easily flashed within 30 minutes without attaching any wires or having to open the devices!

 

The Configure Module in Tasmota should be set as follows to allow the manual switch on the plugs to work:

 

 

 

 

 

 

Please follow and like us:
error0

Answer Skybell Automatically on Android Using Tasker – Electronic Door Viewer

Skybell and other video doorbells ring your phone and allow you to see who’s at the door. But they require you to click on the notification and by the time you do that a minute or two may have gone by. In addition you may want to hang a tablet from a wall to act as an electronic peephole, allowing you to see at a glance who’s at the door and to communicate with them.

If you have a Skybell you can do this with Tasker.

  1. Make sure you have installed your Skybell app.
  2. Go to the Google Play store and purchase and install Tasker. Tasker allows you to automate tasks on Android devices. Tasker’s currently $3 and well worth the price.
  3. Also from the Google Play store install “Notification Listener” a free plugin for Tasker.
  4. In Tasker, click on Profiles tab, then the + sign, and add an Event, Tap “Plugin”, then “Notification Listener”, then “Notification Listener” again:
  5. Click “Configuration”, and change the event to “Notification to Any”, Click on the App button to select the Skybell App, and change the “Text” option to “You have a visitor at your door.”, settings should look like this:
  6. Save by clicking on the Checkmark and exiting out.
  7. Back at the Profiles screen, click on “New Task” on the dialog that pops up, name it as “Open Skybell On Ring”, Tap “+”, select “Plugin”, “Notification Listener”, and then “Gestures”:

  8. Fill out the Gestures screen by adding “%nlkey” to “Notification Key” and toggle on the “Click on notification”:

  9. Click the checkmark and make sure Tasker and the new profile is enabled. You are done. Your profile tab should have an entry that looks something like this:

    Now whenever your Skybell rings, tasker will automatically “Tap” on the Skybell notification, and the tablet should automatically open to the live streaming view of your door.

    Troubleshooting: If you are getting notifications but the Skybell app is not opening automatically, make sure you have Tasker and the event/task profile you created above is enabled, and you have permitted Tasker and Notification Listener to have access to the Android notification services (you should have allowed this during setup). If Skybell notifications are not occurring at all, try changing the tablet’s WIFI IP to a static one and use Google’s 8.8.8.8 and 8.8.4.4 DNS as described in my previous post, or uninstalling and reinstalling the Skybell app.

    Please follow and like us:
    error0

Control Almost Any TV, DVD, VHS, or Other Infrared Device By Voice

TV Photo by Creedi Zhong on Unsplash

Want to control almost any TV, DVD or other infrared device by voice ? If your device is not a newer model that offers voice assistance, you can add voice control by use of a univeral remote like the Broadlink Mini3 IR Control Hub.

These devices operate like your normal wand remotes with two key differences:

  1. Rather than having a directed beam of infrared which you must point at your device, they flood the room with infrared light so they reach all of the devices in the room that are within a reasonable distance and angle from the universal remote.
  2. They are Wifi enabled and respond to commands you issue over your network.

The simplest way of using the universal remote is to simply follow the manufacturer’s instructions and use the mobile software offered by the manufacturer. However, this will involve using the manufacturer’s cloud account which can expose your home network to vulnerabilities.

The more secure but more complicated approach which I have done is to ditch the manufacturer’s mobile app and cloud account and use Home Assistant installed on a Raspberry Pi (model 3 or higher). The steps are too long to list here, but in short, they involve using an IF This Then That (IFTTT) Google Assistant or Alexa applet to issue a command through Home Assistant to trigger a URL call to your Broadlink universal remote using the Home Assistant broadlink plugin. You will also need to setup a DuckDNS account and a secure SSL connection to your Raspberry Pi. The Home Assistant will allow you to setup the broadlink plugin to issue either one command (e.g., to turn the TV on), or several in a series (e.g., turn the TV on and switch to a particular channel).

Below are two YouTube videos explaining most of the steps other than the IFTTT setup (Note that you only need to listen to the first 11 minutes for the first video for the infrared setup, the remainder is not relevant):

To set up voice commands using IFTTT, use the Google Home Assistant applet to cause a voice command “E.g., Turn on TV” to fetch the DuckDNS URL containing your Home Assistant broadlink command.

Lastly do you have a Roku or Roku enabled TV like the TCL Roku series but it’s not voice enabled ? You can ditch the Univeral Remote entirely as well as the Home Assistant setup and just have the IFTTT Google Assistant applet recipe issue the Roku API url command directly to the Roku device’s API. Much simpler and more reliable!

Please follow and like us:
error0

Updating an Old Music & Sound Intercom System with Skybell HD (Part 2 of 2) (or How to Have Skybell Ring a Virtual Doorbell Using Skybell Sniffer)

Introduction

In the first part of this two part post, I described how I used an old Music & Sound intercom system to power a Skybell HD without having to install a special adapter or a new transformer. This second part will describe how to have the Skybell ring a “virtual doorbell” by causing the Skybell button push to play a doorbell sound over speakers. This is an alternative to hard wiring the Skybell to an analog or electronic doorbell as intended by Skybell or using a service like IFTTT which results in a rather long delay between button push and response.

As background, when the button is pressed on the Skybell or when motion is detected, Skybell sends a message over Wifi through your router to the Skybell computers outside of your home network. While the messages can’t be read as they are encrypted, routers that allow ssh logins can run a tcpdump command to monitor network traffic and detect the button press. Once the button press is detected, a script can be triggered to play a sound file or perform any other action. This method results in a much quicker response time than monitoring Skybell’s cloud servers or using IFTTT.

Pre-Requisites

You will need the following to setup a virtual doorbell with Skybell:

  • A linux server running on your home network ( I use a Raspberry Pi)
  • A router which permits ssh logins (I have a router running dd-wrt firmware which permits ssh)

Installation

  1. Install Skybell Sniffer

  2. Install the Simple Skybell Sniffer following these instructions. This is a slight modification I made to a portion of a Skybell plugin to Homebridge which was developed by Thoukydides. My modification doesn’t require Homebridge and simply is intended to run as a service on a linux systemd based server (e.g., debian stretch). The Skybell Sniffer is a systemd service which runs a tcpdump on your router through an ssh command. The service monitors the tcpdump output and then runs the command you specify when it detects a message indicating that the Skybell button has been pressed. Since the message is detected before it leaves your network, the response time is much quicker (1 to 2 seconds) then having to rely on IFTTT or having to monitor Skybell’s cloud service.

    Once Skybell Sniffer is setup and running, we need to set up the action part of the process. The simplest action would be to play an MP3 file of a doorbell ringing and play that over a speaker connected to your Raspberry Pi through the 3.5 mm jack or through blue tooth. However, I have a number of Google Assistant minis and a few Chromecast audio devices throughout my house and I wanted to cast the doorbell sound over those devices. After some research I discovered harperreed’s Google Home Notifier Webservice. This service allows one to cast an mp3 file on any Google Assistant or Chromecast Audio device on your network. It also allows you to have Google Asssistant say any text you want, e.g., “You have a visitor at the door”, however I have found this service to be unreliable at times so I haven’t included it in this write-up but it is explained in the Google Home Notifier readme.

     

  3. Install Google Home Notifier

  4. [NOTE/UPDATE: I no longer use the Google Home Notifier as it was unreliable. I now use skybell-sniff to run a script that publishes an mqtt topic to Home Assistant. See this revised github post (geekvisit/simple-skybell sniffer) here as well as further instructions in this skybell-actions.sh file on github – this method is much recommended over the below which seems to break every few days. I’m leaving the below only for those who want to try an alternative method or don’t want to install Home Assistant. ]

    I downloaded Google Home Notifier Webservice, renamed “main.py” to “gnotify.py”, edited gnotify.py to specify the name of the Google Assistant device I wanted the doorbell to play on (e.g., “Living Room Mini”), downloaded a doorbell.mp3 sound file that I found on the web and placed it in the “static” subfolder, and then followed the “getting started” instructions to install:

    To have the Google Notifier start up each time the Raspberry Pi boots, I added the following to my crontab:

     

  5. Specify Doorbell Action

  6. I then edited the Skybell Sniffer “skybell-actions.sh” script (path is contained in the last line of /etc/default/skybell-sniff) to add the action I wanted to perform on the press of the door bell – playing the doorbell mp3 file I downloaded:

That was it. The system works fairly well and I have been using it for several months.

There are several advantages and disadvantages to this setup over a hard wired connection to a real doorbell as set forth in the Skybell documentation:

Advantages:

  • No separate analog or electronic doorbell required
  • Infinite actions, sounds, and notifications be triggered

Disadvantages:

  • Requires a full time Raspberry Pi to be running ( I don’t find this to be a problem as the pi is low in electricity usage and I already use one for HomeAssistant, I do recommend the Raspberry Pi 3 on up as the prior versions are less stable. I have found the 3 to be rock solid.)
  •  

  • Relatively complicated – several things can go wrong – wifi could fail, the Pi could fail, the PI could be unplugged, the software programs could stop, someone could turn off or down the speaker and/or Google Assistant/Chromecast Audio device

Despite the disadvantages, I have found this system to work relatively well over the course of several months. The biggest issue has been some instability in the google notifier but I believe I have ironed those out in the scripts. If the doorbell does appear to fail,then simply restart your google notifier by executing the following commands:

TIP: Configure your router so that the Google Home or Chromecast Device you are casting to is assigned a static IP based on the mac address shown in the Google Home app. This will solve an issue where the device may intermittently go offline.
Please follow and like us:
error0

Updating an Old Music & Sound Intercom System with Skybell HD (Part 1 of 2)

?

Skybell is a video doorbell similar to Ring. These devices are intended to be hooked up to existing doorbell systems. Most traditional wired doorbells have a transformer that drops the high voltage/high amp of household current to lower voltage and amps compatible with your doorbell chime whether analog or electronic. The two wires coming out near the exterior doorbell button lead to the transformer – so for the Skybell you normally need only to detach the wires from your doorbell button and attach them to the Skybell. That way when you push the Skybell button it not only sends an alert to your smart phone but also rings your normal doorbell.
 
 

The Problem – Skybell is Not Compatible with Intercom Systems

 
 
 
Unfortunately our house was equipped with an old 1980’s style Music & Sound intercom system. I had previously equipped the system with a Google ChromeCast audio so I can wirelesssly cast audio from my smartphone to all the rooms in the house using the M&S speaker system. I removed the radio/intercom unit from the wall, tucked the Chromecast to the side of the internal unit, and cabled the wired out the back behind the sheetrock to the outlet below. The 3.5m audio connector plugged into the internal RCA “aux” plug. I also attached a Google Home Mini on the wall above it and a tablet nearby (see my previous post).
 

 
The M&S Intercom has wires leading from the central intercom unit to speakers in each individual room of the house. In addition, wires from the doorbell button run from the front door through the attic, across the house, and down into the wall, coming into the unit and attaching to the chime. See orange and red wires below:

One would think that one could attach the doorside ends of the orange and red wires (now connected to the doorbell button) to the Skybell. But that doesn’t work, as first they won’t power the Skybell, and second, the Skybell button won’t trigger the chime. Watch this video for an explanation as to why intercom type doorbell buttons do not work with Ring or Skybell (I would suggest that you may want to just read the comments and save some time). Skybell does sell a chime adapter but it doesn’t work for Nucom or Music & Sound type intercoms. In fact Skybell has an explicit statement on its site that the Skybell is not compatible with intercom systems.

DANGER: THIS POST IS FOR EXPLANATORY PURPOSES ONLY TO ILLUSTRATE ONE WAY A SKYBELL WAS INSTALLED. DO NOT ATTEMPT THIS WITHOUT CHECKING WITH A QUALIFIED ELECTRICIAN AND CHECKING WITH LOCAL BUILDING CODE. WIRES AND TRANSFORMER MUST BE OF SUFFICIENT CAPACITY; WRONGLY SIZED, CONFIGURED, OR WIRED SYSTEMS COULD CAUSE FIRE OR EXPLOSION. EACH INTERCOM SYSTEM AND TRANSFORMER IS DIFFERENT AND MOST LIKELY WILL BE DIFFERENT THEN MINE. IT IS VERY POSSIBLE YOUR TRANSFORMER MAY DESTROY YOUR SKYBELL!! ALWAYS TURN POWER OFF FROM THE SWITCHBOX BEFORE WORKING ON ANY POWERED SYSTEMS!ANY ATTEMPT TO FOLLOW THIS POST IS DONE AT YOUR OWN RISK.

 
 

Removing the Intercom from The Wall

 
 
After a lot of thought, I decided to do some exploring. I turned the power off, and removed the intercom unit from the wall.  The unit was fitted into a green metal cabinet fixed to the wall. In the right rear corner of the cabinet there was a corner that was encased with a small solid metal removable box to which an electrical plug was attached.

 

 

 


 
 

The Transformer

 
 
I removed the plug, removed the screws holding the sides of the transformer box in place, and revealed the transformer.

The transformer was stamped secondary power “20V 24VA”. This meant that it was 20 Volts AC (or 20VAC) with 24 Volt Amps. To get amps you divide 24VA/20VAC and get 1.2 amps. I’m not an electrician but this fit the power requirements of the Skybell which required 10-36 VAC (my transformer was 24VA so was within range) and 10VA – so max amp requirement was 10VA/10VAC or 1 AMP.

How to hook to the transformer across the house from the door ? I could have installed new wiring. But the wires connected to the chimes were of sufficient guage, and there would be no need for the old doorbell button or chimes any longer.
 
 

Rewiring the Doorbell Wires

With ALL POWER OFF, I unhooked the ends of the orange and yellow wires from the doorbell chimes, pulled the red wires out of the transformer plug (the end on the radio side of the transformer box), connected the one red from the transformer to the yellow wire, and the second red from the transformer to the orange wire, and inserted each wire set back into the plug holes that the red wires came from. Now we had sufficient power connected to the front door.

I then went outside, pulled the old outside intercom/door bell mechanism out of the wall, cut the orange and yellow wires off the doorbell button, and connected them to the Skybell. I did this only after verifying with a multimeter that the voltage and amps were correct.

 

The skybell works like a charm.

 

 

 

 
However there remains a problem – the inside door chimes no longer work, the Skybell is only being powered. While it can send notifications to our smartphones, it is not able to trigger the chimes. In Part 2, I explain the software side of getting a doorbell to ring inside the house to my Google Home Minis and Chromecast Audio receivers using a Raspberry Pi, Google Notifier  and Skybell Sniffer.

Continued in Part 2 ...

Please follow and like us:
error0

Easy Two Dollar Magnetic Wall Mount for Google Home Mini and/or Tablet

Here’s a stable, cheap magnetic wall mount for a small tablet or a Google Home Mini. The big advantage to a magnetic mount is you can easily detach and reattach without any tools. In addition, for tablets, you can use them vertically or horizontally. The mounts have a surpisingly strong magnetic bond and are incredibly stable – I have been using these for a year with an Amazon Fire HD 7″ tablet and a Home Mini. For the wall plate of the Home Mini I used the bottom cut out from a tin can. For the Tablet I used a 1 gang metal plate bought from Home Depot. The metal plate is more attractive and has a stronger hold than the tin can but either will do these devices.

What you need:

  • Large circular Washer from Home Depot or other hardware supplier (not sure of exact part number but looks something like this, mine is 2″ in diameter and has “ASC” Stamped on it) (about 20 cents)
  • 1 Gang Metal Wall Plate or Bottom of a Tin Can (at most $1.60)
  • Large 1 3/4 inch Magnet (about 80 cents)
  • Sheet Rock Screw and Anchor
  • Super Glue

Installation

  1. Optionally paint the wall plates. Let dry well.
  2.  

  3. Attach the metal plate to the wall using the sheet rock anchors. The tin can just needs one screw, the wall mount has two. For a tablet, make sure you install the plate in such a way as to allow the tablet to be mounted or have enough space to orient it horizontally or vertically, the circulate magnet will let you do either.
     

    Tin Can

    Metal Plate

  4. Place the magnet on the plate (you can try superglueing it but I found that the magnetism holds it just as well and the super glue may come off as you can see happened on the tin can mount above).
  5.  

  6. Superglue the Washer to the back of the device.
  7.  

    Google Home Mini

    Tablet

  8. Done.

 
To keep the wires neat as possible and out of the way, I drilled holes above or below the device to run the cables behind the sheet rock to the wall outlet below. For the wall outlet I installed a USB outlet and a small saw brush plate above it (about $6).

Please follow and like us:
error0

Getting Home Assistant, Mosquitto MQTT, and CloudMQTT To Work Together Using an MQTT Bridge

Photo by Louis Reed on Unsplash

Photo by Louis Reed on Unsplash

I’ve been experimenting with Home Assistant (a home automation server) running the Raspberry Pi and have found the videos from Ben at BRUHautomation to be a big help. One thing I was having trouble with was getting MQTT to control both my sonoff outlets and track my devices. Home Assistant can apparently only use one MQTT Broker at a time. Ben uses Mosquitto when setting up the Sonoff outlets, but CloudMQTT when using Owntracks to track devices.

To get them both working at the same time with Home Assistant you have to join the two using a bridge. This thread helped but the steps I needed weren’t very clearly posted and summarized. Here is what I did that seems to work.

  1. Follow Ben’s video to setup Mosquitto MQTT and CloudMQTT (in that order).
  2. You’ll end up with your configuration.yaml file using CloudMQTT as its broker (we will later change this below).
  3. On the command line on your server, kill mosquitto, and then edit the /etc/mosquitto/mosquitto.conf file so it looks like this:
  4. Here’s a screen shot of CloudMQTT where you get the user and passwords for above:
  5. After editing start mosquitto. Note that I’ve commented out the log as that will force any debugging to output to the screen.
  6. Hopefully you’ll see something like this (rather than errors such as connection refuse, unauthorized, etc:

  7. Now, edit Home Assistant’s configuration.yaml and delete or comment out the the CloudMQTT broker under the mqtt section. Add Mosquitto as the mqtt broker:
  8. Restart Home Assistant:
  9. If you don’t restart, some of your devices may work but not all. Also, if you are still having issues of inconsistent response (e.g., I had one light respond well, but the other one wouldn’t go off), go to the command line make sure you are not running more than one instance of Home Assistant (pps aux | grep hass) – and if you are kill all of them and start only one instance.

  10. That’s it. Navigate to your Home Assistant control panel and test your local devices and your Owntracks tracking. It should all work.
Please follow and like us:
error0