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"
when
Channel 'astro:sun:local:set#event' triggered START
then
wemo_lightswitch_Lightswitch_1_0_221609K13013B1_state.sendCommand( ON );
end
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.
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)