I was lucky enough to have catch up with Paul at we build bots to talk about digital transformation in the public sector and the pandemic. Be warned my accent may have got stronger over lockdown…
This one is going to be word and code heavy.
Firstly shutdown the hyper-v gen2 VM.
Copy the VHDX to the proxmox server, remember you will need twice the space of the VHDX available temporarily to completed the move.
Create the VM on Proxmox, you will need to create it using a OVMF (UEFI) BIOS. You will also need to create a 1Gb virtio hard disk (again this is temporarily)
Make a note of the VM ID (i.e. 103), you’ll need this to import the hard disk.
Once the VHDX is copied across you need to import the disk
qm importdisk VMID SORCEDISK.vhdx DATASTORE --format qcow2
i.e. qm importdisk 103 /tmp/data.vhdx SATA –format qcow2
This will then import the disk to the VM.
Next you need to head over to the VM in proxmox and attach the disk in the gui, you will need to install it as SATA or IDE (not virtio yet)
Boot the machine up into windows, install the latest tools, the temporary 1Gb disk we installed earlier will mean the virtio drivers are installed.
Shut the VM down, remove and reattach your windows drive as virtio, remove and delete the temporary 1Gb drive and turn the machine back on. If your machine had a static IP you will need to readd it, you may get a warning about it being assigned to another NIC. You can ignore this, however, I would recommend removing it at some point!
You can now delete the VHDX file you copied to the proxmox server
So what is respect in security?
Founded by a group of cybersecurity professionals who have decided to take a stand against all forms of harassment within our industry, ‘Respect in Security’ offers organisations the opportunity to formally pledge their commitment to creating a workplace and professional community free from harassment and fear.
The mission to is give victims and potential victims the knowledge that the industry they have chosen does not support these behaviours, and to arm people entering cybersecurity with the knowledge that their peers and employers are there to support them should they ever be targeted.
Committed to making tangible change in our industry. Our objectives are for organisations to be more transparent and accountable in their reporting channels and to help drive positivity in the interactions we have with each other as professionals within our industry. A group that is pushing for change, and is committed to working alongside organisations who truly wish to make their workplaces more welcoming and inclusive.
You can find out more about their pledge and sign up here
My guest blog, leading by example, can be found here (and a big thank you to all those at Respect in Security who helped make the blog possible)
This one is going to be wordy… I’ve done a few upgrades and changes to the smart static since setting it up and using it for every day holidaying. Over the next few paragraphs I’ll go into some detail.
The exec summary for those who don’t want to read to much. I’ve added more flic buttons, and more node red flows, I have replaced the switch and access point (details below), I’ve added an emergency pi zero, an external antenna and a new Kasa strip light. I’ve also finally replaced the porch.
Let’s get into the detail!
Flic buttons – these are amazing and work really well for triggering node red flows. I’m using them without the hub, I might change this in the future as the Bluetooth on the pi isn’t the best, but for now it works ok. I’ve added a second button in the bedroom for triggering a nightlight and easier access. Yes they are expensive, but for a smart physical button there is nothing that comes close.
Hardware additions and replacements –
Wifi – I’ve put in a unifi access point which I had spare, expecting the GL-inet to do everything was unrealistic and the device isn’t that great so I’m replacing it one service at a time. I have an old thin client that I’m currently playing with for firewall / router duties, at the moment I’m experimenting with whether this should be a proxmox server or bare mental. In the meantime I’ve added a Poynting XPOL-1 antenna which appears to have stablised the connection at quite a good rate c 20Mbps on EE 4G.
Switching – I replaced the tp link switch with an easy smart one, so I can reboot the ports remotely. I’ve had one to many occasions when a pi hasn’t rebooted properly meaning I’ve had to drive out to reboot. The easy smart range have lots of limitations, but it will do for now, I will probably replace it when I retire a unifi one!
Smart home – TP Link Kasa have released a light strip which we’ve installed at the front, the rainbow scene is a firm favourite, the one downside is these aren’t supported by home assistant yet.
I have also discovered a flaw in one of my automations, the one that shuts home assistant down it is triggered when the battery is lower than 50%, it works perfectly, but I forgot that when the power comes back on the battery will still be lower than 50% (bugger), so I’ve added a condition that checks the state of the UPS (online vs on battery).
Remote support – I’ve added a Pi zero with VNC to the van, so I can access the network if something goes wrong with the main pi (i.e. it doesn’t reboot), I can then power cycle the PoE switch ports to bring devices back up.
Actual Hardware – when we bought the caravan, one of the “porches” was broken. I managed to source some 1mm aluminium and have bent and painted it. It’s now on the van and works well and looks ok!
I decided that I wanted to tidy up my lack rack and put my two Pi’s rack mounted and out of the way.
The first pi is a backup “server” it runs rsync and has a 3Tb USB drive, it is a staging server between my backups and OneDrive sync. This was easy to do, I printed one module and one pi rack module, works great! I am thinking I might PoE my rack mount Pi’s but this would mean two HATs and a PoE switch for the study.
The second Pi is my Pi KVM, this Pi is slightly more complex as it has some external components, these are mounted in a case, this case was too big for the module, so I 3D printed cases for the individual cases for the rack module. This has tidied it up and it now fits snuggly in the module.
Yummy, yummy Pi's - May 2021 Update
I’ve decided this will become a running update of the Pi’s I am using and what I am doing with them. Updates will be posted to the top of the page.
May 2021 – Update
A lot has changed in home Pi world… ESX for ARM has been released and I’ve been testing this, it works and is stable. Hopefully OPNSense will come to the Pi natively and then there will be some interesting opportunities to run Pi firewalls, I have looked at OpenWRT on the Pi, but prefer the completeness of the xSense ecosystem. I’ve upgraded a couple of Pi’s due to performance issues. I have also migrated the Pi 400 to SSD and it’s a lot quicker. I have been keeping an eye on SD card performance and have settled on Samsung Evo Plus and SanDisk Ultras / Extreme. There appears to be a shortage of 2Gb Pi’s at the moment, I need an additional one to replace the Pi in the kitchen which I am currently using for the CCTV Pi.
A full list below:
- Pi 4 1Gb – CCTV Pi (upgraded from a Pi 3+ for more streams (including 3D printer and new Eufy Cams)
- Pi 4 2Gb – OctoPi (3D printer control)
- Pi 4 2Gb – Pi Sync
- Pi 4 2Gb – Pi KVM
- Pi 4 2Gb – Caravan HA
- Pi 4 2Gb – Caravan Pi
- Pi 4 4Gb – Bedroom Kodi
- Pi 400 – Study Pi
Spare Pi (s)
- 2x Pi 2
- 2x Pi 3+
- Pi 4 8Gb (currently testing ARM ESXi)
- Pi Pico
- Zero WH
- December 2020 – Update
In addition to the Pi’s below, I now have two more in use
- Pi 2 – Backup Pi – Using rsync and rclone to manage all my backups locally and to sync to OneDrive for Business.
- Pi 4 2Gb – Pi KVM – Find out more in this post
I have also managed to purchase a Pi 2 v1.2 to go on the Pi versions board. This completes my collection of historical Pi Bs. When the next version of Pi’s come out the Pi 4’s will slowly be retired to the board!
I am also working on a project with Pi Zero WH’s to create a multizone audio system using Volumio, this project will make use of HifiBerry’s popular DAC Hats as well as some custom integration work. I currently have 3 Pi “audio zones” and am awaiting the hats to begin testing.
- Pi 2, Pi 3+, Pi 4 8Gb
- Pi Zero WH
- Pi 2 1.2 ready for mounting
- Pi 3+ – First home assistant server migrated to new proxmox host
Why no love for the Pi A or Compute module? Although I have a good collection of old Pi’s you may notice that I don’t have any Pi A or Pi Compute modules on the list. This is because I don’t use them! I’ve never had a use for the compute modules. I do have a Pi A in a wildlife camera, but this currently isn’t being used. I love the Pi B and Zero form factors which is why I use them the most, if I have a project that ever uses the other form factors, I may well collect the back catalogue of those too!
Original Post – November 5th
From the moment they were announced I knew that the way I did computing at home had changed. Ideal as test boxes, development, media players and now even mini ESX servers! I’ve used them for many things…
The Pi’s I currently have in use are:
- Pi 4 1Gb – Kitchen LibreELEC
- Pi 4 2Gb – 2nd Device in Lego Room
- Pi 4 4Gb – Bedroom LibreELEC
- Pi 400 – 2nd Device in Study
- Pi 3+ – CCTV Viewer
- Pi 3+ – Garage
- Pi 3+ – Home Assistant
I have used them for other projects in the past including getting started with Home Assistant, mini ESXi Server, custom automations, OSMC media player, Plex Server, learning things with Ali, Wildlife Cameras, the list goes on. I hope they are around for a long time to come!
In the gallery below you can see the latest Pi 400, my display of Pi’s from the original Pi to the Pi 3 B+ (with space for the Pi4 1, 2, 4Gb version… the 8Gb version will start a new board). Next are my Pi’s ready for use (Pi Zero WH, Pi 3 B+ and Pi 4 8Gb), I also have a Pi 2 in the cupboard should I need something older to play with and yes that is a ZX Spectrum +2 behind them. Finally my Pi Zero Board up to the latest Pi Zero WH.
Success! We’ve managed to spend a couple of nights in the van, it all works well, Alexa for the music and the Roku / Plex combo. Other than a couple of issues, below, it’s worked flawlessly and has added benefit without being intrusive. I’ve added some more flic buttons and tweaked some plex scripts (and a UPS buzzer fix), but for actually using the system it has performed really well!
Issues… so there have been a couple of teething problems. The main one being that Alexa frequently loses connection to Kasa, but the Kasa app works fine, a weird one that I haven’t managed to get to the bottom of. I have put in a few more flic buttons to work round it, but it’s still an ongoing issue at the moment. The bandwidth at the van seems to fluctuate a lot (see below), I am intending to replace the GL-Inet device in time, but I am going to wait for an ARM version of OPNSense and will put in another pi for the firewall / VPN attached to some form of 4G or Starlink router. Finally the wireless seems to drop sometimes, I think this might be due to the VPN connection, but I am going to add a TP Link access point to see if it makes any difference. It all works well enough for now though and we’ve spent a lovely couple of weekends there!
Safe shutdowns... and startups
I have not idea how stable the power is at the static, but most of the time we will be turning it off when we leave (it might be on for most of the summer when we leave the fridge on). There might also be times we want to preheat the van in the colder months.
I was working on another project to deliver “internet-in-a-box” for outside broadcasting. This lead me to the open source project NUT, a project designed for controlling UPS units, especially ones whose software sucks (or doesn’t exist for your operating system)
Following on from the work I did for the project I decided I could run the van off a UPS which was controlled by the primary Pi and that the home assistant Pi would shutdown should the UPS battery get too low.
It would also mean that should someone else use the static they would just be able to turn off the power and nut would take care of the safe shutting down of the devices.
I selected a cheap UPS (PowerWalker) that seemed to have reasonable compatibility with NUT and set about configuring it.
The basic NUT configuration was easy. I setup the netmaster and the CGI site really quickly. Getting the NUT client to work on Home Assistant was easy too, I then setup an automation to shutdown the pi.
Notifications however were another level of hard, there isn’t that much information out there and it looks like at some point in the past NUT changed formatting in the configs. However, with a bit of work it all came together.
As you can see from the image above I am hardly using any power, the UPS will keep the static active for about an hour after it loses power, while this is great, the main benefit is I don’t need to leave instructions for people to turn the internet or the Pi’s off when they leave!
Why, oh pi!
Originally I was going to setup a Pi Zero just to manage the UPS, this was the original spec for the “internet-in-a-box”. I had found a PoE Injector with Ethernet on a single Micro USB (Uctronics PoE), I was excited by this discovery, as it would mean I could power and add wired ethernet to the Pi Zero… I am still waiting for the devices, but a fatal flaw has stopped this working. The Pi Zero only has one USB port… The PWR port only carries power. So although I could power and network the Pi, I had nowhere to plug in the UPS. I will do some more digging at some point as £4.80 for a UPS controller would be amazing!
Something I hadn’t really given much thought to until this week was how I was going to power the smart static infrastructure, 2 Pi’s and the “network in a box”.
With the AP1300LTE going back to the manufacturer (the 4G module didn’t work when I started to test), I had some time to think about other bits
In the beginning I was just going to use the power brick for the AP and two Pi Plugs. Then I decided I could run the two Pi’s from a single desktop charger.
Then I did some more reading… The AP could be powered with 802.3 at via it’s WAN port (which can be changed in software to a LAN port).
The Pi 4 can be powered by PoE with a PoE hat (802.3af).
I have used PoE switches from TP-Link and Ubiquiti. I use TP-Link where I basically want a PoE injector for multiple devices and Unifi ones for a more managed solution.
I did a little bit of research and TP-Link do a 5 port (4 port PoE) mixed at/af switch. For under £25 I could power all 3 devices and have a network and PoE port left over.
Powering all three devices this way would save on cabling (just one cable going to each Pi and to the AP) and only need one plug socket. It would also massively simplify things if I wanted to add a UPS at a future date. I could even monitor the UPS via a Pi, safe shutdowns email alerts etc. That’s one for another day though! Adding a small Pi touch screen and a small wireless keyboard and mouse could be fun…
Testing of this idea continues…
The next challenge was to address two big problems
- Offline Smart Static
- Physical Switches
The first issue is how will everything work if the caravan is offline for some reason. The second is the ability to control all the devices physically. It turns out the problems have the same solution!
This post is very text heavy; TLDR; Flic, HA and Kasa save the day!
The easiest solution to the offline issue is to put in local control, a device that can control devices even if they can’t access the internet (incidentally there is no way I know to fix a no wifi issue, as the devices have to communicate somehow!). The go to solution for this type of issue is home assistant, upon investigation Home Assistant (HA) has a module for kasa, and RTSP for the cameras. The home assistant app is then installed on the fire tablet.
Offline Control – Tick!
Problem two… Physical switches.
I did some investigations there are very few smart switches that support no neutral wire switches. There are a few in the market, but they tend to be supported in Tuya smartlife rather than TP-Link’s Kasa platform.
Was this decision to go with the Kasas going to be a bit of a fatal blow to switches? The main reason I was drawn to the Kasa over Smartlife was the fact the extensions had physical buttons, this still stands. Then I remembered HA had a module for smartlife too… I was about to start buying switches so I could have a play, I really didn’t want to add another platform, but it was looking like it would be the only way…
Then a light bulb moment (literally, as I leaned over to hit my flic button)… Flic buttons could pair to the bluetooth on the Pi and be exposed to HA directly.
I installed node-red and the node-red flic module and 5 minutes later I had the flic toggling the power on one of the smart bulbs.
A few minutes later two flics were controlling the Kasa lights and it worked offline!
Physical Control – Tick!
I managed to get physical and offline control working and didn’t have to add another platform or purchase any additional hardware (When I kickstarted Flic 2, I may have slightly bought to many!)