john30 / ebusd

daemon for communication with eBUS heating systems
GNU General Public License v3.0
592 stars 136 forks source link

No writable sensors in mqtt autodiscovery for Home Assistant #1038

Open pattyland opened 1 year ago

pattyland commented 1 year ago

Description

I'm using the Home Assistant Addon together with MQTT and a Vaillant atmoTEC exclusive boiler. Auto discovery works perfect for a few binary sensors and a lof ot sensors. To control my heater I added --mqttvar=filter-direction=r|u|^w to the additional parameters from the addon. In the arguments field below you can validate that it gets passed through to ebus, but:

Actual behavior

only sensors and binary sensors in /homeassistant/

Expected behavior

Good question, switches or range inputs?

ebusd version

23.2

ebusd arguments

--foreground --httpport=8889 --mqtthost=core-mosquitto --mqttport=1883 --mqttuser=mosquitto --mqttpass=*** --scanconfig --mqttjson --mqttint=/etc/ebusd/mqtt-hassio.cfg --mqtttopic=ebusd --device=ens:192.168.178.8:9999 --log=all:notice --log=other:notice --mqttvar=filter-direction=r|u|^w

Operating system

other

CPU architecture

x64

Dockerized

other

Hardware interface

adapter 3.1 WiFi

Related integration

MQTT Home Assistant via mqtt-hassio.cfg

Logs

