Page 5 of 11

Re: Python Plugin: Chromecast

Posted: Friday 21 December 2018 12:00
by Ewaldharmsen
Your lso just create the user variable yourself, just create a variable named "Badkamer"

Re: Python Plugin: Chromecast

Posted: Friday 21 December 2018 15:12
by Sollbohakan
Have this error in Domoticz log:

2018-12-21 14:48:05.682 Error: (Chromecasts) Error on line 314 Error is 'NoneType' object has no attribute 'display_name'

2018-12-21 15:17:49.925 Error: (Chromecasts) http://127.0.0.1:8192/json.htm?type=com ... iable&idx= did not return any results. ([1, Chromecast('192.168.0.101', port=8009, device=DeviceStatus(friendly_name='Vardagsrum', model_name='Chromecast Audio', manufacturer='Google Inc.', uuid=UUID('ec8b31a6-f59e-524e-34c8-49fd10cf3331'), cast_type='audio')), '', 'CONNECTED', 0])
2018-12-21 15:17:49.954 Error: (Chromecasts) http://127.0.0.1:8192/json.htm?type=com ... iable&idx= did not return any results. ([0, Chromecast('192.168.0.235', port=8009, device=DeviceStatus(friendly_name='Mini1', model_name='Google Home Mini', manufacturer='Google Inc.', uuid=UUID('7e9a0c3e-fb27-1b72-7008-d51a93bb0f11'), cast_type='cast')), '', 'CONNECTED', 0])


I have only 1 Google home mini and 1 Chromecast Audio.

Re: Python Plugin: Chromecast

Posted: Friday 21 December 2018 15:51
by jeroenkl
Ewaldharmsen wrote: Friday 21 December 2018 12:00 Your lso just create the user variable yourself, just create a variable named "Badkamer"
Ok, still same issue.

Re: Python Plugin: Chromecast

Posted: Saturday 22 December 2018 0:37
by dextm80
ok i understand my error. Wrong error path installing dipendencies

sudo pip3 install pychromecast -t /home/HEREPUTMYUSER/domoticz/plugins/ChromecastPlugin

fyi now works all ok thanks

Re: Python Plugin: Chromecast

Posted: Saturday 22 December 2018 8:21
by jeroenkl
Sollbohakan wrote: Friday 21 December 2018 15:12 Have this error in Domoticz log:

2018-12-21 14:48:05.682 Error: (Chromecasts) Error on line 314 Error is 'NoneType' object has no attribute 'display_name'

2018-12-21 15:17:49.925 Error: (Chromecasts) http://127.0.0.1:8192/json.htm?type=com ... iable&idx= did not return any results. ([1, Chromecast('192.168.0.101', port=8009, device=DeviceStatus(friendly_name='Vardagsrum', model_name='Chromecast Audio', manufacturer='Google Inc.', uuid=UUID('ec8b31a6-f59e-524e-34c8-49fd10cf3331'), cast_type='audio')), '', 'CONNECTED', 0])
2018-12-21 15:17:49.954 Error: (Chromecasts) http://127.0.0.1:8192/json.htm?type=com ... iable&idx= did not return any results. ([0, Chromecast('192.168.0.235', port=8009, device=DeviceStatus(friendly_name='Mini1', model_name='Google Home Mini', manufacturer='Google Inc.', uuid=UUID('7e9a0c3e-fb27-1b72-7008-d51a93bb0f11'), cast_type='cast')), '', 'CONNECTED', 0])


I have only 1 Google home mini and 1 Chromecast Audio.
For me it is working again. Removed the script and removed manually the Chromecast dir.
Uservariables not removed
Re-install

thxs for the support

Re: Python Plugin: Chromecast

Posted: Sunday 23 December 2018 17:11
by EddyG
My Chromecast connected to the TV works fine, but my other devices (Google Home and Google Home mini) give an error.

Code: Select all

2018-12-23 17:04:20.899 Error: (Cast) Error on line 314 Error is 'NoneType' object has no attribute 'display_name'
Where is that attribute to be set?

Re: Python Plugin: Chromecast

Posted: Sunday 23 December 2018 17:53
by Amsterdam020
I tried to install the "Chromecast status and control plugin"
but i get this error in the log:

Code: Select all

2018-12-23 17:50:36.878 Error: chromecast hardware (21) thread seems to have ended unexpectedly
2018-12-23 17:50:36.879 Error: chromecast hardware (22) thread seems to have ended unexpectedly
I have created two instances so i have two rows..

When I try to delete the hardware in the hardware domoticz crashes and no webpage respond any longer.
How can i delete the hardware or somebody have another idea to solve this?

