eBUS Binding 4.x [4.0.0;5.0.0)

ebus

With this binding, heating and ventilation systems that have an eBUS can be addressed. The corresponding hardware is required. Connections are possible via serial, TCP and ebusd.

Requirements

  • openHAB 4.x
  • eBUS Hardware Interface (Serial, Ethernet, ebusd)
  • eBUS protocol compatible Heating System

Changelog

or just check GitHub Releases for the latest or older versions.

Resources

or just check GitHub Releases for the latest or older versions.

Hi,

I tried to port the ebusd HMU configuration to the openhab ebus binding config, but without success.

I’m running openHAB 4.0.3 with the ebus binding installed from marketplace.

As hardware I use the ebus adapter v5 connected to ebusd version 23.2.23.2.

The bridge configuration looks like this:

UID: ebus:bridge:1be388fcf0
label: eBUS Bridge
thingTypeUID: ebus:bridge
configuration:
  masterAddress: FF
  networkDriver: ebusd
  serialPortDriver: buildin
  ipAddress: 192.168.101.26
  port: 8888
  advancedLogging: true

I also added my new configuration file to the binding configuration. In the log the ebus binding claims that the configfile is loaded and also there is a new HMU device recognized and shown in the inbox. If I add the new device and link some items to the channels the item values are all ‘NULL’ even if I set the channel polling config to poll every 20 seconds.

In the ebusd log I can see that the ebus binding is sending direct commands to the ebusd and that ebusd sees the response from the slave and docodes it.

In the ebus-unreseolved.csv I can see that the binding is not able to decode the messages, but I do not understand why.

Here is a snippet from the ebus-unresolved.csv

2023-11-03 15:18:47;"FF";"08";"B5 11";"01 07 2B 00 06 00 61 00 19 01 38 09 00 AA";
2023-11-03 15:18:50;"FF";"08";"B5 11";"01 07 2B 00 06 00 61 00 19 01 38 09 00 AA";
2023-11-03 15:18:50;"FF";"08";"B5 1A";"04 05 FF 32 00 D3 00 0A FF 08 2F 3F 00 00 00 00 00 00 90 00 AA";
2023-11-03 15:18:52;"FF";"08";"B5 1A";"04 05 FF 32 00 D3 00 0A FF 08 2F 3F 00 00 00 00 00 00 90 00 AA";
2023-11-03 15:19:06;"FF";"08";"B5 1A";"04 05 FF 32 40 93 00 0A FF 08 27 15 BB 00 00 00 00 00 F9 00 AA";
2023-11-03 15:19:06;"FF";"08";"B5 1A";"04 05 FF 32 40 93 00 0A FF 08 27 15 BB 00 00 00 00 00 F9 00 AA";
2023-11-03 15:19:08;"FF";"08";"B5 1A";"04 05 FF 32 40 93 00 0A FF 08 27 15 BB 00 00 00 00 00 F9 00 AA";
2023-11-03 15:20:36;"FF";"08";"B5 1A";"04 05 FF 32 40 93 00 0A FF 08 27 15 BB 00 00 00 00 00 F9 00 AA";
2023-11-03 15:20:38;"FF";"08";"B5 1A";"04 05 FF 32 40 93 00 0A FF 08 27 15 BB 00 00 00 00 00 F9 00 AA";
2023-11-03 15:20:40;"FF";"08";"B5 14";"05 05 01 03 FF FF 02 00 04 01 00 64 00 A2 00 AA";
2023-11-03 15:20:41;"FF";"08";"B5 14";"05 05 01 03 FF FF 02 00 04 01 00 64 00 A2 00 AA";

And this is the newly created configuration

