Python Plugin: Chromecast Topic is solved

Python and python framework

Moderator: leecollings

Post Reply
vodor
Posts: 39
Joined: Friday 19 February 2016 14:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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
PeterFleur
Posts: 32
Joined: Sunday 08 March 2015 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4739
Contact:

Re: Python Plugin: Chromecast

Post 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
RaspberryPI
ZWave
RFXtrx433E
henkdejonge
Posts: 1
Joined: Thursday 31 January 2019 12:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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
TheCondor
Posts: 78
Joined: Thursday 18 June 2015 10:32
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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
PeterFleur
Posts: 32
Joined: Sunday 08 March 2015 13:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4739
Contact:

Re: Python Plugin: Chromecast

Post 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

RaspberryPI
ZWave
RFXtrx433E
TheCondor
Posts: 78
Joined: Thursday 18 June 2015 10:32
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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]
:?:
TheCondor
Posts: 78
Joined: Thursday 18 June 2015 10:32
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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&param=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&param=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&param=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&param=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&param=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.
sanderjohan
Posts: 4
Joined: Thursday 31 December 2015 10:01
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: Python Plugin: Chromecast

Post 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.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Python Plugin: Chromecast

Post 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&param=saveuservariable&vname=TVWoonkamer&vtype=2&vvalue=
gerbenvanasselt
Posts: 74
Joined: Friday 07 September 2018 14:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta 4.1
Location: Netherlands
Contact:

Re: Python Plugin: Chromecast

Post 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&param=saveuservariable&vname=TVWoonkamer&vtype=2&vvalue=
I totally agree with EddyG. Can OP please look into it!

Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk

OedzesG
Posts: 106
Joined: Monday 11 March 2019 0:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post 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?
OedzesG
Posts: 106
Joined: Monday 11 March 2019 0:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by OedzesG »

No one? i would love to use this!!
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin: Chromecast

Post 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.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
OedzesG
Posts: 106
Joined: Monday 11 March 2019 0:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by OedzesG »

Thanx man!! works Great!!! no problems or errors at all!!
OedzesG
Posts: 106
Joined: Monday 11 March 2019 0:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by OedzesG »

You think there is a way to add: Plex and Videoland in Sources?
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Chromecast

Post 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
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Re: Python Plugin: Chromecast

Post 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.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python Plugin: Chromecast

Post 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.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: Python Plugin: Chromecast

Post 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
DutchHans
Posts: 230
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Python Plugin: Chromecast

Post by DutchHans »

Interested too.. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests