lazyd3v blog

🍰 Raspberry Pi setup at my home

Posted at — Aug 8, 2020

One evening, I decided to buy Raspberry Pi to make my home smarter. I’ve already had Ikea Trådfri smart lights, Xiaomi Air Purifier, Sonos Play 5, but I wanted some device that could expand their functionality and provide unlimited potential for future opportunities. Raspberry Pi fits perfectly for this. Here’s the summary of what my Raspberry Pi does at the moment

1. Smart Home hub

There’s an awesome software for home-automation called Home Assistant. It’s open-source, supports a lot of devices, very configurable, can act as a HomeKit bridge (very important for me since I’m apple boy) and many other nice things.

I also bought CC2531 Zigbee USB Stick and flashed zigbee2mqtt firmware which allowed me to connect my Ikea bulbs bypassing Ikea hub. What’s more, it allowed my to avoid vendor-lock so I could connect any Zigbee device from any brand. I’ve already throwed away my Ikea hub and bought several thermo sensors from Aqara 😄

Here’s how my Home Assistant dashboard look like. Not impressing, but I’m in the beginning of the route.


And as I mentioned before, Home Assistant can act as a HomeKit Bridge, so here’s how my Home app looks like


One of the other reasons I decided to setup Home Assistant is an access to historical data. I don’t know why I need this information, but it’s cool.


It’s possible to setup influxdb, grafana, configure Home Assistant and have more advanced dashboard, but I’m fine with current setup for now

2. AdGuard Home

It is another nice software which blocks ads, tracking software and makes surfing experience better. It acts as a DNS server and blocks requests triggered by tracking / ads / malware software. It’s free, open source, have good configuration opportunities, have integration with HomeAssistant 😲 and more. It works nice, but I faced several problems with it:

First, it’s not possible to configure ComHem’s wifi router for custom DNS server, so I had to configure all my devices by myself.

Second, sometimes this software makes some websites not working. For example, I couldn’t buy flight tickets via Ryanair website because of enabled filter.

Here’s how Dashboard looks like. So nice to see how many requests are blocked by this filter


3. Spotify Connect Client

There’s a nice software called Raspotify. As mentioned in project’s description, it is a Spotify Connect client for the Raspberry Pi that Just Works™.

Yes, I’ve already had Sonos speaker which has this feature built-in, but it’s not portable. I spend much time in the kitchen and would like to have music there as well. My girlfriend brought Bluetooth speaker with her, but it’s sooo annoying to pair/unpair this device every time. So, this BT speaker is connected to raspberry pi and raspberry pi is always accessible via spotify client. Boom!

To be fair, I don’t use this feature for now. Raspberry pi’s internal bluetooth transmitter is very weak. My raspberry pi is in the bedroom and as soon as I move bluetooth speaker to the kitchen, music stops playing. I hope buying USB bluetooth dongle will solve it

4. Access to my home network

It’s a very funny story why I decided to have it. Three weeks ago I traveled to Italy and when I was in the bus, I realized that I hadn’t turned off alarm on my Sonos speaker. So every day, at 8:00 AM it would start playing spotify for a looong time 😑 To not annoy my neighbors, I asked my friend to go to my home, connect to my WiFi network and turn off the alarm via app.

I could do it by myself if I had a remote access to my home network, so I decided to configure my raspberry pi for it.

I have a dynamic IP so I configured noip client and now I can connect to my raspberry pi via URL like I also protected my raspberry pi by installing latest software updates, configuring fail2ban, changing ssh port, configuring router to protect from port scanning (wtf, it has a protection from port scanning but no custom DNS) and so on. Also, having raspberry pi available everywhere, I can look at sensors data from anywhere in the world. Again I don’t know why I need this information, but nice to have.

Possible future improvements

I’d like to buy more smart home devices, definitely. For example, I’d like to buy electric blind and write an automation to be synced with alarm. I also would like to have smart radiator thermostat which could be nicely automated as well - for example, warming up the house 1 hour before I arrive or cool down the appartment in the night.

comments powered by Disqus