{
    "id": "hmu",
    "vendor": "Vaillant",
    "label": "Vaillant HMU",
    "description": "Vaillant HMU",

    "authors":      ["XXXXXXX, xxx@xxx.xx"],
    "identification": ["48 4D 55 30 30"],

    "templates": [
        {"name":"unknown3", "template": [
            {"type": "byte", "length": 3}
        ]}
    ],

    "commands":
    [
        {
            "label":    "State",
            "id":       "state",
            "command":  "B5 11",

            "get": {
                "master": [
                    {"type": "static", "default": "07"}
                ],
                "slave": [
                    {"name": "energy", "type": "uchar", "label": "Energy", "format":"%d"},
                    {"name": "energy2", "type": "word", "label": "Energy2", "format":"%dkWh"},
                    {"type": "template-block", "label": "OnOff", "id": "vaillant.onoff"},
                    {"name": "state", "type": "uchar", "label": "State",
                        "mapping": {"1":"ready", "11":"error", "9":"heating", "17":"cooling", "129":"heating_water"}}
                ]
            }
        },

        {
            "label": "Energy Heating",
            "id": "statistics.energy_hc",
            "command": "B5 1A",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 FF 32 00"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "unknown3"},
                        {"type": "template-block", "id": "vaillant.energy4", "label": "Heating Energy"}
                    ]
            }
        },

        {
            "label": "Energy Cooling",
            "id": "statistics.energy_cool",
            "command": "B5 1A",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 FF 32 01"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "unknown3"},
                        {"type": "template-block", "id": "vaillant.energy4", "label": "Heating Energy"}
                    ]
            }
        },

        {
            "label": "Runtime (h)",
            "id": "statistics.runtime",
            "command": "B5 1A",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 FF 32 40"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "unknown3"},
                        {"type": "template-block", "id": "vaillant.hoursum2", "label": "Hours", "format":"%d hours"}
                    ]
            }
        },

        {
            "label": "Runtime heating circuit (h)",
            "id": "statistics.runtime_hc",
            "command": "B5 1A",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 FF 32 41"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "unknown3"},
                        {"type": "template-block", "id": "vaillant.hoursum2", "label": "Hours heating"}
                    ]
            }
        },

        {
            "label": "Runtime cooling (h)",
            "id": "statistics.runtime_cool",
            "command": "B5 1A",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 FF 32 43"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "unknown3"},
                        {"type": "template-block", "id": "vaillant.hoursum2", "label": "Hours cooling"}
                    ]
            }
        },

        {
            "label": "Building Pump Power (%)",
            "id": "diag.building_pump_power",
            "command": "B5 14",

            "get": {
                    "master": [
                        {"type": "static", "default": "05 01 03 FF FF"}
                    ],

                    "slave": [
                        {"type": "template-block", "id": "vaillant.unknown1"},
                        {"name": "value", "type": "word", "label": "Building Pump Power", "format": "%d %%"}
                    ]
            }
        },
    ]
}

I also see many ebus error entries in the log like

2023-11-03 15:25:06.159 [ERROR] [.csdev.ebus.core.EBusEbusdController] - error!
de.csdev.ebus.core.EBusDataException: Unable to send telegram FF 08 B5 1A 04 05 FF 32 40 93 after 2 attempts ... [ERROR: TOO_MANY_ATTEMPS, DATA: FF 08 B5 1A 04 05 FF 32 40 93]
	at de.csdev.ebus.core.EBusQueue.checkSendStatus(EBusQueue.java:117) ~[?:?]
	at de.csdev.ebus.core.EBusEbusdController$EBusSenderThread.run(EBusEbusdController.java:112) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Any suggestions?

Thanks
Marc

I’m triyng to send a command on ebus within a rule:

rule "Betriebsart_BM"
when
	Item Betriebsart_BM_set received update
then   
        ebusAction.sendCommand("BM", "Betriebsart", "35", Betriebsart_BM_set) 
end

However unfortunately it does not work. I get following error in the log:

2024-01-14 15:32:18.127 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'Heating-1' failed: The name 'ebusAction' cannot be resolved to an item or type; line 5, column 9, length 10 in Heating

Can anybody help? Would be highly appreciated!

Hi all

Tried some further. Realised that I did not create ebusAction. Now it looks like:

rule "Betriebsart_BM"
when
	Item Betriebsart_BM_set received update
