Posts

Adding Shelly to a two-way-switch wiring

Image
I have a two-way-switch (Hotelschakeling in Dutch) wiring in my garage to turn the lights on or off. There's a switch near the garage door and one near the door to the hallway. After some reverse engineering, I found out the electrical wiring is done like depicted below: So there's a VOB 5g1.5mm2 running from the switch near the garage door, to the switch next to the door towards the hallway. This is because that same circuit needs to power some additional lights in other rooms on the ground floor. I want to leverage a Shelly to: Turn on the lights when the garage door opens Turn off the lights automatically after, say 5 minutes Run automations in Home Assistant to make sure no power is wasted when someone leaves the lights on in the garage To connect the Shelly, I changed the above wiring to what you can see below: Next I downloaded the app and let it find the Shelly via bluetooth. This was a very straightforward and smooth process, unlike a lo

Using Arduino to report status of my garage door to Home Assistant

Image
A while ago (now reading the post, it is more than 3 years ago 😮), I was working on a project to get notified every time the garage door opens or closes. You can read all about it here . Coming back to that project, I think the solution was/is far from ideal and too complicated. Now that I started to use Home Assistant to make my not so smart home a little smarter, I figured there must be a better way to be able to check if the garage door is still open and to get notified if the garage door opens or closes. The new solution might look like this: There are a few questions here. How can I let an arduino integrate with Home Assistant? How can I let Home Assistant (based on some state change) notify us of this change, via mail for example? Next to that, I will need some setup and electronics so we can read the state of a switch or sensor. Electronics As already mentioned in the other post, I have an MKR WiFi 1010 board. Since I am lazy, I also bought a relay shield .

Connecting Avidsen Home Plugs to Home Assistant via Tasmota

Image
A while a go I bought these Avidsen branded smart plugs in a local hardware store. These plugs work fine. The only downside they have is you need the Avidsen Home app on your phone to control them. A while ago I installed home assistant on a raspberry pi to make my home "smarter". HA integrates flawlessly with Home Wizard which I use to monitor my gas and electricity consumption. It also integrates with my recently purchased tado thermostats. So everything started to get integrated ... except for the Avidsen plugs. After doing some research, I found that these plugs are actually rebranded tuya plugs and home assistant seems to integrate with these. This integration, however, is a bit tedious. You need to re-register all your plugs in the Tuya Smart app and after that you need to set up integration with home assistant on tuya's IoT cloud. Although this works, it seemed like a lot of hassle to have home assistant running in my study, ta

Rescuing data from a dying SSD

Image
A while ago I replaced my unsafe RAID 0 setup with a (faster) SSD of 1TB. Since the RAID 0 setup was unsafe, I created backups every now and then. Even when I replaced the unsafe setup with the safer SSD, I continued creating backups. I try to adhere to the 3-2-1 backup strategy. So I have 3 (actually more than 3) copies of my data on 2 different media. And 1 of them kept off-site. I still use my old script for this that relies on rsync to copy all the data to whatever destination (external drive, NFS share, ...) that I can mount. During the last run of the script I started to notice failures during the rsync copy. After some investigation and booting the PC with a rescue linux , errors started popping up while running fsck.ext4 -c . This option causes e2fsck to use badblocks program to do a read-only scan of the device in order to find any bad blocks. The results of smartclt did not look any good either :( smartctl 7.4 2023-08-01 r5530 [x86_64-linux-5.10.197-1-M

Adding a SATA SSD to a PogoPlug Pro

Image
Adding a SSD to a what? 10 years ago, I bought a PogoPlug Pro on a daily offers website. This was a small ARM device running some Linux flavour on an old 2.6 (I think) kernel. The device was equiped with some proprietary software from a company called Cloud Engines . The idea was to connect this device to your local network, attach an external hard drive using one of the four USB ports and tada your hard drive is now accessible from anywhere on the Internet. This service was totally free of charge. Free as in; you buy the device (price was around €30) plug it in and that was it. It was only later that Cloud Enines started to offer real cloud storage, hosted by themselves and started charging for that service. With other cloud providers like dropbox , google's drive , microsoft's on drive and many others, Cloud Engines was struggling to stay afloat. Somewhere in 2017, the service along with the company finally shutdown , leaving a bunch of users with obsolete d

Arduino Uno with ethernet hat

Image
The other day, while cleaning out the garage, I found my old Arduino Uno. A few years ago, I received this as a new year's present by my employer at that time. Back then, I thought I was going to do something usefull with it. But apparently I didn't, since it was gathering dust on a shelf in the garage. I also did not recall the fact there was an ethernet hat available in the package. So it has an ethernet hat, what can we do with it? Well, we can connect it to a network, let it serve pages, let it perform REST calls, ... After doing all of the samples available in the Arduino IDE , I wanted to use this setup for something useful. The project This will be something very simple. I would like to use the Arduino to report the status of my garage door. Now that is something useful. Should someone open the door, I would like to receive an e-mail stating the current status of the door, OPEN in this case. Should the door be closed again, another e-mail should be sent, indicat

Fixing an Osram Halotronic Transformer

Image
I have these halogen lights in my living room which are powered by an Osram Halotronic Transformer. 2 years ago, one of the lights did not light up anymore so I suspected the electronic transformer to be the culprit. After swapping the halogen lights in a different fixture, it was confirmed the transformer was dead. I searched the web and Osram still manufactures these electronic transformers, but now they have very different dimensions. The fixture only allows the transformer to be 1cm tall, not taller. After a long search I found this one , from a different manufacturer. The transformer had the same formfactor, more or less, but the power output has a maximum of 105W, whereas the Osram has a maximum of 120W. Lukily the halogen lamps are only 100W, so the new transformer should work, without setting anything on fire :D Replacing the broken transformer did the trick and all lights were working again. I did not throw away the Osram transformer yet, hoping I could fix it somewhere in t

Creating backups of your home folder

I don't think I have to tell you that creating backups is necessary. You never know how and when disaster will strike. To prevent loss of data I have been using the following strategy for a while: create a backup on a weekly basis to 2 disks on-site switch one of the on-site disks with an off-site disk (stored in a safe in a bank) Having an off-site disk is important. It helps you recovering from a real disaster like fire or theft. You could rent some online cloud storage to facilitate your off-site backups, but I think my solution (given the amount of data) is cheaper and faster. To create my weekly backup, I use the following script: #!/bin/sh # Author: Brice Burgess - bhb@iceburg.net # multi_backup.sh -- backup to a local drive using rsync. # Uses hard-link rotation to keep multiple backups. # Directories to backup. Seperate with a space. Exclude trailing slash! SOURCES= "/home/kenneth" # Directory to backup to. This is where your backup(s) will be st

openSUSE 13.1

2 years ago, I finally decided to ditch Ubuntu (kubuntu actually) and give openSUSE a try. Since that day, it has been running fine and stable without any problems. 12.1 was getting old, however, and I thought the other weekend was the perfect timing to re-install my main computer with the latest-and-greatest openSUSE 13.1. Like with 12.1, installation went like a breeze. As with 12.1, I downloaded the live DVD and installed from there. It was only after the first reboot, network was not available (it was available in the live DVD) and I had to enable networking manually in YaST, not sure why that happened. YaST, by the way, has been rewritten entirely in Ruby to allow better development for new modules. The previous version of YaST was written in YCP which was a very inflexible language from what I read. Anyway, as a normal user, you probably won't see any differences. Since I have an NVIDIA card, I downloaded and installed the latest drivers (331.20 at the time of writing) manu