Bonjour à tous,
Je rencontre un problème avec le plugin Harmony Hub. Mon installation fonctionnait bien jusqu’à ce que je change de routeur Wifi. Comme mon Harmony Hub a changé d’adresse, j’ai renseigné la nouvelle adresse dans la configuration du plugin et j’ai lancé une mise à jour des configurations. Et là, plus aucune activité n’est trouvée.
Quand j’appelle mon Harmony Hub directement via la commande Curl, j’obtiens bien une réponse
curl -X POST 192.168.1.XX:8088 -H 'Accept: utf-8' -H 'Content-Type: application/json' -H 'Origin: http://sl.dhg.myharmony.com' -d '{"id":1,"cmd":"setup.account?getProvisionInfo","params":{}}'
{"id":1,"msg":"OK","data":{"email":"xxx.xxx@gmail.com","username":"xxx.xx@gmail.com","activeRemoteId":16138087,"discoveryServer":"https:\/\/svcs.myharmony.com\/Discovery\/Discovery.svc","se":true,"susChannel":"production","mode":3,"language":"fr-FR","accountId":"8885212"},"code":"200"}
Par contre, quand j’appelle le fichier main.py, j’obtiens l’erreur suivante:
XX@raspberrypi:/var/www/html/plugins/harmonyhub/3rdparty/PyHarmony2/harmony $ python __main__.py --loglevel DEBUG --harmony_ip 192.168.1.xx show_config
DEBUG: asyncio Using selector: EpollSelector
DEBUG: __main__ Executing task get_client
DEBUG: client Starting connect.
DEBUG: client Retrieving Harmony Hub information.
Traceback (most recent call last):
File "__main__.py", line 641, in <module>
main()
File "__main__.py", line 631, in main
sys.exit(args.func(args))
File "__main__.py", line 340, in show_config
client = get_client(args.harmony_ip)
File "__main__.py", line 56, in get_client
return run_in_loop_now('get_client', func)
File "__main__.py", line 34, in run_in_loop_now
loop.run_until_complete(func_task)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/var/www/html/plugins/harmonyhub/3rdparty/PyHarmony2/harmony/client.py", line 516, in create_and_connect_client
connected = await client.connect()
File "/var/www/html/plugins/harmonyhub/3rdparty/PyHarmony2/harmony/client.py", line 141, in connect
await self._perform_connect()
File "/var/www/html/plugins/harmonyhub/3rdparty/PyHarmony2/harmony/client.py", line 125, in _perform_connect
await self.retrieve_hub_info()
File "/var/www/html/plugins/harmonyhub/3rdparty/PyHarmony2/harmony/client.py", line 103, in retrieve_hub_info
json_response = await response.json()
File "/usr/local/lib/python3.7/dist-packages/aiohttp/client_reqrep.py", line 1110, in json
headers=self.headers,
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('http://192.168.1.xx:8088/')
La page santé de mon plugin
J’utilise raspbian sur un Rpi4
uname -a
Linux raspberrypi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
J’ai essayé de desinstallé le plugin et de le réinstaller mais ça n’a pas fonctionné.
Je sèche.
Avez-vous une idée ?
Un grand merci d’avance