[Plugin Tiers][Sujet Principal] Google Cast

Bonjour,

Ce fil prend la suite de l’ancienne discussion disponible ici

Plugin qui permet de contrôler et récupérer l’état d’équipements compatibles GoogleCast (Google Home, Chromecast, TV android…)

Statut : STABLE
Compatible v3 & v4

La documentation et FAQ est ici : https://github.com/guirem/plugin-google … R/index.md

dashboard2.png

Fonctionnalités :

  • Contrôle du son (mute, +/-)
  • Contrôle des médias (play/pause/stop…)
  • Arrêt appli en cours, reboot
  • Diffuser une page web sur un écran
  • Diffuser un flux audio (webradios) ou vidéo (via url)
  • Diffuser un flux d’un serveur PLEX
  • TTS (Text To Speech) et notification musicale (avec récupération de l’état précédant)
  • Retour d’état sur les principales fonctionnalités
  • Affichage de la lecture en cours
  • Récupération de la configuration de Google Home (ex: alarme, timer)
  • Compatibilité intéraction IFTTT
3 « J'aime »

Bonjour,

Nouvelle version disponible en beta uniquement pour le moment

  • TTS : ajout des moteurs TTS de Jeedom (testé) et TTSWebserver (non testé car je n’ai pas installé le plugin)
  • Compatibilité Jeedom 4 et php7
  • Ajout icon pour Google Hub
  • Fix installation sur debian buster
  • Mise à jour de quelques librairies du plugin

Bonne fin d’année

1 « J'aime »

Merci beaucoup pour cette mise à jour, c’est ok chez moi en V3.3.39

Bon réveillon à toutes et tous

Salut
Merci pour ton travail sur ce plugin
Un souci chez moi qui utilise un autre port que le 443 pour le SSL
Du coup, le démon ne se lance pas

@sebcorse : cela ne devrait pas impacter le démarrage du demon. Quelle est l’erreur des logs ‹ Google_local › ?

Le démon essaie de lancer /usr/bin/python3 /var/www/html/plugins/googlecast/resources/googlecast.py --loglevel info --socketport 55012 --sockethost 127.0.0.1 --callback https:/127.0.0.1:443/plugins/googlecast/core/php/googlecast.api.php --apikey xxxxxxxxxxxxxxxx --ttsweb https://192.168.0.133:443 --ttslang fr-FR --ttsengine gtts --ttsspeed 1.2 --ttscache 1 --ttsgapikey none --daemonname local --cyclefactor 1 --defaultstatus ’ ’
Si je lance manuellement la commande avec le bon port, le démon est ok, mais j’ai alors des soucis de APIKEY

Je pense que tu as ta configuration réseau de jeedom mal configuré (menu Configuration > Réseau). Le plugin utilise les informations de cette configuration pour fonctionner.

1 « J'aime »

Bonjour,

J’ai également un soucis avec le SCAN auto, aucun de mes Home ne remontent.

Le log:

2020-01-03 19:02:05][INFO] : GLOBAL------STARTING googlecast
[2020-01-03 19:02:05][INFO] : GLOBAL------Scan Timeout : 10
[2020-01-03 19:02:05][INFO] : GLOBAL------Scan Frequency : 60
[2020-01-03 19:02:05][INFO] : GLOBAL------Log level : debug
[2020-01-03 19:02:05][INFO] : GLOBAL------Socket port : 55012
[2020-01-03 19:02:05][INFO] : GLOBAL------Socket host : 127.0.0.1
[2020-01-03 19:02:05][INFO] : GLOBAL------PID file : /tmp/googlecast.pid
[2020-01-03 19:02:05][INFO] : GLOBAL------Apikey : *******************************
[2020-01-03 19:02:05][INFO] : GLOBAL------TTS Jeedom server : http://192.168.1.61:80
[2020-01-03 19:02:05][INFO] : GLOBAL------TTS default language : fr-FR
[2020-01-03 19:02:05][INFO] : GLOBAL------TTS default engine : gtts
[2020-01-03 19:02:05][INFO] : GLOBAL------TTS default speech speed : 1.2
[2020-01-03 19:02:05][INFO] : GLOBAL------TTS Google API Key (optional) : NOK
[2020-01-03 19:02:05][INFO] : GLOBAL------Cache status : True
[2020-01-03 19:02:05][INFO] : GLOBAL------Callback : http://127.0.0.1:80/plugins/googlecast/core/php/googlecast.api.php
[2020-01-03 19:02:05][INFO] : GLOBAL------Event cycle : 0.5
[2020-01-03 19:02:05][INFO] : GLOBAL------Main cycle : 2.0
[2020-01-03 19:02:05][INFO] : GLOBAL------Default status message :  
[2020-01-03 19:02:05][INFO] : -----------------------------------------------------
[2020-01-03 19:02:05][DEBUG] : Writing PID 2450 to /tmp/googlecast.pid
[2020-01-03 19:02:05][DEBUG] : Init request module v2.12.4
[2020-01-03 19:02:05][INFO] : GLOBAL------Network communication to jeedom OK.
[2020-01-03 19:02:05][DEBUG] : SOCKETHANDLER------Socket interface started
[2020-01-03 19:02:05][DEBUG] : SOCKETHANDLER------LoopNetServer Thread started
[2020-01-03 19:02:05][INFO] : GLOBAL------Socket started…
[2020-01-03 19:02:05][DEBUG] : SOCKETHANDLER------Listening on: [127.0.0.1:55012]
[2020-01-03 19:02:05][INFO] : GLOBAL------Waiting for messages…
[2020-01-03 19:02:05][DEBUG] : WARMUPNOTIF------ Checking file generation…
[2020-01-03 19:02:05][DEBUG] : SENDER------Send to jeedom : {‹ source ›: ‹ local ›, ‹ started ›: 1}
[2020-01-03 19:02:05][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:02:05][DEBUG] : SCANNER------ No need to scan network, all devices are present
[2020-01-03 19:02:45][DEBUG] : SOCKETHANDLER------Client connected to [127.0.0.1:52948]
[2020-01-03 19:02:45][DEBUG] : SOCKETHANDLER------Message read from socket: {« apikey »:« xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx »,« cmd »:« learnin »}
[2020-01-03 19:02:45][DEBUG] : SOCKETHANDLER------Client disconnected from [127.0.0.1:52948]
[2020-01-03 19:02:45][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2020-01-03 19:02:45][DEBUG] : SOCKET-READ------Received command from jeedom : learnin
[2020-01-03 19:02:45][DEBUG] : SOCKET-READ------Enter in learn mode
[2020-01-03 19:02:45][DEBUG] : SENDER------Send to jeedom : {‹ learn_mode ›: 1, ‹ source ›: ‹ local ›}
[2020-01-03 19:02:47][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:02:47][DEBUG] : MEMORY---- Total CPU time used : 1.516s (3.61%) | Last 42 sec : 1.516s (3.61%) | Memory : 38 Mo
[2020-01-03 19:02:47][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:02:55][ERROR] : Failed to connect. No retries.
[2020-01-03 19:02:55][ERROR] : Failed to connect. No retries.
[2020-01-03 19:02:55][ERROR] : Failed to connect. No retries.
[2020-01-03 19:02:57][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:02:57][DEBUG] : MEMORY---- Total CPU time used : 1.636s (3.15%) | Last 10 sec : 0.120s (1.20%) | Memory : 39 Mo
[2020-01-03 19:02:57][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:03:06][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:06][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:06][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:07][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:03:07][DEBUG] : MEMORY---- Total CPU time used : 1.820s (2.94%) | Last 10 sec : 0.184s (1.84%) | Memory : 39 Mo
[2020-01-03 19:03:07][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:03:15][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:15][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:15][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:17][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:03:17][DEBUG] : MEMORY---- Total CPU time used : 1.972s (2.74%) | Last 10 sec : 0.152s (1.52%) | Memory : 39 Mo
[2020-01-03 19:03:17][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:03:25][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:25][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:25][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:27][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:03:27][DEBUG] : MEMORY---- Total CPU time used : 2.072s (2.53%) | Last 10 sec : 0.100s (1.00%) | Memory : 39 Mo
[2020-01-03 19:03:27][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:03:35][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:35][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:35][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:37][DEBUG] : SCANNER------ Start scanning…
[2020-01-03 19:03:37][DEBUG] : MEMORY---- Total CPU time used : 2.184s (2.37%) | Last 10 sec : 0.112s (1.12%) | Memory : 39 Mo
[2020-01-03 19:03:37][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:47][INFO] : HEARTBEAT------Quitting learn mode (60s elapsed)
[2020-01-03 19:03:47][DEBUG] : SENDER------Send to jeedom : {‹ learn_mode ›: 0, ‹ source ›: ‹ local ›}

