Page 7 of 11
Re: Python Plugin: Chromecast
Posted: Wednesday 23 January 2019 15:28
by vodor
Quick update just to close the loop re my Domoticz hanging.
I was running on Raspbian Jessie still. Havent upgraded in a looong time although packages was updated the last stable release of python in the Jessie repo was python 3.4.x.
After a dist-upgrade to Raspbian Stretch my packages also upgraded as part of this process including python to Python 3.5.3.
Plugin now installs fine and domoticz starts up fine no issues. Picked up my chromecast within seconds and working perfectly.
Lessons learnt: Read properly check all dependencies.
thanks for the help
Re: Python Plugin: Chromecast
Posted: Wednesday 23 January 2019 18:23
by PeterFleur
PeterFleur wrote: ↑Tuesday 22 January 2019 22:59
I had the same with the hanging of Domoticz while saving and it was because i changed the "Directory for message files:" and did not know if i needed the trailing backslash. I deleted the hardware and the user variables it created and added the hardware again. Now it looks like it works without hanging.
But i have an error every 15 seconds in my logfile:
Error: Chromecast hardware (19) thread seems to have ended unexpectedly
And i'm not able to send a variable to the speaker. I hear it connects but then nothing happens. Which seems to be related to the hardware error.
Peter
It looks like the problem was a chromecast.py file in the python directory (/home/pi/domoticz/scripts/python). Once i deleted this file i don't have any errors anymore.
After some further research i found out that the port of filesharing cannot be the same as domoticz (which i thought was the filesharing webserver).
So for people like me maybe it would be nice to have a check if the port is in use by something else in the logging. Sorry for the "stupidity"
Peter
Re: Python Plugin: Chromecast
Posted: Thursday 31 January 2019 13:20
by henkdejonge
I'm trying to set the volume of the Chromecast plugin to a lower level. It's now set to 100% but I would like to set it to a lower level. I've made some changes to the plugin.py but no results. It displays the right level I want in the logging from Domoticz... but the sound coming from the home mini is still at the 100% level. Perhaps I edited the wrong file or variable...
2019-01-31 13:11:50.625 Status: EventSystem: Script event triggered: Script_Device_Lamp_Henk
2019-01-31 13:11:56.560 (Google Home ) Maximizing volume
2019-01-31 13:11:56.588 (Google Home ) Updated volume to 20
2019-01-31 13:11:56.635 (Google Home ) Update Google Home - Volume-Huiskamer: 2 - '20'
2019-01-31 13:11:56.752 (Google Home ) The app of 'Huiskamer' has changed to 'Default Media Receiver'
2019-01-31 13:11:56.796 (Google Home ) Update Google Home - App name-Huiskamer: 20 - '20'
2019-01-31 13:11:56.048 Status: (Google Home ) Will pronounce "Lamp achter stoel Henk uit" on chromecast Huiskamer
2019-01-31 13:11:56.049 Status: (Google Home ) Current volume is 10
Re: Python Plugin: Chromecast
Posted: Monday 04 February 2019 20:46
by TheCondor
Hello, custome notifications stopped working since few days. I'm the Only One? All the rest Is working fine (media, volume etc)
Thanks for your feedback
Re: Python Plugin: Chromecast
Posted: Monday 04 February 2019 20:57
by PeterFleur
TheCondor wrote:Hello, custome notifications stopped working since few days. I'm the Only One? All the rest Is working fine (media, volume etc)
Thanks for your feedback
I have the same but it looks like there is something wrong with user variables in the latests beta.
Peter
Sent from my SM-G930F using Tapatalk
Re: Python Plugin: Chromecast
Posted: Tuesday 05 February 2019 13:47
by TheCondor
PeterFleur wrote: ↑Monday 04 February 2019 20:57
TheCondor wrote:Hello, custome notifications stopped working since few days. I'm the Only One? All the rest Is working fine (media, volume etc)
Thanks for your feedback
I have the same but it looks like there is something wrong with user variables in the latests beta.
Peter
Sent from my SM-G930F using Tapatalk
I'm far behind latest beta:
Code: Select all
Version: 4.9999
Build Hash: 9e8ea729
Compile Date: 2018-09-09 18:27:57
dzVents Version: 2.4.7
Python Version: 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170124]