MODIFY: solved by beginning on a second pi

Re: Python Plugin: Chromecast

Posted: Sunday 23 December 2018 20:10
by EddyG
When ever I want to set audio level of one of the Google Home devices, I get the error:

Code: Select all

Error: (Cast) Error on line 409 Error is Trying to use the controller without it being registered with a Cast object.
Anyone any idea how to solve that?

Re: Python Plugin: Chromecast

Posted: Thursday 27 December 2018 22:40
by mark.sellwood
Domoticz V4.10303
Python version '3.5.3
ChromeCast version 3.1.0

This plugin appears to be working fine with my Home Hub but isn't working with my Home Mini's
If I try to make one of the Mini's say something I get the following in the log:-

Code: Select all

2018-12-27 21:33:06.220 Status: (ChromeCast) Will pronounce "Hello" on chromecast Office speaker
2018-12-27 21:33:06.221 Error: (ChromeCast) Error on line 335 Error is 'NoneType' object has no attribute 'display_name'
If I try to set the volume i get:-

Code: Select all

2018-12-27 21:34:56.178 Status: User: Admin initiated a switch command (2/Office speaker/Set Level)
2018-12-27 21:34:56.215 Error: (ChromeCast) Error on line 417 Error is 'Chromecast' object has no attribute 'Name'
I also note that if I ask one of the Mini's to play a radit channel it works fine but nothing is updated in the Plugin.
I also see the following errors in the log:-

Code: Select all

2018-12-28 03:42:43.338 Error: (ChromeCast) Error on line 221 Error is Can't convert 'NoneType' object to str implicitly
2018-12-28 03:43:21.171 Error: (ChromeCast) Error on line 154 Error is Can't convert 'ConnectionStatus' object to str implicitly
2018-12-29 04:23:14.563 Error: (ChromeCast) Error on line 104 Error is 'Idle'
Not sure how to get all the devices working.

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 13:18
by Ewaldharmsen
mark.sellwood wrote: Thursday 27 December 2018 22:40 Domoticz V4.10303
Python version '3.5.3
ChromeCast version 3.1.0

This plugin appears to be working fine with my Home Hub but isn't working with my Home Mini's
If I try to make one of the Mini's say something I get the following in the log:-

Code: Select all

2018-12-27 21:33:06.220 Status: (ChromeCast) Will pronounce "Hello" on chromecast Office speaker
2018-12-27 21:33:06.221 Error: (ChromeCast) Error on line 335 Error is 'NoneType' object has no attribute 'display_name'
If I try to set the volume i get:-

Code: Select all

2018-12-27 21:34:56.178 Status: User: Admin initiated a switch command (2/Office speaker/Set Level)
2018-12-27 21:34:56.215 Error: (ChromeCast) Error on line 417 Error is 'Chromecast' object has no attribute 'Name'
I also note that if I ask one of the Mini's to play a radit channel it works fine but nothing is updated in the Plugin.
I also see the following errors in the log:-

Code: Select all

2018-12-28 03:42:43.338 Error: (ChromeCast) Error on line 221 Error is Can't convert 'NoneType' object to str implicitly
2018-12-28 03:43:21.171 Error: (ChromeCast) Error on line 154 Error is Can't convert 'ConnectionStatus' object to str implicitly
2018-12-29 04:23:14.563 Error: (ChromeCast) Error on line 104 Error is 'Idle'
Not sure how to get all the devices working.
Can you check version 3.1.2?
I hope that solves the problem

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 13:19
by Ewaldharmsen
EddyG wrote: Sunday 23 December 2018 20:10 When ever I want to set audio level of one of the Google Home devices, I get the error:

Code: Select all

Error: (Cast) Error on line 409 Error is Trying to use the controller without it being registered with a Cast object.
Anyone any idea how to solve that?
should be solved in version 3.1.2

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 13:26
by mark.sellwood
Just done a git pull & now its reported that I'm on 3.1.2
Level control of my Home Hub is working fine but if I try to set the volume of a Home Mini i get:-

Code: Select all

2018-12-30 12:23:44.160 Status: User: Admin initiated a switch command (2/Office speaker/Set Level)
2018-12-30 12:23:44.180 Error: (ChromeCast) Error on line 409 Error is Trying to use the controller without it being registered with a Cast object.

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 13:36
by Ewaldharmsen
Can you try a full reboot?

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 15:13
by mark.sellwood
Tried a full reboot, that didn't help so I removed the plugin, rebooted, deleted the ChromcastPlugin directory, rebooted, added the plugin back along with pychromecast, rebooted, added the plugin back & I still have the error.
Log below.

Code: Select all

