How to identify Items if I have configured every thing with PaperUI automatically? Or do I have to manually add it to a .things file?

Hi all, so my first ever blocking in openHab (my guess the first of many), just started one 1h ago and this seems to have a lot of potential :slight_smile:

I’ve used the GUI and it found all my xiaomi stuff which is cool, I can see temp in control etc, now I started to play with the txt files I’ve added Telegram and managed to get IMs fine:

rule “myRule”
when
Time cron “0 * * ? * *”
then
sendTelegram(“bot1”, “item Foo changed”)

But now I wanted to start playing with the device’s input but can’t seem to figure it out, it’s clear that I’m not getting the right “item” name from the logs, I’ve tried with “mihome…” with quotes, it doesnt return an error if use Channel … triggered but the then doesn’t happen.

This is my rule

rule “MotionSensor1”
when
Item mihome:sensor_motion:158d0001d59a02:motion changed
then
sendTelegram(“bot1”, “Someone on the move!”)
end

I’ve tried to rename the item in the UI, and use “thing.motion”, I get no errors in logs but nothing happens.

Or do I have to manually add these stuff (items) into the config files that I already see in here /paperui/index.html#/control

I’ve looked into this page:https://www.openhab.org/addons/bindings/mihome/

And it seems Channel works as no errors in logs but nothing happens too, so there is no way around it, I have to add that into a .items file?

Tks a lot! :slight_smile:

  • Platform information:latest version
    • Hardware: CPUArchitecture/RAM/storage
    • OS: _what OS is used and which version_mac os
    • Java Runtime Environment: which java platform is used and what version zulu
    • openHAB version: latest
  • Issue of the topic: please be detailed explaining your issue
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

Have you tried reading through the docs for openHAB? I been working on my system for quite a while and just this past week have a system up and running 3 esp8266 boards with temp sensors on each board… I started out knowing nothing about RPi and this kind of stuff. You will find that if you ask for help, the first thing many will ask you, did you read the manual? There is A LOT of good information that will help you get started. Don’t expect to be “spoon fed” for every problem you run into. If you did research and searched through the forums and docs you will have a better chance of gaining the knowledge you are looking for.
From your post, you said you have only started an hour ago. Not a lot of time to do much reading.
I would start by searching the forum with the information you are looking for or go back and read through the docs. It will be easier for you going forward if you can try and find the answers before asking questions. I’ve been the and done that !!

John

I did search but wasn’t able to pass thru this part. Most of the other issues I’ve been able to seach and find it. Tks John.

It seemed like a simple question but I couldn’t find anything, lets hope someone knows if not I will read further.

PaperUI will show you all the “names”. Under Configuration Things you will find all your Things with names, channels and even the linked items.
Under Configuration Items you will find all your Items.
Continue reading the documentation in order to get a better understanding of Things, Channels and Items, especially about their relations.

In case you don’t see your items under the Things in Configuration

Just go to Configuration -> System and turn off “Simple Mode” for Item Linking:

I stumbled across this as well…

Hi

Is it an actual Item you’re referring to?

Or the Channel of a Thing?

Your rule might need changing to this…

rule “MotionSensor1”
when
Item "mihome:sensor_motion:158d0001d59a02:motion" changed
then
sendTelegram(“bot1”, “Someone on the move!”)
end

Or this

rule “MotionSensor1”
when
Channel "mihome:sensor_motion:158d0001d59a02:motion" triggered // you can add conditions here too for exactly Triggered PRESSED
then
sendTelegram(“bot1”, “Someone on the move!”)
end

" " Are essential if your channel contains non standard characters like :

More information on channel triggers here -

Keep in mind that your openhab.log will give you hints as to what is wrong.

Thanks for actually helpful replies instead of “go read the docs”. If at least a link to a meaningful article was sent that would be nice, go read the docs is not nice.

Tks Max and MDAR, after switching the Simple Items, I could see Items in paperUI and this works now:

rule “MotionSensor1”
when
Item mihome_sensor_motion_158d0001d59a02_motion changed
then
sendTelegram(“bot1”, “Someone on the move!”)
end

Tks! let the games begin :slight_smile:

I’ve also tested this but doesn’t work, but for now its okay, and yeah I need to read a bit more

rule “MotionSensor2”
when
Channel “mihome:sensor_motion:158d0001d59a02:motion” triggered
then
sendTelegram(“bot1”, “Someone on the move!2”)
end

Only certain channels can be used to trigger a Rule. See these two Channels in PaperUI.

image

The first one must be linked to a Number:Time Item and cannot be used to trigger a Rule. The second one doesn’t show any Item type below the Channel name. This is because this is a trigger Channel and it can be used to trigger a Rule.

Only Channels that represent a momentary event (e.g. Sunrise just happened, a Dash button was just pressed, etc) can be used to trigger a Rule. In all other cases you must link the Channel to an Item and use the Item to trigger the Rule.

1 Like