Skip to content

Commit

Permalink
Added Service for sending arbritrary ESP2 messages
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Mar 24, 2024
1 parent 062b537 commit b704bbe
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Elatko devices are exemplarily mentioned. You can find [here](https://www.eltako
* [Climate](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/heating-and-cooling/readme.md) (**Experimental** Feedback is welcome.)
* A5-10-06 (Eltako FAE14, FHK14, F4HK14, F2L14, FHK61, FME14)
* [Teach-In Buttons](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/teach_in_buttons/readme.md)
* [Send Message Service](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/service-send-message/readme.md) Sends any EnOcean Message. Can be used for automatinos in Home Assistant so that none-EnOcean and EnOcean deviecs can be combined.

[**Gateway**](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/gateways/readme.md) (See also [how to use gateways](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/gateway_usage/readme.md) and [multiple gateway support](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/multiple-gateway-support/readme.md))
* **Eltako FAM14** and Eltako **FGW14-USB** (based on ESP2, rs485 bus and baud rate 57600, uses library [eltako14bus](https://github.com/grimmpp/eltako14bus))
Expand Down
33 changes: 33 additions & 0 deletions docs/service-send-message/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Send Message Service

This service is mainly inteded to combine none-EnOcean and EnOcean devices. Services which cannot communicate nativcely because they are based on different communication protocols, you can use automations in Home Assistant to e.g. receive trigger from an none-EnOcean sender and send a EnOcean message to an relay or sync states of a thermostat. ...

## Configuration

<img src="send_message_automation_screenshot.png" height="300"/>

Create an [automation](https://www.home-assistant.io/getting-started/automation/) in Home Assistant. Use the upper sections to react on anything you like, dependent on you sensor/sender.

`Add Action` and search for `eltako`. It proposes a service to send messages for every available gateway. In addition you need to enter in the data section what to send. The fields `id` and `eep` must be specified. `id` stands for the sender address. (Keep in mind: bus gateways do not send in wireless network and wireless tranceivers do only have 128 hardcoded addresses to be used.) `eep` is the message format you what to use. Dependent on the eep specific information is put into the messages to be sent. You can either check in the [code](https://github.com/grimmpp/eltako14bus/blob/master/eltakobus/eep.py) or in the logs what attribute need to be set.

<img src="send_message_logs_screenshot.png" />

Values of e.g. other sensers can also be dynamically added by
```
alias: send message
description: ""
trigger: []
condition: []
action:
- service: eltako.gateway_3_send_message
metadata: {}
data:
id: FF-DD-00-01
eep: A5-10-06
current_temp: {{state_attr('climate.my_other_brands_smart_thermostat_1293127', 'current_temperature') }}
target_temp: {{state_attr('climate.my_other_brands_smart_thermostat_1293127', 'target_temperature') }}
enabled: true
mode: single
```

By triggering this example, from above, manually you will send a message via gateway 3 containing the current and target temperature of the thermostat entity 1293127.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit b704bbe

@christophheich
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good, currently not finished, but i will add an example doc and merge it to the repo if thats okay:

https://github.com/christophheich/grimmpp-home-assistant-eltako/blob/documentation/docs/external-thermostat-sensor-example.md

one more thing, the automation with the target temperature in the readme might not work as it is being treated as a template, therefore the code has to look something like this if i am correct:

alias: tado° Wohnbereich
description: ""
trigger:
  - platform: state
    entity_id:
      - climate.tado_smart_thermostat_suxxxxxxxx
    attribute: current_temperature
  - platform: state
    entity_id:
      - climate.tado_smart_thermostat_suxxxxxxxx
    attribute: temperature
action:
  - service: eltako.gateway_1_send_message
    data:
      id: FF-82-3E-69
      eep: A5-10-06
      current_temperature: >-
        {{ state_attr('climate.tado_smart_thermostat_suxxxxxxxx',
        'current_temperature') }}
      target_temperature: >-
        {{ state_attr('climate.tado_smart_thermostat_suxxxxxxxx',
        'temperature') }}
    enabled: true
mode: single

Please sign in to comment.