openhab / org.openhab.ui.habot

A chatbot for openHAB using machine-learning natural language processing from OpenNLP
Eclipse Public License 1.0
65 stars 31 forks source link

Switch #6

Closed jensfr1 closed 6 years ago

jensfr1 commented 6 years ago

Hi,

I am playing a bit with the bot and now I can switch lights on and off.

The issue is that the switch in the chat is only visible for the first light I have added.

2018-03-24 22_19_09-habot

Item code for all lights are the same: Switch Light1_Toggle "TV" <light> (LivingRoom, gLight) ["object:tvlicht", "object:licht", "object:light", "object:lights", "object:lighting"] { channel="hue:" } Switch Light2_Toggle "Stehlampe" <light> (LivingRoom, gLight) ["object:stehlampe", "object:licht", "object:light", "object:lights", "object:lighting"] { channel="hue:" }

In the Card Board I can also not find it.

2018-03-24 22_26_48-habot

In the Items Menu in settings for example I dont find Light2 even it is in the items file and in the Paper UI.

2018-03-24 22_23_39-habot

Screen from Paper UI.

2018-03-24 22_24_51-paper ui
ghys commented 6 years ago

Thanks for trying it out! Hmm, that's odd. It looks like the server-side found all your items alright, but the web client doesn't know about them. It loads the list early on via a call to the rest/items API - same as Paper UI.

Here are a couple suggestions:

jensfr1 commented 6 years ago

Is really odd but once I stopped sitting at my desk and moved to the sofa it worked from my phone and now also in Chrome. Cheers, Jens

ghys commented 6 years ago

Could be because the items weren't there when you displayed the page, and you didn't refresh? If the items change the UI doesn't know about it (not that it couldn't, there are events sent for that sort of thing, but they are not handled currently). Anyways, glad it's working now.