Error in the new Chromecast binding when using Chrome cast audio groups

I running OH2.2, with the newest chromcast binding. I get this error when trying the change the volume of my chromcast audio groups.
Can anyone help, please?

2017-11-28 22:50:50.040 [WARN ] [su.litvak.chromecast.api.v2.Channel ] - Error while handling
org.codehaus.jackson.map.JsonMappingException: Could not resolve type id 'DEVICE_UPDATED' into a subtype of [simple type, class su.litvak.chromecast.api.v2.StandardResponse]
 at [Source: N/A; line: -1, column: -1]
	at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) ~[429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownTypeException(StdDeserializationContext.java:273) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:117) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:74) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:89) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.deser.StdDeserializerProvider$WrappedDeserializer.deserialize(StdDeserializerProvider.java:494) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2695) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1990) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at su.litvak.chromecast.api.v2.EventListenerHolder.deliverEvent(EventListenerHolder.java:56) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at su.litvak.chromecast.api.v2.Channel.notifyListenersOfSpontaneousEvent(Channel.java:440) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at su.litvak.chromecast.api.v2.Channel.access$600(Channel.java:50) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
	at su.litvak.chromecast.api.v2.Channel$ReadThread.run(Channel.java:186) [429:org.openhab.binding.chromecast:2.2.0.201711260007]
2017-11-28 22:50:49.982 [ERROR] [nternal.profiles.ProfileCallbackImpl] - Exception occurred while calling handler: java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:225) ~[?:?]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194) ~[?:?]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:88) ~[?:?]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:67) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$4(CommunicationManager.java:245) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:?]
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) [?:?]
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) [?:?]
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) [?:?]
	at java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3566) [?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:?]
	at org.eclipse.smarthome.core.thing.internal.CommunicationManager.receiveCommand(CommunicationManager.java:240) [314:org.eclipse.smarthome.core.thing:0.9.0.201711242229]
	at org.eclipse.smarthome.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:108) [314:org.eclipse.smarthome.core.thing:0.9.0.201711242229]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:212) [307:org.eclipse.smarthome.core:0.9.0.201711242229]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1) [307:org.eclipse.smarthome.core:0.9.0.201711242229]
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:186) [307:org.eclipse.smarthome.core:0.9.0.201711242229]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.NullPointerException
	at su.litvak.chromecast.api.v2.ChromeCast.setVolumeByIncrement(ChromeCast.java:252) ~[?:?]
	at org.openhab.binding.chromecast.internal.ChromecastCommander.handleVolume(ChromecastCommander.java:178) ~[?:?]
	at org.openhab.binding.chromecast.internal.ChromecastCommander.handleCommand(ChromecastCommander.java:64) ~[?:?]
	at org.openhab.binding.chromecast.handler.ChromecastHandler.handleCommand(ChromecastHandler.java:147) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl$1.call(ProfileCallbackImpl.java:70) ~[?:?]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl$1.call(ProfileCallbackImpl.java:1) ~[?:?]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:223) ~[?:?]
	... 28 more

same error here - did you find a solution?

No, sorry. It seems to only happen some times, I noticed, but I didn’t find a patteren. :confused:

Im runnning Openhasbian 2.2 on a raspberry Pi 3

I have this on a Synology DS213j DSM6.1
with Openhab 2.2.0.010
Package shows in DSM as not running, although it is working.

Do you have the error then using groups or just single units? I see my error only on chromcast audio groups but as I recall I also saw it for single units (controlling them though a group)
I only experince this while changing the volume.

just checked and im seeing this too. although it seems to be working still. I changed the volume of an audio but its currently playing in a group and the error seems to be straight after the group item sees the audio change.

2.3.0-SNAPSHOT Build #1160
231 │ Active │ 80 │ 2.3.0.201801020943 │ Chromecast Binding

