openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.58k forks source link

[homematic] HM-ES-TX-WM with different firmware versions needed #9793

Closed Jogobo closed 3 years ago

Jogobo commented 3 years ago

Your Environment

Version used: 2.5.9

I have a ccu2 with about 100 devices, two of them HM-ES-TX-WM, one compellingly with firmware version 1.2 (ferraris sensor connected), the second compellingly with 2.5 (ES-IEC connected). Due to the warning in the log I am aware of not having different firmware versions for same devices, but in this case I have no choice. So it would be necessary to have support for both firmware versions at the same time. Actually I get the following log messages:

`2021-01-12 10:37:54.624 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint 'REQ0109252:1#BOOT'

2021-01-12 10:37:54.657 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint 'REQ0109252:1#ENERGY_COUNTER'

2021-01-12 10:37:54.717 [WARN ] [ternal.handler.HomematicThingHandler] - Channel not found for datapoint 'REQ0109252:1#POWER'`

MHerbst commented 3 years ago

Can you explain in more detail why you can't update all devices to the latest firmware version. I would expect that firmware versions are backward compatible.

As a solution, I think it could be possible to handle devices with different firmware versions as different device types. That means after a firmware update the device would have to be deleted and discovered again. Therefore I would implement a solution (or better bypass) like this only for this device if the firmware versions really differ that much.

Jogobo commented 3 years ago

The HM-ES-TX-WM supports four types of sensors (see "Hinweis" at the bottom of product page) The ES-IEC supports IEC 62056-21 A, B, C, D und SML (see "Beschreibung" at product page)

Firmware v1.2 supports all four sensor types. But for ES-IEC only IEC 62056-21 modes A and C (see Release Notes). Firmware v2.5 adds support for all IEC 62056-21 protocol types, but there is no more support for sensors ES-GAS, ES-LED and ES-Fer (see Release Notes).

Conclusion: If you have an energy meter with optical interface, speaking SML you have to flash the HM-ES-TX-WM with firmware v2.5. If you have an analogue energy meter with a rotating disk with a red marker you have to use sensor ES-Fer, which is only supported with firmware v1.2.

In my case I have an official energy meter speaking SML and an old analogue energy meter counting energy usage of my wallboxes. So I have two HM-ES-TX-WM, one with v1.2 and one with v2.5.

I would agree that in this special case the firmware makes the same hardware two different devices.

MHerbst commented 3 years ago

@Jogobo I understand. It would have been better if EQ3 names the device with firmware version 2.4 differently. I will have to look into the code whether it is possible to use the firmware version for this device to treat them internally as different devices.

Jogobo commented 3 years ago

Did you already find time to look into the code? If it is not possible to make two different devices depending on the firmware version I would have to buy a different energy counter, which I would like to avoid.

MHerbst commented 3 years ago

Yes, I did. It seem to be easier than I thought. Will do some tests in the next days. Currently, I only have a development environment for OH 3. Before I could create a test version for you, I would have to set-up an environment for 2.5. What are your plans regarding switching to OH 3?

Jogobo commented 3 years ago

I am on openSuSE 15.2. So there is a server upgrade before switching to OH 3. It will take at least half a year before I'll do all the upgrade work.

MHerbst commented 3 years ago

I will try to make it available also for 2.5

MHerbst commented 3 years ago

@Jogobo I think I was able to create a device of a different type if the firmware version is greater 2.0. This device is of type HS-ES-TX-WM2. I have create a test version for 2.5. You can copy it from here https://github.com/MHerbst/openhab-addons-test (the jar for version 3 does not yet contain this enhancement). In OH you have to remove the old thing and then run a new discovery to get the new one.

Jogobo commented 3 years ago

@MHerbst I installed the test version and it works. I had to remove the v1.2 device and it was rediscovered with the old gas, IEC and power channels in OH. Thank you very much!