[SOLVED] Everything works in Paper UI/Control but nothing works in Sitemap

Hi,
I’m running openhab2 ver. 2.4.0 on a Raspberry PI 3+.

My problems are as follows:
Every item/thing is configured, and they are working from Paper UIs Control function. I have set up a sitemap and all item / things are showed on the sitemap but trying to power on a Squeezebox or a SonOff contact result in absolutely nothing.

The openHAB2 log viewer show this when things af done through “Control”:

2019-02-15 14:16:06.932 [ome.event.ItemCommandEvent] - Item 'SqueezeboxClassic_Power' received command ON
2019-02-15 14:16:06.943 [nt.ItemStatePredictedEvent] - SqueezeboxClassic_Power predicted to become ON
2019-02-15 14:16:06.956 [vent.ItemStateChangedEvent] - SqueezeboxClassic_Power changed from OFF to ON
.
2019-02-15 14:16:13.509 [ome.event.ItemCommandEvent] - Item 'SqueezeboxClassic_Power' received command OFF
2019-02-15 14:16:13.525 [nt.ItemStatePredictedEvent] - SqueezeboxClassic_Power predicted to become OFF
2019-02-15 14:16:13.536 [vent.ItemStateChangedEvent] - SqueezeboxClassic_Power changed from ON to OFF
2019-02-15 14:18:06.415 [ome.event.ItemCommandEvent] - Item 'LED_Reol_Power' received command ON
2019-02-15 14:18:06.424 [nt.ItemStatePredictedEvent] - LED_Reol_Power predicted to become ON
2019-02-15 14:18:06.434 [vent.ItemStateChangedEvent] - LED_Reol_Power changed from OFF to ON
2019-02-15 14:18:09.417 [ome.event.ItemCommandEvent] - Item 'LED_Reol_Power' received command OFF
2019-02-15 14:18:09.433 [nt.ItemStatePredictedEvent] - LED_Reol_Power predicted to become OFF
2019-02-15 14:18:09.458 [vent.ItemStateChangedEvent] - LED_Reol_Power changed from ON to OFF

and this when the same actions are done through my sitemap:

2019-02-15 14:22:08.097 [ome.event.ItemCommandEvent] - Item 'SqueezeboxClassicPower' received command ON
2019-02-15 14:22:08.104 [nt.ItemStatePredictedEvent] - SqueezeboxClassicPower predicted to become NULL
2019-02-15 14:22:11.168 [ome.event.ItemCommandEvent] - Item 'SqueezeboxClassicPower' received command OFF
2019-02-15 14:22:11.176 [nt.ItemStatePredictedEvent] - SqueezeboxClassicPower predicted to become NULL
2019-02-15 14:22:17.145 [ome.event.ItemCommandEvent] - Item 'Switch_1' received command ON
2019-02-15 14:22:17.161 [vent.ItemStateChangedEvent] - Switch_1 changed from OFF to ON
2019-02-15 14:22:20.670 [ome.event.ItemCommandEvent] - Item 'Switch_1' received command OFF
2019-02-15 14:22:20.691 [vent.ItemStateChangedEvent] - Switch_1 changed from ON to OFF

My home.items file:

// Dette er filen med alle manuelt oprettede items

//Sonoff kontakter
Switch Switch_1 "LED reol" { mqtt=">[broker:cmnd/sonoffbasic1/POWER:command:ON:1],>[broker:cmnd/sonoffbasic1/POWER:command:OFF:0],<[broker:stat/sonoffbasic1/POWER:state:default]" }

//Squeezebox Server
String SqueezeboxServer "Squeezebox Server" <squeezeboxserver> { channel="squeezebox:squeezeboxserver:myServer:favoritesList" }

//Alrum Chromecast
Dimmer AlrumChromecastAudioVolume "Volume" <soundvolume> ["Switchable"] { channel="chromecast:audio:36752fde74b91a246ca86a64558c1f88:volume" }
Player AlrumChromecastAudioControl "Kontrol" <mediacontrol> { channel="chromecast:audio:36752fde74b91a246ca86a64558c1f88:control" }
Switch AlrumChromecastAudioMute "Mute" <mute> { channel="chromecast:audio:36752fde74b91a246ca86a64558c1f88:mute" }
String AlrumChromecastAudioMediaArtist "Kunstner" <artist> { channel="chromecast:audio:36752fde74b91a246ca86a64558c1f88:artist" }
String AlrumChromecastAudioMediaTitle "Titel" <title> { channel="chromecast:audio:36752fde74b91a246ca86a64558c1f88:title" }

