Skip to content

Commit

Permalink
Add docs, update config, add ebusd2
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrtobolski committed Jun 20, 2024
1 parent 81d860b commit 6cad93b
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 3 deletions.
76 changes: 76 additions & 0 deletions ebusd/DOCS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Home Assistant Add-on: eBUSd

This is to run [ebusd](http://ebusd.eu) as supervisor addon (docker container) in Home Assistant OS.

## How to run ebusd

Deep dive into the [ebusd Wiki](https://github.com/john30/ebusd/wiki).
The steps **Build and Install are handled by this addon**. You'll need to **configure the options in this addon to run** ebusd.

1. Connect a [hardware interface](https://github.com/john30/ebusd/wiki/6.-Hardware) to your device runing Home Assistant OS. USB and network devices are supported.
2. Define either a USB or network device. Seperate configuration entries are available via the UI or can be configured manually using ```device: /dev/ttyAMA0``` or ```network_device: enh:192.158.0.7:9999```
3. MQTT will be configured automatically to use the Home Assitant MQTT Broker. This can be overridden in the config options if you would prefer to use an external MQTT server. TCP and HTTP client acces is also available.
4. Start the Add-on and check the output logs
<img width="512" alt="Bildschirmfoto 2021-10-07 um 21 54 10" src="https://user-images.githubusercontent.com/1786188/136459050-16ab7c10-0fe0-40ff-b20d-b6eb1730630d.png">


## How to get data into Home Assistant

MQTT discovery is now automatically configured. When you start the add-on the global readings (uptime, signal status etc.) will be added to Home Assistant automatically under a device named ebusd. After around 5 minutes any readings that are being polled, either via an MQTT request or by editing your config files, will be added to Home Assistant automatically. The device name will be ebusd {circuit} - e.g. "ebusd bai".

The mqttvar option can be used to inject MQTT variables or the [mqtt-hassio.cfg](https://github.com/john30/ebusd/blob/master/contrib/etc/ebusd/mqtt-hassio.cfg) can be edited and saved in your /config folder.

For more info please see the eBUSd docs:
- [MQTT Integration](https://github.com/john30/ebusd/wiki/MQTT-integration)
- [MQTT Discovery](https://github.com/john30/ebusd/discussions/518)

**Top tips:**

- If you send an MQTT get message with payload "?1" eBUSd will automatically poll that reading every 30 seconds and publish via MQTT. For example: ```mosquitto_pub -t ebusd/bai/FlowTemp/get -m ?1```
- Git clone the ebusd-configuration files to your /config folder and edit the config files for your heating system. Add a number 1-9 (1 high priority, 9 low prioirty) after the r at the start of each line and eBUSd will poll that reading automatically.
- Once your heating system has been detected change the device name from "ebusd bai" to the name of your boiler e.g. "ecoTEC pro"
- If some polled readings do not show up in Home Assistant it might be because mqtt-hassio.cfg is configured to filter them out. Try setting to mqttvar to ```"filter-name="``` and this will remove any filters so you can debug the issue.

## Custom CSV or MQTT cfg files:

To use custom config files you can use the configpath option. You can create a local copy of https://github.com/john30/ebusd-configuration in your "/config" folder and change configpath to e.g. "/config/ebusd-configuration/latest/en". Custom CSV files must be in the /config folder.

Similarly for MQTT create config file in "/config" folder and link it using the --mqttint=/config/YOUR_FILE_PATH option

## HTTP and TCP client Access

To use HTTP and TCP clients enter port numbers into the add-on network settings and activated in the config.
After TCP clients activation you can connect from any system with installed [ebusd clients](https://github.com/john30/ebusd/wiki/3.-Clients-and-commands).

The following example will force a reading of all messages from loaded csv config files and can be included via crontab for regular message updates:

```ebusctl -s X.X.X.X f -l "*" -a|awk '{print $2}' | xargs -L1 -t ebusctl -s X.X.X.X r```
Where ```X.X.X.X``` is the address of the ebusd add-on.

## Running ebusd and ebusctl directly

To run ebusctl and/or ebusd directly (as suggested on other forums for debugging purposses) you need to SSH into the Docker container. For this you need the [**Advanced** SSH & Web Terminal](https://github.com/hassio-addons/addon-ssh) (not the standard one).

After getting the addon, you need to set a password in the configuration of the SSH addon otherwise it will not start.

Last step in preparing the addon is to disable the 'Protection mode' on the *Info* page of the addon.

Afterwards, in the SSH you can type in

```docker exec -it `docker ps | grep ebusd | awk '{print $1}'` /bin/bash```

and you are inside the docker container, where you can easily run `ebusctl` or `ebusd`.

## Custom command line options

You can add any command line options using the custom command line options field. Check the eBUSd wiki for all available options - https://github.com/john30/ebusd/wiki/2.-Run

For example ``` --initsend --dumpconfig```

## Network eBUS adapter support

This release now fully supports wireless/network [eBUS adapters](https://adapter.ebusd.eu/index.en.html). The configuration options has changed from custom_device to network_device.

For example ```network_device: enh:Y.Y.Y.Y:9999```
Where ```Y.Y.Y.Y``` is the address of the eBUS asapter.

23 changes: 23 additions & 0 deletions ebusd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Home Assistant Add-on: ebusd

![Supports aarch64 Architecture][aarch64-shield]
![Supports amd64 Architecture][amd64-shield]
![Supports armhf Architecture][armhf-shield]
![Supports armv7 Architecture][armv7-shield]
![Supports i386 Architecture][i386-shield]

ebusd - eBUS daemon

## About

This Add-on runs ebusd, a daemon for handling communication with eBUS devices connected to a 2-wire bus system (“energy bus” used by numerous heating systems) USB and network ebusd adapters are supported.

### Based on
- john30: https://github.com/john30/ebusd
- LukasGrebe: https://github.com/LukasGrebe/ha-addons

[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
6 changes: 3 additions & 3 deletions ebusd/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "ebusd add-on test"
version: "1.0.1"
name: "ebusd add-on"
version: "1.0.0"
slug: "ebusd"
description: >
This Add-on runs eBUSd, a daemon for handling communication with eBUS devices
Expand All @@ -12,7 +12,7 @@ arch:
- armv7
- i386
init: false
# image: "ghcr.io/piotrtobolski/{arch}-addon-ebusd"
image: "ghcr.io/piotrtobolski/{arch}-addon-ebusd"
startup: services
services:
- mqtt:need
Expand Down
Binary file added ebusd/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions ebusd2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->

## 1.0.0

- Initial release
25 changes: 25 additions & 0 deletions ebusd2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Home Assistant Add-on: ebusd2

![Supports aarch64 Architecture][aarch64-shield]
![Supports amd64 Architecture][amd64-shield]
![Supports armhf Architecture][armhf-shield]
![Supports armv7 Architecture][armv7-shield]
![Supports i386 Architecture][i386-shield]

ebusd - eBUS daemon

## About

**This is identical to ebusd add-on with the exception of default MQTT topic (ebusd2 instead of ebusd) to allow running second daemon on the same HA instance.**

This Add-on runs ebusd, a daemon for handling communication with eBUS devices connected to a 2-wire bus system (“energy bus” used by numerous heating systems) USB and network ebusd adapters are supported.

### Based on
- john30: https://github.com/john30/ebusd
- LukasGrebe: https://github.com/LukasGrebe/ha-addons

[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[armhf-shield]: https://img.shields.io/badge/armhf-no-red.svg
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
64 changes: 64 additions & 0 deletions ebusd2/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "ebusd add-on (2)"
version: "1.0.0"
slug: "ebusd2"
description: "Same as ebusd add-on but allow creating second instance of ebusd on a single HA machine"
url: "https://github.com/piotrtobolski/ha-addons/tree/main/ebusd2"
arch:
- aarch64
- amd64
- armv7
- i386
init: false
image: "ghcr.io/piotrtobolski/{arch}-addon-ebusd"
startup: services
services:
- mqtt:need
uart: true
map:
- addon_config:rw
ports:
8888/tcp: null
8889/tcp: null
ports_description:
8888/tcp: TCP client port
8889/tcp: HTTP client port (HTTP must be activated in config)
options:
scanconfig: true
loglevel_all: "notice"
mqtttopic: "ebusd2"
mqttint: "/etc/ebusd/mqtt-hassio.cfg"
mqttjson: true
schema:
mode: "list(enh|ens|udp)?"
device: "device(subsystem=tty)?"
network_device: "str?"
latency: "int(0,10000)?"
pollinterval: "int(0,3600)?"
http: "bool?"
readonly: "bool?"
scanconfig: "bool?"
configpath: "str?"
commandline_options: "str?"
accesslevel: "str?"
logdir_name: "str?"
logdir_files_number: "int?"
logdir_files_size: "int?"
loglevel_all: "list(error|notice|info|debug)?"
loglevel_network: "list(error|notice|info|debug)?"
loglevel_bus: "list(error|notice|info|debug)?"
loglevel_update: "list(error|notice|info|debug)?"
loglevel_main: "list(error|notice|info|debug)?"
loglevel_other: "list(error|notice|info|debug)?"
mqtthost: "str?"
mqttport: "int?"
mqttuser: "str?"
mqttpass: "str?"
mqttjson: "bool?"
mqttlog: "bool?"
mqttretain: "bool?"
mqttint: "str?"
mqttvar: "str?"
mqtttopic: "str?"
lograwdata: "bool?"
lograwdatafile: "str?"
lograwdatasize: "int?"
Binary file added ebusd2/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6cad93b

Please sign in to comment.