openhab / openhab-addons

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

[shelly] Auto-upgrade channel definitions to latest version (fixes NOT_READY thing status) #15414

Open markus7017 opened 1 year ago

markus7017 commented 1 year ago

The current version of the binding changes various channel types to system defined ones, e.g. humidity channel has now system type system:atmospheric-humidity or most temperature channels are now of type system:indoor-temperature. However, that causes things of existing installations to say in status NOT_READY for 120sec.

The binding now incudes a mechanism, which checks channel's typeId and acceptedItemType and adapts this to the latest information. Existing item linkage and channel values should not be impacted.

The following changes are applied

|Channe lold type typeId |new channel typeId |New acceptedItemType | |sensors#humidity |sensorExtHumidity |system:atmospheric-humidity|Number:Dimensionless. | |sensors#temperature |sensorTemp |system:indoor-temperature |Number:Temperature | |sensors#motion |sensorMotion |system:motion |Switch | |meter1#currentWatts |meterWatts. |system:electric-power |Number:Power | |meter1#totalKWH |meterTotal |system:electric-current |Number:Energy | |meter1#returnedKWH |meterReturned |system:electric-current |Number:Energy | |meter1#voltage |meterVoltage. |system:electric-voltage |Number:ElectricPotential| |meter1#current |meterCurrent |system:electric-current |Number:ElectricCurrent | |meter#lastPower1 |lastPower1 |system:electric-power |Number:Power | |relay#brightness. |dimmerBrightness |system:brightness. |Dimmer | |device#internalTemp |deviceTemp |system:indoor-temperature. |Number:Temperature. | |device#supplyVoltage. |supplyVoltage |system:electric-voltage |Number:ElectricPotential | |device#accumulatedWTotal l|meterAccuTotal |system:electric-current. |Number:Energy | |device#accumulatedReturned|meterAccuReturned|system:electric-current. |Number:Energy |

markus7017 commented 9 months ago

relates to #15960

markus7017 commented 9 months ago

relates to #15960