Following the setup of a Cent OS CCTV server, I’ve been using Raspberry Pi’s as video sources. But what if there was a Raspberry Pi in perfect situ for a CCTV camera, but was already in use as a media player?
A Linux system has always had the impression that it is
versatile, so this should be an achievable task. A barrier would be how to get
this done with the operating system installed, in this case it is LibreElec, an
OS with the tagline “Just enough OS for Kodi”. Therefore, it would be more of a
challenge than a usual Debian install.
The team at LibreElec saw this type of thing coming, and included the Docker service as a Kodi addon to allow the curious tinkerer to add more than Kodi to a Pi.
If you have the LibreElec based Pi in the opportune
placement to add a camera, here is how to add Mjpeg streaming capabilities…
When a phone is no longer required on your service, there is
always trepidation on what will happen to it, the hope is that’s its unplugged,
stuffed in a drawer and never sees the light of day again. But in reality,
there’s a good chance that it will end up on the likes of eBay and Gumtree, and
since a phone is already provisioned with your server details, the next person
to get their hands on it could have unauthorised access to the system.
The simple step to prevent unauthorised access is to delete / change the secret to the extension, if your will to put up with the constant failed registration attempts. But what about the personal data on the phone? BLFs, local directories and the like.
Yealink devices since firmware version 81 have had the
ability to factory reset via a SIP notify command, meaning should a phone still
be online, a factory reset can be handled remotely and without end user
intervention.
If you’d ever searched for Raspberry Pi projects that
involved a camera then the results would certainly include Motioneye OS, an
easy to use self-contained operating system that is truly (write then) plug and
play.
Looking for a CCTV project earlier this year I too was drawn in by this, and with my small abundance of RPi spares it was the cheapest choice, using a couple of RPi 3B+ for video, and a Zero W for time-lapse image capture. All processing was self-contained on each Pi with capture data passed over via SMB to a Windows file share.
This worked, but had a couple of problems that prevented it
from being trustworthy. Firstly, it stops recording video after a few days of
uptime, by creating empty files. And secondly the time-lapse camera seemed to
reset every few minutes that created in white out image capture as the camera’s
exposure setting recalibrated, ruining a time-lapse video.
Looking wider there was also the performance issue. In
Motioneye OS’ default state of managing all features, the highest FPS seemed to
max at 15 fps even on the Pi 3B+. Forums suggest this is due to the motion eye
daemon handling all the image processing in software, putting a strain on the Pi’s
modest CPU.
The idea and goal is to move the processing and IO
responsibilities to my server, which would be far more capable than the then
latest available RPi, and as I have chosen Cent OS to be my go-to Linux OS of
choice, this is what I’ll be using.
A gateway to make this possible is an option in Motioneye OS, Fast Network Camera. This when set relinquishes the Pi of all processing duties and serves to just stream the camera capture as best as possible via MJPEG.
Here’s how to set up Motioneye on a Cent OS server to be a central data hub for a network of RPi Motioneye OS cameras.
For years, since it was XBMC on the original Pi I have been using OSMC as my Raspberry Pi media player. And following on from a whole home Pi redeployment for to include a CCTV system the latest installment was to install OSMC to two Raspberry Pi 3A+.
Raspberry Pi 3A+
The Pi 3A+ plus is the cut down little brother to the latest
3B+ much akin to the original Pi B and A models. Both have the same quad-core ARM
v8 processor, Broadcom Videocore-IV GPU and importantly the 2.4GHz and 5GHz
802.11b/g/n/ac Wi-Fi module for faster and stable WIFI out of the box. What’s cut
down is the RAM, halved at 512MB, USB ports are reduced to one due to the removal
of the onboard USB and gone is the ethernet port.
All the power without the ports make its perfect as a media player,
all that’s needed to connect is the HDMI, with remote control provided via a CEC
equipped TV.
The issue with OSMC
Here are the issues I experienced with OSMC on the Pi3A+,
this is in no way a snarl at the developers who are doing an amazing job. I
believe the 3 A+ is still a new and niche model so it’s understandable that development
is slow for this product. I’m just hoping this will eventually be looked into and
resolved, and putting it out there in case others have the same issue. Performance
on the 3B+ is still exceptional.
From boot, selecting a 720p file (via Samba and h264 encoding)
is fine, with subsequent auto-play files playing with no issues. However, with the
next selection the issues start, selecting a file loads it but doesn’t play, having
to go to the main menu and selecting Full-Screen to play the file. But then it buffers
constantly. On the third play this workaround fails, and selecting Full-Screen results
in a black screen.
In addition, even from boot any 1080p content fails to play with
a black screen in its place, and playing h265 encoded files results in an
immediate system crash.
480p content remains unaffected and plays perfectly.
LibreELEC to the rescue
Without resorting to buying a 3 B+, your media experience can still be made on 3 A+ by using LibreELEC, an alternative to OSMC that has the same goal of getting Kodi on the Raspberry Pi.
Before we start, a story. When I created my first web server, I’d found a copy of Windows NT Server 4.0, upgraded it to Service Pack 6a to get IIS enabled, opened port 80 on the router and viola, working webserver. This was 2001 and unfortunately my creation of a webserver coincided with the spread of the Code Red virus, and it reached my server within days of it being online.
Not knowing at the time, and thinking it was a one off,
formatted the hard drive and completed the whole setup again. A day passed
before the virus was back. Now with the knowledge of what was happening and wary
of it happening again. I rebuilt the server and this time put the website
behind port 8080, this time the virus never returned.
I thought to myself that this was security through
obscurity, and with the victory over Code Red, was something I held onto for
many years.
I applied this method when it came to opening RDP access to
the outside world, choosing a seemingly obscure port 8021 on each network
setup. However, I’ve been dealt a wakeup call following what I’ve just seen…
From time to time we come across legacy applications and deployments that you didn’t know exist until something goes wrong with it. This week it was an unbeknown to me Joomla website that had been ticking over since 2012. However recent visits to the site got this result:
A report came in on this issue and a few checks of the domain DNS revealed it was on a platform we use for domains and web hosting.
Not overly familiar with the hosting company from a website standpoint and even less with Joomla, it was time to first fathom out how it works, and them find the problem and fix
As the years pass by we find ourselves moving on from an old computer to making a clean start with something more relevant, and when migrating to a new PC or laptop its always a worry that you may leave something behind. Luckily these days, instead of having a laptop laying about in its last used state for fear of losing that once forgotten file or program, the whole system can be virtualised on a server or donor machine for such eventualities, paving the way for the physical machine to be reused or recycled.
My method is to use VMware Standalone Convertor Wizard to convert physical machines to an ESXI 6.5 host. All previous conversions have been seamless however the latest conversion of a Fujitsu U904 laptop didn’t go as so, the conversion process completed without a hitch, but when starting the newly created VM I found that keyboard input was unresponsive. Continue reading “VMWare: No Keyboard on Newly Virtualised Machine”
An interesting call came in this week; I say interesting but in reality it is a call we all dread. A user that is reporting that the computer keeps displaying “Trying to recover Windows” followed by the inevitable “Unable to recover Windows”. Unable to remote on and look, there was no choice to bring it into the office.
On first inspection it was indeed booting to the recovery console, and displaying recovery choices including 4 restore points. These were the first port of call but were all unsuccessful. This machine has been in use by the user for many years, and so had many years of settings and obscure software installed, so there was a lot to gain from repairing the issue instead of a full Windows re-install.
Its been a year since my time-lapse post, and since my server has been working away without external input capturing and archiving the view from from my window the entire time.
Something I wanted to capture is a time-lapse of of summer and winter from the same perspective, in order to see the difference between the two polar seasons in terms of sunlight.
Now with a year’s worth of capture and as a tribute to the reliability of the code, I thought to quickly splice together a June and December time lapse video:
Its interesting to see how the webcam when left at the default settings interprets light values over a sustained period of time. As even in the summer it will get as dark as the winter night at some point, I thought of this as a natural reset point for the cam’s light values.
Choosing a similar weather conditions at both ends of the daylight spectrum (23/06 and 19/12) the camera seemingly registers a different light strength.
Anyways it is still an interesting watch regardless of the date its being viewed at, hope you enjoy, and wishing you a happy new year!
Living in a block of flats is a nightmare when it comes to getting reliable wireless network coverage, especially when only having 2.4Ghz Wi-Fi as it is a heavily congested frequency. Over the last few months I’ve found the connection constantly dropping on my wireless devices, even within a few feet of the access point.
I use a Netgear FVS318N for my wireless connections and a frustration is that the region is locked to Europe, where the radio power is limited more than other parts of the world.
This means the highest achievable power is half, raising it to full results in this dead end:
Very annoying, this post shows how to get a region locked Netgear use all the power available, and to discover what devices in the area are competing for the wireless space.