//Stuen Chromecast
Dimmer StuenChromecastVolume "Volume" <soundvolume> ["Switchable"] { channel="chromecast:chromecast:2266edb8be11aab8d68c43bc5af1277d:volume" }
Player StuenChromecastControl "Kontrol" <mediacontrol> { channel="chromecast:chromecast:2266edb8be11aab8d68c43bc5af1277d:control" }
Switch StuenChromecastMute "Mute" <mute> { channel="chromecast:chromecast:2266edb8be11aab8d68c43bc5af1277d:mute" }
String StuenChromecastMediaArtist "Kunstner" <artist> { channel="chromecast:chromecast:2266edb8be11aab8d68c43bc5af1277d:artist" }
String StuenChromecastMediaTitle "Titel" <title> { channel="chromecast:chromecast:2266edb8be11aab8d68c43bc5af1277d:title" }

//Køkken Chromecast
Dimmer KoekkenChromecastVolume "Volume" <soundvolume> ["Switchable"] { channel="chromecast:chromecast:86efc12a90543e72af23b0a35f8572b4:volume" }
Player KoekkenChromecastControl "Kontrol" <mediacontrol> { channel="chromecast:chromecast:86efc12a90543e72af23b0a35f8572b4:control" }
Switch KoekkenChromecastMute "Mute" <mute> { channel="chromecast:chromecast:86efc12a90543e72af23b0a35f8572b4:mute" }
String KoekkenChromecastMediaArtist "Kunstner" <artist> { channel="chromecast:chromecast:86efc12a90543e72af23b0a35f8572b4:artist" }
String KoekkenChromecastMediaTitle "Titel" <title> { channel="chromecast:chromecast:86efc12a90543e72af23b0a35f8572b4:title" }

//Google Home
Dimmer GoogleHomeVolume "Volume" <soundvolume> ["Switchable"] { channel="chromecast:chromecast:4d638be7792429f0d8d4c89cdd132c87:volume" }
Player GoogleHomeControl "Kontrol" <mediacontrol> { channel="chromecast:chromecast:4d638be7792429f0d8d4c89cdd132c87:control" }
Switch GoogleHomeMute "Mute" <mute> { channel="chromecast:chromecast:4d638be7792429f0d8d4c89cdd132c87:mute" }
String GoogleHomeMediaArtist "Kunstner" <artist> { channel="chromecast:chromecast:4d638be7792429f0d8d4c89cdd132c87:artist" }
String GoogleHomeMediaTitle "Titel" <title> { channel="chromecast:chromecast:4d638be7792429f0d8d4c89cdd132c87:title" }

//Squeezebox Classic
Switch SqueezeboxClassicPower "Tænd / Sluk" <power> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:power" }
Player SqueezeboxClassicControl "Kontrol" <mediacontrol> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:control" }
Dimmer SqueezeboxClassicVolume "Volume" <soundvolume> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:volume" }
Switch SqueezeboxClassicMute "Mute" <mute> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:mute" }
Switch SqueezeboxClassicPlayPause "Spil / Pause" <playpause> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:play/pause" }
Switch SqueezeboxClassicPlayStop "Stop" <stop> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:stop" }
Switch SqueezeboxClassicNext "Næste" <next> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:next" }
Switch SqueezeboxClassicPrevious "Forrige" <previous> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:prev" }
Number SqueezeboxClassicPlayingTime "Spilletid" <playingtime> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:currentPlayingTime" }
Number SqueezeboxClassicTrackDuration "Track spilletid" <trackduration> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:duration" }
Number SqueezeboxClassicShuffleMode "Shuffle Mode " <shufflemode> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:currentPlaylistShuffle" }
Number SqueezeboxClassicRepeatMode "Gentag" <repeatmode> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:currentPlaylistRepeat" }
String SqueezeboxClassicArtist "Kunstner" <artist> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:artist" }
String SqueezeboxClassicAlbum "Album" <album> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:album" }
String SqueezeboxClassicTitle "Titel" <title> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:title" }
String SqueezeboxClassicYear "År" <year> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:year" }
Image SqueezeboxClassicCoverArt "Cover" <coverart> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:coverartdata" }
String SqueezeboxClassicGenre "Genre" <genre> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:genre" }
String SqueezeboxClassicPlayAFavorite "Favorit" <playafavorite> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:playFavorite" }
String SqueezeboxClassicSyncPlayer "Synkronisere" <syncplayer> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:sync" }
String SqueezeboxClassicUnSyncPlayer "Ophæv Synkronisering" <unsyncplayer> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:unsync" }
Number SqueezeboxClassicPlaylistIndex "Playlist indeks" <playlistindex> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:playListIndex" }
Number SqueezeboxClassicNumberofPlaylistTrack "Antal numre på playlist" <numberofplaylisttrack> { channel="squeezebox:squeezeboxplayer:myServer:000420069ee5:numberPlaylistTracks" }