2023-10-12 23:55:00.228 [main notice] ebusd 23.2.p20230716 started with auto scan on device: 192.168.178.8:9999, enhanced
2023-10-12 23:55:01.732 [bus notice] device status: resetting
2023-10-12 23:55:01.732 [bus notice] bus started with own address 31/36
2023-10-12 23:55:01.735 [mqtt notice] connection established
2023-10-12 23:55:01.764 [bus notice] signal acquired
2023-10-12 23:55:02.113 [bus notice] new master 03, master count 2
2023-10-12 23:55:02.456 [bus notice] device status: reset, supports info
2023-10-12 23:55:02.470 [bus notice] device status: extra info: firmware 1.1[8419].2[847f], jumpers 0x3b
2023-10-12 23:55:06.004 [bus notice] new master 10, master count 3
2023-10-12 23:55:06.062 [update notice] received unknown MS cmd: 1008b5110101 / 092c2c0080ffff0000ff
2023-10-12 23:55:06.344 [update notice] received unknown MS cmd: 1008b5100900000078ffff050000 / 0101
2023-10-12 23:55:06.621 [update notice] received unknown MS cmd: 1008b5110102 / 05013c6e501e
2023-10-12 23:55:11.966 [bus notice] scan 08: ;Vaillant;BAI00;0730;7401
2023-10-12 23:55:11.966 [update notice] store 08 ident: done
2023-10-12 23:55:11.966 [update notice] sent scan-read scan.08  QQ=31: Vaillant;BAI00;0730;7401
2023-10-12 23:55:11.966 [bus notice] scan 08: ;Vaillant;BAI00;0730;7401
2023-10-12 23:55:12.536 [main notice] read common config file vaillant/broadcast.csv
2023-10-12 23:55:12.677 [main notice] read common config file vaillant/scan.csv
2023-10-12 23:55:12.813 [main notice] read common config file vaillant/general.csv
2023-10-12 23:55:12.952 [main notice] read scan config file vaillant/08.bai.csv for ID "bai00", SW0730, HW7401
2023-10-12 23:55:13.422 [update notice] sent scan-read scan.08 id QQ=31: 
2023-10-12 23:55:13.631 [update notice] sent scan-read scan.08 id QQ=31: 
2023-10-12 23:55:13.818 [update notice] sent scan-read scan.08 id QQ=31: 
2023-10-12 23:55:14.031 [update notice] sent scan-read scan.08 id QQ=31: 21;22;01;0010018741;0001;005306;N4
2023-10-12 23:55:14.451 [main notice] found messages: 224 (3 conditional on 28 conditions, 0 poll, 10 update)
2023-10-12 23:55:14.710 [update notice] sent scan-read scan.08 id QQ=31: 21;22;01;0010018741;0001;005306;N4
2023-10-12 23:55:14.936 [update notice] sent scan-read scan.08 id QQ=31: 21;22;01;0010018741;0001;005306;N4
2023-10-12 23:55:16.088 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:55:16.372 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:55:17.243 [bus notice] scan 15: ;Vaillant;CTLV0;0312;9103
2023-10-12 23:55:17.243 [update notice] store 15 ident: done
2023-10-12 23:55:17.243 [update notice] sent scan-read scan.15  QQ=31: Vaillant;CTLV0;0312;9103
2023-10-12 23:55:17.243 [bus notice] scan 15: ;Vaillant;CTLV0;0312;9103
2023-10-12 23:55:17.424 [update notice] sent unknown MS cmd: 3115b5090124 / 09003231323135303030
2023-10-12 23:55:17.604 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:55:17.705 [main error] scan config 15: ERR: SYN received
2023-10-12 23:55:17.880 [update notice] sent poll-read bai CounterStartattempts1 QQ=31: 0
2023-10-12 23:55:20.403 [update notice] received unknown MS cmd: 0315b51303066400 / 00
2023-10-12 23:55:20.461 [update notice] received unknown MS cmd: 0315b51303066400 / 00
2023-10-12 23:55:20.566 [update notice] received unknown MS cmd: 0315b51303066400 / 00
2023-10-12 23:55:23.206 [update notice] sent poll-read bai CounterStartattempts2 QQ=31: 0
2023-10-12 23:55:26.099 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:55:26.375 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:55:29.170 [update notice] sent poll-read bai CounterStartAttempts3 QQ=31: 0
2023-10-12 23:55:29.895 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:55:29.993 [main error] scan config 15: ERR: SYN received
2023-10-12 23:55:35.191 [update notice] sent poll-read bai CounterStartAttempts4 QQ=31: 0
2023-10-12 23:55:36.063 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:55:36.343 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:55:36.588 [update notice] received update-read broadcast vdatetime QQ=10: 22:11:02;12.10.2023
2023-10-12 23:55:36.855 [update notice] received poll-read bai Status02 QQ=10: on;60;55.0;80;15.0
2023-10-12 23:55:37.134 [update notice] received unknown MS cmd: 1008b5110100 / 0860010d001f000000
2023-10-12 23:55:37.359 [update notice] received update-read broadcast outsidetemp QQ=10: -40.000
2023-10-12 23:55:41.233 [update notice] sent poll-read bai DeactivationsTemplimiter QQ=31: 0
2023-10-12 23:55:42.098 [main error] scan config 15: ERR: wrong symbol received
2023-10-12 23:55:42.321 [bus error] device status: eBUS comm error: framing
2023-10-12 23:55:46.066 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:55:46.325 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:55:47.094 [bus error] poll bai DisplayMode failed: ERR: SYN received
2023-10-12 23:55:53.128 [bus error] poll bai expertlevel_ReturnTemp failed: ERR: wrong symbol received
2023-10-12 23:55:53.287 [bus error] device status: eBUS comm error: framing
2023-10-12 23:55:54.361 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:55:54.460 [main error] scan config 15: ERR: SYN received
2023-10-12 23:55:56.053 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:55:56.327 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:55:59.168 [bus error] poll bai externalFlowTempDesired failed: ERR: read timeout
2023-10-12 23:56:05.195 [update notice] sent poll-read bai ExtFlowTempDesiredMin QQ=31: 0.00
2023-10-12 23:56:06.033 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:56:06.307 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:56:06.567 [update notice] received poll-read bai Status02 QQ=10: on;60;55.0;80;15.0
2023-10-12 23:56:06.733 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:56:06.934 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:56:07.048 [bus notice] max. symbols per second: 103
2023-10-12 23:56:07.050 [main error] scan config 15: ERR: SYN received
2023-10-12 23:56:11.219 [update notice] sent poll-read bai FanHours QQ=31: 0
2023-10-12 23:56:16.033 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:56:16.309 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:56:17.253 [update notice] sent poll-read bai FanStarts QQ=31: 0
2023-10-12 23:56:19.249 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:56:19.350 [main error] scan config 15: ERR: SYN received
2023-10-12 23:56:23.211 [update notice] sent poll-read bai FlowTemp QQ=31: 22.12;ok
2023-10-12 23:56:26.009 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:56:26.274 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:56:29.172 [update notice] sent poll-read bai FlowTempDesired QQ=31: 0.00
2023-10-12 23:56:31.538 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:56:31.636 [main error] scan config 15: ERR: wrong symbol received
2023-10-12 23:56:35.214 [update notice] sent poll-read bai FlowTempMax QQ=31: 66.12
2023-10-12 23:56:36.006 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:56:36.334 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:56:36.532 [update notice] received update-read broadcast vdatetime QQ=10: 22:12:02;12.10.2023
2023-10-12 23:56:36.808 [update notice] received poll-read bai Status02 QQ=10: on;60;55.0;80;15.0
2023-10-12 23:56:37.085 [update notice] received unknown MS cmd: 1008b5110100 / 0860010d001f000000
2023-10-12 23:56:37.310 [update notice] received update-read broadcast outsidetemp QQ=10: -40.000
2023-10-12 23:56:41.180 [update notice] sent poll-read bai HcHours QQ=31: 510
2023-10-12 23:56:43.809 [update notice] sent scan-read scan.15 id QQ=31: 
2023-10-12 23:56:43.914 [main error] scan config 15: ERR: SYN received
2023-10-12 23:56:46.004 [update notice] received read bai Status01 QQ=10: 22.0;22.0;-;-;-;off
2023-10-12 23:56:46.288 [update notice] received update-write bai SetMode QQ=10: auto;0.0;60.0;-;1;0;1;0;0;0
2023-10-12 23:56:47.107 [bus error] poll bai HcPumpMode failed: ERR: wrong symbol received
2023-10-12 23:56:47.110 [bus error] device status: eBUS comm error: framing
john30 commented 1 year ago

