PaperUI is not designed for everyday control of openHAB - it’s for administering openHAB.
ClassicUI was designed for openHAB1.
All Sitemap examples assumed BasicUI, as shown in the screenshots.
PaperUI is not designed for everyday control of openHAB - it’s for administering openHAB.
ClassicUI was designed for openHAB1.
All Sitemap examples assumed BasicUI, as shown in the screenshots.
ClassicUI is perfectly usable with openHAB2.
Like BasicUI, what it shows is entirely controlled by sitemap file. What goes in the sitemap is entirely up to you. You can put duplicates if you want.
Are you by chance using openHAB in “Simple Mode”, which auto creates Items? This quickly becomes a nuisance if you are also adding Items manually.
hafniumzinc –
THANK YOU so much for this post. It has taken me almost a year to find the information you placed into this thread.
I had given up hope of ever finding this information. I have been forced into using PaperUI to define my SONOFF devices. This is fantastic info.
This appears to be OH2 configs, yes? Do you know if / how it changes for OH3?
Again thank you so much. I have a buddy that is suffering from the same lack of docs, he will also greatly appreciate this post.
If you continue with config files you won’t have to change anything for OH3
That was my assumption, but you know where assumptions can put you!
Indeed!
With OH3 you do have some other options, which you may prefer:
hafniumzinc -
(edited, removed original content, substituted the following)…
I finally got my Dual R2 unit up and running from config files. Thank you for all of the help and clarification that your original 2 posts provided.
Is there a way to include a device location such as @“Living Room” in the mqtt thing config? I tried this …
Thing mqtt:topic:eab2edb0:RS_Music_Room “RS_MR” @ “Music Room” (mqtt:broker:eab2edb0)
Generates a missing “)” error.
You should be able to, but add it after the reference to the Bridge/Broker Thing, not before. This is my bible:
Thanks again and “the Bible” link is much appreciated. It is great to have more functionality in config files than the PaperUI exposes.
Hi,
all this functionality is also covered by the UI.
Are you saying the PaperUI allows control of visibility?? I have not seen that.
Hi , I’m very new to openHab and have found this guide extremely useful so far. however I’m not quite sure how actually create the empty files within the command line, I assume its within the command line? any assistance or a dummies guide if you will for a newb like myself would be greatly appreciated. many thanks chris.
Welcome!
On the command line navigate to your specific folder, then
touch my_items.items
will create an empty Items file called my_items
.
But that’s not particularly user friendly - how have you got openHAB setup? Do you have access through a normal file manager to your configuration files?
If you want to create and edit config files use an editor.
Thankyou very much, this is my first attempt at anything like this. until this point i had only used the paper UI and even installed the openHab o.s using the installation steps found on the sight. I don’t believe i have access through a normal file manager to my configuration files, however i did install putty last week and have managed to install the mosquito and check it works.
any help and tips are greatly appreciated.
Great tutorial, it helped me a lot. But I have a problem. I have a separate channel to set PulseTime but I would also like to get it’s state. If I publish cmnd/rega/PulseTime1
I get {"PulseTime1":{"Set":400,"Remaining":0}}
from stat/rega/RESULT
. But these /RESULT
do not come regularly, as is the case with /STATE
. How can I do this ?
You can change the TelePeriod
from the default 300
In tasmota console enter
TelePeriod 10
I can’t provide a complete example at the moment, but I think you’ll have to create a Cron triggered rule which uses the MQTT action to publish an empty message to
cmnd/rega/PulseTime1
You then need to setup a (new) Channel on your Thing which listens to
stat/rega/RESULT
and probably uses REGEX to filter to make sure it includes the PulseTime1
keyword.
@hafniumzinc Wow, I was not aware that it is possible to publish MQTT commands using rules. It opens tremendous possibilities, such as programming tasmota as if I were using its console. Thanks a lot, this was the solution.
Here is a simple OH3/DSL rule
triggers:
- id: "2"
configuration:
startlevel: 100
type: core.SystemStartlevelTrigger
conditions: []
actions:
- inputs: {}
id: "1"
configuration:
type: application/vnd.openhab.dsl.rule
script: |-
val actions = getActions("mqtt","mqtt:broker:aveiro")
actions.publishMQTT("cmnd/rega/PulseTime","")
type: script.ScriptAction
And here is the thing definition for a Sonoff 4CH Pro
UID: mqtt:topic:aveiro:sonoff_rega
label: Rega do Quintal
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:aveiro
channels:
- id: zona1
channelTypeUID: mqtt:switch
label: Zona 1
description: ""
configuration:
commandTopic: cmnd/rega/POWER1
stateTopic: stat/rega/POWER1
- id: zona2
channelTypeUID: mqtt:switch
label: Zona 2
description: ""
configuration:
commandTopic: cmnd/rega/POWER2
stateTopic: stat/rega/POWER2
- id: zona3
channelTypeUID: mqtt:switch
label: Zona 3
description: ""
configuration:
commandTopic: cmnd/rega/POWER3
stateTopic: stat/rega/POWER3
- id: zona4
channelTypeUID: mqtt:switch
label: Zona 4
description: ""
configuration:
commandTopic: cmnd/rega/POWER4
stateTopic: stat/rega/POWER4
- id: zon1p
channelTypeUID: mqtt:number
label: Pulsetime 1
description: null
configuration:
commandTopic: cmnd/rega/PulseTime1
stateTopic: stat/rega/RESULT
transformationPattern: REGEX:(.*PulseTime1.*)∩JSONPATH:$.PulseTime1.Set
- id: zon2p
channelTypeUID: mqtt:number
label: Pulsetime 2
description: null
configuration:
commandTopic: cmnd/rega/PulseTime2
stateTopic: stat/rega/RESULT
transformationPattern: REGEX:(.*PulseTime2.*)∩JSONPATH:$.PulseTime2.Set
- id: zon3p
channelTypeUID: mqtt:number
label: Pulsetime 3
description: null
configuration:
commandTopic: cmnd/rega/PulseTime3
stateTopic: stat/rega/RESULT
transformationPattern: REGEX:(.*PulseTime3.*)∩JSONPATH:$.PulseTime3.Set
- id: zon4p
channelTypeUID: mqtt:number
label: Pulsetime 4
description: null
configuration:
commandTopic: cmnd/rega/PulseTime4
stateTopic: stat/rega/RESULT
transformationPattern: REGEX:(.*PulseTime4.*)∩JSONPATH:$.PulseTime4.Set