Error multizone_status chromecast binding

No, I don’t believe so.

1 Like

it’s a dependency, why the binding isn’t just update ?
there are things I don’t understand with openhab

Because it doesn’t work that way. Releases use the binding version that was built with the release. Of course you could try uninstalling the binding, then downloading the latest version of the binding into the addons directory. But then you might need to resolve the 3rd party library dependencies yourself (by also downloading those to addons). But, if the third party library is not OSGI-wrapped, then there’s even more fiddling involved. This is why I made the decision a long time ago to run snapshots, but this approach is not for everyone as it involves some risk…

Same error here…

Could not resolve type id ‘MULTIZONE_STATUS’ into a subtype of…

I tried very hard to get into git, maven and openhab manuel instllation to get the new api running without waiting for a new release. Unitl now with no success.

Here are my steps. Perhaps anyone can find my mistake:
1.) Uninstall the regular chromecast binding within the paperUI
2.) log into the machine on with openhab is installed
3.) create folder in the home dir and clone then api-dir

git clone GitHub - vitalidze/chromecast-java-api-v2: Java implementation of ChromeCast V2 protocol client

4.) change into the cloned dir
5.) edit pom.xml and add the folloning lines:

<dependency>
    <groupId>su.litvak.chromecast</groupId>
   <artifactId>api-v2</artifactId>
    <version>0.11.1</version>
  </dependency>

6.) Compile the api => sucessful api-v2-0.11.2-SNAPSHOT.jar in the target dir

mvn compile

7.) create new dir for addons and clone then addons from git

git clone GitHub - openhab/openhab2-addons: This is an archive of the full history of the openhab2-addons repo.

8.) change to the chromecast binding dir

./openhab2-addons/bundles/org.openhab.binding.chromecast/

9.) edit the pom.xml and add these lines

<dependency>
  <groupId>su.litvak.chromecast</groupId>
  <artifactId>api-v2</artifactId>
  <version>0.11.2-SNAPSHOT</version>
  <scope>system</scope>
  <systemPath>$path_to_the_builted api/api-v2-0.11.2-SNAPSHOT.jar</systemPath>
</dependency>

10.) build the chromecast buinding => sucessfull org.openhab.binding.chromecast-2.5.0-SNAPSHOT.jar
11.) copy then org.openhab.binding.chromecast-2.5.0-SNAPSHOT.jar to the addon dir

In my case /usr/share/openhab2/addons
(I also tried to copy then api-v2-0.11.2-SNAPSHOT.jar into the same dir)

12.) change own and the rights of the file
13.) restart openhab

sudo systemctl restart openhab2.service

Unfortunately I receive the following error:

Could not resolve module: org.openhab.binding.chromecast [238] Unresolved requirement: Import-Package: su.litvak.chromecast.api.v2; version="[0.11.0,1.0.0)

Does anyone find the mistake?

what command to build? (for point 10.)

This command:

Hi,
Meanwhile, is there a way not to log the exceptions? I tried with

log:set ERROR openhab-binding-chromecast

but I’m still logging them.
Thanks.

may be try in org.ops4j.pax.logging.cfg , before log enhancement line put :

log enhancement
log4j2.appender.out.filter.chromecast.type = RegexFilter
log4j2.appender.out.filter.chromecast.regex = .* litvak.*
log4j2.appender.out.filter.chromecast.onMatch = DENY
log4j2.appender.out.filter.chromecast.onMisMatch = ACCEPT

But need confirmation , because not sure

I understand your frustration, I feel the same way. In the past, I was always able to wait for a new release of openhab, but these days it might take a long time before that happens (latest stable 2.4.0 is from Dec 17, 2018), and running the latest binding yourself is pretty complex, as Mark explains nicely.

As a solution or work-around I’ve started using node-red plugins where possible, as all of my rules are inside Node-RED instead of OpenHAB.

I’ve build a new version of the binding with the fix:

org.openhab.binding.chromecast-2.5.0-SNAPSHOT.jar

Maybe you can see if it fixes the issue?

You can also update the binding on the console using:

openhab> bundle:list | grep Chromecast
213 │ Active │  80 │ 2.5.0.201910030417    │ openHAB Add-ons :: Bundles :: Chromecast Binding
openhab> bundle:update 213 https://github.com/wborn/openhab2-addons/releases/download/chromecast-multizone-status-tag/org.openhab.binding.chromecast-2.5.0-SNAPSHOT.jar
openhab> bundle:list | grep Chromecast
213 │ Active │  80 │ 2.5.0.201910031158    │ openHAB Add-ons :: Bundles :: Chromecast Binding

Make sure you update 213 to the correct bundle ID you see for your own openHAB instance because if you update the wrong bundle OH might stop working! :slight_smile:

New bonding is on 2.5.0 Milestone openhabian or only 2.5.0 snapshot openhabian ?

It’s build using the code from the latest master. I gave it a brief test and it works with the M3 and recent snapshot builds.

Ok thank you :slight_smile: because I am on openhabian 2.4 , so I need to upgrade to M3 ?

It doesn’t work easily with 2.4.0 @Fiftiz because it also depends on Jackson which was only added as a feature in openHAB 2.5.0:

195 │ Active    │  80 │ 2.4.0                  │ HABPanel User Interface
196 │ Active    │  80 │ 2.4.0                  │ HomeBuilder User Interface
197 │ Resolved  │  75 │ 2.4.0                  │ openHAB Paper UI Theme Fragment, Hosts: 193
198 │ Installed │  80 │ 2.5.0.201910031158     │ openHAB Add-ons :: Bundles :: Chromecast Binding
openhab> bundle:start 198
Error executing command: Error executing command on bundles:
	Error starting bundle 198: Could not resolve module: org.openhab.binding.chromecast [198]
  Unresolved requirement: Import-Package: com.fasterxml.jackson.annotation; version="[2.9.0,3.0.

ok thank you @wborn

I have now trouble with chromecast volume.
When i stream music from iphone app (spotify) and change volume from mobile, than the volume will loop.
Also sometimes when I change the volume from openahb and play chromecast from the mobile app spotify.

In openhab log:

2019-10-05 13:38:18.921 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume1' received command 0
2019-10-05 13:38:19.002 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 68
2019-10-05 13:38:19.014 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume2' received command 32
2019-10-05 13:38:19.033 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume2' received command 0
2019-10-05 13:38:19.055 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 100
2019-10-05 13:38:19.071 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 64
2019-10-05 13:38:19.093 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 51
2019-10-05 13:38:19.188 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 100
2019-10-05 13:38:19.233 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume4' received command 56
2019-10-05 13:38:19.305 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume2' received command 8
2019-10-05 13:38:19.337 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume3' received command 66
2019-10-05 13:38:19.357 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume3' received command 0
2019-10-05 13:38:19.377 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 54
2019-10-05 13:38:19.404 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume2' received command 32
2019-10-05 13:38:19.420 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 100
2019-10-05 13:38:19.446 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume4' received command 0
2019-10-05 13:38:19.468 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume4' received command 76
2019-10-05 13:38:19.493 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 47
2019-10-05 13:38:19.537 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume2' received command 31
2019-10-05 13:38:19.575 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 92
2019-10-05 13:38:19.593 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume4' received command 74
2019-10-05 13:38:19.630 [ome.event.ItemCommandEvent] - Item 'Google_Asistent_Volume5' received command 42

Hi @Fiftiz,
I have no “#log enhancement” line. I added it before the “# OSGi appender” line, but I’m still logging the exceptions.

Hi Wouter…
I just downloaded the .jar today. Wen I manually install the .jar in the addons folder, I get this error:

2019-10-29 09:33:54.949 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.chromecast-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.chromecast [295]
  Unresolved requirement: Import-Package: com.fasterxml.jackson.annotation; version="[2.9.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

I´m using openhabian hasslefree openhab 2.5M2.
EDIT: I dont see jackson.annotation beeing part of openhab 2.5 anywhere like you mention a few post back?

The Jackson feature PR was merged (Aug 17) after 2.5.0.M2 was released (Aug 9).