I’m using also groups, but the warning doesn`t tell on which thing or item
it is about.
Today I couldn’t stream to any of the devices (all sony with chrome
built-in), never had this before.
None showed in Google Home App.
They came back after I unplugged.

Same here. Simple command in rule:

GH_Kitchen_Volume.sendCommand(30)

It works, so I am more than happy. But log is full of errors:

2018-03-28 11:31:52.248 [WARN ] [su.litvak.chromecast.api.v2.Channel ] - Error while handling
org.codehaus.jackson.map.JsonMappingException: Could not resolve type id 'DEVICE_UPDATED' into a subtype of [simple type, class su.litvak.chromecast.api.v2.StandardResponse]
 at [Source: N/A; line: -1, column: -1]
        at su.litvak.chromecast.api.v2.EventListenerHolder.deliverEvent(EventListenerHolder.java:56) [235:org.openhab.binding.chromecast:2.2.0]
        at su.litvak.chromecast.api.v2.Channel.notifyListenersOfSpontaneousEvent(Channel.java:440) [235:org.openhab.binding.chromecast:2.2.0]
        at su.litvak.chromecast.api.v2.Channel.access$600(Channel.java:50) [235:org.openhab.binding.chromecast:2.2.0]
        at su.litvak.chromecast.api.v2.Channel$ReadThread.run(Channel.java:186) [235:org.openhab.binding.chromecast:2.2.0]

interessting. still happens with OH 2.3
has anyone ever created an issue in github?

I’m also seeing this. I’ll check github and log it if it’s not there.

Edit: Issue created
https://github.com/openhab/openhab2-addons/issues/3719

1 Like

Interesting though i’ve removed all java versions apart from zulu and updated to openHAB 2.4.0 Build #1309 and it doesn’t seem to be having a problem at the moment. I guess time will tell though.

I upgraded to version 2.4 v. 1310, and it works but I have the good old, spaming of my log:

2018-07-10 13:13:05.322 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 37 to 42

2018-07-10 13:13:07.040 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from CC1AD845 to 705D30C6

2018-07-10 13:13:07.060 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 42 to 37

2018-07-10 13:13:15.293 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from 705D30C6 to CC1AD845

2018-07-10 13:13:15.309 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 37 to 42

2018-07-10 13:13:16.970 [vent.ItemStateChangedEvent] - intPlug_6_Plugs_1_Load changed from 2.79 to 2.90

2018-07-10 13:13:16.997 [vent.ItemStateChangedEvent] - intPlug_6_Plugs_1_Temperature changed from 50.51 to 50.43

2018-07-10 13:13:17.122 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from CC1AD845 to 705D30C6

2018-07-10 13:13:17.130 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 42 to 37

2018-07-10 13:13:25.291 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from 705D30C6 to CC1AD845

2018-07-10 13:13:25.333 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 37 to 42

2018-07-10 13:13:27.058 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from CC1AD845 to 705D30C6

2018-07-10 13:13:27.061 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 42 to 37

2018-07-10 13:13:35.294 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from 705D30C6 to CC1AD845

2018-07-10 13:13:35.308 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 37 to 42

2018-07-10 13:13:37.040 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from CC1AD845 to 705D30C6

2018-07-10 13:13:37.056 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 42 to 37

2018-07-10 13:13:45.303 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from 705D30C6 to CC1AD845

2018-07-10 13:13:45.336 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 37 to 42

2018-07-10 13:13:47.051 [vent.ItemStateChangedEvent] - AllSpeakers_AppId changed from CC1AD845 to 705D30C6

2018-07-10 13:13:47.075 [vent.ItemStateChangedEvent] - intPlug_6_Plugs_1_Load changed from 2.90 to 68.90

2018-07-10 13:13:47.104 [vent.ItemStateChangedEvent] - CC_all_audioGroup_Volume changed from 42 to 37

Is this what is mentioned in the comment on github?

I haven’t seen that issue with the chromecast, only with my light groups, so i’m guessing you have the volumes in a group in openhab. I don’t do that, I just add the ChromeCast Group as another ChromeCast and hide any individual ones which are apart of the group when the group is playing.

Hi I have a very strange behaviour when a Google home mini is part of a speaker group the appName and appId are reflected fine when there is broadcasting via the group (e.g. triggered by another Google home mini that has the group as a default speaker).

However when I start radio (TuneIn) on this mini that does not have the group as default output but is part of the group the following stance behaviour happens.

The music (TuneIn) start on that Google home mini only as is expected.
BUT the AppNamen and AppID do the following it first changes to TuneIn and the TuneIn ID but the immediately changes again to UNDEF. The Idling remains off though.

In the Google Home app it is correctly reflected.

here is the log

2018-11-24 09:49:45.522 [vent.ItemStateChangedEvent] - GoogleHomeMiniBureau_AppName changed from UNDEF to TuneIn Free
2018-11-24 09:49:45.525 [vent.ItemStateChangedEvent] - GoogleHomeMiniBureau_AppId changed from UNDEF to 12F05308
2018-11-24 09:49:45.526 [vent.ItemStateChangedEvent] - GoogleHomeMiniBureau_Idle changed from ON to OFF
2018-11-24 09:49:48.668 [vent.ItemStateChangedEvent] - GoogleHomeMiniBureau_AppName changed from TuneIn Free to UNDEF
2018-11-24 09:49:48.669 [vent.ItemStateChangedEvent] - GoogleHomeMiniBureau_AppId changed from 12F05308 to UNDEF

So basically it means it’s impossible to show what’s playing on a Google Home or Google Home mini that is part of an audio group unless all of the members of the group have the group as default speaker.