create account

Fun with Homekit, Smart Light Notifications on Raspberry PI temperature by emrebeyler

View this thread on: hive.blogpeakd.comecency.com
· @emrebeyler · (edited)
$43.08
Fun with Homekit, Smart Light Notifications on Raspberry PI temperature
I'm maintaining a Raspberry Pi 4 Model B (4GB) to host some tools & applications at home.

- [Deconz](https://github.com/dresden-elektronik/deconz-rest-plugin) (Zigbee gateway software of [Conbee](https://phoscon.de/en/conbee))
- [Homebridge](https://homebridge.io/) (A bridge to define non-Homekit accessories to Homekit)
- [AdGuard Home](https://adguard.com/tr/adguard-home/overview.html) (Personal DNS server to block ads at the DNS level)

I've heard some CPU temperature problems at first, so in the first installation, I've bought [this aliminium heat sink case](https://www.kiwi-electronics.nl/aluminium-heatsink-behuizing-voor-de-raspberry-pi-4?search=heat%20sink%20case&description=true).

<center><img src="https://i.imgur.com/YvQNnMF.jpg"></center>
<center><sup>Image is taken from [kiwi-electronics listing page](https://www.kiwi-electronics.nl/aluminium-heatsink-behuizing-voor-de-raspberry-pi-4?search=heat%20sink%20case&description=true)</sup></center>

It looks quite cool and includes double fans to make sure the temperature of Pi in acceptable levels. However, after running this case and the fans a couple of days, I was disturbed by the level of noise of the fans. It creates a lot of noise. I store pi in the closed cabinet (working headless) below a closed door in the first floor. (I sleep in the second floor, yet, I can still hear the sound of the vibration created from the fans at nights.)

After running a couple of weeks like that, I see that the CPU was running around 38°, 40°. I also observed CPU load and ram usage, and it was all perfect. Since the RPi 4b is quite powerful, CPU load stays around %1-%5, and memory usage was like 10% at most. So I've decided to stop the fans. That made the Pi perfectly quite but the temperature is stable around 48°-50°, which is also acceptible.

However, I don't want to run Rpi more than 60°, so I'll be observing the temperature levels more. I've setup a couple of scripts for that, but also I've added a new "automation" rule to get notified if the CPU temperature passes a certain degree.

<center><img src="https://i.imgur.com/BP4HsQV.png"></center>

#### Homekit automations
****

I consolidate all my smart home appliances at Homekit so that I can manage all my automations in one place. (By the way, that's a good thing to do, since almost every brand want to force their automation structure, and it becomes a mess when you manage automations in different places.)

What I need for this specific automation are:

- When Raspberry Pi CPU Temperature passes a certain degree (Trigger)
- Switch on the lights, dim to 100%, and make the light red on my workspace (Action) (Hue light bulbs)
- (If I am at the workspace) (Condition) (Via a tilt sensor on the chair.)

Normally, this kind of automation is not supported at the Apple Home app, however, Homekit specs support this. So, by using [Eve app](https://www.evehome.com/en/eve-app), I can accomplish this. (The app is free to use, works on the top of Homekit.)

However, there was one small problem, I need to expose RPi temperature to Homekit. Fortunately, this could be done via [a homebridge plugin](https://www.npmjs.com/package/homebridge-raspberrypi-temperature), exposes CPU temp. into Homekit.

Now that, I have everything I need, here are the steps:

| Operation                                                    | Action |
|--------------------------------------------------|---------------|
| Set scene                              |   ![step1](https://i.imgur.com/9OdBDKV.jpg)        |
| Add trigger                            |   ![](https://i.imgur.com/OtT8oIf.jpg) |
| Add condition                          | ![](https://i.imgur.com/wkxL528.jpg) |
| Final result                                   | ![](https://i.imgur.com/QeFXOVD.jpg) |
***

All set. :)

#### Smart-Home Community
***

We have [Smart Home](https://hive.blog/created/hive-102496) community in place for a while. Feel free to share your own experience and adventures on the topic.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 187 others
👎  
properties (23)
authoremrebeyler
permlinkfun-with-homekit-smart-light-notifications-on-raspberry-pi-temperature
categoryhive-102496
json_metadata{"app":"hiveblog/0.1","format":"markdown","image":["https://i.imgur.com/YvQNnMF.jpg","https://i.imgur.com/BP4HsQV.png","https://i.imgur.com/9OdBDKV.jpg","https://i.imgur.com/OtT8oIf.jpg","https://i.imgur.com/wkxL528.jpg","https://i.imgur.com/QeFXOVD.jpg"],"links":["https://github.com/dresden-elektronik/deconz-rest-plugin","https://phoscon.de/en/conbee","https://homebridge.io/","https://adguard.com/tr/adguard-home/overview.html","https://www.kiwi-electronics.nl/aluminium-heatsink-behuizing-voor-de-raspberry-pi-4?search=heat%20sink%20case&description=true","https://www.evehome.com/en/eve-app","https://www.npmjs.com/package/homebridge-raspberrypi-temperature","https://hive.blog/created/hive-102496"],"tags":["homekit","home-automation","raspberrypi"]}
created2020-06-17 09:28:12
last_update2020-06-17 09:36:03
depth0
children10
last_payout2020-06-24 09:28:12
cashout_time1969-12-31 23:59:59
total_payout_value22.886 HBD
curator_payout_value20.193 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,994
author_reputation448,535,049,068,622
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,015,512
net_rshares91,933,558,139,871
author_curate_reward""
vote details (252)
@equeqtra ·
$0.02
👏👏👏
👍  
properties (23)
authorequeqtra
permlinkre-emrebeyler-qc2ffr
categoryhive-102496
json_metadata{"tags":["hive-102496"],"app":"peakd/2020.05.5"}
created2020-06-17 10:21:33
last_update2020-06-17 10:21:33
depth1
children0
last_payout2020-06-24 10:21:33
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.012 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3
author_reputation2,617,324,066,150
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,016,274
net_rshares98,856,175,838
author_curate_reward""
vote details (1)
@kennyroy ·
$0.03
Show us the original image that you have! Interesting, the outcome!
👍  
properties (23)
authorkennyroy
permlinkqc2jcc
categoryhive-102496
json_metadata{"app":"hiveblog/0.1"}
created2020-06-17 11:45:48
last_update2020-06-17 11:45:48
depth1
children0
last_payout2020-06-24 11:45:48
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.013 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation64,694,645,595,688
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,017,476
net_rshares102,931,350,416
author_curate_reward""
vote details (1)
@nuagnorab ·
$0.03
This looks quite fun, would love to try it with my pi!
👍  
properties (23)
authornuagnorab
permlinkre-emrebeyler-qc2gs7
categoryhive-102496
json_metadata{"tags":["hive-102496"],"app":"peakd/2020.05.5"}
created2020-06-17 10:50:39
last_update2020-06-17 10:50:39
depth1
children0
last_payout2020-06-24 10:50:39
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.013 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length54
author_reputation125,097,310,898,849
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,016,653
net_rshares100,873,181,437
author_curate_reward""
vote details (1)
@themarkymark ·
I haven't tried AdGuard Home, curious how it compares to PiHole.
👍  
👎  ,
properties (23)
authorthemarkymark
permlinkre-emrebeyler-qc2ew1
categoryhive-102496
json_metadata{"tags":["hive-102496"],"app":"peakd/2020.05.5"}
created2020-06-17 10:09:36
last_update2020-06-17 10:09:36
depth1
children1
last_payout2020-06-24 10:09:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length64
author_reputation1,774,203,157,359,879
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,016,076
net_rshares-19,613,215,210
author_curate_reward""
vote details (3)
@emrebeyler ·
$0.02
There is a [comparison](https://github.com/AdguardTeam/AdGuardHome#comparison-pi-hole) here. I tried both, using Adguard Home for now. It felt simpler, more clean to me.
👍  
👎  
properties (23)
authoremrebeyler
permlinkqc2f4o
categoryhive-102496
json_metadata{"links":["https://github.com/AdguardTeam/AdGuardHome#comparison-pi-hole"],"app":"hiveblog/0.1"}
created2020-06-17 10:14:48
last_update2020-06-17 10:14:48
depth2
children0
last_payout2020-06-24 10:14:48
cashout_time1969-12-31 23:59:59
total_payout_value0.012 HBD
curator_payout_value0.012 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length169
author_reputation448,535,049,068,622
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,016,147
net_rshares94,859,473,180
author_curate_reward""
vote details (2)
@themarkymark ·
Why did you get the 4GB?  Are you using that much ram?
There isn't much that goes over 2GB that you would run on a Pi, and the 2GB dropped down to 1GB price, so they seem to be the sweet spot right now.
properties (22)
authorthemarkymark
permlinkre-emrebeyler-qc51wa
categoryhive-102496
json_metadata{"tags":["hive-102496"],"app":"peakd/2020.05.5"}
created2020-06-18 20:21:45
last_update2020-06-18 20:21:45
depth1
children4
last_payout2020-06-25 20:21:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length202
author_reputation1,774,203,157,359,879
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,045,104
net_rshares0
@emrebeyler ·
The price difference was not much. And I'd like to host more stuff in time with the Pi, so bought a 4GB one, but I agree 2gb looks like a sweet spot at the moment.
properties (22)
authoremrebeyler
permlinkqc54lh
categoryhive-102496
json_metadata{"app":"hiveblog/0.1"}
created2020-06-18 21:20:06
last_update2020-06-18 21:20:06
depth2
children3
last_payout2020-06-25 21:20:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length163
author_reputation448,535,049,068,622
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,045,969
net_rshares0
@themarkymark ·
I’m ordering a few 2GB but want to get a 4GB to try running a Bitcoin node on. 

Just don’t see a lot of need for 4GB as anything that needs that much a Pi typically doesn’t do well. But there are some use cases like a Bitcoin node, clusters, and so on that’s why I was curious if you were using much ram. 
properties (22)
authorthemarkymark
permlinkre-emrebeyler-qc58il
categoryhive-102496
json_metadata{"tags":["hive-102496"],"app":"peakd/2020.05.5"}
created2020-06-18 22:44:45
last_update2020-06-18 22:44:45
depth3
children2
last_payout2020-06-25 22:44:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length306
author_reputation1,774,203,157,359,879
root_title"Fun with Homekit, Smart Light Notifications on Raspberry PI temperature"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,047,253
net_rshares0