Page 2 of 11

Re: Python Plugin: Chromecast

Posted: Thursday 22 November 2018 16:52
by DutchHans
Got it working... This is just brilliant!
5 Google Homes... fantastic...

One question...
Is it also possible to determine which Chromecast is active?.. i mean.. if I ask in the livingroom if the dishwasher is ready...that the Chromecast from the livingroom answers.. and when I ask the same question in the bedroom..that the Chromecast in the bedroom answers

Hans

Re: Python Plugin: Chromecast

Posted: Thursday 22 November 2018 18:03
by snellejellep
It is working now but i forgot one of the dependencies that came with the update.

Note: it now does not turn to other when i stop playing but it stays on the app it was playing, is that intended behaviour or somthing you are figuring out because i would like my stuff to turn on when i start casting amd turn off when i stop but right now i do not get the off report.

Re: Python Plugin: Chromecast

Posted: Thursday 22 November 2018 21:08
by assenzuid
Updated to the latest plugin.py.

Now i get this error message

Code: Select all

(Chromecast status) You have set a password, but have not excluded your local ip. Please do so, then restart domoticz
I have filled my local network under Local Networks in Domoticz setting page.

Re: Python Plugin: Chromecast

Posted: Thursday 22 November 2018 22:33
by dextm80

Code: Select all

2018-11-22 21:49:09.116 Error: (Chomecast) Error on line 233 Error is list index out of range 
????

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 8:29
by Ewaldharmsen
I have just published version 1.1.5. Please check again

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 11:22
by toutazimuth
Ewaldharmsen wrote: Friday 23 November 2018 8:29 I have just published version 1.1.5. Please check again
Rasberry Pi
Domoticz beta V4.10224

Ewaldharmsen, thank you for the work done
Network error for me.
Should I change network addresses and port in the plugin (my Domoticz adress is not 127.0.0.1) ?

Code: Select all

2018-11-23 11:17:06.298 Error: (chrome) Error on line 355 Error is HTTPConnectionPool(host='127.0.0.1', port=8080): Max retries exceeded with url: /json.htm?type=command&param=saveuservariable&vname=TVcuisine&vtype=2&vvalue= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x672c3bf0>: Failed to establish a new connection: [Errno 111] Connection refused',))
2018-11-23 11:17:06.298 Error: (chrome) 'onStart' failed 'UnboundLocalError':'local variable 'result' referenced before assignment'.
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 317 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 210 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 359 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices
2018-11-23 11:17:15.815 Error: (chrome) Error on line 244 Error is list index out of range

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 12:06
by Ewaldharmsen
toutazimuth wrote: Friday 23 November 2018 11:22
Ewaldharmsen wrote: Friday 23 November 2018 8:29 I have just published version 1.1.5. Please check again
Rasberry Pi
Domoticz beta V4.10224

Ewaldharmsen, thank you for the work done
Network error for me.
Should I change network addresses and port in the plugin (my Domoticz adress is not 127.0.0.1) ?

Code: Select all

2018-11-23 11:17:06.298 Error: (chrome) Error on line 355 Error is HTTPConnectionPool(host='127.0.0.1', port=8080): Max retries exceeded with url: /json.htm?type=command&param=saveuservariable&vname=TVcuisine&vtype=2&vvalue= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x672c3bf0>: Failed to establish a new connection: [Errno 111] Connection refused',))
2018-11-23 11:17:06.298 Error: (chrome) 'onStart' failed 'UnboundLocalError':'local variable 'result' referenced before assignment'.
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 317 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 210 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-23 11:17:06.298 Error: (chrome) ----> Line 359 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices
2018-11-23 11:17:15.815 Error: (chrome) Error on line 244 Error is list index out of range


Wow I didn't even know that was possible, but fixed in version 1.1.6

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 12:55
by DutchHans
What do you mean?...
Ewaldharmsen wrote: Friday 23 November 2018 12:06 Wow I didn't even know that was possible, but fixed in version 1.1.6

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 19:15
by DutchHans
Hi Ewald,

