is there a place with all the documentation as this is making me pull my hair out. Lets look at the chromecast binding we have 3 items
control
volume
playuri
then we go down the page and look at the rules and there is now something to do with appid that you can also do with the device but no documentation on site.
The documentation is shocking over the whole project. When i get to grips with it something id be happy to help with dont get why others have not done this
Well, you are invited to improve documentation, as there are always too little people that have time and expertise
In fact, there are many pages in the documentation which are almost ok or at least sufficient.
But one has to find the pages with errors …
If you read my OP i talk about the example rule mentioning appid as a parameter. There is no mention to where this came from or how it should be used.
It also changes how it refers to the chromecast from using the name setup in the things file to this chromecast_chromecast_38e621581281c7675a777e7b474811ed, where did this new name come from and how do i find it?
Sorry for the neagtive tone of my first comment. I dont want to get into a flame war just want to get things to work. Then when I know how to make things work I can then write some awsome documentation
My question is where did this item come from “chromecast_chromecast_38e621581281c7675a777e7b474811ed_appId” how should this be defined in the items file?
How do I find the app ids? eg // 2872939A Google Play Music (what is spotify and where is this info from)
here is a link to the documentation I am following
I think, this is - in parts - mixed up information.
When using autodiscovery and simple mode on, openHAB will introduce items bound to the channels by itself.
autodiscovery -> openHAB2 Bindings are often capable to discover the existing hardware, so the only thing to do is, to install a binding. The binding will find the hardware automatically or you have to configure the correct address (as here… set the ip address). After that, the thing does exist in openHAB2.
simple mode -> Take a look at Paper UI -> Configuration -> System -> Item Linking. If this parameter (org.eclipse.smarthome.links) is set to ON, openHAB will link every standard channel of a new thing to a new item. These items will be automatically generated. openHAB makes use of UID to ensure that the names of the items are unique. In question of chromecast the name starts with chromecast_ and ends with _appId.
You can lookup these names in Paper UI -> Configuration -> Things -> chromecast thing (here livingroomcc) -> channels -> show more (on the right side, per channel).
If simple mode is switched off, openHAB won’t generate items and there won’t be no items with _appId at all.
still cannot get this to work, here is where I am at
Things are setup as
wemo:socket:lrspeakers [udn=“Socket-1_0-221707K110032E”]
chromecast:audio:livingroomcastaudio “living room speakers” [ ipAddress=“192.168.20.107”]
Items are setup as
Switch lrspeakers_switch “Living room speakers [stateformat]” { channel=“wemo:socket:Livingroomswitch:state” }
rule "Turn on kitchen speakers when Chromecast starts playing music"
when
Item ccmusicliving changed
then
{
logInfo("RULE.AUDIO", "Chromecast id changed!")
// 36061251 Pandora
// 2872939A Google Play Music
if (ccmusicliving.state == "36061251"
|| ccmusicliving.state == "2872939A") {
lrspeakers_switch.sendCommand(ON)
}
}
end
If im doing something super dumb im sorry just starting to pull my hair out here
rule "Turn on kitchen speakers when Chromecast starts playing music"
when
Item ccmusicliving changed
then
logInfo("RULE.AUDIO", "Chromecast id changed! New id is {}",ccmusicliving.state.toString)
// 36061251 Pandora
// 2872939A Google Play Music
if (ccmusicliving.state.toString == "36061251"
|| ccmusicliving.state.toString == "2872939A") {
lrspeakers_switch.sendCommand(ON)
}
end
Please pay attention to .toString. Keep in mind, that a state is not the same as a string.
I guess you got the chromecast ids from events.log?