//Squeezebox Touch
Switch SqueezeboxTouchPower "Tænd / Sluk" <power> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:power" }
Player SqueezeboxTouchControl "Kontrol" <mediacontrol> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:control" }
Dimmer SqueezeboxTouchVolume "Volume" <soundvolume> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:volume" }
Switch SqueezeboxTouchMute "Mute" <mute> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:mute" }
Switch SqueezeboxTouchPlayPause "Spil / Pause" <playpause> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:play/pause" }
Switch SqueezeboxTouchPlayStop "Stop" <stop> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:stop" }
Switch SqueezeboxTouchNext "Næste" <next> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:next" }
Switch SqueezeboxTouchPrevious "Forrige" <previous> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:prev" }
Number SqueezeboxTouchPlayingTime "Spilletid" <playingtime> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:currentPlayingTime" }
Number SqueezeboxTouchTrackDuration "Track spilletid" <trackduration> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:duration" }
Number SqueezeboxTouchShuffleMode "Shuffle Mode " <shufflemode> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:currentPlaylistShuffle" }
Number SqueezeboxTouchRepeatMode "Gentag" <repeatmode> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:currentPlaylistRepeat" }
String SqueezeboxTouchArtist "Kunstner" <artist> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:artist" }
String SqueezeboxTouchAlbum "Album" <album> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:album" }
String SqueezeboxTouchTitle "Titel" <title> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:title" }
String SqueezeboxTouchYear "År" <year> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:year" }
Image SqueezeboxTouchCoverArt "Cover" <coverart> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:coverartdata" }
String SqueezeboxTouchGenre "Genre" <genre> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:genre" }
String SqueezeboxTouchPlayAFavorite "Favorit" <playafavorite> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:playFavorite" }
String SqueezeboxTouchSyncPlayer "Synkronisere" <syncplayer> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:sync" }
String SqueezeboxTouchUnSyncPlayer "Ophæv Synkronisering" <unsyncplayer> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:unsync" }
Number SqueezeboxTouchPlaylistIndex "Playlist indeks" <playlistindex> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:playListIndex" }
Number SqueezeboxTouchNumberofPlaylistTrack "Antal numre på playlist" <numberofplaylisttrack> { channel="squeezebox:squeezeboxplayer:myServer:00042022ec95:numberPlaylistTracks" }

My home.sitemap file:

//This is sitemap file
sitemap home label="Klix's smarte hjem"
{
Frame label="Squeezebox UK kontor"
{
Default item=SqueezeboxClassicControl
Slider item=SqueezeboxClassicVolume icon=soundvolume
Default item=SqueezeboxClassicPower
}
Frame label="Squeezebox alrum"
{
Default item=SqueezeboxTouchControl
Slider item=SqueezeboxTouchVolume icon=soundvolume
Default item=SqueezeboxTouchPower
}
Frame label="Alrum Chromecast Audio"
{
Default item=AlrumChromecastAudioControl
Slider item=AlrumChromecastAudioVolume icon=soundvolume
}
Frame label="Chromecast Køkken"
{
Default item=KoekkenChromecastControl
Slider item=KoekkenChromecastVolume icon=soundvolume
}
Frame label="Chromecast Stuen"
{
Default item=StuenChromecastControl
Slider item=StuenChromecastVolume icon=soundvolume
}
Frame label="Alrum Chromecast Audio"
{
Default item=AlrumChromecastAudioControl
Slider item=AlrumChromecastAudioVolume icon=soundvolume
}
Frame label="LED reol"
{
Switch item=Switch_1
}
}