then   
        val ebusAction = getActions("ebus","ebus:bridge:EFH")
        ebusAction.sendCommand("BM", "Betriebsart", "30", Betriebsart_BM_set.state) 
end

However get a new error:

2024-01-14 17:02:04.800 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'Heating-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.binding.ebus.action.EBusActions.sendCommand(org.openhab.core.thing.binding.ThingActions,java.lang.String,java.lang.String,java.lang.String,java.util.Map) on instance: null in Heating

Has anybody an idea?

You should use the sendCommand to the connected item. There is no need for an action.

@csowada: thank you.

Do you mean something like this:

rule "Betriebsart_BM"
when
	Item Betriebsart_BM_set received update
then   
        sendCommand("BM", "Betriebsart", "30", Betriebsart_BM_set.state) 
end

I guess you did not mean that. In any case this does not work either. What did you mean with connected item and what sendCommand?

Thank you in advance for the help

@csowada: sorry for my beginner fault. I understood now. Simple standard sendCommand to the item I used for reading the values from the ebus. Now it works.

Thank you

@csowada: Hi Christian

I have a next issue I would like to “get” and “set” the Time Scheduling of the BM. I know the command (e.g. Program 3, Thursday, Switch Time 1 is “40 16”). I also know, how to interpreat the data, i.e. first byte is end time and second byte is starting time counted in 15 min steps, i.e. 2 AM is 8. However, I don’t know how to code the data. As you can see I have chosen as “type”: “word” in the parser file:

{
            "label":    "MK_P3_Do_S1",
             "id":      "MK_P3_Do_S1",
 
             "set": {
                 "command":  "50 23",
                 "type":     "master-master",
                 "master": [
                     {"type": "kw-crc"},
                     {"type": "static", "default": "40 16"},
                     {"name": "MK_P3_Do_S1", "type": "word", "label": "MK_P3_Do_S1"}
                 ]
             },
             
             "get": {
                 "command":  "50 22",
                 "master": [
                     {"type": "kw-crc"},
                     {"type": "static", "default": "40 16"}
                 ],
                 "slave": [
                     {"name": "MK_P3_Do_S1", "type": "word", "label": "MK_P3_Do_S1"}
                 ]
             }
         }    

I don’t think that this is correct as I don’t get anything meaningful out… in openhab it shows “-”. How can I correctly codes this?

As always: any help is much appreciated

one more thing to my issue: i don’t see any poll request in the log for this command, like

2024-01-19 17:33:15.367 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_T-Vorlauf-Heizung#T-Vorlauf-Heizung" with "FF 08 50 22 03 28 0D 00 27" ...

although I even set the polling to 1 sec. Maybe it is not a question of the data type but something else

Hi Rolf,

Do you have the raw ebus command or message in hex? Or a link to an (ebusd?) file for the required data? Based on that, you (with a little community help) can build your json config.

Hi Cor

Thank you very much for your hint.

However, I already have my .json file with other commands in it. They all get polled and displayed in openhab as expected. Only the command as shown in my last post (only the command shown in .json file which ist not working) gets not polled (no TRACE log with the polling for this command).

Or do i understand something not correctly?

Dear all

I solved the issue. Sorry for the inconvinience. It was a wrong adressing of the channel.

Thanks for teh help

@csowada: I changed to openhab 4 now. I had t make a fresh install. Now, I don’t find the place where you can add teh custom config files, like:

file:///etc/openhab/BM.json
file:///etc/openhab/WPM.json
file:///etc/openhab/MM1.json

Can you pelase help on this?

Best Rolf

Depends if you installed it in your addons folder or via the market place.

In my (still) test server I had it in the add-ons folder and during a brief search couldn’t find it.

However, when removing it from the addons folder, rebooting and installing the binding via the marketplace, you get a little cogwheel to the right if you click on the installed ebus binding in the marketplace:

@Chiuaua79 : Thank you very much. I was searching this cogwheel, however still can’t find it. And yes I installed the binding via the marketplace. Really strange… Do I do something wrong?

