Picture Frame from a TV and RaspberryPi

Hardware used

Raspberry PI 3B+ you could also use a Pi Zero W, I already had the PI

Sceptre E205W-1600 2020 20″ 75Hz 

VideoSecu LCD LED Monitor TV Wall Mount

Short HDMI cable

Software used

Raspbian

Eye of Gnome

SFTP to map a drive to my Chromebook so I can just take new photos and drag them over into the folder.

SWISH installed on a windows PC or SFTP NET Drive so you can use SFTP like a mounted drive and and not install anything else on the Pi. Not something I needed but its here in case I change my mind or someone else wants an idea.

Installed raspbian.

Pricing out a twenty inch digital picture frame on Amazon they were in the $200 to $300 range. I put this together for under $125. It also lets me use wireless to move pictures into or out of the slideshow.

Change Eye of Gnome to set the time delay for the slideshow. Added eog-plugins to be able to randomize the slideshow.

gsettings set org.gnome.eog.fullscreen seconds N <N= number of seconds between slides>

sudo apt-get install eog-plugins

Edited crontab -e to start and stop the slideshow on a schedule. vcgencmd is used to start and stop output on the HDMI port starting at 8 AM and stopping at 9 PM. I Used Crontab Guru online tool to help set the times. The vgencmd commands are to turn the display off at 9 PM and turn it back on at 8 AM, then at 8:01 start the slideshow.

0 8 * * * vcgencmd display_power 1 <Turns the screen back on at 8AM>
1 8 * * * /home/pi/scripts/display.sh
0 21 * * * vcgencmd display_power 0 <blanks the screen at 9PM>

Wrote a couple scripts to start the slideshow. Make the scripts executable “chmod 755 <script.sh>” and put all the scripts in a folder named scripts.

display.sh
DISPLAY=:0.0 /home/pi/scripts/runslideshow.sh

runslideshow.sh
eog –slide-show /media/Slides/

Used screen to run testing of the scripts.

screen -ls to list screens

screen -r <screen number> to reattach to a screen

The screensaver would kick on after a while and the temperature would go to 84.9’C or higher sometimes. So I disabled the screensaver completely in the GUI. the problem seems to have gone away with that change.

Things to do.

Make a wooden frame for the TV so it looks like a picture frame?

Clean up the power cables

English muffin bread

3 cups flour
1 cup warm water
2 eggs
1 packet dry yeast
salt to taste
Corn meal to coat the bread pan with
Mix one cup flour and dry ingredients.
Add eggs and water
Mix three minutes
Mix in the rest of the flour slowly until a nice ball forms
From into a loaf and set in the greased and corn meal coated bread pan.
Let sit one hour in a warm place or until it rises to the top of the pan.
Heat the oven to four hundred degrees
Bake for about twenty minutes and cover to keep the top from browning to much.
Bake another ten minutes or until it sounds hollow.
Remove from the pan and let it cool

bread
English Muffin Bread

Tasmota Martin Jerry Smart Switch

smart switch
smart switch installation
INSTALLATION REQUIREMENT
It fits the standard mult-gang outlet plate, and outlet box. Just replace your non-smart switch with this smart one in 10 mins.

Neutral wire is required
One-way switch (NOT 3-way)
2.4G Home WiFi network (NOT 5G)
iOS or Android phone
Basic electrical wiring experience
Basic installation tools (screwdriver, wire strippers, voltage checker)
I used these settings that I found and can’t find again from the Internet. With generic it gives me three switch options in the local page but I’m only using one here.

I also have some Martin Jerry smart plugs that I loaded Tasmota on. One problem with these is they display as OFF in the Tasmota software when they are on. I removed entries from GPI04 and GPI05 to get rid of two extra buttons that were displayed in the GUI. The button on the side of the plug works but doesn’t light up right now.

For the plugs that I had, the relay needed to be changed otherwise off was on and on was off. So D6 change 29 to 21 and it works as expected.

I’ve got a generic Tuya Smart outdoor plug that I flashed with Tasmota. It has two outlets on it so the settings are below.

I named the outlets one and two and loaded them into Hubitat with the Sonoff-Tasmota driver as two separate virtual devices as switch number 1 and switch number 2. This plug is branded Amzdest with two outlets.

I tried another outdoor plug that I have this one is three outlets and labeled as Tonbux. I couldn’t get the third outlet working but found a link with a number of similar devices and used the setup from there.