Re: Python Plugin: Chromecast
Posted: Thursday 07 February 2019 21:24
by TheCondor
Code: Select all
2019-02-07 21:22:17.253 Status: (Chromecast) Entering work loop.
2019-02-07 21:22:17.254 Status: (Chromecast) Initialized version 3.3.1, author 'Tsjippy'
2019-02-07 21:22:17.261 Status: (Chromecast) Checking if images are loaded
2019-02-07 21:22:17.262 Status: (Chromecast) Starting up
2019-02-07 21:22:17.292 Status: (Chromecast) Checking for available chromecasts
2019-02-07 21:22:17.274 Error: (Chromecast) Could not get all variables. Used this url: 192.168.99.51:8080/json.htm?type=command¶m=getuservariables
2019-02-07 21:22:17.279 Error: (Chromecast) Error on line 648 Error is No connection adapters were found for '192.168.99.51:8080/json.htm?type=command¶m=adduservariable&vname=Bagno&vtype=2&vvalue='
2019-02-07 21:22:17.283 Error: (Chromecast) Error on line 648 Error is No connection adapters were found for '192.168.99.51:8080/json.htm?type=command¶m=adduservariable&vname=Ingresso&vtype=2&vvalue='
2019-02-07 21:22:17.287 Error: (Chromecast) Error on line 648 Error is No connection adapters were found for '192.168.99.51:8080/json.htm?type=command¶m=adduservariable&vname=Camera&vtype=2&vvalue='
2019-02-07 21:22:17.290 Error: (Chromecast) Error on line 692 Error is No connection adapters were found for '192.168.99.51:8080/json.htm?type=command¶m=getuservariables'
2019-02-07 21:22:26.059 (Chromecast) Found these chromecasts: 'Camera', 'Ingresso', 'Bagno'
2019-02-07 21:22:26.059 (Chromecast) Registering listeners for 'Camera'
2019-02-07 21:22:26.059 (Chromecast) Done registering listeners for 'Camera'
2019-02-07 21:22:26.060 (Chromecast) Registering listeners for 'Ingresso'
2019-02-07 21:22:26.060 (Chromecast) Done registering listeners for 'Ingresso'
2019-02-07 21:22:26.060 (Chromecast) Registering listeners for 'Bagno'
2019-02-07 21:22:26.060 (Chromecast) Done registering listeners for 'Bagno'
2019-02-07 21:22:26.100 (Chromecast) Updated volume to 30
2019-02-07 21:22:26.120 (Chromecast) Update Chromecast Bagno Volume: 2 - '30'
2019-02-07 21:22:26.059 Status: (Chromecast) Connected to 'Camera'
2019-02-07 21:22:26.060 Status: (Chromecast) Connected to 'Ingresso'
2019-02-07 21:22:26.060 Status: (Chromecast) Connected to 'Bagno'
It Lost the variables in some way, removed and readded and now All Is working.
Re: Python Plugin: Chromecast
Posted: Sunday 03 March 2019 13:00
by sanderjohan
Did anybody install this plugin on a Synology NAS with Domoticz?
I have my main Domoticz installed on the Synology put I have no idea how to install this plugin. I could install it on my secondary Domoticz which runs on a Raspberry, but unfortunately the status is not shared with Domoticz Remote server.
Re: Python Plugin: Chromecast
Posted: Tuesday 05 March 2019 9:50
by EddyG
I don't like errors.
On every restart of domoticz this error occurs.
I know it does not harm, but I have a script running looking for errors in the log file and inform me by Telegram.
Could this error be prevented?
Code: Select all
2019-03-05 09:46:12.016 Error: (Cast) Could not create 'TVWoonkamer', result was ERR. Url used is http://127.0.0.1:8080/json.htm?type=command¶m=saveuservariable&vname=TVWoonkamer&vtype=2&vvalue=
Re: Python Plugin: Chromecast
Posted: Tuesday 05 March 2019 10:06
by gerbenvanasselt
EddyG wrote:I don't like errors.
On every restart of domoticz this error occurs.
I know it does not harm, but I have a script running looking for errors in the log file and inform me by Telegram.
Could this error be prevented?
Code: Select all
2019-03-05 09:46:12.016 Error: (Cast) Could not create 'TVWoonkamer', result was ERR. Url used is http://127.0.0.1:8080/json.htm?type=command¶m=saveuservariable&vname=TVWoonkamer&vtype=2&vvalue=
I totally agree with EddyG. Can OP please look into it!
Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 0:25
by OedzesG
Like almost everyone I get the error: [(Chromecast) Could not create 'TV attic', result was ERR. Url used is http: //XXX.XXX.X.X: 8080 / json.htm? Type = command & param = saveuservariable & vname = TV attic & vtype = 2 & vvalue =]
But the big problem why this plugin does not work is:
[Error: (Chromecast) Error on line 319 Error is not join thread before it is started]
Can someone please help me?
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 11:01
by OedzesG
No one? i would love to use this!!
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 13:12
by Dnpwwo
There are a number of Chromecast/Home plugins if this one is not doing what you want.
Mine is here:
https://github.com/dnpwwo/Domoticz-Google-Plugin but I believe other users have created some as well.
mine doesn't use user variables at all but does handle notificatons from scripts or devices directly.
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 15:09
by OedzesG
Thanx man!! works Great!!! no problems or errors at all!!
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 15:10
by OedzesG
You think there is a way to add: Plex and Videoland in Sources?
Re: Python Plugin: Chromecast
Posted: Monday 11 March 2019 20:57
by kniazio
Dnpwwo wrote: ↑Monday 11 March 2019 13:12
There are a number of Chromecast/Home plugins if this one is not doing what you want.
Mine is here:
https://github.com/dnpwwo/Domoticz-Google-Plugin but I believe other users have created some as well.
mine doesn't use user variables at all but does handle notificatons from scripts or devices directly.
Can you give an example of a script for sending a voice notification and a script for playing the brick from a url
Re: Python Plugin: Chromecast
Posted: Tuesday 12 March 2019 11:30
by Dnpwwo
@kniazio,
As documented on github:
Target device speaks the message text e.g.
Code: Select all
commandArray['Lounge Home'] = "SendNotification 'Hello'"
the spoken language will be the same as the one used by the Domoticz web interface. Alternatively, 'Google_Devices' shows up as a notification target if you use the 'Notifications' button for a device so you don't have to use a script for some scenarios.
Not sure what you mean?
playing the brick from a url
@OedzesG,
I will add new aplications (as they are used) to the Source device in the next version.
Re: Python Plugin: Chromecast
Posted: Tuesday 12 March 2019 11:56
by EdwinK
Dnpwwo wrote: ↑Monday 11 March 2019 13:12
There are a number of Chromecast/Home plugins if this one is not doing what you want.
Mine is here:
https://github.com/dnpwwo/Domoticz-Google-Plugin but I believe other users have created some as well.
mine doesn't use user variables at all but does handle notificatons from scripts or devices directly.
Seems to work right out of the (virtual) box. I only get an error at 2019-03-12 11:48:09.933 Error: (ChromeCast) Unsupported device type: 'Google Cast Group'
Don't really know what to add there.
Re: Python Plugin: Chromecast
Posted: Tuesday 12 March 2019 14:21
by kniazio
Dnpwwo wrote: ↑Tuesday 12 March 2019 11:30
@kniazio,
As documented on github:
Target device speaks the message text e.g.
Code: Select all
commandArray['Lounge Home'] = "SendNotification 'Hello'"
the spoken language will be the same as the one used by the Domoticz web interface. Alternatively, 'Google_Devices' shows up as a notification target if you use the 'Notifications' button for a device so you don't have to use a script for some scenarios.
Not sure what you mean?
playing the brick from a url
@OedzesG,
I will add new aplications (as they are used) to the Source device in the next version.
Ok. How should I use it? Where should I enter this command
Re: Python Plugin: Chromecast
Posted: Tuesday 12 March 2019 19:10
by DutchHans
Interested too..
