Item naming questions?

I had been using openhab2 betas last year. Anyway, figured I’d start fresh with OH2 release. Trying to have a go without doing much configuration by files; trying to use PaperUI.

I have a wemo lightswitch. It is detected in PaperUI, and I can turn it on and off.

I’ve been trying to write a rule that will turn the light on at sunset.

I eventually came up with the following, which works. But to get the switch name, I ended up going through the initialisation logs to find the name - how is one supposed to find the name or give it an alias to use in scripts?

rule "Turn On Lights After Sunset"
		Channel	'astro:sun:local:set#event' triggered START 
		wemo_lightswitch_Lightswitch_1_0_221609K13013B1_state.sendCommand( ON );

You could temporarily (edit:) disable Simple Mode in OH2 for Item Linking (in Paper UI -> Configuration -> System) and check the Items from the Paper UI sub-menu.

Thanks for your help.

Unfortunately, Simple Mode is already enabled.

“check the Items from the Paper UI sub-menu”

What Paper UI sub-menu?


Here is what I have:

Hi Paul

Since it got added in simple mode I guess you need to turn that off and then look in Paper UI under Configuration/Items.

Another way is to use the Karaf console and se them listed there.

ssh to your box and then
ssh openhab@localhost -p 8101 -oHostKeyAlgorithms=+ssh-dss
the password is habopen

openhab> items <- This command will give you all your created items. To find more commands just type “help”

Hope this helps.


1 Like

Also, another way (to find an item name) is to browse to the thing and to the linked items that openHAB 2 created for you via Paper UI:

You need to disable Simple Mode for Item Linking to see the Linked items

Make sure that Simple Mode is disabled:

Thanks for everyone’s help.

I think the real question is how do I change “wemo_lightswitch_Lightswitch_1_0_221609K13013B1_state” to an alias or something, something I can use in the rules etc?

I don’t think that you can use aliases for item names
You could try to rename the existing or delete it and create manually a new one (don’t forget to link it to the appropriate thing channels)