My PoE Attic switch is FAILing, ESPHome PWM fans to the rescue? DIY
This is my last ditch effort to cool down my attic PoE switch that runs my cameras.. of course I had to hook it all up to Home Assistant to monitor the temps and control the PWM fans!
The code for the ESP32:
text_sensor:
# Send IP Address
- platform: wifi_info
ip_address:
name: Fanhub IP Address
# Send Uptime in raw seconds
- platform: template
name: Fanhub Uptime
id: uptime_human
icon: mdi:clock-start
sensor:
- platform: wifi_signal
name: Fanhub WiFi Strength
update_interval: 30s
- platform: dht
pin: GPIO15
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 10s
- platform: pulse_counter
pin: GPIO13
name: Fanhub Fan Speed1
id: fan_pulse1
unit_of_measurement: 'RPM'
filters:
- multiply: 0.5
count_mode:
rising_edge: INCREMENT
falling_edge: DISABLE
update_interval: 3s
- platform: uptime
name: Fanhub Uptime
id: uptime_sensor
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
# Custom C++ code to generate the result
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
output:
- platform: ledc
pin: GPIO27
frequency: 10000 Hz
id: fanhub_pwm1
fan:
- platform: speed
output: fanhub_pwm1
name: "Fanhub Fan1"
🔥These links support my madness🔥
💲 NordVPN: http://www.bmbsucks.com
💲 Members-Only Punishment: https://bit.ly/bmbmembers
💯These are my other Socials💯
🔹Twitter: https://bit.ly/BMBTw
🔹Instagram: https://bit.ly/bmbinstagram
🔹Tik-Tok: https://bit.ly/bmbtock
🔹Discord: http://bit.ly/BMBDISCORD
📷This is the gear I use🎥
💲Studio Camera: https://amzn.to/3itlHdT
💲Mobile Camera: https://amzn.to/3UjtHuX
💲Primary Mic: https://amzn.to/34qv2Hw
💲Secondary Mic: https://amzn.to/2qMipHW
💲Audio Recorder: https://amzn.to/3gOIfFn
✉️P.O. Box for Mail✉️
Byte My Bits
P.O. Box 77
Haysville, KS 67060
Видео My PoE Attic switch is FAILing, ESPHome PWM fans to the rescue? DIY канала Byte My Bits
The code for the ESP32:
text_sensor:
# Send IP Address
- platform: wifi_info
ip_address:
name: Fanhub IP Address
# Send Uptime in raw seconds
- platform: template
name: Fanhub Uptime
id: uptime_human
icon: mdi:clock-start
sensor:
- platform: wifi_signal
name: Fanhub WiFi Strength
update_interval: 30s
- platform: dht
pin: GPIO15
temperature:
name: "Temperature"
humidity:
name: "Humidity"
update_interval: 10s
- platform: pulse_counter
pin: GPIO13
name: Fanhub Fan Speed1
id: fan_pulse1
unit_of_measurement: 'RPM'
filters:
- multiply: 0.5
count_mode:
rising_edge: INCREMENT
falling_edge: DISABLE
update_interval: 3s
- platform: uptime
name: Fanhub Uptime
id: uptime_sensor
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
# Custom C++ code to generate the result
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
output:
- platform: ledc
pin: GPIO27
frequency: 10000 Hz
id: fanhub_pwm1
fan:
- platform: speed
output: fanhub_pwm1
name: "Fanhub Fan1"
🔥These links support my madness🔥
💲 NordVPN: http://www.bmbsucks.com
💲 Members-Only Punishment: https://bit.ly/bmbmembers
💯These are my other Socials💯
🔹Twitter: https://bit.ly/BMBTw
🔹Instagram: https://bit.ly/bmbinstagram
🔹Tik-Tok: https://bit.ly/bmbtock
🔹Discord: http://bit.ly/BMBDISCORD
📷This is the gear I use🎥
💲Studio Camera: https://amzn.to/3itlHdT
💲Mobile Camera: https://amzn.to/3UjtHuX
💲Primary Mic: https://amzn.to/34qv2Hw
💲Secondary Mic: https://amzn.to/2qMipHW
💲Audio Recorder: https://amzn.to/3gOIfFn
✉️P.O. Box for Mail✉️
Byte My Bits
P.O. Box 77
Haysville, KS 67060
Видео My PoE Attic switch is FAILing, ESPHome PWM fans to the rescue? DIY канала Byte My Bits
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Wirsh sent me this..](https://i.ytimg.com/vi/hm6XRvzsKvc/default.jpg)
![My Proxmox died, taking Home Assistant with it!](https://i.ytimg.com/vi/tChgOIBZMKE/default.jpg)
![Cheap and AMAZING smart rotary knob for Home Assistant](https://i.ytimg.com/vi/QSI3C6fHQSI/default.jpg)
![Synology makes Security Cameras now!? With AI?? BC500](https://i.ytimg.com/vi/CZe2RUuuc8Q/default.jpg)
![Got a 15,000 Lumens LED Light to go camping.. 12v!](https://i.ytimg.com/vi/fsBF8tGBMRQ/default.jpg)
![Jason Bytes back Ep. 73 - A project vid or a JBB!? Mostly Home assistant questions..](https://i.ytimg.com/vi/DRFTGXqCWzE/default.jpg)
![Perfect Entry Touchscreen Home Assistant Controls!](https://i.ytimg.com/vi/TnmVQWBCQNY/default.jpg)
![I'm in WAY over my head.. I could use some help..](https://i.ytimg.com/vi/YHbUb6lrrdA/default.jpg)
![Home Assistant + ZigBee = HOLY BANANAS! - Smart Lawn Ed.](https://i.ytimg.com/vi/f2Syz1dPs9Q/default.jpg)
![Zigbee hardware, Moisture Sensor, Batteries, Mustang Exhaust, Server build.. #MEGAVLOG](https://i.ytimg.com/vi/nvg8m61Tm8Y/default.jpg)
![Jason Bytes Back Ep. 72 - Electric Bills, Home Assistant, sEnD HelP](https://i.ytimg.com/vi/Sh5GMRs4ctk/default.jpg)
![My server customization disaster..](https://i.ytimg.com/vi/vLyNqhY_WXk/default.jpg)
![Home Assistant intro on a 55" touch screen!](https://i.ytimg.com/vi/7Zibtem-jPo/default.jpg)
![Jason Bytes Back Ep. 71 - A house fire, Unraid Podcast, HOT 3900K!](https://i.ytimg.com/vi/32Q-wxVQj3A/default.jpg)
![ChatGPT commands deleted my data](https://i.ytimg.com/vi/6P1RB84xPpw/default.jpg)
![Destroying my old server for HUGE upgrades!](https://i.ytimg.com/vi/peEbmI_Kzho/default.jpg)
![Who sent me this old af CPU/MB? Lets see if it works..](https://i.ytimg.com/vi/x4Cit1YW00Y/default.jpg)
![This was shocking.](https://i.ytimg.com/vi/J6I-YB0pFNo/default.jpg)
![DIY Generator Power Inlet Box Installation - Zombie preparedness!](https://i.ytimg.com/vi/k_MBgHPxsJU/default.jpg)
![Jason Bytes Back Ep. 70 - Shucking drives dead? Plex to sell? Questions..](https://i.ytimg.com/vi/HyDifv3GOPA/default.jpg)