Python Plugin: Chromecast Topic is solved

Python and python framework

Moderator: leecollings

bramski
Posts: 45
Joined: Thursday 20 July 2017 16:26
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by bramski »

dextm80 wrote: Sunday 25 November 2018 10:38
bramski wrote: Sunday 25 November 2018 10:34
dextm80 wrote: Sunday 25 November 2018 10:32

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
Hmm, that's the same I got and it is working for me now. Did you restart domoticz `sudo service domoticz.sh restart`? And which URL did you set in the plugin settings? Do you run the latest version of the plugin?
dextm80
Posts: 117
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 4.10159
Contact:

Re: Python Plugin: Chromecast

Post by dextm80 »

wow, i've reinstalled plugin and now it's ok! no errors!

Edit

I've other chromecast, i try to add anorther chromecast and this is the log error:

Code: Select all

 2018-11-25 11:20:04.952 Error: (Chromecast) failed to load 'plugin.py', Python Path used was '/home/x/domoticz/plugins/ChromecastPlugin/:/usr/lib/python36.zip:/usr/lib/python3.6:/usr/lib/python3.6:/usr/lib/python3.6/lib-dynload'.
2018-11-25 11:20:04.952 Error: (Chromecast 2) Module Import failed, exception: 'TypeError'
2018-11-25 11:20:04.952 Error: (Chromecast 2) Error Line details not available. 
EDIT
okk, i can add 1 plugin and i put the names into Chromecast name(s), but GOOGLE HOME MINI status is not update
Issues: into group (1 group with 1 chromecast and google mini)volume are not updated, google mini status not updated (no log errors)
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge
DutchHans
Posts: 229
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 »

That's negative..

5 google minis are updated just fine at my place.
Spoken text work's fine too..

Regards, Hans
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 »

Two Chromecast's and two mini's working (at least, devices are created).
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
dextm80
Posts: 117
Joined: Tuesday 24 October 2017 18:32
Target OS: Linux
Domoticz version: 4.10159
Contact:

Re: Python Plugin: Chromecast

Post by dextm80 »

yes, try it into a group and tell me
Domoticz on AsRock j3455-ITX 8gb ram - Aeotec ZWave Usb Stick - RFLink 433Mhz
1x Fibaro Wall Plug
1x Fibaro Motion Sensor
x NeoCoolcam Wall Plug
Netatmo Weather Station - Netatmo Thermostat
Philips Hue Bridge
DutchHans
Posts: 229
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 »

Good evening... I like the plugin very much but ran into a few things.

Voice on a group works, but they dont start at the same time... the first Mini starts.. the second follows a few seconds later, but somewhere in the middle of the text...

and... I ran into the max size of the variable ... my goodmorning script can generate a pretty long variable, with weather, Traffic, Birthdays, News, Garbage, etc ..its not played...

regards, Hans
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by Ewaldharmsen »

I have just release version 2.0.0.
It now auto resumes youtube when that what was playing before a message was played.
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 »

Getting this in the error log.

Code: Select all

2018-11-27 09:48:54.291 Error: (PyCast) Error on line 264 Error is 'result'
2018-11-27 09:48:54.313 Error: (PyCast) Error on line 264 Error is 'result'
2018-11-27 09:48:54.325 Error: (PyCast) Error on line 264 Error is 'result'
2018-11-27 09:48:54.337 Error: (PyCast) Error on line 264 Error is 'result'
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
maxtrash
Posts: 106
Joined: Tuesday 06 August 2013 1:31
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by maxtrash »

I've upgraded to the latest version and it works fine now with my 15 devices or so. I copied the logging where it said "(Chromecast) Found these chromecasts: Living Room display, Attic, etc." to the hardware settings.
Personally I wouldn't mind the plugin to just create devices for all devices found. You don't have to show the devices if you don't want to anyway.

Thanks for the great work!

Currently I'm investigating how to notify to the cast devices. For instance I would like to cast if the garage door is left open. Any suggestions what the best approach would be?
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Chromecast

Post by Nautilus »

Thanks for the plugin! Seems to work (I'm not using the notification, at least so far) but the only thing I wonder is why I get this in my log:

Code: Select all

.../json.htm?type=command&param=getuservariable&idx= did not return any results.
Variable is created so not sure what is missing...:)
DutchHans
Posts: 229
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 »

Very nice plugin, but I ran into the max.size of the variable.
Is there something to do about this?

Code: Select all

2018-12-02 16:56:11.922 Error: EventSystem: Error updating variable Living Room speaker: String exceeds maximum size
Regards, Hans
DutchHans
Posts: 229
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 »

Very nice plugin, but I ran into the max.size of the variable.
Is there something to do about this?

Code: Select all

2018-12-02 16:56:11.922 Error: EventSystem: Error updating variable Living Room speaker: String exceeds maximum size
Regards, Hans
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by Ewaldharmsen »

I just have released version 3.0.1.
You can now update the hardware without the need to restart domoticz.
Devices which are no longer needed are automatically deleted
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Python Plugin: Chromecast

Post by schulpr »

Hi,

After re-installing the plugin I get this error:

2018-12-11 07:03:36.189 Error: (Chromecast) 'onCommand' failed 'NameError'.
2018-12-11 07:03:36.189 Error: (Chromecast) ----> Line 570 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onCommand
2018-12-11 07:03:36.189 Error: (Chromecast) ----> Line 415 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onCommand

