Last active
June 2, 2023 22:23
-
-
Save tubalainen/e36a5f6ca44593f2ca306a33e90d7398 to your computer and use it in GitHub Desktop.
FTX temperature sensor and relay control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At home I have a dumb Östberg Heru 75 with no smartness what so ever, it is also a bit unclear how efficient the system really is. How much heat that can be recycled. | |
The components (other than the tools, 3D printed box for the electronics etc) | |
1x NodeMCU (I use a LUA board), can be found on all tinker shops and all big online retail stores such as ali, banggood, amazon and ebay as well as locally sourced supplers (prefered!) | |
4x Dallas temperature sensors DS18B20 "waterproofed with metal sleeve". Souced from same as the NodeMCU | |
1x relay board, souced from the same as the NodeMCU | |
Some cables | |
For the project installation of the software | |
- Install esphome (addon store in Home Assistant) | |
- Create a new node and enter all information about your wifi network as well as the hardware you use - click create. | |
- Edit the node in esphome - insert the code below | |
- Save and check config | |
- Push the three dots right next to your node and select "compile" | |
- Once finished compiling push download bin file | |
For the hardware: | |
- Connect everything together, https://esphome.io/components/sensor/dallas.html I use the D5 pin as well as +3.3 V and GND. | |
- Connect your nodemcu via a micro usb cable to your computer and use "esphome flasher", select the comport and the binfile and hit "flash" | |
- Check the logs for the different sensor IDs | |
- Edit the node in esphome again uncomment the sensor part and paste in the IDs detected from the log file at the appropiate places in the code | |
- Save and "update" (now flashed directly over the air) | |
- All set! | |
In Home Assistant | |
- The new esphome node should now be visible, autodetected integration - add it. | |
For lovelace and the UI. | |
- Google FTX system, select picture - pick a picture that suits you (I take no responsibilty for any copyright violations here) | |
- Google "rotating fan gif" and select and download the pictures and gifs (I take no responsibilty for any copyright violations here) | |
- Place all images in the /config/www folder on your home assistant instance. | |
- In Home Assistant Lovelace, add a picture elements card and paste in the lovelace code example below | |
### ESPHOME yaml code ### | |
esphome: | |
name: ftx01 | |
platform: ESP8266 | |
board: nodemcuv2 | |
wifi: | |
ssid: "mywifi" | |
password: "secret" | |
ap: | |
ssid: "ftx01 Fallback Hotspot" | |
captive_portal: | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
ota: | |
web_server: | |
port: 80 | |
dallas: | |
pin: D5 | |
update_interval: 10s | |
sensor: | |
- platform: dallas | |
address: 0x800416637198FF28 | |
name: "FTX in" | |
- platform: dallas | |
address: 0xB2041662C064FF28 | |
name: "FTX ut" | |
- platform: dallas | |
address: 0x8204166372CCFF28 | |
name: "FTX retur" | |
- platform: dallas | |
address: 0x0D031663C61DFF28 | |
name: "FTX cirkulation" | |
#[16:25:21][D][dallas.sensor:079]: Found sensors: | |
#[16:25:21][D][dallas.sensor:082]: 0x800416637198FF28 | |
#[16:25:21][D][dallas.sensor:082]: 0xB2041662C064FF28 | |
#[16:25:21][D][dallas.sensor:082]: 0x8204166372CCFF28 | |
#[16:25:21][D][dallas.sensor:082]: 0x0D031663C61DFF28 | |
# | |
switch: | |
- platform: gpio | |
name: "Brytare - FTX rotor" | |
pin: D6 | |
id: relay | |
restore_mode: RESTORE_DEFAULT_ON | |
################################################################ | |
#### Home Assistant Package file (config/packages/ftx.yaml) #### | |
################################################################ | |
climate: | |
- platform: generic_thermostat | |
name: "ftx" | |
heater: switch.brytare_ftx_rotor | |
# ac_mode: 'true' | |
target_sensor: sensor.ftx_retur | |
target_temp: 22.5 | |
# cold_tolerance: 0.3 | |
# hot_tolerance: 0 | |
min_cycle_duration: | |
minutes: 60 | |
# keep_alive: | |
# minutes: 60 | |
# initial_hvac_mode: "heat" | |
# away_temp: 16 | |
# precision: 1.0 | |
### This is how you calculate efficiancy of the FTX syste | |
# Verkningsgrad = ((t2- t3)/( t1- t3))*100 | |
# t1=Frånluftstemperatur innan VVX (oC). | |
# t2=Tilluftstemperatur efter VVX (oC). | |
# t3=Intagsluft (uteluft) innan VVX (oC). | |
sensor: | |
- platform: template | |
sensors: | |
ftx_effektivitet_pct: | |
value_template: "{{ ((states.sensor.ftx_cirkulation.state|float - states.sensor.ftx_in.state|float) / (states.sensor.ftx_retur.state|float - states.sensor.ftx_in.state|float) * 100) |round(2) }}" | |
unit_of_measurement: '%' | |
automation: | |
- id: 'rotorindikator_ftx_on' | |
alias: Rotorindikator ftx on | |
initial_state: 'on' | |
trigger: | |
- entity_id: switch.brytare_ftx_rotor | |
platform: state | |
to: 'on' | |
condition: [] | |
action: | |
- data: | |
entity_id: light.vardagsrum_esp_led | |
brightness_pct: 25 | |
color_name: red | |
service: light.turn_on | |
- id: 'rotorindikator_ftx_off' | |
alias: Rotorindikator ftx off | |
initial_state: 'on' | |
trigger: | |
- entity_id: switch.brytare_ftx_rotor | |
platform: state | |
to: 'off' | |
condition: [] | |
action: | |
- data: | |
entity_id: light.vardagsrum_esp_led | |
brightness_pct: 25 | |
color_name: blue | |
service: light.turn_on | |
##################################################### | |
#### Lovelace picture-elements card code example #### | |
##################################################### | |
type: picture-elements | |
elements: | |
- type: state-label | |
entity: sensor.ftx_ut | |
style: | |
font-size: 1.4vmax | |
left: 26% | |
top: 14% | |
- type: state-label | |
entity: sensor.ftx_in | |
style: | |
font-size: 1.4vmax | |
left: 75% | |
top: 14% | |
- type: state-label | |
entity: sensor.ftx_cirkulation | |
style: | |
font-size: 1.4vmax | |
left: 31% | |
top: 56% | |
- type: state-label | |
entity: sensor.ftx_retur | |
style: | |
font-size: 1.4vmax | |
left: 69% | |
top: 56% | |
- entity: switch.brytare_ftx_rotor | |
image: /local/stopped-fan.png | |
state_image: | |
'on': /local/spinning-fan.gif | |
style: | |
left: 50% | |
top: 38.6% | |
width: 10% | |
tap_action: | |
action: call-service | |
service: switch.toggle | |
service_data: | |
entity_id: switch.brytare_ftx_rotor | |
type: image | |
image: /local/ftx.png | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ATTENTION!
I take NO RESPONSIBILITY if you damage your FTX, your self or any property. To use the switch on the recycling drum you need to tinker with high voltage (mains).