Looking forward to hear if any of you dear readers can see where I have made a mistake.

Regards Ulrik

Please use the formatting options to make your post readable.

Hi Job,

Of course. My mistake - sorry.

Ulrik

Your item name is not consistent throughout your setup.
Maybe you have linked the channel of a Thing through PaperUI and the same channel through your items file, but with different names.

You can mix your item linking between PaperUI and flat text files but I would not recommend it because you won’t be able to manage that with a large amount of items.

Hi sihui

Oh - what a bummer :frowning:
I have been looking at those files for hours because I saw another post with a similar problem. Thanks for pointing this out. Now most of it works, and you are right it is a mix of Paper UI af text files. I think I will stay with Paper UI in the future.

Regards Ulrik

1 Like

Hi Sihui!
I was on a similar trouble with one Chromecast and one googleHome mini device.

Starting from PaperUi, installing ChromeCast Binding, creating Things and Items from it is easy and everything works.

But I’d like to do everything manually.
I’m ok with .items and .sitemaps files but what about .things?

I found this old example that DOES NOT work:

/* Google Home mini /
Thing chromecast:chromecast:ghome [ ipAddress = “192.168.1.240” ]
/
Google Chromecast */
Thing chromecast:chromecast:gcast [ ipAddress = “192.168.1.242” ]

What is the correct sintax to specify the device ID in .things file?

Thanks for your help!
Alex

Sorry, no idea, I am using PaperUI Things.

Why do you think your syntax is wrong? The docs are pretty clear.
What message do you see from the binding about it in your openhab.log ?

Hi Rossko57,
As a newbie, I’d like to understand how things work.
As said, with PaperUi everything works.

But what about starting from scratch ?

  1. Install Chromecast binding from PaperUi
  2. Do I need .things file or only .items with channel definition ? Or both ?
    Thanks.

In general -
You need Things (and their channels)
You can define those ether with PaperUI or in xxx.things files.
To display anything in any sitemap, you can only use Items.
You can define those either with PaperUI or in xxx.items files.
Part of the Item definition can be a link to a Thing channel.

That’s ok. Really Thanks.

But this .things file

/*Google Chromecast binding /
/
Google Home mini */
Thing chromecast:chromecast:ghome [ ipAddress = “192.168.1.240” ]

/* Google Chromecast */
Thing chromecast:chromecast:gcast [ ipAddress = “192.168.1.242” ]

doesn’t work with this .items

Dimmer Google_Home_Volume "GH Volume " <soundvolume> (gAssistenti) [ "Switchable" ] { channel="chromecast:chromecast:ghome:volume" }

Instead, everything works if I use the ID in the .items file…

Dimmer Google_Home_Volume "GH Volume " <soundvolume> (gAssistenti) [ "Switchable" ] { channel="chromecast:chromecast:dbd112fca0454840e95caxxxxxxxx:volume" }

But in this case, what is the .things file for ?

And how could i set it to work with the ID ??
I mean, I would have expected something like this:

Thing chromecast:chromecast:ghome [ ipAddress = “192.168.1.240” , Id= “dbd112fca0454840e95caxxxxxxxx”]

and then an .items file like this:

Dimmer Google_Home_Volume "GH Volume " <soundvolume> (gAssistenti) [ "Switchable" ] { channel="chromecast:chromecast:ghome:volume" }

Then there’s something wrong with your Thing definition. I don’t know what. Perhaps the binding will tell you in a message in your openhab.log.

A wild guess, you seem to have already discovered or setup the same Thing in PaperUI. I doubt duplicate connections are allowed.

So, somewhere, you already have a Thing and a channel with a long, clumsy UID. Auto-generated UIDs usually have some property of the device buried in them. Look at Things in PaperUI.

Why? The IP is unique.