Page 1 of 11
Python Plugin: Chromecast
Posted: Tuesday 20 November 2018 8:24
by Ewaldharmsen
I created a plugin to retrieve Chromecasts statuses and control the Chromecasts from Domoticz.
See
https://github.com/Tsjippy/ChromecastPlugin/
Re: Python Plugin: Chromecast
Posted: Tuesday 20 November 2018 18:56
by DewGew
How do I use the message function?
Re: Python Plugin: Chromecast
Posted: Tuesday 20 November 2018 20:21
by Ewaldharmsen
Just add a value to the created variabele and the text will be spoken.
I use it voor voice messages and fill the variable from a lua script
Re: Python Plugin: Chromecast
Posted: Tuesday 20 November 2018 21:12
by ErikAtSpijk
Great, I've been trying to get pychromecast working for some time now, without succes as I struggled with the depeneces.
I do use the latest stable version of domoticz. Any idea why you need the latest domoticz beta to use this plug in? Do you have plans to allow the latest stable version?
Re: Python Plugin: Chromecast
Posted: Tuesday 20 November 2018 22:20
by assenzuid
Some errors in log
2018-11-20 22:18:36.499 Error: (Chromecast status) 'onStart' failed 'ConnectionError'.
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 275 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 180 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 312 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 75 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/api.py', function get
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 60 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/api.py', function request
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 533 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function request
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 646 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function send
2018-11-20 22:18:36.499 Error: (Chromecast status) ----> Line 516 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/adapters.py', function send
2018-11-20 22:18:46.049 Error: (Chromecast status) Error on line 210 Error is list index out of range
2018-11-20 22:18:46.049 Error: (Chromecast status) Error on line 210 Error is list index out of range
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 9:19
by snellejellep
great plugin but i have a couple of questions/bugs:
- when i try to edit the hardware settings under hardware in domoticz my domoticz will hang until i give a service restart and then all the changes i made are gone.
- what are the language codes to, in my case, set it to dutch?
- how can i let my chromecast speak the text i put in the variable, that is nowhere to be found in the readme on github unfortunately...
- why does the selector go to other if i stop casting netflix or youtube? i would rather have a option in the selector called off that is selected when nothing is playing
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 9:33
by EdwinK
snellejellep wrote: ↑Wednesday 21 November 2018 9:19
great plugin but i have a couple of questions/bugs:
- when i try to edit the hardware settings under hardware in domoticz my domoticz will hang until i give a service restart and then all the changes i made are gone.
Same here. I would like this plugin, but for now it's not working for me.
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 9:40
by Ewaldharmsen
ErikAtSpijk wrote: ↑Tuesday 20 November 2018 21:12
Great, I've been trying to get pychromecast working for some time now, without succes as I struggled with the depeneces.
I do use the latest stable version of domoticz. Any idea why you need the latest domoticz beta to use this plug in? Do you have plans to allow the latest stable version?
No, in the latest stable Domoticz just hangs on this:
(cc) Entering work loop.
2018-11-21 09:37:47.474 Status: (cc) Initialized version 1.0.0, author 'Tsjippy'
2018-11-21 09:37:47.692 Status: Python EventSystem: Initalizing event module.
2018-11-21 09:37:47.693 Status: EventSystem: Started
2018-11-21 09:37:47.693 Status: EventSystem: Queue thread started...
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 9:50
by Ewaldharmsen
snellejellep wrote: ↑Wednesday 21 November 2018 9:19
great plugin but i have a couple of questions/bugs:
- when i try to edit the hardware settings under hardware in domoticz my domoticz will hang until i give a service restart and then all the changes i made are gone.
- what are the language codes to, in my case, set it to dutch?
- how can i let my chromecast speak the text i put in the variable, that is nowhere to be found in the readme on github unfortunately...
- why does the selector go to other if i stop casting netflix or youtube? i would rather have a option in the selector called off that is selected when nothing is playing
1) Yes this is because I use a listener to achieve the changed status of the Chromecasts, but Domoticz python plugins cannot handle that for now.
In order to change any hardware settings you have to disable the hardware, restart domoticz, change the hardware, then re-enable it.
2) See
http://www.lingoes.net/en/translator/langcode.htm In your (and mine) case it is nl-NL
3) Just type in the message in the variable with the Chromecasts name
4) I will look into this.
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 10:12
by dextm80
Hi, i've this issue:
Code: Select all
2018-11-21 10:02:59.836 Error: (Chomecast) 'onStart' failed 'ConnectionError'.
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 275 in '/home/xxx/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 180 in '/home/xxx/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 312 in '/home/xxx/domoticz/plugins/ChromecastPlugin/plugin.py', function createDevices
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 75 in '/home/xxx/domoticz/plugins/ChromecastPlugin/requests/api.py', function get
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 60 in '/home/xxx/domoticz/plugins/ChromecastPlugin/requests/api.py', function request
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 533 in '/home/xxx/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function request
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 646 in '/home/xxx/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function send
2018-11-21 10:02:59.836 Error: (Chomecast) ----> Line 516 in '/home/xxx/domoticz/plugins/ChromecastPlugin/requests/adapters.py', function send
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 10:20
by dextm80
EdwinK wrote: ↑Wednesday 21 November 2018 9:33
snellejellep wrote: ↑Wednesday 21 November 2018 9:19
great plugin but i have a couple of questions/bugs:
- when i try to edit the hardware settings under hardware in domoticz my domoticz will hang until i give a service restart and then all the changes i made are gone.
Same here. I would like this plugin, but for now it's not working for me.
same another problem for me
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 13:56
by Ewaldharmsen
I have released version 1.1.0, with a better readme, and 2 potential warnings:
1) When you do not have accept new hardware enabled
2) When you have a username and password, but you local ip is not in the exclusions list.
In both cases the plugin will not work.
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 13:58
by snellejellep
Ewaldharmsen wrote:I have released version 1.1.0, with a better readme, and 2 potential warnings:
1) When you do not have accept new hardware enabled
2) When you have a username and password, but you local ip is not in the exclusions list.
In both cases the plugin will not work.
I will test when i get home
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 18:28
by snellejellep
tested it and saw the off when nothing is playing implemented but that now gives the problem, at least for me, that the switch is updated to the currently playing app but in the same second turned back to off, that is not how it is supposed to work i think
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 19:33
by sincze
Excellent work.
For now stream/py2chromecast is running stable so I might wait a bit longer before switching completely over in production.
Re: Python Plugin: Chromecast
Posted: Wednesday 21 November 2018 21:28
by TheCondor
Marvelous! Let the home talk to You is awesome !!! Thanks
Just the garbage remainder Is incredible itself
Re: Python Plugin: Chromecast
Posted: Thursday 22 November 2018 14:03
by DewGew
I suggest when nothing is casting. The text device "title" shows "Not Casting" or similar.
Re: Python Plugin: Chromecast
Posted: Thursday 22 November 2018 14:06
by DutchHans
I think I have done everything right . But non of my Chromecasts is added, neither variables.. what am I missing?
Regards, Hans
Re: Python Plugin: Chromecast
Posted: Thursday 22 November 2018 14:49
by Ewaldharmsen
Did you use the latest version?
I think it should show a warning in the log, you are sure new devices are accepted?
You have to change that in settings
Re: Python Plugin: Chromecast
Posted: Thursday 22 November 2018 14:59
by DutchHans
Hi,
Yes I am on the latest Beta. 4.10224
and Yes i have "allow new hardware" enabled
Regards, Hans