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
HW_REV: 5
VENDOR: Arris Interactive, L.L.C.
BOOTR: 1.2.1.61
SW_REV: 7.5.63C.SIP.PC20.TW
MODEL: TG862G
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.

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.

#!/bin/bash
#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 127.0.0.1 >> file.tmp | date >> file.tmp
#-s after mail gives me a subject line
echo “$(cat file.tmp)” | mail -s IPaddress <email@domain.com>
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.

/etc/network/if-up.d/mailip-1

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 myip.opendns.com @resolver1.opendns.com >> file.tmp

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

Raspberry Pi Term Server

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

20180301_151019

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 I’m running this on Buster now
  • 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”.

[ 4.518967] usb 1-1.5.1: pl2303 converter now attached to ttyUSB0
[ 4.523283] usb 1-1.5.2: pl2303 converter now attached to ttyUSB1
[ 4.535015] usb 1-1.5.3: pl2303 converter now attached to ttyUSB2
[ 4.539260] usb 1-1.5.4: pl2303 converter now attached to ttyUSB3

And my ser2net.conf looks like this.

2000:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner
2001:telnet:600:/dev/ttyUSB1:9600 8DATABITS NONE 1STOPBIT banner
2002:telnet:600:/dev/ttyUSB2:9600 8DATABITS NONE 1STOPBIT banner
2003:telnet:600:/dev/ttyUSB3:9600 8DATABITS NONE 1STOPBIT banner

<TCP port>:<state>:<timeout>:<device>:<options>

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 127.0.0.1 2001

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/
/www/
/www/cgi-bin/
root@cat:/rom/www/luci-static#

 

Download the upgrade to /tmp/

wget -O /tmp/openwrt-15.05.1-ar71xx-generic-tl-wr703n-v1-squashfs-sysupgrade.bin http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/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)

W I R E L E S S F R E E D O M
—————————————————–
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
—————————————————–

root@cat:~#

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_ID=’OpenWrt’
DISTRIB_RELEASE=’15.05.1′
DISTRIB_REVISION=’r48532′
DISTRIB_CODENAME=’chaos_calmer’
DISTRIB_TARGET=’ar71xx/generic’
DISTRIB_DESCRIPTION=’OpenWrt Chaos Calmer 15.05.1′
DISTRIB_TAINTS=”
root@cat:~# cat /etc/openwrt_version
15.05.1
root@cat:~#

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.

#ON:
#echo 1 > /sys/devices/virtual/gpio/gpio26/value
#OFF:
#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
root@cat:~#

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

 

Bread and Butter Pickles

3 Quarts Bread and Butter Pickles

I added a little chili powder, lemon and pepper to give it a slight bite. I also ignored the onions as I’m no fan of onions and celery. I let these sit with the weight on them for about twenty four hours since I got busy, I think it just let the flavor sink in more.

  • 15 cups sliced cucumbers
  • 3 onions, thinly sliced
  • 1cup coarse salt
  • 4 cups cracked ice
  • 1cups cider vinegar
  • 1cups sugar
  • 3teaspoon turmeric
  • 1teaspoon celery seed
  • 1 tablespoon mustard seeds

pickles

Directions

  1. Combine cucumbers, onions, salt and ice in a large bowl.
  2. Mix well.
  3. Put a weight on and allow to stand 3 hours. (I used a plate with a jar of honey, anything will do).
  4. Rinse and drain thoroughly.
  5. Combine vinegar, sugar, turmeric, celery seed and mustard seed in a large pot.
  6. Add drained cucumbers.
  7. Place pot on medium low heat.
  8. Bring almost to a boil, but DO NOT ALLOW TO BOIL.
  9. Remove from heat.
  10. Seal in sterilized jars, 10 minutes in a hot water bath.

 

  1. Easy way to sterilize jars: Wash them well in hot soapy water.
  2. Dry them off.
  3. Put on a cookie sheet, right side up, at 225°F for 15 minutes.
  4. Turn off oven and leave them in there until you need them.

 

BLT Steakhouse and Ford Sync by Microsoft

At first glance you would think these two things have no relation. However they seem to originate from the same place.

I was riding home in works 2015 Ford Escape, equipped with Sync. I asked for some Willie Nelson, which I had loaded on my USB stick and and put in the cars USB port. What played was something entirely different, Wrecking Ball by Miley Cyrus. I didn’t even know that was on there, but the song always make me laugh and think about the Bama fan. I do love that snippit of video.

Not entirely unlike my visit to BLT Steak in Washington DC. I ordered a stout but they were out and I ended up with a Duck Rabbit brown ale no other stouts on the menu. Then I ordered dinner, a baby spinach salad, spiced tuna and asparagus. What a tasty meal right? The first thing to come out was a Caesar salad. Not to bad I was waffling between that and the baby spinach, maybe this is what I said when I was ordering. But I thought I even pointed the item out on the menu since it was very noisy in there.

Then out comes my steak and baked potato. What? I told the server I had ordered spiced tuna and asparagus, he apologized and took the steak back. Wait a while and a great meal of what I ordered and they added some mushrooms. They also comped a dessert of warm apple cobbler.

I went back to my hotel room happy and full for the night.

Eco Plug

With a lot of help from Viktor I tinkered with an Eco Plug that I got from Home Depot for $7.50ish. I can turn it off and on using voice commands on Alexa. This has an esp8266 wireless board in it that we loaded with some code to make it look like a WeMo to Alexa.

img_0148

The wires were soldered on temporarily so I could connect a USB FTDI from my PC. There wasn’t enough room inside the plug to leave the wires on so I ended up removing them.

usb-ttl5vt-uart-pinout

Arduino IDE was used to upload to the esp8266. A tutorial for how to work with this is here.

Wemo Lights

I wanted a way to control my Smart Home devices inside the house if I had no Internet connection. I have a mix of Wemo and Kankun plugs right now that I’m using to control various lamps and my outdoor light.

I built a small web page on my Raspberry Pi with buttons for each device. I need to do a lot of cleanup to get the buttons lined up but what I used for the Wemo devices had a lot of padding around each image that was used. The small red light indicates the switch is on, on the Driveway button no light indicates it is off.

pi-webpage

Below is an image from the Wemo pages that I replaced with the buttons shown above.

on-1

For Wemo’s I used the instructions found here. I had a fair amount of trouble getting this working correctly because of permission issues. First it wouldn’t build the database because of a missing line at the top of wemo_backend.py not sure if I deleted that or if it was just missing but I added “#!/usr/bin/python” and that ran. Then I had to create the logfile in “/var/log/wemo/switchlog”.

Samsung Smartthings Hub

To get Google Home to play with my WeMo switches I ordered one of these hubs. For about fifty dollars it added a bunch of other features like door and window sensors along with multi sensors that can detect water leaks and motion. I sent Google Home back as it wasn’t as well integrated with other devices  as the Echo Dot ,aka Alexa and cost $99.99 on sale compared to Alexa at $39.99 on sale.

This has been easy to setup but requires another app on my phone and a connection to the cloud to work.

I used the labs section and connected my WeMo devices immediately and they worked with no more problems. I went to the Google Home and said hey google, “turn on the Christmas lights”, and everything worked. With Alexa I didn’t need the smart hub to make this work as the plug for this was a WeMo and native to Alexa.

The hub did add other options though like motion, and temperature sensing. I can’t find a decent doorbell option though. I just want the doorbell to ring inside and record when it was used, no fancy video or two way communication needed.

Geofencing

Once I got my location set this seems to work pretty well.

I have eight devices setup with the hub now, Belkin Wemo, Amcrest SmartPlug, Samsung Multisensor, Aeon Multisensor, and a Samsung Door sensor. The Amcrest SmartPlug has been the most interesting so far, it is a re-branded Kankun plug that needed some slight tweaking to make it work but cost about ten dollars less than the Wemo switch that does the same thing.

Google Home Arrived and was returned

Setup took about ten minutes from unboxing to being in use. It probably would have taken less time if I had my phone and the Google Home on the same wireless network.

I have two WiFi networks and decided to try and switch Google home to the one with the stronger signal. This left me in a loop for several minutes while my phone and Chrome-cast on the same network waited for Google Home to catch up. The App stayed in a loop waiting for the Google Home.

I wanted to listen to WGY Radio and I got a fail. WGY uses iHeart radio not Google radio. I can install iHeart radio on my Nexus 5x and cast the station over to the Google Home with no problem, but that isn’t going to fly with my seventy three year old mother and she is the one that wants to listen to this.

Google Calendar, Google Home can’t find anything on my calendar? I have a user with a vanity domain smithjon.com and Google didn’t like that, fortunately I also have a regular gmail account and shared the calendar between the two and events show up in both locations now. Google Home however still doesn’t know about any events on my cale

Google Home and Chrome-cast don’t play together very nicely. For example I have Warren Zevon playing on the Google Home and say “Hey Google, cast music to Chrome-cast”. The Chrome-cast comes up and starts Google Music. Nice but that’s not the music I wanted.

I ask Google Home to play Grandma Got Run Over by a Reindeer, sorry its not in my library and it plays something sort of similar, but different.

So far I’ve only used it to play music and asked a few random questions. For a hundred dollars I want it to do more, we’ll have to wait and see how more works out. I ordered a Samsung Smartthings hub to use to control the WeMo switches that I have. I’m trying work something out with the Amcrest plug and my door bell but we’ll see how that goes.

With the Smartthings hub my lights work but with a small delay sometimes, other times they are as quick as using Alexa with the lights direct connected. I still think the Google home is going back.

Google Home has been returned and Alexa has taken over. I kept the Samsung Smartthings hub that I got to work with Home and I’m using that with Alexa and replacing the different phone Apps that I had for WeMo and Amcrest switch control.