Update: I managed to find the cogwheel. However not via marketplace. Install ebus via add-on folder and then in the openhab distribution part of the add-on store you we find the cog wheel when clicking on the ebus binding… very funny

@csowada: I think you are needed now. The ebus binding on OH4 is strangly behaving. Whenever the system is rebooted OH looses somehow the binding. I installed ebus via marketplace and you can find then the cogwheel as described by Chiuaua. In the main UI under setting area on the right side in the section add-on seetings you find to bindings: “eBus Binding” and “eBUS Binding 4.x [4.0.0;5.0.0)” and you can do the Configuration URL. However when you do e.g. a reboot the binding is somehow lost, i.e.
“eBus Binding” is lost and no Configuration URL can be done anymore…

Could you please help here?

Thanks in advance

@csowada: Since upgrading to 4.2.0.M1 after 1 or 2 days of running the ebus binding I get “full sending queue” errors

2024-04-05 14:41:23.280 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_T-Sauggas#T-Sauggas" with "FF 08 50 22 03 C0 80 30 77" ...
2024-04-05 14:41:23.344 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_Laufz-Verdichter#Laufz-Verdichter" with "FF 08 50 22 03 DE 2A 02 A1" ...
2024-04-05 14:41:23.344 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_T-Ruecklauf-Heizung#T-Ruecklauf-Heizung" with "FF 08 50 22 03 24 16 00 D2" ...
2024-04-05 14:41:23.344 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:BM:EFH:75:BM_inside_temp#insidetemp" with "FF 75 50 22 03 EC 11 00 FA" ...
2024-04-05 14:41:23.345 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_p-Sole#p-Sole" with "FF 08 50 22 03 EC 7D 30 24" ...
2024-04-05 14:41:23.419 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_T-Vorlauf-Heizung-Soll#T-Vorlauf-Heizung-Soll" with "FF 08 50 22 03 B8 02 00 1D" ...
2024-04-05 14:41:23.565 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:BM:EFH:35:BM_T-mean-outside#T-mean-outside" with "FF 35 50 22 03 7E 0C 0A 81" ...
2024-04-05 14:41:23.567 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:41:23.567 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_Ansteuerung-ZHP#Ansteuerung-ZHP" with "FF 08 50 22 03 78 7B 30 C4" ...
2024-04-05 14:41:23.567 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_Laufz-E-Heizung#Laufz-E-Heizung" with "FF 08 50 22 03 98 88 30 FF" ...
2024-04-05 14:41:23.568 [TRACE] [ng.ebus.internal.handler.EBusHandler] - Poll command "ebus:WPM1:EFH:08:WPM1_Q1#Q1" with "FF 08 50 22 03 94 93 30 0A" ...
2024-04-05 14:41:23.568 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.

and data is not regularly updated anymore:

2024-04-05 14:43:23.574 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:44:23.576 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:44:23.579 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:44:23.579 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:45:23.579 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:45:23.579 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:45:23.580 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:46:23.422 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:47:23.577 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:48:23.582 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:48:23.582 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:48:23.583 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:48:23.585 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.
2024-04-05 14:48:23.583 [ERROR] [de.csdev.ebus.core.EBusQueue        ] - Send queue is full! The eBUS service will reset the queue to ensure proper operation.

Only restarting the binding temporarly helps. However error comes back after 1 or 2 days. Any ideas what could be wrong here?

Thanks in advance for the help

I have same problem with :

Send queue is full! The eBUS service will reset the queue to ensure proper operation.

Is there any solution for this problem ?

I also had a lot of errors, such as this one and others. They seamed to be hardware related (Ebus adapter shield v.5). After a firmware update they were gone.

In the process of searching the cause (ebus adapter or binding), I made two scripts to communicate with the adapter with the ebusctl command, without the binding.

I still use the scripts as they give me direct control over the communication. I don’t promote them over the binding, but you could use them to find the cause of your problem.

You should also be aware that the ebus is quite slow (2400 bits per second). I poll the devices every minute.