Just installed the latest version 1.16 and from all Google Minis(5) I got the same Error:

2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range

every 10 seconds.

And.. its not speaking the variable string anymore....

any Ideas?

Regards, Hans

Re: Python Plugin: Chromecast

Posted: Friday 23 November 2018 22:07
by dextm80
DutchHans wrote: Friday 23 November 2018 19:15 Hi Ewald,

Just installed the latest version 1.16 and from all Google Minis(5) I got the same Error:

2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range

every 10 seconds.

And.. its not speaking the variable string anymore....

any Ideas?

Regards, Hans

Code: Select all

2018-11-23 22:06:07.404 Error: (Chomecast) Error on line 244 Error is list index out of range 
same error here


and before this error:

Code: Select all

 2018-11-24 17:53:10.644 Status: (Chomecast) Connected to Chromecast
2018-11-24 17:53:10.725 Error: (Chomecast) Error on line 355 Error is Expecting value: line 1 column 1 (char 0)
2018-11-24 17:53:10.726 Error: (Chomecast) 'onStart' failed 'UnboundLocalError':'local variable 'result' referenced before assignment'.
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 317 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 210 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 359 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices 

Re: Python Plugin: Chromecast

Posted: Saturday 24 November 2018 18:53
by Ewaldharmsen
dextm80 wrote: Friday 23 November 2018 22:07
DutchHans wrote: Friday 23 November 2018 19:15 Hi Ewald,

Just installed the latest version 1.16 and from all Google Minis(5) I got the same Error:

2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range
2018-11-23 19:12:43.241 Error: (CC) Error on line 244 Error is list index out of range

every 10 seconds.

And.. its not speaking the variable string anymore....

any Ideas?

Regards, Hans

Code: Select all

2018-11-23 22:06:07.404 Error: (Chomecast) Error on line 244 Error is list index out of range 
same error here


and before this error:

Code: Select all

 2018-11-24 17:53:10.644 Status: (Chomecast) Connected to Chromecast
2018-11-24 17:53:10.725 Error: (Chomecast) Error on line 355 Error is Expecting value: line 1 column 1 (char 0)
2018-11-24 17:53:10.726 Error: (Chomecast) 'onStart' failed 'UnboundLocalError':'local variable 'result' referenced before assignment'.
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 317 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 210 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 17:53:10.726 Error: (Chomecast) ----> Line 359 in '/home/x/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices 
Check you hardware, I have added an extra field which nerds to be filled.Somehow the default foes not work on upgrade

Re: Python Plugin: Chromecast

Posted: Saturday 24 November 2018 19:01
by dextm80

Check you hardware, I have added an extra field which nerds to be filled.Somehow the default foes not work on upgrade
which fields?

Firefox_Screenshot_2018-11-24T18-00-13.849Z.png
Firefox_Screenshot_2018-11-24T18-00-13.849Z.png (10.28 KiB) Viewed 1974 times

Re: Python Plugin: Chromecast

Posted: Saturday 24 November 2018 21:38
by assenzuid
Updated to the latest version

Code: Select all

2018-11-24 21:36:44.327 Error: (Chromecast status) Error on line 355 Error is Invalid URL '/json.htm?type=command&param=saveuservariable&vname=Chromecast Video&vtype=2&vvalue=': No schema supplied. Perhaps you meant http:///json.htm?type=command&param=saveuservariable&vname=Chromecast Video&vtype=2&vvalue=?
2018-11-24 21:36:44.327 Error: (Chromecast status) 'onStart' failed 'UnboundLocalError':'local variable 'result' referenced before assignment'.
2018-11-24 21:36:44.327 Error: (Chromecast status) ----> Line 317 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 21:36:44.327 Error: (Chromecast status) ----> Line 210 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-24 21:36:44.327 Error: (Chromecast status) ----> Line 359 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices

