Dimmer, number, string not working

In basic UI, I tried Switch, it is working perfectly fine. But when I add Dimmer or other types, it stopped working. Below are my codes. I’m using Openhab 2.1.0 on my windows laptop btw.

In items file:

Switch Wallplug_TV_Jessie "Wallplug TV" <poweroutlet> { channel="samsungtv:tv:6cd29ac0_aaee_451c_a85e_5c41b771c67a:power" }

Switch Mute_TV_Jessie "Mute TV" <switch> { channel="samsungtv:tv:6cd29ac0_aaee_451c_a85e_5c41b771c67a:mute" }

Dimmer Volume_TV_Jessie "Volume of TV" <soundvolume> { channel="samsungtv:tv:6cd29ac0_aaee_451c_a85e_5c41b771c67a:volume" }

Number Channel_Number_TV_Jessie "Channel number of TV" <number> { channel="samsungtv:tv:6cd29ac0_aaee_451c_a85e_5c41b771c67a:channel" }

In sitemap file:

    Switch item=Wallplug_TV_Jessie label="Jessie's smart TV"
    Switch item=Mute_TV_Jessie label="Mute my TV"
    Dimmer item=Volume_TV_Jessie label="Volume of TV"
    Number item=Channel_Number_TV_Jessie label="Channel number"

when I open http://localhost:8080/basicui/app
It keeps giving me this error:
It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.
In my openhab logs file, it says:
2017-10-23 03:55:37.391 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘default.sitemap’ has errors, therefore ignoring it: [6,5]: mismatched input ‘Dimmer’ expecting ‘}’

If I remove the two lines of dimmer and number in my sitemap file, it works fine, as in the picture below.
Is it because of the item type? Did I make any mistakes? I’ve been looking at these for a couple hours and couldn’t figure out. If someone knows, please help me. Thanks!!!

E.g., a Dimmer Item will be represented as if using a Slider element

can you try that out?

Check this site for more Information: http://docs.openhab.org/configuration/sitemaps.html

I have the first line,

sitemap default label="My Home Devices"
{
   
    Switch item=Wallplug_TV_Jessie label="Jessie's smart TV"
    Switch item=Mute_TV_Jessie label="Mute my TV"
  //  Dimmer item=Volume_TV_Jessie label="Volume of TV"
  //  Number item=Channel_Number_TV_Jessie label="Channel number"
  //  String item=Source_Name_TV_Jessie label="Source Name"
  	Switch item=Stop_Browser_TV_Jessie label="Stop Browser on TV"
  	Switch item=Presence_Mobile_Jessie label="Jessie's Mobile"
 }

Argh, you’ve been 2 fast :stuck_out_tongue: I just edited my text.

Dimmers are represented as Sliders, e.g.:

Slider item=Light_FF_Office_Desk_B

I replaced Dimmer with Slider, it is working!!! Thanks so much!!!

No problem :slight_smile: the mentioned URL above gives you more Information about the possibility of representing item in sitemaps. Have fun!

1 Like