@dakipro
@dakipro said in OpenHAB:
@guillermo-schimmel said in OpenHAB:
It looks that I was using 1.a, as this is how I already have items defined from before, f.eks.
Number Temp_03 "Temperatura [%.1f °C]" {mqtt="<[mosquito:mygateway1-out/3/1/1/0/0:state:default]"}
but I do agree, this is a bit... time consuming to figure out which value should be sent when.
To migrate from this to 1.b, I would have to define every channel in the things file?
Yes, like this:
Thing mqtt:topic:miscosas {
Channels:
Type number : ecovacs_1_battery_level "Ecovacs 01 Battery Level" [ stateTopic="ecovacs/E0000693817701104736/battery_level" ]
Type string : ecovacs_1_charge_status "Ecovacs 01 Charge Status" [ stateTopic="ecovacs/E0000693817701104736/charge_status" ]
Or via Paper UI, which is slower and painful.
I am not a fan of PaperUi , and would like to have a official bindings when possible. It is always annoying to update openhab, and I would like to keep it as less complicated as possible.
Do you have an example (or give some tips) on how to go with 1.b route, either via PaperUi, or things file? What do I write there for one, f.eks. temperature-humidity sensor?
The "1.b" is just like I said. Define your .things and then is identical to the 2. From things you go to items and then sitemap.
I like having good control over each node, so defining each channel should be fine for me, I am just struggling to get started, then I can copy-paste from there
There you have an example, which I actually use with and old mysensor node which I modifyed (bad)
a. Things:
Thing mqtt:topic:miscosas {
Channels:
Type string : porton_a_mano "Garage Porton a Mano" [ stateTopic="mygateway1-out/11/3/1/0/16" ]
}
b. Items
String item_porton_a_mano "porton a mano" { channel="mqtt:topic:miscosas:porton_a_mano"}
c. Sitemap
Frame label="Garage" {
Default item=item_porton_a_mano icon="garagedoor" valuecolor=[CLOSED="green",OPEN="red" ]
}
Thanks!