With the impending removal of the 1.x binding compatibility layer (in OH 3.0) I have been experimenting with homie MQTT items.
It looks like a promising way of getting third party devices into OH without having a specific 2.x (or 3.x) binding.
So I'm trying the ISY-Homie bridge. OH is very buggy with homie items, although it (kind of) auto discovers them.
So OH discovers a Dimmer item (from my ISY), OH inconveniently marks the dimmer channel as a Number Channel, but you can link it to a Dimmer Item, and it works as a Dimmer. Homie uses 0.0 to 1.0 for dimmers, though, so Habapp throws these errors when you change the value:
2020-02-05 11:08:12,314[ HABApp]ERROR| __process_exception: Error 0.45 in on_sse_event:
2020-02-05 11:08:12,315[ HABApp]ERROR| __process_exception: Traceback (most recent call last):
2020-02-05 11:08:12,315[ HABApp]ERROR| __process_exception: File "/home/nick/Scripts/HABApp/HABApp/openhab/oh_connection.py", line 110, in on_sse_event
2020-02-05 11:08:12,316[ HABApp]ERROR| __process_exception: __item.set_value(event.value)
2020-02-05 11:08:12,316[ HABApp]ERROR| __process_exception: File "/home/nick/Scripts/HABApp/HABApp/openhab/items/dimmer_item.py", line 19, in set_value
2020-02-05 11:08:12,317[ HABApp]ERROR| __process_exception: assert new_value is None, new_value
2020-02-05 11:08:12,317[ HABApp]ERROR| __process_exception: AssertionError: 0.45
2020-02-05 11:08:28,509[ HABApp]ERROR| __process_exception: Error 1.0 in on_sse_event:
2020-02-05 11:08:28,510[ HABApp]ERROR| __process_exception: Traceback (most recent call last):
2020-02-05 11:08:28,510[ HABApp]ERROR| __process_exception: File "/home/nick/Scripts/HABApp/HABApp/openhab/oh_connection.py", line 110, in on_sse_event
2020-02-05 11:08:28,511[ HABApp]ERROR| __process_exception: __item.set_value(event.value)
2020-02-05 11:08:28,511[ HABApp]ERROR| __process_exception: File "/home/nick/Scripts/HABApp/HABApp/openhab/items/dimmer_item.py", line 19, in set_value
2020-02-05 11:08:28,512[ HABApp]ERROR| __process_exception: assert new_value is None, new_value
2020-02-05 11:08:28,512[ HABApp]ERROR| __process_exception: AssertionError: 1.0
Although the Slider/Dimmer 'Item' works just fine in the interface, and if you query the value of the item, you get 0.0-100.0. You also can't send 'ON' or 'OFF' to these DimmerItems it only accepts numbers.
OH is obviously doing some internal processing of these homie events, to transform Items to Channels. It looks to me like you send 0.0-1.0 to the homie Item but the returned value is 0.0-100.0.
This isn't a bug as such, more like a new feature.
So if an item is linked to a homie Thing or Channel maybe we should transform 'ON'/'OFF' to 0-100, and accept that there is some low level transformation going on (and not throw an error).
Homie Channels look like this:
number mqtt:homie300:proliant:dimmer-44f0c61:dimmer#dimmer
string mqtt:homie300:proliant:dimmer-44f0c61:dimmer#paddleaction
They all start with mqtt:homie300 where 300 is the homie version (400 is the latest). proliant is my broker, dimmer-44f0c61 is the "Device Id" (from my ISY), and dimmer is the type of device.
The example is a dimmer switch, paddleaction is a string that gives the last switch activity ("ON", "OFF", "FastON" etc.).
With the impending removal of the 1.x binding compatibility layer (in OH 3.0) I have been experimenting with homie MQTT items.
It looks like a promising way of getting third party devices into OH without having a specific 2.x (or 3.x) binding.
So I'm trying the ISY-Homie bridge. OH is very buggy with homie items, although it (kind of) auto discovers them.
So OH discovers a Dimmer item (from my ISY), OH inconveniently marks the dimmer channel as a
Number
Channel, but you can link it to a DimmerItem
, and it works as a Dimmer. Homie uses 0.0 to 1.0 for dimmers, though, so Habapp throws these errors when you change the value:Although the Slider/Dimmer 'Item' works just fine in the interface, and if you query the
value
of the item, you get 0.0-100.0. You also can't send 'ON' or 'OFF' to theseDimmerItems
it only accepts numbers.OH is obviously doing some internal processing of these homie events, to transform
Items
toChannels
. It looks to me like you send 0.0-1.0 to the homieItem
but the returnedvalue
is 0.0-100.0.This isn't a bug as such, more like a new feature.
So if an item is linked to a homie
Thing
orChannel
maybe we should transform 'ON'/'OFF' to 0-100, and accept that there is some low level transformation going on (and not throw an error).Homie
Channels
look like this:They all start with
mqtt:homie300
where300
is the homie version (400 is the latest).proliant
is my broker,dimmer-44f0c61
is the "Device Id" (from my ISY), anddimmer
is the type of device.The example is a dimmer switch,
paddleaction
is a string that gives the last switch activity ("ON", "OFF", "FastON" etc.).The
Items
look like this:Where the
Dimmer
is 0-100,Number
is 0.0-1.0.I think that
homie
support is in it's early stage in OH, but it might be a project to put some basic support in Habapp for it.