2018-12-30 14:04:56.470 Status: Domoticz V4.10304 (c)2012-2018 GizMoCuz
2018-12-30 14:04:56.483 Status: Build Hash: 30480b21, Date: 2018-12-30 08:37:02
2018-12-30 14:04:56.488 Status: Startup Path: /home/pi/domoticz/
2018-12-30 14:04:56.800 Status: EventSystem: reset all events...
2018-12-30 14:04:57.918 Active notification Subsystems: (0/13)
2018-12-30 14:04:57.869 Status: PluginSystem: Started, Python version '3.5.3'.
2018-12-30 14:04:57.963 Status: WebServer(HTTP) started on address: :: with port 8080
2018-12-30 14:04:58.063 Starting shared server on: :::6144
2018-12-30 14:04:58.046 Status: WebServer(SSL) started on address: :: with port 443
2018-12-30 14:04:58.054 Status: Proxymanager started.
2018-12-30 14:04:58.064 Status: TCPServer: shared server started...
2018-12-30 14:04:58.069 Status: RxQueue: queue worker started...
2018-12-30 14:05:00.072 Status: EventSystem: reset all events...
2018-12-30 14:05:00.074 Status: EventSystem: reset all device statuses...
2018-12-30 14:05:00.340 Status: PluginSystem: Entering work loop.
2018-12-30 14:05:00.701 Status: Python EventSystem: Initalizing event module.
2018-12-30 14:05:00.704 Status: EventSystem: Queue thread started...
2018-12-30 14:05:00.705 Status: EventSystem: Started
2018-12-30 14:07:46.879 Status: (Chromecast) Started.
2018-12-30 14:07:58.972 Status: (Chromecast) Initialized version 3.1.2, author 'Tsjippy'
2018-12-30 14:07:58.975 Status: (Chromecast) Entering work loop.
2018-12-30 14:07:58.986 Status: (Chromecast) Checking if images are loaded
2018-12-30 14:07:58.988 Status: (Chromecast) Starting up
2018-12-30 14:07:59.170 (Chromecast) Checking devices for Office speaker
2018-12-30 14:07:59.256 (Chromecast) Created uservariable for 'Office speaker'
2018-12-30 14:07:59.256 (Chromecast) Created 'Status' device for chromecast 'Office speaker'
2018-12-30 14:07:59.270 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.309 (Chromecast) Created 'Volume' device for chromecast 'Office speaker'
2018-12-30 14:07:59.315 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.340 (Chromecast) Created 'Title' device for chromecast 'Office speaker'
2018-12-30 14:07:59.346 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.367 (Chromecast) Created 'App' device for chromecast 'Office speaker'
2018-12-30 14:07:59.375 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.402 (Chromecast) Checking devices for Lounge display
2018-12-30 14:07:59.483 (Chromecast) Created uservariable for 'Lounge display'
2018-12-30 14:07:59.484 (Chromecast) Created 'Status' device for chromecast 'Lounge display'
2018-12-30 14:07:59.492 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.518 (Chromecast) Created 'Volume' device for chromecast 'Lounge display'
2018-12-30 14:07:59.525 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.557 (Chromecast) Created 'Title' device for chromecast 'Lounge display'
2018-12-30 14:07:59.563 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.584 (Chromecast) Created 'App' device for chromecast 'Lounge display'
2018-12-30 14:07:59.592 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.619 (Chromecast) Checking devices for Front bedroom speaker
2018-12-30 14:07:59.700 (Chromecast) Created uservariable for 'Front bedroom speaker'
2018-12-30 14:07:59.700 (Chromecast) Created 'Status' device for chromecast 'Front bedroom speaker'
2018-12-30 14:07:59.708 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.735 (Chromecast) Created 'Volume' device for chromecast 'Front bedroom speaker'
2018-12-30 14:07:59.741 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.766 (Chromecast) Created 'Title' device for chromecast 'Front bedroom speaker'
2018-12-30 14:07:59.772 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.793 (Chromecast) Created 'App' device for chromecast 'Front bedroom speaker'
2018-12-30 14:07:59.802 (Chromecast) Device Image update: 'Chromecast', Currently 0, should be 101
2018-12-30 14:07:59.828 (Chromecast) Devices check done
2018-12-30 14:07:59.909 (Chromecast) Found uservariable for Office speaker
2018-12-30 14:07:59.910 (Chromecast) Found uservariable for Lounge display
2018-12-30 14:07:59.910 (Chromecast) Found uservariable for Front bedroom speaker
2018-12-30 14:07:59.910 (Chromecast) Local ip address is 192.168.1.20
2018-12-30 14:07:59.911 (Chromecast) Starting file server on port 8000
2018-12-30 14:07:59.954 (Chromecast) Files in the '/tmp/' directory are now available on port 8000
2018-12-30 14:07:59.119 Status: Incoming connection from: 192.168.1.20
2018-12-30 14:07:59.969 Status: (Chromecast) Checking for available chromecasts
2018-12-30 14:08:09.536 (Chromecast) Found these chromecasts: Lounge display, Office speaker, Onkyo TX-L50 EB57F4, Front bedroom speaker
2018-12-30 14:08:09.537 (Chromecast) Registering listeners for Lounge display
2018-12-30 14:08:09.564 (Chromecast) Update Chromecast - App name-Lounge display: 0 - '0'
2018-12-30 14:08:09.599 (Chromecast) Update Chromecast - Volume-Lounge display: 2 - '50'
2018-12-30 14:08:09.600 (Chromecast) Done registering listeners for Lounge display
2018-12-30 14:08:09.601 (Chromecast) Registering listeners for Office speaker
2018-12-30 14:08:09.536 Status: (Chromecast) Connected to Lounge display
2018-12-30 14:08:09.601 Status: (Chromecast) Connected to Office speaker
2018-12-30 14:08:14.409 (Chromecast) Registering listeners for Front bedroom speaker
2018-12-30 14:08:14.408 Status: (Chromecast) Connected to Front bedroom speaker
2018-12-30 14:08:46.861 Status: User: Admin initiated a switch command (17/Chromecast - Volume-Office speaker/Set Level)
2018-12-30 14:08:46.885 Error: (Chromecast) Error on line 409 Error is Trying to use the controller without it being registered with a Cast object.

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 16:39
by Ewaldharmsen
I have no idea, here it just works.