Re: Python Plugin: Chromecast

Posted: Saturday 24 November 2018 23:07
by mark.sellwood
A new field has been added "Domoticz url and port:" you need to fill this in. ie http://xxx.xxx.xxx.xxx:8080

Re: Python Plugin: Chromecast

Posted: Saturday 24 November 2018 23:29
by dextm80
mark.sellwood wrote: Saturday 24 November 2018 23:07 A new field has been added "Domoticz url and port:" you need to fill this in. ie http://xxx.xxx.xxx.xxx:8080
Yes, already did it but errors still remains

Re: Python Plugin: Chromecast

Posted: Sunday 25 November 2018 2:08
by maxtrash
nice plugin, happy with it!
One thing I wonder though: can't get the talking to work. After entering the text in the variable I heard the regular ding but no spoken text. The plugin did tell me name of the song being played though it is functioning.
Any idea how I could debug this?

Re: Python Plugin: Chromecast

Posted: Sunday 25 November 2018 10:09
by bramski
Thanks for the plugin. I was also struggling to get it up and running.

For everyone having the list index errors please try the following.

- Ssh into your domoticz instance
- Execute `curl http://127.0.0.1:8080/json.htm`

When you get a 401 unauthorized, this is your problem. This means your domoticz instance cannot access the API without a username/password.
You can set this up in "Setup" -> "Local networks". Make sure you add 127.0.0.* there.
Try again using the the curl command. If you get a JSON response you can re-enable the chromecast plugin and it should start creating devices.

Re: Python Plugin: Chromecast

Posted: Sunday 25 November 2018 10:32
by dextm80
bramski wrote: Sunday 25 November 2018 10:09 Thanks for the plugin. I was also struggling to get it up and running.

For everyone having the list index errors please try the following.

- Ssh into your domoticz instance
- Execute `curl http://127.0.0.1:8080/json.htm`

When you get a 401 unauthorized, this is your problem. This means your domoticz instance cannot access the API without a username/password.
You can set this up in "Setup" -> "Local networks". Make sure you add 127.0.0.* there.
Try again using the the curl command. If you get a JSON response you can re-enable the chromecast plugin and it should start creating devices.
for me not resolve problem, thanks

Re: Python Plugin: Chromecast

Posted: Sunday 25 November 2018 10:34
by bramski
dextm80 wrote: Sunday 25 November 2018 10:32
bramski wrote: Sunday 25 November 2018 10:09 Thanks for the plugin. I was also struggling to get it up and running.

For everyone having the list index errors please try the following.

- Ssh into your domoticz instance
- Execute `curl http://127.0.0.1:8080/json.htm`

When you get a 401 unauthorized, this is your problem. This means your domoticz instance cannot access the API without a username/password.
You can set this up in "Setup" -> "Local networks". Make sure you add 127.0.0.* there.
Try again using the the curl command. If you get a JSON response you can re-enable the chromecast plugin and it should start creating devices.
for me not resolve problem, thanks
What is the output of the curl command?

Re: Python Plugin: Chromecast

Posted: Sunday 25 November 2018 10:38
by dextm80
bramski wrote: Sunday 25 November 2018 10:34
dextm80 wrote: Sunday 25 November 2018 10:32
bramski wrote: Sunday 25 November 2018 10:09 Thanks for the plugin. I was also struggling to get it up and running.

For everyone having the list index errors please try the following.

- Ssh into your domoticz instance
- Execute `curl http://127.0.0.1:8080/json.htm`

When you get a 401 unauthorized, this is your problem. This means your domoticz instance cannot access the API without a username/password.
You can set this up in "Setup" -> "Local networks". Make sure you add 127.0.0.* there.
Try again using the the curl command. If you get a JSON response you can re-enable the chromecast plugin and it should start creating devices.
for me not resolve problem, thanks
What is the output of the curl command?

Code: Select all

{
   "status" : "ERR"
}

i use my domoticz ip and port