- Platform information:
- Hardware: AMD64
- OS: Windows 10/10.0 (amd64)
- Java Runtime Environment: Azul Systems, Inc. 11.0.12 (Zulu11.50+19-CA)
- openHAB version: openHAB 3.2.0.M1
Hi All
I am having issues setting the volume of my Google Home Minis via the Chromecast binding.
The volume changes seem to revert after a few seconds and I am not sure why.
Couple of scenarios used for testing/debugging.
Simple rule based change to only adjust the volume via the volume channel:
rule "Test Say"
when
Item Test_Say received command ON
then
LoungeSpeaker_Volume.postUpdate(100)
Test_Say.postUpdate(OFF)
end
Results in the following:
14:30:56.520 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Test_Say' received command ON
14:30:56.535 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Test_Say' changed from OFF to ON
14:30:56.535 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LoungeSpeaker_Volume' changed from 12 to 100
14:30:56.535 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Test_Say' changed from ON to OFF
14:31:02.949 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LoungeSpeaker_Volume' changed from 100 to 12
The following rule which plays audio results in the audio fading out during the playSound as the volume reverts. The sound file is 6 seconds long.
rule "Test Say"
when
Item Test_Say received command ON
then
playSound("chromecast:chromecast:6df7deca73b62299e64480d680f5d95f","gun_1618.wav", new PercentType(100))
Test_Say.postUpdate(OFF)
end
Logs as follows:
14:40:19.615 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Test_Say' received command ON
14:40:19.630 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Test_Say' changed from OFF to ON
14:40:22.160 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LoungeSpeaker_Volume' changed from 12 to 100
14:40:27.253 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Test_Say' changed from ON to OFF
14:40:27.400 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'LoungeSpeaker_Volume' changed from 100 to 12
If I manually adjust the volume using the LoungeSpeaker_Volume
item, the volume adjustment is maintained
The obvious issue with this is that the audio fades out before the playSound
completes which makes adjusting the volume a pointless excercise.
I would prefer to use the LoungeSpeaker_Volume.postUpdate(100)
as this removes the nuisance of the Google Home mini volume change jingle which I have seen a few posts about.
Any suggestions?
Thanks
Mark