Une idée qui pourrait m’aider ?

Merci !

En lisant le log, je ne sais pas si c’est un hasard mais la ligne

[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.
[2020-01-03 19:03:45][ERROR] : Failed to connect. No retries.

Se répète 3 fois, hors j’ai 3 Homes à la maison, si ça peut aider :confused:

EDIT: en allumant ma TV qui possède un chromecast, la ligne se répète 4 fois :confused:

EDIT2: la communication via le plugin Gcast marche (une fois l’IP rentrée manuellement je peux faire parler mon home mini)

Azz’

Il semblerait qu’il y ait eu des changements du côté de google.
Je n’arrivais plus à créer de groupe.
J’ai refait une maison et réintégré les équipements dedans.
Cela a résolu mon problème.

Testé, pas de changement pour le plug-in…

Par contre j’ai 66 équipements à réintégrer dans home :sob::sob::sob:

Désolé !!!

Pas grave, ça m’occupe pendant que je cherche su le plug-in :slight_smile:

@Azzoth : Pour ton problème va voir ici pour la résolution : https://community.jeedom.com/t/aucun-chrome-cast-trouve-sur-google-cast/13099/9

Cette résolution est valable pour ceux qui ont ça dans les logs

[ERROR] : Failed to connect. No retries.

2 « J'aime »

:pray::wave::pray::wave::pray::wave::pray:

Merci beaucoup!

Merci pour le suivi! Ça marche impec!

Super le lien pour changer de version à fonctionner. Merci beaucoup

Juste pour partager une info qu’il serait intéressante de rajouter à la FAQ dans la section TTS :

Ma config :

  • Jeedom v4.0.35
  • Debian 10 (Buster)
  • Plug-in Google Cast dans sa version du 2019-08-27 23:18:12

Le TTS ainsi que la lecture des médias ne fonctionnaient pas alors que la communication était bonne (les commandes arrivaient sur le Google Home).
J’ai du installer le paquet ffmpeg via SSH sur ma Debian pour que ça fonctionne :

sudo apt install ffmpeg

Depuis c’est nickel. Pour ceux que ça peut aider…

@HollyFredD : la version beta actuelle règle déjà ce problème donc il n y aura plus de problème dans le futur. Elle passera en stable sous peu.

Bonjour GUIREM,
Ton plugin fonctionnait très bien en Jeedom 3 sous une VM Synology, mais depuis le passage en Jeedom V4, ayant tout réinstallé, tout fonctionne à nouveau sauf le scan avec ton plugin, rien ne remonte), testé en stable et là copie log en Béta :
2020-01-05 18:06:11][INFO] : ------------------------------------------------------
[2020-01-05 18:06:11][INFO] : ------------------------------------------------------
[2020-01-05 18:06:11][INFO] : GLOBAL------STARTING googlecast
[2020-01-05 18:06:11][INFO] : GLOBAL------Scan Timeout : 10
[2020-01-05 18:06:11][INFO] : GLOBAL------Scan Frequency : 60
[2020-01-05 18:06:11][INFO] : GLOBAL------Log level : debug
[2020-01-05 18:06:11][INFO] : GLOBAL------Socket port : 55012
[2020-01-05 18:06:11][INFO] : GLOBAL------Socket host : 127.0.0.1
[2020-01-05 18:06:11][INFO] : GLOBAL------PID file : /tmp/googlecast.pid
[2020-01-05 18:06:11][INFO] : GLOBAL------Apikey : *******************************
[2020-01-05 18:06:11][INFO] : GLOBAL------TTS Jeedom server : http://10.0.0.66:80
[2020-01-05 18:06:11][INFO] : GLOBAL------TTS default language : fr-FR
[2020-01-05 18:06:11][INFO] : GLOBAL------TTS default engine : jeedomtts
[2020-01-05 18:06:11][INFO] : GLOBAL------TTS default speech speed : 1.2
[2020-01-05 18:06:11][INFO] : GLOBAL------TTS Google API Key (optional) : NOK
[2020-01-05 18:06:11][INFO] : GLOBAL------Cache status : True
[2020-01-05 18:06:11][INFO] : GLOBAL------Callback : http://10.0.0.66:80/plugins/googlecast/core/php/googlecast.api.php
[2020-01-05 18:06:11][INFO] : GLOBAL------Event cycle : 0.5
[2020-01-05 18:06:11][INFO] : GLOBAL------Main cycle : 2.0
[2020-01-05 18:06:11][INFO] : GLOBAL------Default status message :  
[2020-01-05 18:06:11][INFO] : -----------------------------------------------------
[2020-01-05 18:06:11][DEBUG] : Writing PID 12516 to /tmp/googlecast.pid
[2020-01-05 18:06:11][DEBUG] : Init request module v2.12.4
[2020-01-05 18:06:11][INFO] : GLOBAL------Network communication to jeedom OK.
[2020-01-05 18:06:11][DEBUG] : SOCKETHANDLER------Socket interface started
[2020-01-05 18:06:11][DEBUG] : SOCKETHANDLER------LoopNetServer Thread started
[2020-01-05 18:06:11][INFO] : GLOBAL------Socket started…
[2020-01-05 18:06:11][INFO] : GLOBAL------Waiting for messages…
[2020-01-05 18:06:11][DEBUG] : WARMUPNOTIF------ Checking file generation…
[2020-01-05 18:06:11][DEBUG] : SOCKETHANDLER------Listening on: [127.0.0.1:55012]
[2020-01-05 18:06:11][DEBUG] : SENDER------Send to jeedom : {‹ source ›: ‹ local ›, ‹ started ›: 1}
[2020-01-05 18:06:11][DEBUG] : SCANNER------ Start scanning…
[2020-01-05 18:06:11][DEBUG] : SCANNER------ No need to scan network, all devices are present
[2020-01-05 18:06:17][DEBUG] : SOCKETHANDLER------Client connected to [127.0.0.1:34934]
[2020-01-05 18:06:17][DEBUG] : SOCKETHANDLER------Message read from socket: {« apikey »:« 6WYLNEFgKRL8V1OIpY1arKY4FJGKJeYA »,« cmd »:« learnin »}
[2020-01-05 18:06:17][DEBUG] : SOCKETHANDLER------Client disconnected from [127.0.0.1:34934]
[2020-01-05 18:06:17][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2020-01-05 18:06:17][DEBUG] : SOCKET-READ------Received command from jeedom : learnin
[2020-01-05 18:06:17][DEBUG] : SOCKET-READ------Enter in learn mode
[2020-01-05 18:06:17][DEBUG] : SENDER------Send to jeedom : {‹ source ›: ‹ local ›, ‹ learn_mode ›: 1}
[2020-01-05 18:06:19][DEBUG] : SCANNER------ Start scanning…
[2020-01-05 18:06:19][DEBUG] : MEMORY---- Total CPU time used : 2.480s (31.00%) | Last 8 sec : 2.480s (31.00%) | Memory : 52 Mo
[2020-01-05 18:06:19][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-05 18:06:42][ERROR] : Failed to connect. No retries.
[2020-01-05 18:06:58][ERROR] : Failed to connect. No retries.
[2020-01-05 18:07:03][ERROR] : Failed to connect. No retries.
[2020-01-05 18:07:03][DEBUG] : SCANNER------ Start scanning…
[2020-01-05 18:07:03][DEBUG] : MEMORY---- Total CPU time used : 2.656s (5.11%) | Last 44 sec : 0.176s (0.40%) | Memory : 52 Mo
[2020-01-05 18:07:03][DEBUG] : SCANNER------ Looking for chromecasts on network…
[2020-01-05 18:07:19][INFO] : HEARTBEAT------Quitting learn mode (60s elapsed)
[2020-01-05 18:07:19][DEBUG] : SENDER------Send to jeedom : {‹ source ›: ‹ local ›, ‹ learn_mode ›: 0}
[2020-01-05 18:07:22][ERROR] : Failed to connect. No retries.
[2020-01-05 18:07:42][ERROR] : Failed to connect. No retries.
[2020-01-05 18:08:02][ERROR] : Failed to connect. No retries.
[2020-01-05 18:09:03][DEBUG] : SCANNER------ Start scanning…
[2020-01-05 18:09:03][DEBUG] : MEMORY---- Total CPU time used : 3.104s (1.80%) | Last 120 sec : 0.448s (0.37%) | Memory : 52 Mo
[2020-01-05 18:09:03][DEBUG] : SCANNER------ No need to scan network, all devices are present

Merci d’avance

guirem a répondu, juste au dessus :