Items, Sitemap, IsteonPLM, and BasicUI Assistance Needed

Hello,

I have created the following item file:

Group gLights
Switch hallLight "Hall light" <light> (gLights) {insteonplm="16.A2.A4:F00.00.04#switch"}
Switch brownRoomLight "Brown room light" <light> (gLights) {insteonplm="12.35.1B:F00.00.04#switch"}
Switch laundryLight "Laundry room light" <light> (gLights) {insteonplm="1A.2D.B7:F00.00.04#switch"}
Dimmer mantelLight "Mantel light [%s]" <dimmablelight> (gLights) {insteonplm="17.FF.BB:F00.00.01#dimmer"}
Switch hallLight2 "Hall light is: [%s]" <light> {insteonplm="16.A2.A4:F00.00.04#switch"}

I have created the following sitemap:

sitemap default label="Harvest Hills House" {
        
    Frame label="Lights" {
        Switch item=hallLight label="Hall" mappings=[OFF="off", ON="on"]
        Switch item=brownRoomLight label="Brown Rm" mappings=[OFF="off", ON="on"]
        Switch item=laundryLight label="Laundry Rm" mappings=[OFF="off", ON="on"]
        Switch item=mantelLight label="Mantel" mappings=[OFF="off", ON="on"]
        Switch item=hallLight2 label="Hall 2" mappings=[OFF="off", ON="on"]
    }
    Frame {
        Group item=gLights label="Lights" icon="group" {
            Switch item=hallLight label="Hall" mappings=[OFF="off", ON="on"]
            Switch item=brownRoomLight label="Brown Rm" mappings=[OFF="off", ON="on"]
            Switch item=laundryLight label="Laundry Rm" mappings=[OFF="off", ON="on"]
            Switch item=mantelLight label="Mantel" mappings=[OFF="off", ON="on"]
        }
    }
}

On the BasicUI for the Hall 2 light I get a bulb icon and the Hall 2 label on the left, and then on the right I get an “OFF” label followed by an ON and OFF button. (Not sure how to add an image of I would.) When commanding ON and OFF, the bulb goes from yellow to grey… I am wondering if this is based on the report back from the light, or just based on the reflected commanded state? The “OFF” label on the right does not change dynamically with the commanding of ON and OFF from the buttons, but will correctly update after a browser refresh. Is this value based on a report from the light, or just a reflection of the commanded state as well? I am also wondering why only the value inside the [%s] is being displayed and not the complete “Hall light is: [%s]” from the label? If I do “[Hall light is: %s]” in the item it all appears/ displays (still does not update though), but this does not seem to follow the examples given in the documentation.

thanks

Its just the commanded state. There are some devices that will report their state back to OH but not all.

If it reflects the state of the light when toggled at the switch eventually this might just be BasicUI not refreshing the updated state. But if the Light does not report its new state when you toggle it at the switch then the state presented on the sitemap and the state stored within OH only reflects what OH knows (i.e. commands and updates that were generated within OH).

You are overriding the labels defined on the Items in the sitemap. The label on the sitemap takes precedence.

Thanks for the response.

The Insteon 2477S switches send reports of their state, so I was just wondering (Hoping) that it was mapped in the code somehow. But I see there is only one parameter being linked too anyway so that would not work (Maybe the developers will make an update someday… fingers crossed). I turned on and off the switch and see the command toggle along with the colour of the bulb on the switch… the dimmer report did not update. I unplugged the network cable and made some commands from the Gui and see that the light bulb still toggled based on the command… So if I do this remotely, I do not really know if my lights are on or off, if this is not based on the report. Or is the software guaranteeing this in the background? Because one thing I noticed is that once I plugged the network back in all the commands I made seemed to be queued and executed… had quite a light show going!

Thanks for the info on the Sitemap labels overriding the item labels. I did not determine that from reading the documentation.

I added the following to the items file:

Group:Switch:OR(ON,OFF) Lights "Lights on: [(%d)]"

and the following to the sitemap:

Switch item=Lights mappings=[OFF="All off"]

I added the Group Lights to all my defined lights.

The “Lights on: (#)” label is not updating is realtime either (and I assume that it is supposed too), but works on a browser refresh / page change. Unless I am doing something wrong.

Also for these labels, can I use the valuecolour parameter to have a lights “ON” value displayed in green fro example… I have been trying but not getting it to work.

What version of OH 2 are you using. There was a bug in Beta 4 that has been fixed that prevented BasicUI from refreshing all the time.

I used the apt-get … but now I can’t recall which one I installed, but I think it was the beta offline version. Not a Linux super user, so I am not able to figure out the version looking through the installation. Can I install the snapshot release on top of it…?

Could you also tell me if this is correct (should work in the sitemap file for a switch:

Item:

Switch hallLight2 "Hall light: [%s]" <light> {insteonplm="16.A2.A4:F00.00.04#switch"}

Sitemap:

Switch item=hallLight2 label="Hall light: [%s]" labelcolor=["ON"="green"] valuecolor=["ON"="green"] mappings=[OFF="off", ON="on"]

I really just want the value to be colored, and bold if possible.

Yes. There have been some changes to the repos recently as well so review the installation instructions.

That looks like it would work.Though I don’t think you use quotes for the ON part, just the color:

Thanks again.

I used quotes because I did see that example, and the “Uninitialized” value was in quotes, so I thought that maybe string values required them… I made the change and still no luck.

Switch item=hallLight2 label="Hall light: [%s]" labelcolor=[ON="green"] valuecolor=[ON="green"] mappings=[OFF="off", ON="on"]

But the door one works now…

Text item=backDoorSensor label="Back door is [%s]" labelcolor=[CLOSED="blue"] valuecolor=[CLOSED="green"]

One last question which I can not seem to find the answer to… Can I change the color of the buttons (theme) that were created using the mappings parameter? They are Magenta when selected, and I would like them just a darker grey… I am trying to achieve only having things red if the condition is bad. So if I am leaving the house for example I can quickly see a window is open by reporting open in red.

thanks.

I’ve seen some cases where the icons are now mapped to the transformed state of the Item. I wonder if there is some weird similar thing going on here. Try “on”=“green” to match your mappings.

No.

No luck. Thanks for all the help so far… Going to move to the snapshot package now.