more updates

This commit is contained in:
proddy
2020-01-09 20:02:13 +01:00
parent 52129a6b25
commit 7145426099
27 changed files with 42 additions and 10174 deletions

View File

@@ -2,11 +2,11 @@ Here is a prototype board you can build yourself on a breadboard for testing.
The breadboard layout was done using [DIY Layout Creator](https://github.com/bancika/diy-layout-creator) and sources files are included in this repo.
![Breadboard Circuit](_media/schematics/breadboard.png)
![Breadboard Circuit](_media/schematics/breadboard.png ':size=500')
The schematic used:
![Schematic](_media/schematics/circuit.png)
![Schematic](_media/schematics/circuit.png ':size=500')
*Optionally I've also added 2 0.5A/72V polyfuses between the EMS and the two inductors L1 and L2 for extra protection.*
@@ -19,6 +19,6 @@ The EMS circuit will work with both 3.3V and 5V. It's easiest though to power di
- powering from the 3.5mm service jack (stereo jack) on the boiler. This will give you 8V so you need a buck converter (like a [Pololu D24C22F5](https://www.pololu.com/product/2858)) to step this down to 5V to provide enough power to the ESP8266 (250mA at least)
- powering direct from the EMS line, which is 15V DC and using a buck converter as described above.
| With Power Circuit |
| ------------------------------------------ |
| ![Power circuit](_media/schematics/Schematic_EMS-ESP.png) |
**With Power Circuit**
![Power circuit](_media/schematics/Schematic_EMS-ESP.png ':size=600') |

View File

@@ -1,24 +1,10 @@
## Example Dashboard
The files to read MQTT and parse as sensors and thermostat components into HA can be found [here](integrations/homeassistant/ha) along with a LoveLace dashboard which looks like:
In the `doc` folder there is a basic template for a HA dashboard which looks like:
![Home Assistant panel)](_media/home%20assistant/ha.png)
![Home Assistant panel](_media/home%20assistant/ha.png ':size=500')
and the alerts on an iOS/Android device using PushBullet, PushOver or any notification service would look like:
![Home Assistant iPhone notify)](_media/home%20assistant/ha_notify.jpg)
You can find the `.yaml` configuration files under `doc/ha`. See also this [HA forum post](https://community.home-assistant.io/t/thermostat-and-boiler-controller-for-ems-based-boilers-nefit-buderus-bosch-using-esp/53382). Make sure you include these YAML files in your `configuration.yaml` file, e.g.
```yaml
script: !include script.yaml
sensor: !include sensor.yaml
switch: !include switch.yaml
notify: !include notify.yaml
climate: !include climate.yaml
automation: !include automation.yaml
binary_sensor: !include binary_sensor.yaml
```
![Home Assistant iPhone notify](_media/home%20assistant/ha_notify.jpg ':size=300')
## Supporting multiple thermostat heating circuits

View File

@@ -1,17 +1,17 @@
## Using Telnet to monitor traffic
## Using Telnet to monitor EMS traffic
Use the telnet client to inform you of all activity and errors real-time. This is an example of the telnet output:
![Telnet](https://github.com/proddy/EMS-ESP/raw/master/doc/telnet/telnet_menu.jpg)
![Telnet](_media/telnet/telnet_menu.jpg)
Type 'log v' and Enter and you'll be seeing verbose logging messages. ANSI colors with white text for info messages, green are for broadcast telegrams, yellow are the ones sent to us and red are for unknown data or telegrams which have failed the CRC check.
Type `log v` and Enter and you'll be seeing verbose logging messages. ANSI colors with white text for info messages, green are for broadcast telegrams, yellow are the ones sent to us and red are for unknown data or telegrams which have failed the CRC check.
![Telnet](https://github.com/proddy/EMS-ESP/raw/master/doc/telnet/telnet_verbose.PNG)
![Telnet](_media/telnet/telnet_verbose.PNG)
To see the current stats and collected values type 'info'. Note it is normal behavior to see a few CrcErrors as this is usually noise on the line.
![Telnet](https://github.com/proddy/EMS-ESP/raw/master/doc/telnet/telnet_stats.PNG)
![Telnet](_media/telnet/telnet_stats.PNG)
**Warning: be careful when sending values to the boiler. If in doubt you can always reset the boiler to its original factory settings by following the instructions in the user guide. For example on my Nefit Trendline that is done by holding down the Home and Menu buttons simultaneously for a few seconds, selecting factory settings from the scroll menu followed by pressing the Reset button.**

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 594 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
docs/_media/boiler_64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,13 +1,15 @@
<img style="margin: 10px 10px; float:right; width:40%" src="_media/boiler.svg" alt="EMS-ESP Logo"></img>
Welcome to EMS-ESP! A small project to read and write to EMS controller heating devices.
<br>
Follow these steps to get EMS-ESP up and running:
- [Build](Building-your-own-test-circuit) or buy an EMS interface board. I highly recommend purchasing a EMS Gateway from BBQKees. Go to https://bbqkees-electronics.nl/
- [Build](Building-your-own-test-circuit) or buy an EMS interface board. I highly recommend purchasing a EMS Gateway from BBQKees ([bbqkees-electronics.nl](https://bbqkees-electronics.nl))
- Get an ESP8266 dev board (Wemos D1, Lolin, Nodemcu or equivalent)
- Build or download the firmware](Building-firmware)
- [Build or download the firmware](Building-firmware)
- [Upload the firmware](Uploading-firmware)

View File

@@ -7,11 +7,11 @@
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="EMS-ESP">
<meta name="keywords" content="EMS-ESP EMS esp8266 flash firmware help installation flash">
<meta name="keywords" content="EMS-ESP EMS esp8266 flash firmware help installation">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta property="og:title" content="EMS-ESP">
<meta property="og:description" content="An EMS interface">
<meta property="og:image" content="https://proddy.github.io/EMS-ESP/_media/logo-proddy-fw.jpg">
<meta property="og:image" content="https://proddy.github.io/EMS-ESP/_media/boiler_64.png">
<meta property="og:url" content="https://proddy.github.io/EMS-ESP/#/Home">
<!-- Theme: Simple Dark -->
@@ -29,7 +29,7 @@
name : 'EMS-ESP',
nameLink : './#/Home',
homepage : 'Home.md',
logo : '/_media/logo-proddy-fw.jpg',
logo : '/_media/EMS-ESP_logo.png',
repo : 'https://github.com/proddy/EMS-ESP',
onlyCover : true,
relativePath: false,

View File

@@ -0,0 +1,42 @@
- id: ems-esp_offline
alias: See if ems-esp goes offline
initial_state: true
trigger:
platform: state
entity_id: sensor.ems_esp_status
to: offline
action:
- service: notify.admin_notify
data_template:
title: EMS-ESP
message: 'gone offline'
- id: emsesp_restart
alias: See if ems-esp restarts
initial_state: true
trigger:
platform: mqtt
topic: home/ems-esp/start
payload: start
action:
- service: notify.admin_notify
data_template:
title: ems-esp has booted
message: EMS-ESP
- service: mqtt.publish
data_template:
topic: home/ems-esp/start
payload: '{{ now().strftime("%H:%M:%S %-d/%b/%Y") }}'
- id: boiler_shower
alias: Alert shower time
initial_state: true
trigger:
platform: state
entity_id: sensor.last_shower_duration
action:
- service: notify.admin_notify
data_template:
title: Shower finished at {{states.sensor.time.state}}
message: "{{ states.sensor.last_shower_duration.state }}"

View File

@@ -0,0 +1,12 @@
- platform: mqtt
name: 'Tap Water'
state_topic: 'home/ems-esp/tapwater_active'
payload_on: "1"
payload_off: "0"
- platform: mqtt
name: 'Heating'
state_topic: 'home/ems-esp/heating_active'
payload_on: "1"
payload_off: "0"

View File

@@ -0,0 +1,41 @@
- platform: mqtt
name: Thermostat
modes:
- "auto"
- "heat"
- "off"
mode_command_topic: "home/ems-esp/thermostat_cmd_mode1"
temperature_command_topic: "home/ems-esp/thermostat_cmd_temp1"
mode_state_topic: "home/ems-esp/thermostat_data"
current_temperature_topic: "home/ems-esp/thermostat_data"
temperature_state_topic: "home/ems-esp/thermostat_data"
mode_state_template: "{% if value_json.hc1.mode in ['manual', 'day'] %} heat {% elif value_json.hc1.mode in ['night', 'off'] %} off {% else %} auto {% endif %}"
current_temperature_template: "{{ value_json.hc1.currtemp }}"
temperature_state_template: "{{ value_json.hc1.seltemp }}"
temp_step: 0.5
- platform: mqtt
name: boiler
modes:
- "auto"
- "off"
min_temp: 40
max_temp: 60
temp_step: 1
current_temperature_topic: "home/ems-esp/boiler_data"
temperature_state_topic: "home/ems-esp/boiler_data"
mode_state_topic: "home/ems-esp/boiler_data"
current_temperature_template: "{{ value_json.wWCurTmp }}"
temperature_state_template: "{{ value_json.wWSelTemp }}"
mode_state_template: "{% if value_json.wWActivated == 'off' %} off {% else %} auto {% endif %}"
temperature_command_topic: "home/ems-esp/boiler_cmd_wwtemp"
mode_command_topic: "home/ems-esp/boiler_cmd_wwactivated"

View File

@@ -0,0 +1,12 @@
sensor.boiler_boottime:
friendly_name: Controller last restart
icon: mdi:clock-start
sensor.showertime_time:
friendly_name: 'Last shower at'
icon: mdi:timelapse
sensor.boiler_updated:
friendly_name: 'Data last received'
icon: mdi:clock-start

View File

@@ -0,0 +1,22 @@
# Home Assistant Files
* <a href="integrations/homeassistant/automation.yaml">automation.yaml</a>
* <a href="integrations/homeassistant/binary_sensor.yaml">binary_sensor.yaml</a>
* <a href="integrations/homeassistant/climate.yaml">climate.yaml</a>
* <a href="integrations/homeassistant/customize.yaml">customize.yaml</a>
* <a href="integrations/homeassistant/notify.yaml">notify.yaml</a>
* <a href="integrations/homeassistant/script.yaml">script.yaml</a>
* <a href="integrations/homeassistant/sensor.yaml">sensor.yaml</a>
* <a href="integrations/homeassistant/switch.yaml">switch.yaml</a>
* <a href="integrations/homeassistant/ui-lovelace.yaml">ui-lovelace.yaml</a>
Make sure you include these YAML files in your `configuration.yaml` file, e.g.
```yaml
script: !include script.yaml
sensor: !include sensor.yaml
switch: !include switch.yaml
notify: !include notify.yaml
climate: !include climate.yaml
automation: !include automation.yaml
binary_sensor: !include binary_sensor.yaml
```

View File

@@ -0,0 +1,16 @@
- name: pushover
platform: pushover
api_key: !secret pushover_api_key
user_key: !secret pushover_user_key
- name: general_notify
platform: group
services:
- service: ios_pauls_iphone
- service: pushover
- name: admin_notify
platform: group
services:
- service: ios_pauls_iphone
- service: pushover

View File

@@ -0,0 +1,8 @@
# ems-esp
shower_coldshot:
sequence:
- service: mqtt.publish
data_template:
topic: 'home/ems-esp/generic_cmd'
payload: '{cmd:"coldshot"}'

View File

@@ -0,0 +1,146 @@
# thermostat HC1
- platform: mqtt
state_topic: 'home/ems-esp/thermostat_data'
name: 'Current Room Temperature'
unit_of_measurement: '°C'
value_template: "{{ value_json.hc1.currtemp }}"
- platform: mqtt
state_topic: 'home/ems-esp/thermostat_data'
name: 'Current Set Temperature'
unit_of_measurement: '°C'
value_template: "{{ value_json.hc1.seltemp }}"
- platform: mqtt
state_topic: 'home/ems-esp/thermostat_data'
name: 'Current Mode'
value_template: "{{ value_json.hc1.mode }}"
# boiler
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Warm Water selected temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.wWSelTemp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Warm Water tapwater flow rate'
unit_of_measurement: 'l/min'
value_template: '{{ value_json.wWCurFlow }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Warm Water current temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.wWCurTmp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Warm Water activated'
value_template: '{{ value_json.wWActivated }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Warm Water 3-way valve'
value_template: '{{ value_json.wWHeat }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Current flow temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.curFlowTemp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Return temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.retTemp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Gas'
value_template: '{{ value_json.burnGas }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Boiler pump'
value_template: '{{ value_json.heatPmp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Fan'
value_template: '{{ value_json.fanWork }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Ignition'
value_template: '{{ value_json.ignWork }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Circulation pump'
value_template: '{{ value_json.wWCirc }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Burner max power'
unit_of_measurement: '%'
value_template: '{{ value_json.selBurnPow }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Burner max power'
unit_of_measurement: '%'
value_template: '{{ value_json.selBurnPow }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Burner current power'
unit_of_measurement: '%'
value_template: '{{ value_json.curBurnPow }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'System Pressure'
unit_of_measurement: 'bar'
value_template: '{{ value_json.sysPress }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Boiler temperature'
unit_of_measurement: '°C'
value_template: '{{ value_json.boilTemp }}'
- platform: mqtt
state_topic: 'home/ems-esp/boiler_data'
name: 'Pump modulation'
unit_of_measurement: '%'
value_template: '{{ value_json.pumpMod }}'
# shower time duration
- platform: mqtt
name: 'Last shower duration'
state_topic: "home/ems-esp/shower_data"
value_template: "{{ value_json.duration | is_defined }}"
- platform: template
sensors:
showertime_time:
value_template: '{{ as_timestamp(states.sensor.last_shower_duration.last_updated) | int | timestamp_custom("%-I:%M on %a %-d %b") }}'
boiler_updated:
value_template: '{{ as_timestamp(states.sensor.boiler_temperature.last_updated) | timestamp_custom("%H:%M on %d/%b") }}'
boiler_boottime:
value_template: '{{ as_timestamp(states.automation.see_if_boiler_restarts.attributes.last_triggered) | timestamp_custom("%H:%M:%S %d/%m/%y") }}'
# general
- platform: mqtt
state_topic: 'home/ems-esp/status'
name: 'ems-esp status'

View File

@@ -0,0 +1,20 @@
# EMS-ESP
- platform: mqtt
name: "Shower Timer"
state_topic: "home/ems-esp/shower_data"
value_template: "{{ value_json.timer }}"
command_topic: "home/ems-esp/shower_data"
payload_on: '{"timer":"1"}'
payload_off: '{"timer":"0"}'
state_on: "1"
state_off: "0"
- platform: mqtt
name: "Long Shower Alert"
state_topic: "home/ems-esp/shower_data"
value_template: "{{ value_json.alert }}"
command_topic: "home/ems-esp/shower_data"
payload_on: '{"alert":"1"}'
payload_off: '{"alert":"0"}'
state_on: "1"
state_off: "0"

View File

@@ -0,0 +1,75 @@
- id: ems-esp_id0
title: Heating
cards:
- id: ems-esp_id1
type: glance
entities:
- entity: binary_sensor.tap_water
icon: mdi:fire
- entity: binary_sensor.heating
icon: mdi:radiator
- id: ems-esp_id2
type: entities
title: Boiler
show_header_toggle: false
entities:
- sensor.boiler_boottime
- sensor.boiler_updated
- sensor.ems_esp_status
- type: divider
- sensor.warm_water_selected_temperature
- sensor.warm_water_current_temperature
- sensor.warm_water_activated
- sensor.warm_water_3_way_valve
- type: divider
- sensor.boiler_temperature
- sensor.return_temperature
- sensor.current_flow_temperature
- sensor.pump_modulation
- sensor.ignition
- sensor.gas
- sensor.fan
- sensor.boiler_pump
- sensor.system_pressure
- sensor.burner_max_power
- sensor.burner_current_power
- id: ems-esp_id3
type: vertical-stack
cards:
- type: entities
title: Shower Monitor
show_header_toggle: false
entities:
- switch.shower_timer
- switch.long_shower_alert
- type: divider
- sensor.last_shower_duration
- sensor.showertime_time
- type: entity-button
icon: mdi:shower-head
name: send a cold shot of shower water
entity: script.shower_coldshot
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.shower_coldshot
- type: history-graph
entities:
- sensor.ems_esp_wifi
- sensor.ems_esp_freemem
- id: ems-esp_id4
type: vertical-stack
cards:
- type: history-graph
entities:
- sensor.pc_room_sensor_temperature
- sensor.current_room_temperature
- sensor.dark_sky_temperature
- type: thermostat
entity: climate.thermostat
- type: thermostat
entity: climate.boiler