An ebusd add-on

Download addon version 0.84 from GitHub, unzip and then copy do HA shared directory by samba. Directory name addon. Then go to supervisor to addon and click to reload again. It show now also version 0.84. now you can install it

1 Like

Sorry, missed all the messages. Will roll back auto MQTT tomorrow and release a new version

@pepeEL @andrej33 @leeyuentuen @Mozzarella

Sorry for problems you have had with MQTT. I have made a change so that MQTT can be overridden manually using the old config scheme. If no MQTT details are entered it will be configured automatically.

I have just released as version 0.86. Post if you have any more problems and I will keep an eye on the forum.

1 Like

Thanks @pepeEL, @timstanley1985 for your help and effort with this addon!

Thanks for your work.

Great job. Just what I was looking for

Version 0.86 works again ok.

I can’t install ebusd add-on due to next error:
Installation failed
The command '/bin/ash -o pipefail -c apk -U add --no-cache ebusd' returned a non-zero code: 1
Could you help me to find where is root cause of this problem

What hardware are you trying to install this into? Can you also post the full supervisor log please. That will detail why the install failed

Raspberry Pi3B+ with Armbian. Ebus adapter v2.2. HASSIO Supervisor on docker.

22-01-24 12:18:42 INFO (SyncWorker_0) [supervisor.docker.addon] Starting build for 2ad9b828/armv7-addon-ebusd:0.86
22-01-24 12:19:03 ERROR (SyncWorker_0) [supervisor.docker.addon] Can't build 2ad9b828/armv7-addon-ebusd:0.86: The command '/bin/ash -o pipefail -c apk -U add --no-cache ebusd' returned a non-zero code: 1
22-01-24 12:19:03 ERROR (SyncWorker_0) [supervisor.docker.addon] Build log: 
Step 1/16 : ARG BUILD_FROM
Step 2/16 : FROM $BUILD_FROM
 ---> a267e8678e44
Step 3/16 : ENV LANG C.UTF-8
 ---> Using cache
 ---> 30ed8f6f7dcd
Step 4/16 : RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing"     >> /etc/apk/repositories
 ---> Using cache
 ---> bc5608e3fb44
Step 5/16 : RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main"     >> /etc/apk/repositories
 ---> Using cache
 ---> 76ac620ca515
Step 6/16 : RUN apk -U add --no-cache ebusd
 ---> Running in 3252590d647b
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/armv7/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: temporary error (try again later)

WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: temporary error (try again later)

fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/edge/testing: temporary error (try again later)

fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/edge/main: temporary error (try again later)

ERROR: unable to select packages:

  ebusd (no such package):
    required by: world[ebusd]
Removing intermediate container 3252590d647b

It could be you need to use docker build command to run with “–network host” option

This is the problem:

fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/armv7/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/edge/testing: temporary error (try again later)

You are the only person who has had this problem so I suspect this is a local problem. Is the pi connected to the internet? Have you tried to ping the address above and see if it is reachable from your pi?

Could you tell me logic of this failed action? How to find package ebusd in these APKINDEXes?
I’ve successfully downloaded all of these archives on raspberry with wget.

The APK is installed within the docker build so downloading it onto your pi won’t help. Have you tried clicking the rebuild button you see if it builds successfully? The error message does say try again later

https://pkgs.alpinelinux.org/packages?name=ebusd&branch=edge

Great addition to HA
Slight bug in log configuration
–log=mqtt:[anything] is not valid as mqtt is not an area so checking anything in “Log level for MQTT messages” results in failure
e.g.

> ebusd --foreground --mqtthost=core-mosquitto --mqttport=1883 --mqttuser=addons --mqttpass=xxxxxxxxxx --scanconfig --mqttlog --latency=10 --device=/dev/ttyUSB0 --log=all:error --log=mqtt:debug
ebusd: invalid log: areas
Try `ebusd --help' or `ebusd --usage' for more information.

The ebusd wiki says areas are limited to
main,network,bus,update,all

Thanks

Thanks @Sonosy. I have lots of messages in my logs with title [mqtt notice] but you are correct that you cannot set the log level of these at runtime. They seem to follow whatever is set for log=all.

I will remove this option in the next release.

I have done some digging and there is actually an undocumented log area called “other” which MQTT log messages are logged to (code links below). I will update the config to include this additional log area in the next release.

Thanks @timstanley1985 , very speed response.
It’s taken me ages to get mqtt to work with ebusd so for those in a similar position what I have found is.
Each ebus circuit item needs an HA sensor configured (in configuration.yaml) like this

sensor:
  - platform: mqtt
    name: "Hot Water Storage Bottom Temp"
    unique_id: "ebusd_ehp_storage_bottom_water_temp"
    state_topic: "ebusd/ehp/HwcTemp"
    unit_of_measurement: "°C"

The state_topic format is derived from the ebusd configuration setup and defaults to
ebusd/[circuit name]/[circuit item]

The thing I was stuck on is that ebusd does not automatically start polling all items in every circuit and to get your circuit items polled and published you need an automation (in automations.yaml).
This could trigger routinely and should have actions to start polling as follows:

- id: 'whatever'
  alias: ebus poll
  description: 'Triggers ebusd to start polling circuit items'
  trigger:
  - platform: time_pattern
    hours: '1'
  condition: []
  mode: single
  action:
  - service: mqtt.publish
    data:
      topic: ebusd/ehp/HwcTemp/get
      payload_template: ?1
  - service: mqtt.publish
    data:
      topic: ebusd/ehp/OutsideTemp/get
      payload_template: ?1

The mqtt topic is the same as the state topic in the configuration appended by /get
The payload template can be ?1 to ?9 where the digit is the priority.
AFAIUI the ebus is polled every --pollintervalsec as set up in ebusd’s configuration (default 5 seconds) for each circuit item on a round robin basis.
This means that if all items were set up with the same payload_template they would all get polled in sequence (so for 12 items at 5 seconds, each item will be polled once per minute).

I’m sure it would be best to trigger this animation on startup and every time ebusd restarts but I haven’t figured that out yet.

Please post if there’s a better way

Hi @Sonosy,

I did a post on how to do this a few weeks ago, i’ll have to see if we can get a link added to the opening post.

You will only need to publish ?1 to the /get topic once and eBUSd will poll every 5 seconds until you reboot eBUSd. The eBUSd developer has also said he is working on a Home Assistant integration using MQTT discovery so polled readings should hopefully be discovered automatically in a future release of eBUSd.