Page 9 of 11
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 10:58
by Dnpwwo
@Ewaldharmsen,
I couldn't get 'Chromecast.start()' to work either in my plugin and could not work it out.
I used 'Chromecast.socket_client.start()' instead and it did the trick. Still don't know why though...
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 11:04
by Ewaldharmsen
Dnpwwo wrote: ↑Tuesday 26 March 2019 10:58
@Ewaldharmsen,
I couldn't get 'Chromecast.start()' to work either in my plugin and could not work it out.
I used 'Chromecast.socket_client.start()' instead and it did the trick. Still don't know why though...
I think the best thing you can do is:
sudo rm -r /home/pi/domoticz/plugins/ChromecastPlugin/
sudo pip3 uninstall pychromecast
cd domoticz/plugins
git clone
https://github.com/Tsjippy/ChromecastPlugin
sudo pip3 install pychromecast
sudo pip3 show pychromecast
make sure cd /usr/local/lib/python3.5/dist-packages/pychromecast/ exists.
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 15:38
by snellejellep
something is still going wrong after reinstall, these are the switches it made:
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 15:52
by Ewaldharmsen
snellejellep wrote: ↑Tuesday 26 March 2019 15:38
something is still going wrong after reinstall, these are the switches it made:
You have made a paste error. I think you used
cd /usr/local/lib/python3.5/dist-packages/pychromecast/
as a Chromecasts name in hardware settings
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 15:55
by wvries
Ewaldharmsen wrote: ↑Tuesday 26 March 2019 11:04
Dnpwwo wrote: ↑Tuesday 26 March 2019 10:58
@Ewaldharmsen,
I couldn't get 'Chromecast.start()' to work either in my plugin and could not work it out.
I used 'Chromecast.socket_client.start()' instead and it did the trick. Still don't know why though...
I think the best thing you can do is:
sudo rm -r /home/pi/domoticz/plugins/ChromecastPlugin/
sudo pip3 uninstall pychromecast
cd domoticz/plugins
git clone
https://github.com/Tsjippy/ChromecastPlugin
sudo pip3 install pychromecast
sudo pip3 show pychromecast
make sure cd /usr/local/lib/python3.5/dist-packages/pychromecast/ exists.
followed the instructions and when enabling the plugin, again it starts respawning.
Code: Select all
ps -ef | grep domoticz
root 690 1 16 15:48 ? 00:00:16 /home/pi/domoticz/domoticz -daemon -www 8900 -sslwww 443
root 912 690 0 15:48 ? 00:00:00 /home/pi/domoticz/domoticz -daemon -www 8900 -sslwww 443
root 1259 690 0 15:49 ? 00:00:00 /home/pi/domoticz/domoticz -daemon -www 8900 -sslwww 443
When disabling the plugin, it does disconnect from the devices with the following info:
2019-03-26 15:50:18.088 (Chromecast) Setting device 22 as timed out
2019-03-26 15:50:18.091 (Chromecast) Setting device 23 as timed out
2019-03-26 15:50:18.097 (Chromecast) Setting device 24 as timed out
2019-03-26 15:50:18.101 Status: (Chromecast) Disconnecting from 'Living Room speaker'
2019-03-26 15:50:23.078 (Chromecast) 'Living Room speaker' is disconnected.
2019-03-26 15:50:23.078 (Chromecast) Setting device 51 as timed out
2019-03-26 15:50:23.079 Status: (Chromecast) Disconnecting from 'Living Room mini'
2019-03-26 15:50:23.078 Error: (Chromecast) Error on line 846 Error is 6
2019-03-26 15:50:27.472 (Chromecast) 'Living Room mini' is disconnected.
2019-03-26 15:50:27.472 (Chromecast) Setting device 41 as timed out
2019-03-26 15:50:27.472 Status: (Chromecast) Disconnecting from 'Living Room TV'
2019-03-26 15:50:27.472 Error: (Chromecast) Error on line 846 Error is 5
2019-03-26 15:50:32.261 (Chromecast) 'Living Room TV' is disconnected.
but also see the following error in the log:
Code: Select all
2019-03-26 15:50:12.350 Error: (Chromecast) Error on line 846 Error is 8
2019-03-26 15:50:23.078 Error: (Chromecast) Error on line 846 Error is 6
2019-03-26 15:50:27.472 Error: (Chromecast) Error on line 846 Error is 5
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 15:59
by Ewaldharmsen
can you update to version 4.0.1?
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 16:07
by snellejellep
Ewaldharmsen wrote: ↑Tuesday 26 March 2019 15:52
snellejellep wrote: ↑Tuesday 26 March 2019 15:38
something is still going wrong after reinstall, these are the switches it made:
You have made a paste error. I think you used
cd /usr/local/lib/python3.5/dist-packages/pychromecast/
as a Chromecasts name in hardware settings
my bad... indeed i did that wrong.
now it shows all my devices and it seems to work. thank you!
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 16:11
by wvries
Ewaldharmsen wrote: ↑Tuesday 26 March 2019 15:59
can you update to version 4.0.1?
git pull => Already up to date.
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 16:16
by Ewaldharmsen
Can you post your version info?
Python, Domoticz etc.
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 16:23
by wvries
Ewaldharmsen wrote: ↑Tuesday 26 March 2019 16:16
Can you post your version info?
Python, Domoticz etc.
HW: RPI3+ (With SSD)
Domoticz 4.10572
Python 3.5.3
OS: Raspbian GNU/Linux 9 (stretch) - last update yesterday
Other (external) plugins:
- Domoticz-Tuya-SmartBulb-Plugin
- Zigbee2MQTT
Update:
I see also increasing number of PluginMgr processes started / running when I have the problem.
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 16:40
by Ewaldharmsen
wvries wrote: ↑Tuesday 26 March 2019 16:23
Ewaldharmsen wrote: ↑Tuesday 26 March 2019 16:16
Can you post your version info?
Python, Domoticz etc.
HW: RPI3+ (With SSD)
Domoticz 4.10572
Python 3.5.3
OS: Raspbian GNU/Linux 9 (stretch) - last update yesterday
Other (external) plugins:
- Domoticz-Tuya-SmartBulb-Plugin
- Zigbee2MQTT
Update:
I see also increasing number of PluginMgr processes started / running when I have the problem.
Strange I have the same versions. Can you try disabling the other plugins and removing and reinstalling the Chromecasts plugin?
Re: Python Plugin: Chromecast
Posted: Tuesday 26 March 2019 19:09
by gerbenvanasselt
@Ewald
Reinstalled the plugin and now it is running like never before. Thanks a lot.
Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk
Re: Python Plugin: Chromecast
Posted: Wednesday 27 March 2019 8:10
by peterenderest
Hi ,
I have installed the chromecast plugin and I get the error below. In this chat about this topic, I saw the advice to de-install and re-install, but it does not help unfortunatelly.
Does anybody has an idea to solve this problem?
2019-03-27 08:01:09.328 Status: (Chromecast devices) Started.
2019-03-27 08:01:09.612 Error: (Chromecast) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/ChromecastPlugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2019-03-27 08:01:09.612 Error: (Chromecast devices) Module Import failed, exception: 'ImportError'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Module Import failed: ' Name: requests'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Error Line details not available
Version info:
Domoticz v.9700 on Raspberry pi
Python 3.5.3
Re: Python Plugin: Chromecast
Posted: Wednesday 27 March 2019 8:24
by Ewaldharmsen
peterenderest wrote: ↑Wednesday 27 March 2019 8:10
Hi ,
I have installed the chromecast plugin and I get the error below. In this chat about this topic, I saw the advice to de-install and re-install, but it does not help unfortunatelly.
Does anybody has an idea to solve this problem?
2019-03-27 08:01:09.328 Status: (Chromecast devices) Started.
2019-03-27 08:01:09.612 Error: (Chromecast) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/ChromecastPlugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2019-03-27 08:01:09.612 Error: (Chromecast devices) Module Import failed, exception: 'ImportError'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Module Import failed: ' Name: requests'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Error Line details not available
Version info:
Domoticz v.9700 on Raspberry pi
Python 3.5.3
sudo pip3 install requests
Re: Python Plugin: Chromecast
Posted: Wednesday 27 March 2019 19:30
by peterenderest
Ewaldharmsen wrote: ↑Wednesday 27 March 2019 8:24
peterenderest wrote: ↑Wednesday 27 March 2019 8:10
Hi ,
I have installed the chromecast plugin and I get the error below. In this chat about this topic, I saw the advice to de-install and re-install, but it does not help unfortunatelly.
Does anybody has an idea to solve this problem?
2019-03-27 08:01:09.328 Status: (Chromecast devices) Started.
2019-03-27 08:01:09.612 Error: (Chromecast) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/ChromecastPlugin/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload'.
2019-03-27 08:01:09.612 Error: (Chromecast devices) Module Import failed, exception: 'ImportError'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Module Import failed: ' Name: requests'
2019-03-27 08:01:09.613 Error: (Chromecast devices) Error Line details not available
Version info:
Domoticz v.9700 on Raspberry pi
Python 3.5.3
sudo pip3 install requests
@Ewaldharmsen thanks for your reply!, I tried this, but get the following message: Requirement already satisfied: requests in /usr/lib/python3/dist-packages
Do I have to include this in the python path? And if yes, how do I do this?
Re: Python Plugin: Chromecast
Posted: Wednesday 27 March 2019 20:16
by Ewaldharmsen
You should update to the latest Domoticz beta version
Re: Python Plugin: Chromecast
Posted: Wednesday 27 March 2019 21:22
by peterenderest
Ewaldharmsen wrote: ↑Wednesday 27 March 2019 20:16
You should update to the latest Domoticz beta version
Thanks! It works now smoothly!
Re: Python Plugin: Chromecast
Posted: Monday 01 April 2019 19:18
by Tobbo
Keep getting this error. It is like the attribute start has been removed or something?
2019-04-01 19:15:54.807 Status: (Chromecast) Found these chromecasts: 'Google Home Mini', 'Chromecast'
2019-04-01 19:15:54.808 Error: (Chromecast) Error on line 556 Error is 'Chromecast' object has no attribute 'start'
Domo version V4.10590 (I beleive I'm on beta?
)
Any ideas?
Re: Python Plugin: Chromecast
Posted: Monday 01 April 2019 20:04
by Ewaldharmsen
Tobbo wrote: ↑Monday 01 April 2019 19:18
Keep getting this error. It is like the attribute start has been removed or something?
2019-04-01 19:15:54.807 Status: (Chromecast) Found these chromecasts: 'Google Home Mini', 'Chromecast'
2019-04-01 19:15:54.808 Error: (Chromecast) Error on line 556 Error is 'Chromecast' object has no attribute 'start'
Domo version V4.10590 (I beleive I'm on beta?
)
Any ideas?
you have to update PyChromecast:
Re: Python Plugin: Chromecast
Posted: Monday 01 April 2019 20:21
by Tobbo
Ewaldharmsen wrote: ↑Monday 01 April 2019 20:04
Tobbo wrote: ↑Monday 01 April 2019 19:18
Keep getting this error. It is like the attribute start has been removed or something?
2019-04-01 19:15:54.807 Status: (Chromecast) Found these chromecasts: 'Google Home Mini', 'Chromecast'
2019-04-01 19:15:54.808 Error: (Chromecast) Error on line 556 Error is 'Chromecast' object has no attribute 'start'
Domo version V4.10590 (I beleive I'm on beta?
)
Any ideas?
you have to update PyChromecast:
First of all, thank you for a very quick answer.
So after following your instructions and also restarting the domoticz service, things started to work, BUT, I'm getting some new errors regarding spotify it seems.
- Spoiler: show
-
Code: Select all
2019-04-01 20:16:52.105 Error: (Chromecast) Error on line 241 Error is 'Spotify' object has no attribute 'current_user_playing_track'
2019-04-01 20:17:01.671 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:17:01.675 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:17:01.675 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:17:12.309 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:17:12.314 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:17:12.314 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:17:22.490 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:17:22.494 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:17:22.494 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:00.219 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:00.223 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:00.223 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:10.425 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:10.428 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:10.428 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:20.659 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:20.662 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:20.662 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:30.871 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:30.874 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:30.874 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:41.083 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:41.087 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:41.087 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:51.309 Error: (Chromecast) 'onHeartbeat' failed 'AttributeError':''Spotify' object has no attribute 'current_user_playing_track''.
2019-04-01 20:20:51.313 Error: (Chromecast) ----> Line 786 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat
2019-04-01 20:20:51.313 Error: (Chromecast) ----> Line 400 in '/home/pi/domoticz/plugins/ChromecastPlugin/plugin.py', function onHeartbeat