The Randall Museum in San Francisco hosts a large HO-scale model train layout. Created by the Golden Gate Model Railroad Club starting in 1961, the layout was donated to the Museum in 2015. Since then I have started automatizing trains running on the layout. I am also the de-facto layout maintainer. This blog describes various updates on the Randall project and I maintain a separate blog for all my electronics not directly related to Randall.
2019-01-08 - Wyze Cameras & System StatusCategory Randall
Over the last year we had a number of automation failures, and one thing that became quickly obvious was how hard it was to remotely identify that the automation had failed and why or how it had failed (we were not always immediately notified and many times details were lacking). To work around this, I first added a couple Wyze cameras at strategic locations. Here I am solely interested in identifying whether the trains are running and whether they are stopped at the right place at the end of the day.
Although that was a good start, I needed a better way to handle this than made available by the Wyze mobile-phone app, and so I recently added the ability to capture the state of the automation:
This is handled by the automation computer sending a JSON status to my own server. We can keep track of when the system was turned on or off, and whether automated trains were recently active.
One thing the Wyze cameras lack is a web client interface, so I just created the Wyze Web Interface project, a simple Wyze web client to pull the most recent video alarms from the Wyze cameras and display them on the web page. I run a more advanced version of that on my server with authentication. Since I am interested in train motion over a static layout background, it happens to work very well; I can see dedicated video clips when trains are active, and the Wyze’s “green motion tracking” rectangle helpfully points out what’s moving in this picture:
The Wyze cameras are not a security solution, yet they do a great job at this kind of unsecured surveillance. At $25 per camera, they are quite affordable, they are easy to set up, and they don’t require an expensive extra cloud storage subscription. The only drawback of this solution is that their video alarm system only captures 12-second clips with a 5-minutes cool down. That actually works OK here since our automation runs every 5-6 minutes on average, and is not overwise configurable. The video quality is acceptable -- it’s 1080p yet the recordings are heavily compressed. That said we don’t need too much detail, just a rough idea if trains are running and whether they are parked at the proper position. There are a couple cases when trains had derailed which were most obvious.
One thing I would not recommend the Wyze cameras for is a permanent fixed live view. For example, if I had a hidden staging or fiddle yard to monitor, a cheap $25 camera of good quality like the Wyze would be ideal. However the mobile app is definitely not designed for this out of the box. I find that its live view disconnects too easily, and the app itself lacks a setting to have it auto-start and display the live view automatically. Since these cameras do not support RTSP by default, they cannot be used with all the excellent other IPCam apps on Android (although tinyCam pro recently added support for it, so that’s an option but be warned that it uses an unofficial hack to pull the video like I do in my Wyze Web Interface project).