do you have writable messages at all? check with "ebusctl find -w"

inoxsk commented 1 year ago

Hi, same issue here. Trying to send a mqtt message results in 2023-10-20 21:41:41.616 [mqtt error] write message bai FlowTempDesired not found Not sure if my formatting is wrong, or some other mistake..

stefaanderoeck commented 1 year ago

Found this github issue while trying to figure out why I can't set anything (first time setup), I think I'm having similar problems:

root@58709eeec8de:/# grep ^filter-direction /etc/ebusd/mqtt-hassio.cfg
filter-direction = r|u|^w
root@58709eeec8de:/# ebusctl info
version: ebusd 23.2.23.2
device: ebus-62b5c8.lan:9999, enhanced, firmware 1.1[3501].1[3501]
signal: acquired
symbol rate: 23
max symbol rate: 81
min arbitration micros: 8
max arbitration micros: 90
min symbol latency: 9
max symbol latency: 21
scan: finished
reconnects: 0
masters: 2
messages: 202
conditional: 2
poll: 68
update: 10
address 03: master #11
address 08: slave #11, scanned "MF=Vaillant;ID=BAI00;SW=0405;HW=9602", loaded "vaillant/bai.0010015600.inc" ([HW=9602]), "vaillant/08.bai.csv"
address 31: master #8, ebusd
address 36: slave #8, ebusd

root@58709eeec8de:/# ebusctl find -w
broadcast id = no data stored
broadcast queryexistence = no data stored
broadcast vdatetime = no data stored

root@58709eeec8de:/# ebusctl find -r | wc -l
164
root@58709eeec8de:/# 
Pradar123 commented 1 year ago

I have the same issue. However i cant seem to get the ebusctl to run anywhere (its possibly on my end) ssh'ing the HA it sends back unknown command ebusctl. tried to ssh the adapter itself (just to make sure) but i couldnt., Sorry im just a layman at this point. i have HA running on VM, all the sensors from ebus adapter arriving but no option to write anything. im using the LukasGrebe ha-addons rep for connection.

john30 commented 1 year ago

FlowTempDesired

look out for the message definition using "ebusctl f -a -l * -w". if it appears as writable there, then you have to check your settings (e.g. acl file missing)

john30 commented 1 year ago

I have the same issue. However i cant seem to get the ebusctl to run anywhere (its possibly on my end) ssh'ing the HA it sends back unknown command ebusctl. tried to ssh the adapter itself (just to make sure) but i couldnt., Sorry im just a layman at this point. i have HA running on VM, all the sensors from ebus adapter arriving but no option to write anything. im using the LukasGrebe ha-addons rep for connection.