Any idea how to solve this?

Thanks for the help!

Kind regards, Rob
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Chromecast

Post by Nautilus »

Ewaldharmsen wrote: Monday 10 December 2018 14:23 I just have released version 3.0.1.
You can now update the hardware without the need to restart domoticz.
Devices which are no longer needed are automatically deleted
Any ideas about this:
Nautilus wrote: Sunday 02 December 2018 9:59 Thanks for the plugin! Seems to work (I'm not using the notification, at least so far) but the only thing I wonder is why I get this in my log:

Code: Select all

.../json.htm?type=command&param=getuservariable&idx= did not return any results.
Variable is created so not sure what is missing...:)
Still seeing it also with the new version.
Last edited by Nautilus on Tuesday 11 December 2018 23:03, edited 2 times in total.
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 »

Code: Select all

2018-12-11 09:28:57.518 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.540 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.561 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.585 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by Ewaldharmsen »

schulpr wrote: Tuesday 11 December 2018 7:06 Hi,

After re-installing the plugin I get this error:

2018-12-11 07:03:36.189 Error: (Chromecast) 'onCommand' failed 'NameError'.
2018-12-11 07:03:36.189 Error: (Chromecast) ----> Line 570 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onCommand
2018-12-11 07:03:36.189 Error: (Chromecast) ----> Line 415 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onCommand

Any idea how to solve this?

Thanks for the help!

Kind regards, Rob
Thats a bug, can you update to version 3.0.2?
Should be solved.
Ewaldharmsen
Posts: 130
Joined: Tuesday 07 February 2017 15:00
Target OS: Linux
Domoticz version:
Contact:

Re: Python Plugin: Chromecast

Post by Ewaldharmsen »

EdwinK wrote: Tuesday 11 December 2018 9:29

Code: Select all

2018-12-11 09:28:57.518 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.540 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.561 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.585 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
Can you remove the hardware, and all user variables, restart domoticz and re-add it?
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Python Plugin: Chromecast

Post by schulpr »

After update to 3.02 a new error occured:

2018-12-12 10:03:50.208 Error: (Chromecast) failed to load 'plugin.py', Python Path used was ':/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2018-12-12 10:03:50.208 Error: (Chromecast) Module Import failed, exception: 'SyntaxError'
2018-12-12 10:03:50.208 Error: (Chromecast) Import detail: File: /home/pi/domoticz/plugin.py, Line: 7, offset: 1
2018-12-12 10:03:50.208 Error: (Chromecast) Error Line '<!DOCTYPE html>
2018-12-12 10:03:50.208 '

Is it also possible to update with 'git pull ChromecastPlugin' or something like this?

Kind regards, Rob
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Python Plugin: Chromecast

Post by Nautilus »

Ewaldharmsen wrote: Wednesday 12 December 2018 9:19
EdwinK wrote: Tuesday 11 December 2018 9:29

Code: Select all

2018-12-11 09:28:57.518 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.540 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.561 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-11 09:28:57.585 Error: (PyCast) http://192.168.0.11:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
Can you remove the hardware, and all user variables, restart domoticz and re-add it?
Thanks, tried this but now I'm not getting any devices created. Allow new hardware devices was on when I re-added it:

Code: Select all

2018-12-12 23:46:48.500 Status: (Chromecasts) Started.
2018-12-12 23:46:50.220 Status: (Chromecasts) Entering work loop.
2018-12-12 23:46:50.220 Status: (Chromecasts) Initialized version 3.0.2, author 'Tsjippy'
2018-12-12 23:46:50.223 Status: (Chromecasts) Checking if images are loaded
2018-12-12 23:46:50.223 Status: (Chromecasts) Starting up
2018-12-12 23:46:50.242 Error: (Chromecasts) 'onStart' failed 'ConnectionError'.
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 560 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 272 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onStart
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 502 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function updateDevices
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 75 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/api.py', function get
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 60 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/api.py', function request
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 533 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function request
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 646 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/sessions.py', function send
2018-12-12 23:46:50.242 Error: (Chromecasts) ----> Line 516 in '/home/pi/domoticz/plugins/ChromecastPlugin/requests/adapters.py', function send
2018-12-12 23:47:02.580 Error: (Chromecasts) http://127.0.0.1:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 23:47:12.805 (Chromecasts) Connecting to available chromecasts
2018-12-12 23:47:12.805 Status: (Chromecasts) Checking for available chromecasts
2018-12-12 23:47:21.791 (Chromecasts) Found these chromecasts: Musiikkihuone TV
2018-12-12 23:47:21.792 (Chromecasts) Registering listeners for Musiikkihuone TV
2018-12-12 23:47:21.792 (Chromecasts) Done registering listeners for Musiikkihuone TV
2018-12-12 23:47:21.836 (Chromecasts) The app of 'Musiikkihuone TV' has changed to Backdrop
2018-12-12 23:47:21.836 (Chromecasts) Will set the domoticz devices to off.
2018-12-12 23:47:21.836 (Chromecasts) Updated volume to 50
2018-12-12 23:47:21.792 Status: (Chromecasts) Connected to Musiikkihuone TV
2018-12-12 23:47:31.337 Error: (Chromecasts) http://127.0.0.1:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
2018-12-12 23:47:41.323 Error: (Chromecasts) http://127.0.0.1:8080/json.htm?type=command&param=getuservariable&idx= did not return any results.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest