Garage Door Opener with WiFi

20180811_214138I bought this switch from Amazon its listed as the wireless garage door opener remote WiFi switch universal. I connected terminals L and N to 110 volt AC power and the black and green wire to a door magnetic contact sensor for an indicator to let me know if the door is open or closed.

20180811_215539The instructions are a bit weak so I’m unsure what that red wire is for, I’m just going to cap it off for now. Even the instructions on the back of the device seem a bit unclear. The paper that came inside the box had the usual small print that required a magnifying glass and just wasn’t clear.

20180811_210041A will be for the positive to the garage door opener and Com to the negative. You can use B and Com for a second door and C and Com for a third door or gate. However you only get one open and close indicator for all three. I’m going to use this to replace the wall switch for the garage door and give me the option to use WiFi to open and close the door as well as monitor the status of the door. I also ordered a type 86 wall junction box to put this in and mount it to the wall.

I used the Tuya Smart phone app for control and integrated this with my Home Assistant setup running on a Raspberry Pi. I chose Tuya Smart because I already have this setup for several other devices.

screenshot_20180811-224539_tuyasmartIt looks like these are just a NodeMCU with momentary relays and the power supply built in. Below is what it looks like in Home Assistant. For some reason Home Assistant doesn’t see my renaming of Button A to Garage Door. With a restart of Home Assistant it eventually picked up on the renames.

Screenshot 2018-08-11 at 10.52.04 PM

Posted in Home Automation, Linux, Uncategorized | Leave a comment

Cable Modem Woes

I’ve since returned this modem and have basic modem with one ethernet port and phone jacks. I was using an Arris cable modem which is proving to be garbage.

System: ARRIS DOCSIS 3.0 / PacketCable 2.0 Touchstone Telephony Gateway
VENDOR: Arris Interactive, L.L.C.
SW_REV: 7.5.63C.SIP.PC20.TW
Battery Charger FW Rev: 02.10
 Firmware Build and Revisions
Firmware Name: TS070563C_032913_MODEL_862_GW_TW_SIP_PC20
Firmware Build Time: Fri Mar 29 11:42:55 EDT 2013
eSAFE 0 FW Revision: 2.0.40_0920E

I tried to do DHCP reservations and it seems these just fail with no error displayed.  I wanted to change the subnet it uses and that isn’t allowed either. Wireless seems to lock up randomly and requires a reboot. I have multiple AP’s and funnel DHCP back to the Arris so usually I just end up on an AP that is farther away that what is ideal for my setup.

I built a DHCP server on my Raspberry Pi as a work around to not being able to reserve an IP and have that working smoothly for a couple of days now. I’m considering getting a different modem with out wireless or the phone ports ( I don’t use the phone ports) and then maybe a Ubiquiti Networks UniFi AP Enterprise WiFi System UAP-3 and using that so all of my APs would be from one manufacturer and work together better. Currently I’m using a mish mash between the cable modem and other old AP’s that people have discarded. I just don’t want to spend the $180 or so that it costs to get this equipment and use Ubiquiti’s proprietary POE.

Posted in Home Automation, Linux, Uncategorized | Leave a comment

Raspberry Pi email IP at boot

I found a bunch of what seem complicated answers for how to do this. I made my own eventually just using bash and adding it to /etc/rc.local, turns out I didn’t need to have it in rc.local either, if I put it in /etc/network/if-up/ and made it executable.

#Send an email with the local IP
#sleep added to give me a wait to the process during boot and before remove to give the #script some time to run. These may not be needed. Adjust as needed.
sleep 5
#grep -v added to trim out some extra info from the file
#date added so it would append a time stamp to file
ifconfig | grep inet | grep -v inet6 | grep -v >> file.tmp | date >> file.tmp
#-s after mail gives me a subject line
echo “$(cat file.tmp)” | mail -s IPaddress <>
sleep 5
rm file.tmp

I added this line to /etc/rc.local, but I was getting two copies of the email on boot up. So I deleted it.


If I wanted my external IP I could add a line like below. Maybe put a line in cron to run the script every so often and get this info at times other than when I boot the Pi or when renewing the IP.

dig +short >> file.tmp

To get dig I had to add apt-get install dnsutils.

Posted in Debian, Linux, Uncategorized | Leave a comment

Raspberry Pi Term Server

So I got this idea online to make my own terminal server with a Raspberry Pi and ser2net.


Hardware needed.

  • UGREEN USB to Serial RS232 Cable Adapter 4 Ports DB9 Converter 9-Pin Male to Male with Hexnuts
  • Raspberry Pi

Software installed.

  • Raspbian Stretch Lite
  • Ser2net
  • UFW
  • Screen

I think a Pi Zero could also do the job and save a few dollars. So far it remembers the port numbers on reboot and my config is good but I’m working on getting the logging to work the way I want it.

Install ser2net running Raspbian Stretch:

apt-get install ser2net  Then edit /etc/ser2net.conf with your USB to information that I got from running “dmesg | grep tty”.

apt-get install ufw

sudo ufw default deny

sudo ufw allow ssh