you don't need ebusctl, a simple netcat is doing quite the same. the adapter can't do ssh (would be fancy though).

inoxsk commented 1 year ago

The adapter should communicate over netcat? I get no response trying to access it by ncat.. Getting a bit off topic here :) EDIT : Got the communication part working. ebusctl find -w results in 👍 broadcast id = no data stored broadcast queryexistence = (empty for 31fe07fe00 / )

john30 commented 1 year ago

not the adapter, you can communicate with ebusd using netcat. didn't I suggest a different command to use for checking?

inoxsk commented 1 year ago

You did, at first it did not work, it took me some time to get it to work - had to change it to "ebusctl f -a -l "*" -w". Result

bai AccessoriesOne = no data stored bai AccessoriesTwo = no data stored bai APCLegioProtection = no data stored (message not available due to condition) bai BlockTimeHcMax = no data stored bai clearerrorhistory = no data stored bai DSNOffset = no data stored bai FanSpeedOffsetMax = no data stored bai FanSpeedOffsetMin = no data stored bai FlowsetHcMax = no data stored bai FlowsetHwcMax = no data stored bai HcPumpMode = no data stored bai HoursTillService = no data stored bai HwcPostrunTime = no data stored bai HwcTempMax = no data stored bai PartloadHcKW = no data stored bai PartloadHwcKW = no data stored bai PrEnergyCountHc1 = no data stored bai PrEnergyCountHc2 = no data stored bai PrEnergyCountHc3 = no data stored bai PrEnergyCountHwc1 = no data stored bai PrEnergyCountHwc2 = no data stored bai PrEnergyCountHwc3 = no data stored bai PrEnergySumHc1 = no data stored bai PrEnergySumHc2 = no data stored bai PrEnergySumHc3 = no data stored bai PrEnergySumHwc1 = no data stored bai PrEnergySumHwc2 = no data stored bai PrEnergySumHwc3 = no data stored bai ReturnRegulation = no data stored bai SecondPumpMode = no data stored bai SetFactoryValues = no data stored bai SolPostHeat = no data stored bai StorageLoadTimeMax = no data stored bai ValveMode = no data stored bai WarmstartOffset = no data stored bai WPPostrunTime = no data stored broadcast id = no data stored broadcast queryexistence = (empty for 31fe07fe00 / ) broadcast vdatetime = no data stored memory eeprom = no data stored memory ram = no data stored

GrumpyMeow commented 1 year ago

I think i have the same issue. I do see "select" and "number" entities being created for my thermostat (350), but nothing for my Vaillant-boiler (bai).

ebusctl info
version: ebusd 23.2.p20230716
update check: revision 23.2 available
device: /dev/ttyUSB0
access: *
signal: acquired
symbol rate: 23
max symbol rate: 123
min arbitration micros: 1
max arbitration micros: 4
min symbol latency: 5
max symbol latency: 7
scan: finished
reconnects: 0
masters: 3
messages: 369
conditional: 3
poll: 262
update: 10
address 03: master #11
address 08: slave #11, scanned "MF=Vaillant;ID=BAI00;SW=0604;HW=5502", loaded "vaillant/bai.308523.inc", "vaillant/08.bai.csv"
address 10: master #2
address 15: slave #2, scanned "MF=Vaillant;ID=35000;SW=0109;HW=7102", loaded "vaillant/15.350.HW7102.csv"
address 31: master #8, ebusd
address 36: slave #8, ebusd

I'm using the Home Assistant addon and configured: area=CV-Hok,filter-direction=r|u|^w,filter-name=status|temp|yield|count|energy|power|runtime|hours|starts|mode|curve|^load$|^party$|sensor|timer|fuel|cooling|heat|data|error|pressure|flame|speed|switch. Later i also manually modified mqtt-hassio.inc file. The result stays the same.

In MQTT-explorer i see the following "sensor" (while i would expect it as a writable-type):

{
  "unique_id":"ebusd_bai_HwcPostrunTime_0",
  "name":"ebusd bai HwcPostrunTime ",
  "device":{
   "identifiers":"ebusd_bai",
   "manufacturer":"ebusd.eu",
   "name":"ebusd bai",
   "via_device":"ebusd",
   "sw_version":"23.2",
   "suggested_area":"CV-Hok"
  },
  "value_template":"{{value_json[\"0\"].value}}",
  "state_topic":"ebusd/bai/HwcPostrunTime",
  "unit_of_measurement":"s"
 }

in the config definition file it is specified as:

r;wi,,HwcPostrunTime,d.72 WW Pumpnenachlaufzeit,,,,"1104",,,UCH,-10,s,Pumpennachlaufzeit nach Speicherladung

Might it be related to the unit "s" not being recognized as usable for "number"? Or might it be related to the "ws" and "wi" permission which don´t match with "w".

2ad9b828-ebusd:/# ebusctl f -a -l "*" -w
350 ccTimer.Friday = no data stored
350 ccTimer.Monday = no data stored
350 ccTimer.Saturday = no data stored
350 ccTimer.Sunday = no data stored
350 ccTimer.Thursday = no data stored
350 ccTimer.Tuesday = no data stored
350 ccTimer.Wednesday = no data stored
350 clearerrorhistory = no data stored
350 ContactName = no data stored
350 Date = no data stored
350 Hc12stepanalogCtrl = no data stored
350 Hc1BankHolidayEndPeriod = no data stored
350 Hc1BankHolidayStartPeriod = no data stored
350 Hc1DayTemp = no data stored
350 Hc1HolidayEndPeriod = no data stored
350 Hc1HolidayRoomTemp = no data stored
350 Hc1HolidayStartPeriod = no data stored
350 Hc1LineMatchingAdaption = no data stored
350 Hc1NightTemp = no data stored
350 Hc1OPMode = no data stored
350 HcName1 = no data stored
350 hcTimer.Friday = no data stored
350 hcTimer.Monday = no data stored
350 hcTimer.Saturday = no data stored
350 hcTimer.Sunday = no data stored
350 hcTimer.Thursday = no data stored
350 hcTimer.Tuesday = no data stored
350 hcTimer.Wednesday = no data stored
350 HwcCircuitActive = no data stored
350 HwcLegioStartDay = no data stored
350 HwcLegioStartTime = no data stored
350 HwcTempDesired = no data stored
350 hwcTimer.Friday = no data stored
350 hwcTimer.Monday = no data stored
350 hwcTimer.Saturday = no data stored
350 hwcTimer.Sunday = no data stored
350 hwcTimer.Thursday = no data stored
350 hwcTimer.Tuesday = no data stored
350 hwcTimer.Wednesday = no data stored
350 KeyCodeforConfigMenu = no data stored
350 LanguageVariant = no data stored
350 LcdContrastValue = no data stored
350 MaintenanceDate = no data stored
350 PhoneNumber = no data stored
350 RoomTempCorrection = no data stored
350 SummerWinterTimeAdjust = no data stored
350 Time = no data stored
bai AccessoriesOne = no data stored
bai AccessoriesTwo = no data stored
bai APCLegioProtection = no data stored
bai BlockTimeHcMax = no data stored
bai clearerrorhistory = no data stored
bai DSNOffset = no data stored
bai FanSpeedOffsetMax = no data stored
bai FanSpeedOffsetMin = no data stored
bai FlowsetHcMax = no data stored
bai FlowsetHwcMax = no data stored
bai HcPumpMode = no data stored
bai HoursTillService = no data stored
bai HwcPostrunTime = no data stored
bai HwcTempMax = no data stored
bai PartloadHcKW = no data stored
bai PartloadHwcKW = no data stored
bai PrEnergyCountHc1 = no data stored
bai PrEnergyCountHc2 = no data stored
bai PrEnergyCountHc3 = no data stored
bai PrEnergyCountHwc1 = no data stored
bai PrEnergyCountHwc2 = no data stored
bai PrEnergyCountHwc3 = no data stored
bai PrEnergySumHc1 = no data stored
bai PrEnergySumHc2 = no data stored
bai PrEnergySumHc3 = no data stored
bai PrEnergySumHwc1 = no data stored
bai PrEnergySumHwc2 = no data stored
bai PrEnergySumHwc3 = no data stored
bai ReturnRegulation = no data stored
bai SecondPumpMode = no data stored
bai SetFactoryValues = no data stored
bai SolPostHeat = no data stored
bai StorageLoadTimeMax = no data stored
bai ValveMode = no data stored
bai WarmstartOffset = no data stored
bai WPPostrunTime = no data stored
broadcast id = no data stored
broadcast queryexistence = no data stored
broadcast vdatetime = no data stored
memory eeprom = no data stored
memory ram = no data stored