Three outlet outdoor plug
{“NAME”:”Outdoor3Outlet”,”GPIO”:[0,0,0,23,56,0,0,0,21,17,22,0,0],”FLAG”:0,”BASE”:18}

Hubitat

I decided to move my smart home devices to Hubitat from SmartThings. The hub is small about two by two inches and half an inch thick. It uses an external Z-wave/Zigbee stick. About Half the size of my SmartThings hub. I have used the SmartThings hub since December 2016.

hubitat

Yes that USB adapter sticks out the side of the hub, making it look like an afterthought. Setup was smooth and their interface works well. I think it works better than using the interface for SmartThings however there is no app that can be used to easily control devices when I’m not home. They do allow some web links back to the hub but these seem to work intermittently so far, mostly due to my connection not being stable on my phone. The idea is to automate things as much as possible and keep traffic local so its a trade off. I didn’t have to much trouble with the SmartThings hub, but I don’t see the need to have everything out in the cloud when most of this gets managed locally and has no need to leave the house.

Devices I have moved over so far include.

  • Yale YRL220 lever locks. Removing from SmartThings was a little troublesome but they paired right up with Hubitat and Hubitat was able to read the existing codes from the locks as well as add and delete new codes. I think the removing was just an issue with how I did the removal. I should have read the instructions before starting. October 2017
  • Sengled E11-G13W Smart LED Soft White (Element Classic) Bulb Zigbee. Removed from SmartThings and paired up with Hubitat no problems. October 2018
  • Tuya Smart devices. These devices use the Tuya Smart app and I”m still working on getting that setup in the house. It requires an external node.js server running on my Raspberry Pi. I haven’t set all of this up yet.
    • Wireless Garage Door Opener Remote WiFi Switch Universal Controlled by Smartphone. I can control up to three devices with this and it uses a proximity sensor to indicate if a door is open or closed. 2018
    • Martin Jerry mini Smart Plug 2017
  • Everspring ST812 Z-Wave Wireless Flood Detector Haven’t moved this one yet. 2018
  • Wemo Switches work over WiFi, no problems connecting them but some issues with getting them to work remotely consistently. These were my introduction to IoT devices and I have them placed where I can’t easily get to light switches. They have been very reliable with my first one installed for about three years now. December 2015
  • Samsung SmartThings Water Leak Sensor Zigbee. Battery lasts about a year and works well for leaks. I would not place it where it can be submerged. Moved over from SmartThings to Hubitat with no problems. September 2016
  • Samsung SmartThings GP-U999SJVLCAA Smart Water Leak Sensor, Zigbee. Paired up no problems and reads temperature fine. September 2018
  • Samsung SmartThings GP-U999SJVLAAA Door and Window Multipurpose Sensor, Zigbee. This has a tilt sensor in it and so far Hubitat is not reading that correctly. I want to use the tilt sensor on the garage door to let me know if the door is open or closed. September 2018
  • Sonoff Basic using Tasmota firmware no luck with these so far. These are using WiFi. 2018
  • Kankun Smart Switches WiFi, from a variety of manufacturers. These all run OpenWRT and are controlled with some json code in SmartThings. No luck with getting the groovy code from SmartThings to Hubitat yet, but I haven’t spent much time with this so far. I get an error on line 127 right now that I need to dig into. With some help from the Hubitat forums, I changed physicalgraph with hubitat in the code on line 127 and it works now. These are all the same device sold by different companies.
    • Amcrest 2015
    • JTD 2016
    • QISC  2017
  • Sensi UP500W Thermostat on WiFi. I haven’t done anything on this yet it didn’t work under SmartThings and I don’t know if I’ll even try to move this onto Hubitat. December 2016
  • Ring Doorbell Pro and Spotlight Camera Plugin. I haven’t tried anything with this yet. I am using IFTTT with the Wemo app to turn on lights when I arrive home and this works well, but it is outside of Hubitat. 2017
  • Zooz Z-Wave Plus Smart Plug ZEN06 VER. 2.0 with 2 USB Charging Ports, White. This is on order from Amazon and I’ll use it in the garage as a repeater for the Z-Wave network. Setup was easy with Hubitat, no problems. The size of this plug is a bit on the large side, but it is designed to only cover one outlet in a duplex. December 2018
  • Leviton Z-Wave VRPD3-1LW Vizia RF + Series 300 Watt Plug-In Lamp Dimming Module for CFL and LED. Worked no problems bringing it from SmartThings to Hubitat. January 2017
  • Leviton DZPA1-2BW Decora Smart Plug-in Outlet Z-Wave Plus. Worked no problems bringing it from SmartThings to Hubitat. December 2017
  • Aeotec Range Extender 6, Z-Wave Plus repeater, Aeotec Range Extender 6, Z-Wave Plus repeater It was tough to get this to link up the first time with Hubitat but it did eventually connect and is working well now. I could have just as easily used a plug with Z-Wave Plus and gotten the functionality of the of the plug for about the same price. December 2018
  • Aeon Labs Aeotec Z-Wave Gen5 Multi-Sensor (Z-Wave Plus) I had given up on this with SmartThings mostly because of battery life being useless. With Hubitat and four fresh AAA batteries it seems to be working well so far. December 2016
  • Aeotec TriSensor, Z-Wave Plus S2 Motion, Temperature, Light Sensor, 3-in 1 Paired up quickly and working well for about a week or two now. November 2018
  • Z-Wave Plus Gold Plated Reliability Garage Door Tilt Sensor, White (TILT-ZWAVE2.5-ECO). Connected up with a couple of tries removing and putting the battery back in. Contact sensor works with the gerneric z-wave contact sensor driver from Hubitat. December 2018

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>