sudo ufw enable

sudo ufw status numbered

Installed screen:

sudo apt-get install screen

screen -S term <to open a screen with the name term>

To use the terminal server I ssh in and then run screen and open a terminal in there. The advantage to that is I can leave the terminal running during an upgrade and go get some milk and cookies.

telnet 2001

Posted in Uncategorized | Leave a comment

Upgrade Kankun Smart Plug

To preserve some changes and files I added. Add their path to sysupgrade.conf, in my case this is /www/ and /www/cgi-bin/.

# cat /etc/sysupgrade.conf

## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/


Download the upgrade to /tmp/

wget -O /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin

Run the upgrade and set back and wait. One site I found on the web said they had problems with wireless being disabled after running sysupgrade -c on one of three attempts. If that happens it means I’ll be opening the case and soldering pins to the headers to get wireless enabled again.

sysupgrade -c /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin

BusyBox v1.23.2 (2016-01-02 18:01:44 CET) built-in shell (ash)

CHAOS CALMER (15.05.1, r48532)
* 1 1/2 oz Gin Shake with a glassful
* 1/4 oz Triple Sec of broken ice and pour
* 3/4 oz Lime Juice unstrained into a goblet.
* 1 1/2 oz Orange Juice
* 1 tsp. Grenadine Syrup


Seems like it worked, the plug is sitting there with a blue light like it is still upgrading.

root@cat:~# cat /etc/openwrt_release
DISTRIB_DESCRIPTION=’OpenWrt Chaos Calmer 15.05.1′
root@cat:~# cat /etc/openwrt_version

After the install finished I was good and logged back in using the password that I had set for root. The relay didn’t work to turn the switch on and off  but adding two lines to rc.local corrected this problem.

echo 26 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio26/direction

After doing that and testing with a couple of reboots I can run the commands below to turn the outlet on and off from the CLI or go to the web page that I build and do the same there. Just the line with the word echo in them.

#echo 1 > /sys/devices/virtual/gpio/gpio26/value
#echo 0 > /sys/devices/virtual/gpio/gpio26/value

Space is at a premium on this device after the upgrade.

root@corner:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.0M 256.0K 768.0K 25% /
/dev/root 2.0M 2.0M 0 100% /rom
tmpfs 14.2M 68.0K 14.1M 0% /tmp
/dev/mtdblock3 1.0M 256.0K 768.0K 25% /overlay
overlayfs:/overlay 1.0M 256.0K 768.0K 25% /
tmpfs 512.0K 0 512.0K 0% /dev
root@corner:~# exit
root@cat:/~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 512.0K 396.0K 116.0K 77% /
/dev/root 2.3M 2.3M 0 100% /rom
tmpfs 14.0M 64.0K 13.9M 0% /tmp
/dev/mtdblock3 512.0K 396.0K 116.0K 77% /overlay
overlayfs:/overlay 512.0K 396.0K 116.0K 77% /
tmpfs 512.0K 0 512.0K 0% /dev

Smartthings is broken now and I can’t use voice commands on Alexa for this plug either until I sort that out.


Quote | Posted on by | Leave a comment


I was filling the Heep up with gas today at the local Cumberland Farms and noticed a help wanted sign “Starting pay $13 an hour”.
This made me think of Al Vermalia he was an old codger I worked with years ago. He used to tell me how easy I had it since when he started out at seventeen cents an hour back in the day.
When I started minimum wage was $2.65 and I got a raise a few weeks later when the state minimum went up. I’m starting to understand why that seemed so huge to Al and I think I might be the old codger now.

When I hit seventy how much will that dollar be worth then?

Posted in Family | Leave a comment

Stuffed Spaghetti Squash

One large spaghetti squash
one pound mozzarella
sixteen ounces ricotta cheese
four ounces butter
garlic cloves to taste
one pound boneless skinless chicken
four ounces Italian dressing
basil cubes to taste

Heat the oven to four hundred degrees
Split the squash in half and remove the seeds
clean and crush the garlic cloves place them and a couple pats of butter on a cookie sheet with the halves of squash open side down over the garlic and butter. Cook for one hour.

When the squash is close to having been in the oven for one hour take the chicken and dice it up in a pan on the stove top. Brown the chicken and add the Italian dressing and cubes of basil letting it all blend together.

Once the squash has cooked for an hour remove it from the oven and flip them over. Add a layer of ricotta cheese then the browned chicken and last a layer of mozzarella into the squash. Put this back in the over at four hundred and cook for another twenty minutes or until the mozzarella starts to brown.

Remove form the oven and let sit for about five minutes, serves four to six people with left overs.

I like to add a diced up tomato or mushrooms into the squash with the chicken, ricotta, and mozzarella. You could add anything you like to give it a little more something.

Basil Cubes
Harvest the fresh basil from the garden and puree it into a mush add a little olive oil and dump these in an ice cube tray. Freeze and save the basil for later use, long after your basil has all frozen outside.

I got some great spaghetti squash this year from the Suzy Dan team, thanks guys we had a great dinner Sunday.

Posted in cooking, food, gardening | Leave a comment