I've set the "accesslevel=*". I'm not using an acl-file.

Note to others: It's possible to run commands in the ebusd-container by using the Portainer-addin.

GrumpyMeow commented 1 year ago

I'm pretty sure it has got something to do with the "%direction" token replacement. This as the entity "Hc12stepanalogCtrl" is being registered as a sensor, while it's registered as "r;wi" here: https://github.com/john30/ebusd-configuration/blob/4675cd03b2763867cf74bd12426b1990bebb6204/ebusd-2.1.x/de/vaillant/15.370.csv#L34

Other writable fields with "r;w" do get registered as number or select types.

Temporary workaround!

  1. Ensure you are using r|w|^w as filter-direction.
  2. Make a subfolder called "ebusd" in /config/addons_config: mkdir -p /config/addons_config/ebusd
  3. Navigate to that folder: cd /config/addons_config/ebusd/
  4. Clone the ebusd-configuration in this folder : git clone https://github.com/john30/ebusd-configuration.git
  5. Edit the config files of your bai-device using vi or vscode in "latest/en/vaillant"-folder. Replace r;ws and r;wi with r;w. So here you are modifying the "direction" configuration of the ebusd-parameters.
  6. In the addons-config put config-value for custom configuration-path: /config/addons_config/ebusd/ebusd-configuration/latest/en
  7. Restart ebusd-addon.

Note! Probably the entities in Home Assistant will have no values. This is because the values have not been read yet by ebusd. In the ebusd-repository there is a "contrib/scripts"-folder with a "readall.sh" script you might want to run. You probably need to install netcat (nc) via "apk add netcat-freebsd".

Although it might be possible to create a Home Assistant script which will query all mqtt-entries automatically. Dunno (yet). Update: I don't think it's possible in Home Assistant to iterate over all auto-discovered mqtt entities and trigger an update. The home_assisstant _update-service seems to do nothing. Publishing to the topics of mqtt-entities also seems to be impossible as the state_topic is not available via the entity, only "friendly_name" and "entity_id". Both these attributes can initially be reverse-engineered into the mqtt-topic, but both values can be changed by the user via the home-assistant user-interface. The mqtt-topic is probably stored in the internals of the mqtt-entity.

Looking through the code, i see: https://github.com/john30/ebusd/blob/b9012326786c02033606745264053ac0d787ee54/src/ebusd/mqtthandler.cpp#L359

/**
 * possible message direction names by (write*2) + (passive*1).
 */
static const char* directionNames[] = {
    "r", "u", "w", "uw",
};

@john30 In the definition-file i see that "ws" and "wi" are being used. Should these values not be aligned?

john30 commented 11 months ago

if ws is used, then it is a matter of assigning more rights to the default user by using an ACL file and define a "mqtt" user there or just loosen the default rights (by using the "--accesslevel=..." option)

dialerp commented 11 months ago

Is there a way for the data from the "bai" section to refresh and be sent via MQTT? Currently, only data from the VR71 section and "bai Status01";"bai Status01" are correctly sent. obraz_2023-12-20_160430777 log obraz_2023-12-20_160559280

The next issue is that attempts to query gas consumption are returning an error. obraz_2023-12-20_161145616

dialerp commented 10 months ago

Perhaps someone will find my solution useful. On Debian, where ebusd is installed, I've run a script that sends the necessary data via MQTT to my MQTT broker `

!/bin/bash

while true; do result_temp=$(ebusctl read StorageTemp) sleep 1 result_temp_desired=$(ebusctl read StorageTempDesired)

/usr/bin/mosquitto_pub -h 192.168.X.X -u YOUR_USER -P YOUR_PASS -t "ebus/StorageTemp" -m "$result_temp"
/usr/bin/mosquitto_pub -h 192.168.X.X -u YOUR_USER -P YOUR_PASS -t "ebus/StorageTempDesired" -m "$result_temp_desired"

sleep 60

done `

The only issue I can't solve is obtaining data on gas consumption. ebusctl read PrEnergyCountHc1 ERR: invalid position in decode