Can you try version 3.1.3? That should print the cast object.

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 17:39
by mark.sellwood
Thanks, this is what I get with 3.1.3

Code: Select all

2018-12-30 16:34:34.382 Status: User: Admin initiated a switch command (17/Chromecast - Volume-Office speaker/Set Level)
2018-12-30 16:34:34.404 Error: (Chromecast) Somehow I cannot set the volume. The current chromecast used is this one: Chromecast('192.168.1.71', port=8009, device=DeviceStatus(friendly_name='Office speaker', model_name='Google Home Mini', manufacturer='Google Inc.', uuid=UUID('42ad2484-b19e-ce23-bad4-4f01b7c8ab8a'), cast_type='cast'))
I hope this helps

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 20:42
by Ewaldharmsen
mark.sellwood wrote: Sunday 30 December 2018 17:39 Thanks, this is what I get with 3.1.3

Code: Select all

2018-12-30 16:34:34.382 Status: User: Admin initiated a switch command (17/Chromecast - Volume-Office speaker/Set Level)
2018-12-30 16:34:34.404 Error: (Chromecast) Somehow I cannot set the volume. The current chromecast used is this one: Chromecast('192.168.1.71', port=8009, device=DeviceStatus(friendly_name='Office speaker', model_name='Google Home Mini', manufacturer='Google Inc.', uuid=UUID('42ad2484-b19e-ce23-bad4-4f01b7c8ab8a'), cast_type='cast'))
I hope this helps
Found the error, fixed in version 1.3.4: you cannot set the volume on a chrome cast audio device when no app is connected.

Re: Python Plugin: Chromecast

Posted: Sunday 30 December 2018 20:48
by mark.sellwood
Thanks, I'll give 3.1.4 a try tomorrow and let you know how it goes.

Re: Python Plugin: Chromecast

Posted: Monday 31 December 2018 9:03
by mark.sellwood
Hi, so with 3.1.4 I still can't control the volume.
In my Office I asked my Google Home Mini to play "Magic Radio" this happen s fine.
I previous versions of the plugin (sorry I don't remember what one) it would display "Magic Radio" in the Text display in the Utility tab, this doesn't happen now.
With the Google Home Mini playing the radio I cant control the Volume, I get the error

Code: Select all

2018-12-31 07:52:15.786 Status: (Chromecast) Cannot issue a command to 'Office speaker' when no app is connected.
I also note that you cant make the Home Mini say anything, I entered Hello on the Variable, in the log i see

Code: Select all

2018-12-31 07:52:49.311 Status: (Chromecast) Will pronounce "Hello" on chromecast Office speaker
2018-12-31 07:52:49.312 Error: (Chromecast) Error on line 312 Error is 'NoneType' object has no attribute 'display_name'
I hope this helps.

Re: Python Plugin: Chromecast

Posted: Monday 31 December 2018 9:43
by EddyG
Same here on plugin version 3.1.4. and Domoticz 4.10302