jon@raspberrypi:~ $

screen commands

screen –ls to list

screen –r to reconnect

screen –r <session number> if more than one session open

ctrl +a followed by d to leave a screen open and disconnect

ctrl+d to disconnect and close the screen

jon@raspberrypi:~ $ screen -ls

There are screens on:

        906.pts-0.raspberrypi   (26/01/21 20:35:30)     (Detached)

        873.pts-0.raspberrypi   (26/01/21 20:33:10)     (Detached)

2 Sockets in /run/screen/S-jon.

jon@raspberrypi:~ $

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

Escape character is ctrl ] and then q at the prompt to get out.

telnet> q

Connection closed.

Lawn Mower Repair

Last time I used the mower it was running rough. So in the spirit of good preventative maintenance I put it away until I had some time to look at it. It would appear that the bolts that hold the carburetor had evaporated. After some looking I found one bolt laying on top of the mower deck and the other had gone to the land of lost bolts.

I searched around in an old canning jar and found that little bolt on the right side that was missing. Looks pretty factory I think. The other one I just screwed it into the nearest empty spot.

I think Dad would be proud but Uncle Harold might shake his head at that one bolt but it’s all I had.

Mower

Mushrooms in the woods

Can anyone identify these for me and tell me what they are? I think they might be chicken of the woods but they are growing on a downed log that might be hickory or some hemlock.
A quick glance through Cornell returned this link, which indicates to avoid them if it is growing on an evergreen. “Be wary of Chickens growing on conifers (in the Northeast) as they are a different species and can cause poisoning. Chicken of the Woods can make a fine chicken substitute as long as you make sure to fully cook the mushroom.” I am in the Northeast, so I suppose I need to go back and see what these were growing on.

Big Al

When I lived in Schenectady we had different neighbors over the twenty years there. The last one just before we left was Big Al. He was one serious piece of work. I’d come home and find him on the front steps silver paint on his face from the can he was huffing. He said he worked at a group home with kids but I don’t think he was ever away from the house that long.
In the evening his buddies would show up and hang with him on the porch. Music banging out from a red Nissan Four Runner and the windows in every house on the block shaking. Sunday morning after the party was over I’d come out and pick up the bottles and baggies from the front yard. I was miserable those months when Big Al lived next to me.
I’d come home every night and there is Big Al sitting on the porch steps stoned out of his mind. He’d say hello to me and I’d say hello back, neither of us very friendly. In the middle of the night I’d look out in my driveway  between the two houses and Big Al’s buddy with the BMW would be tucked up in there out of site and they’d be sitting in the car conducting their business.
Every now and then Big Al and his girlfriend would fight loudly with the windows open, the baby would cry and they’d shout at each other. We’d had worse neighbors for the fighting but these two really set the bar for the drug dealing.

One day a pair of sneakers showed up draped over the power lines going to the house. Pat from across the street took them down and two days later a new pair of sneakers was back up on the wires, this time pink high heeled sneakers. Young kids twelve or thirteen years old would stop by and get their “stuff” from Big Al. He always had a little something for his customers.
Big Al’s friends all wore red shirts and caps like a uniform. The one kid had a pit bull that he would bring just for company. The dog had a nice spike collar and the kid had a tough time keeping him on the leash, but I never saw the dog get loose.
Neighbors would call the cops on the noise and they’d say they couldn’t do anything unless it continued after eleven O’clock when the noise ordinance would kick in. Neighbors would call the cops on the drug dealing but unless someone filed an official complaint they weren’t interested in doing anything more than lending a sympathetic ear. This was around the corner from Steinmetz Middle School (renamed Cities in Schools or some such thing), within site of the signs that say drug free school zone. Those signs were real useful. The Schenectady Police Department was about as useless as tits on a bull.
One Sunday morning after a particularly boisterous Saturday night I came out to a huge pile of garbage in my front yard. It looked like a couple of trash bags had exploded right there. It turned out that Pat across the street had come out early and picked up all the garbage from the night before shoved it in a  couple of bags and thrown them in the open front door of Big Al’s apartment. Big Al’s girlfriend came down the stairs found this mess started crying and went to Big Al who made the assumption that I had gathered all the trash up and thrown it into his front hallway. In his rage he took all the trash and threw it in my yard. I couldn’t blame him for coming to this conclusion because he was aware I wasn’t pleased with him, but I swear it wasn’t me.
Pat from across the street saw what happened and came out told me not to worry he would get it cleaned up since he had caused the issue and told me to take the wife and go get breakfast. I don’t really blame pat for any of this as I was probably thinking of doing something similar to throwing it all in the front door, maybe setting it on fire once I got it in there. I got back from breakfast and Pat is sitting across the street smoking a joint that Big Al gave him after they worked something out. All I really know is my yard was clean again.
Things like this went on for a few more weeks but we saw an eviction notice on the front door of Big Al’s apartment. Then about a month later the final eviction notice was tacked to the front door by the Sheriffs department. I hate to say it but I did find some pleasure in his misfortune.
I had a camera setup that I could use to watch the house while I was at work and the day I saw Big Al, the girlfriend and the baby headed down the street with all their stuff in tow I celebrated. It had been six long months of Big Al holding the neighborhood hostage.
That night I came home and the kids across the street were out front playing basketball for the first time that summer, people were out on their porches and the whole neighborhood felt transformed.
Big Al couldn’t have gone far as they left on foot but it was far enough away I didn’t have to deal with him anymore. About a week later I was out front mowing the lawn and trimming the hedges a couple of young guys about fifteen years old came and sat on Big Al’s porch waiting for Big Al. I let them sit there and went about my business for about an hour. Finally as I finished up I asked what they were doing the one kid told me waiting for Al. I sadly told them Big Al had moved about a week ago. The older of the two griped “how come we are always the last to know”? I smiled and drug my bag of lawn clippings back up the driveway to the garage as they walked away.
Some time in the next couple of weeks the landlord came by with a couple of young guys and cleaned out the apartment. For two weeks they dragged stuff down to the curb and filled it. Six feet tall, two feet wide and thirty feet long two weeks for trash pick up and a couple of truck loads that they hauled away on their own. Every door in that apartment had holes punched in them and I don’t believe Big Al ever took the trash out once while he lived there.

Hijinxs

We lived next to my Grandparents when I was growing up, it made for some good times between my Father and Grand Father.

One time a family of birds made a nest in the eaves of the addition my dad built. The addition contained my parents bedroom and the sound of the baby birds would wake my mother every morning. She insisted my father remove the birds, so he found a good use for them.
Dad caught those babies and put them in a paper lunch bag, took them over to my grandparents house in the evening when grandpa had fallen asleep in his favorite chair and placed the bag on the floor near grandpa. Then dad snuck back outside and watched through the window as the birds began to make noises and escape from the bag. My grand father woke up to the noise and sat there trying to figure out what on earth was going on while dad stood outside the window laughing.
Every year grandpa would plant a garden and my father would plant one to try and compete with his. Each would brag about what they were growing and egg the other on. One year dad had a row of potatoes in, one plant did so much better than the others it was two or three times the size of everything else. It turns out my grand father would wait until dark and sneak over to put fertilizer on that one plant, then come over and mention to my dad how well that one plant was doing and wonder out loud why it was so much bigger than the others. He did this all summer finally telling dad what was going on, they both had a good laugh over that.
There was a truck that grandpa had down by the road and was trying to sell. He also had an old mannequin. He took that mannequin and left the legs hanging out of the hood, boy the cars slowed up and some even stopped to look at that. Not sure how long it took to sell that truck but it did raise some interest in it.