noiwid / tiko_heating_api

Component allowing to manage traditional radiators connected via the TIKO solution from within Home Assistant server. It requires hosting a web page that will serve as an endpoint to communicate with TIKO through their API.
19 stars 6 forks source link

besoin d'aide pour débutant #12

Open phid78 opened 10 months ago

phid78 commented 10 months ago

Bonjour, Je n'y connais malheureusement rien et tente d'apprendre. J'ai fait les étapes : 1-2-3-4 (mais j'ai l'impression que je n'ai pas tout). J'ai compris qu'il fallait heberger le fichier tiko.php. J'ai un site sur 02switch, j'ai crée un sous domaine et maintenant.... que vais je faire..... Me suffit il de mettre le fichier php a la racine de mon sous domaine ? En vous remerciant pour votre aide.

letrouf commented 10 months ago

Merci pour ta réponse rapide, je ne l'avais vu noté dans aucun tuto. J'avance petit à petit. J'ai donc réussi à récupérer le endpoint token mais ça me renvoie un 404 not found. Est-ce que c'est normal que le endpoint change à chaque fois que j'appelle le "tail share/htdocs/tiko/tiko.env" ?

noiwid commented 10 months ago

c'est le token ou le endpoint qui change ? quelle est l'URL sur laquelle tu essaies d'y accéder?

Le jeu. 30 nov. 2023, 22:12, letrouf @.***> a écrit :

Merci pour ta réponse rapide, je ne l'avais vu noté dans aucun tuto. J'avance petit à petit. J'ai donc réussi à récupérer le endpoint token mais ça me renvoie un 404 not found. Est-ce que c'est normal que le endpoint change à chaque fois que j'appelle le "tail share/htdocs/tiko/tiko.env" ?

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1834567528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A5P43H72FNW5EQSPSTYHDZD5AVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGU3DONJSHA . You are receiving this because you were mentioned.Message ID: @.***>

letrouf commented 10 months ago

non non le token pardon

noiwid commented 10 months ago

que fais-tu pour qu'il soit recrée ?

si le fichier est la, normalement en accédant a la page web via: http://192.168.0.2/tiko/tiko.php?install=true&hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx tu devrais accéder à la page d'installation avec les infos pour l'ajouter dans H.A...

nb: il faut remplacer l'ip par la tienne

letrouf commented 10 months ago

si je retape "tail share/htdocs/tiko/tiko.env" le token change, je ne sais pas si c'est normal. En tapant l'adresse avec le bon ip et le token je tombe sur Capture d’écran 2023-11-30 220639

noiwid commented 10 months ago

il doit manquer un truc dans ton url... si c'est une ip locale tu ne risques rien à la transmettre, et puis tu peux toujours modifier le token quand ce sera réglé...

Le jeu. 30 nov. 2023, 22:39, letrouf @.***> a écrit :

si je retape "tail share/htdocs/tiko/tiko.env" le token change, je ne sais pas si c'est normal. En tapant l'adresse avec le bon ip et le token je tombe sur Capture.d.ecran.2023-11-30.220639.jpg (view on web) https://github.com/noiwid/tiko_heating_api/assets/146136707/a54366f0-1b0a-4d09-93ee-125e3a1516b3

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1834601649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A6KYKZIKGSHDM7NX3LYHD4KLAVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGYYDCNRUHE . You are receiving this because you were mentioned.Message ID: @.***>

letrouf commented 10 months ago

La voici http://192.168.10.15/tiko.php?install=true&hash=41d30e57a2dbb28f420dda8a8a5b21bb080b1201027a50f6d31cd44e2756ee40

noiwid commented 10 months ago

Essaye: http://192.168.10.15/tiko/tiko.php?install=true&hash=41d30e57a2dbb28f420dda8a8a5b21bb080b1201027a50f6d31cd44e2756ee40 http://192.168.10.15/tiko.php?install=true&hash=41d30e57a2dbb28f420dda8a8a5b21bb080b1201027a50f6d31cd44e2756ee40

Message ID: @.***>

letrouf commented 10 months ago

ca me renvoie sur la page de saisie des identifiants tiko, rien de plus

noiwid commented 10 months ago

il semble y avoir un problème de droits, essaie la commande :

chmod 777 share/htdocs/tiko/ -R

Le jeu. 30 nov. 2023, 22:51, letrouf @.***> a écrit :

ca me renvoie sur la page de saisie des identifiants tiko, rien de plus

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1834618877, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5AZZ4DYWUOVEMHFASWLYHD5UNAVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGYYTQOBXG4 . You are receiving this because you were mentioned.Message ID: @.***>

letrouf commented 10 months ago

idem, page des identifiants tiko avec ton lien et 404 avec le lien normal pour accéder à la config. Jsuis vraiment une quiche désolé.

noiwid commented 10 months ago

es tu abonné direct chez Tiko ? où via Engie?

Le ven. 1 déc. 2023, 08:30, letrouf @.***> a écrit :

idem, page des identifiants tiko avec ton lien et 404 avec le lien normal pour accéder à la config. Jsuis vraiment une quiche désolé.

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1835610765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A5OTPW6LJ5TWOJFWFDYHGBPTAVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVGYYTANZWGU . You are receiving this because you were mentioned.Message ID: @.***>

phid78 commented 10 months ago

Je crois que ca m'a fait ca quand je me suis planté dans mes identifiants, verifie les

letrouf commented 10 months ago

Je suis passé via Engie en effet. Les identifiants sont les bons, ils fonctionnent sur l'appli tiko et sur portal-engie.tiko.ch sans souci.

phid78 commented 10 months ago

est ce bien ceux la d'indiqué dans le fichier .env : tail share/htdocs/tiko/tiko.env

letrouf commented 10 months ago

Tout à fait

phid78 commented 10 months ago

Pour ma part, j'ai avancé : j'avais encore le pb de timeout et compagnie mais de maniere aleatoire, j'en ai deduis que c'était lié au certificat et effectivement, let's encrypt utilise le port 80 comme le serveur Apache. donc j'ai changé le port 80 par 81 de let's encrypt et depuis ce matin plus d'erreur, juste un warning : Updating Command Line Switch Radiateurs on/off took longer than the scheduled update interval 0:01:00 mais en cherchant sur les forums, c'est un bug connu de HA qui devait etre reglé en juin et ça n'a apparement pas été le cas. HA dit de ne pas en tenir compte. Reste que le changement de température n'est pas tenu, comme si au bout d'une minute, tiko recevait l'info de revenir a ses réglages de base.

@letrouf, envoie tes logs apache ca devrait être utile pour noiwid je pense

letrouf commented 10 months ago

Voici : s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started No username and/or password was provided. Skipping account set up. SSL is deactivated and/or you are using a custom config. Here is your web file architecture. total 8 -rw-r--r-- 1 root root 0 Nov 30 17:32 index.php -rw-r--r-- 1 root root 0 Nov 27 21:46 index.php~ drwxrwx--x 2 root root 4096 Nov 30 17:33 tiko drwxrwx--x 2 root root 4096 Nov 27 21:47 tiko~ Starting Apache2... [Fri Dec 01 17:25:52.340860 2023] [mpm_prefork:notice] [pid 78] AH00163: Apache/2.4.58 (Unix) PHP/8.1.26 OpenSSL/3.1.4 mod_wsgi/4.9.4 Python/3.11 configured -- resuming normal operations [Fri Dec 01 17:25:52.340981 2023] [core:notice] [pid 78] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Fri Dec 01 17:35:37.839644 2023] [php:error] [pid 145] [client 192.168.10.78:58311] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [01/Dec/2023:17:35:37 +0100] "GET /tiko.php?install=true&hash=6595d4bb07df5fc9506aa15b093fe9e8d521c0b48ed7a8d95d632ee2e84e71c7 HTTP/1.1" 404 273

phid78 commented 10 months ago

alors deja, je n'ai pas comme toi : index.php et index.php~ Ensuite, je pense que ca : script '/var/www/localhost/htdocs/tiko.php devrait etre a la fin /htdocs/tiko/tiko.php Donc je pense que tu as oublié une etape, surement : mkdir share/htdocs/tiko Personnellement, soit tu attends le retour de noiwid, soit tu tentes :

SylvainDx commented 10 months ago

Je suis passé via Engie en effet. Les identifiants sont les bons, ils fonctionnent sur l'appli tiko et sur portal-engie.tiko.ch sans souci.

Attention reponse rapide sans verification mais il faut peut être modifier l'URL tiko dans le fichier php qui pointe vers l'URL en .fr et non .ch

SylvainDx commented 10 months ago

Ok, j'ai mis mon fichier a la racine de mon sous domaine, j'ai modifié le php comme je suis via mon pilotage elect via engie par : /////////////// // FUNCTION ////////////// if(($hash and $_REQUEST["hash"]==$hash) or $_REQUEST["install"]){ function f_tiko($json, $token=false, $account_id=false){ if(!$account_id) { $url = "https://portal-engie.tiko.ch"; $method = "POST"; } else { $url = "[https://portal-engie.tiko.ch".$account_id."/consumption_summary/](https://portal-engie.tiko.ch**%22.$account_id.%22/consumption_summary/)"; $method = "GET"; } $headers = array( 'Content-Type:application/json', // 'User-agent:Mozilla/5.0 (Linux; Android 13; Pixel 4a Build/T1B3.221003.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/106.0.5249.126 Mobile Safari/537.36' // needed with tiko.ch api endpoint

J'ai bien un fichier .env et spyc qui s'est creer. Quand je vais sur http://sous-domaine/tiko.php?install=true&hash=clé du fichier .env ca me rammene a la page 1 saisissez vos identifiant tiko.

Je precise que j'ai été sur la page https://portal-engie.tiko.ch, mis mes identifiant et j'accede bien a mon installation

Comme ça a été fait ici

noiwid commented 10 months ago

le endpoint chez Tiko doit pas être le même, l'App que tu utilises c'est Mon Pilotage Elec?

Le ven. 1 déc. 2023, 19:35, SylvainDx @.***> a écrit :

Ok, j'ai mis mon fichier a la racine de mon sous domaine, j'ai modifié le php comme je suis via mon pilotage elect via engie par : /////////////// // FUNCTION ////////////// if(($hash and $_REQUEST["hash"]==$hash) or $_REQUEST["install"]){ function f_tiko($json, $token=false, $account_id=false){ if(!$account_id) { $url = "https://portal-engie.tiko.ch https://portal-engie.tiko.ch"; $method = "POST"; } else { $url = " https://portal-engie.tiko.ch".$account_id."/consumption_summary/"; $method = "GET"; } $headers = array( 'Content-Type:application/json', // 'User-agent:Mozilla/5.0 (Linux; Android 13; Pixel 4a Build/T1B3.221003.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/106.0.5249.126 Mobile Safari/537.36' // needed with tiko.ch api endpoint

J'ai bien un fichier .env et spyc qui s'est creer. Quand je vais sur http://sous-domaine/tiko.php?install=true&hash=clé du fichier .env ca me rammene a la page 1 saisissez vos identifiant tiko.

Je precise que j'ai été sur la page https://portal-engie.tiko.ch, mis mes identifiant et j'accede bien a mon installation

Comme ça a été fait ici

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1836593271, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A6OGDGD23AVLVJ4BJTYHIPN3AVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGU4TGMRXGE . You are receiving this because you were mentioned.Message ID: @.***>

letrouf commented 10 months ago

En fait l'appli est exactement la même, avec les mêmes identifiants et le même visuel, ils ont juste rebrandé. Du coup je suis sur l'appli Tiko de base. Je vais tester ce qu'a dit Phid78 pour voir

le endpoint chez Tiko doit pas être le même, l'App que tu utilises c'est Mon Pilotage Elec? Le ven. 1 déc. 2023, 19:35, SylvainDx @.> a écrit : Ok, j'ai mis mon fichier a la racine de mon sous domaine, j'ai modifié le php comme je suis via mon pilotage elect via engie par : /////////////// // FUNCTION ////////////// if(($hash and $_REQUEST["hash"]==$hash) or $_REQUEST["install"]){ function f_tiko($json, $token=false, $account_id=false){ if(!$account_id) { $url = "https://portal-engie.tiko.ch https://portal-engie.tiko.ch"; $method = "POST"; } else { $url = " https://portal-engie.tiko.ch".$account_id."/consumption_summary/"; $method = "GET"; } $headers = array( 'Content-Type:application/json', // 'User-agent:Mozilla/5.0 (Linux; Android 13; Pixel 4a Build/T1B3.221003.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/106.0.5249.126 Mobile Safari/537.36' // needed with tiko.ch api endpoint J'ai bien un fichier .env et spyc qui s'est creer. Quand je vais sur http://sous-domaine/tiko.php?install=true&hash=clé du fichier .env ca me rammene a la page 1 saisissez vos identifiant tiko. Je precise que j'ai été sur la page https://portal-engie.tiko.ch, mis mes identifiant et j'accede bien a mon installation Comme ça a été fait ici — Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A6OGDGD23AVLVJ4BJTYHIPN3AVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGU4TGMRXGE . You are receiving this because you were mentioned.Message ID: @.>

letrouf commented 10 months ago

J'ai supprimé le dossier comme conseillé, j'ai tout remis sans souci jusqu'aux identifiants mais tjs aucun accès à la page de config, même erreur "Not Found The requested URL was not found on this server."

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started No username and/or password was provided. Skipping account set up. SSL is deactivated and/or you are using a custom config. Here is your web file architecture. total 8 -rw-r--r-- 1 root root 0 Nov 30 17:32 index.php -rw-r--r-- 1 root root 0 Nov 27 21:46 index.php~ drwxrwx--x 2 root root 4096 Nov 30 17:33 tiko drwxrwx--x 2 root root 4096 Nov 27 21:47 tiko~ Starting Apache2... [Fri Dec 01 17:25:52.340860 2023] [mpm_prefork:notice] [pid 78] AH00163: Apache/2.4.58 (Unix) PHP/8.1.26 OpenSSL/3.1.4 mod_wsgi/4.9.4 Python/3.11 configured -- resuming normal operations [Fri Dec 01 17:25:52.340981 2023] [core:notice] [pid 78] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Fri Dec 01 17:35:37.839644 2023] [php:error] [pid 145] [client 192.168.10.78:58311] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [01/Dec/2023:17:35:37 +0100] "GET /tiko.php?install=true&hash=6595d4bb07df5fc9506aa15b093fe9e8d521c0b48ed7a8d95d632ee2e84e71c7 HTTP/1.1" 404 273 192.168.10.78 - - [01/Dec/2023:17:36:30 +0100] "-" 408 - [Fri Dec 01 22:39:10.978316 2023] [php:warn] [pid 146] [client 192.168.10.78:61023] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43 [Fri Dec 01 22:39:11.251745 2023] [php:warn] [pid 146] [client 192.168.10.78:61023] PHP Warning: Undefined variable $_SELF in /share/htdocs/tiko/tiko.php on line 854 192.168.10.78 - - [01/Dec/2023:22:39:10 +0100] "GET /tiko/tiko.php HTTP/1.1" 200 2085 192.168.10.78 - - [01/Dec/2023:22:39:23 +0100] "POST /tiko/tiko.php HTTP/1.1" 302 - [Fri Dec 01 22:39:23.121685 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418060 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418131 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418146 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418158 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418172 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 135, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.498225 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Undefined variable $_SELF in /share/htdocs/tiko/tiko.php on line 854, referer: http://192.168.10.15/tiko/tiko.php 192.168.10.78 - - [01/Dec/2023:22:39:23 +0100] "GET /tiko/tiko.php?install=true&hash=07d07f99b13429e56c24fdc3012e6ec7fad6436cdaf3d5e4e49f5133c1b02f75 HTTP/1.1" 200 2085 192.168.10.78 - - [01/Dec/2023:22:40:15 +0100] "-" 408 - [Fri Dec 01 22:42:21.705538 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43 [Fri Dec 01 22:42:21.705618 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "hash" in /share/htdocs/tiko/tiko.php on line 89 [Fri Dec 01 22:42:21.705636 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "install" in /share/htdocs/tiko/tiko.php on line 89 192.168.10.78 - - [01/Dec/2023:22:42:21 +0100] "GET /tiko/tiko.php HTTP/1.1" 200 - 192.168.10.78 - - [01/Dec/2023:22:42:46 +0100] "-" 408 - [Fri Dec 01 22:43:24.530227 2023] [php:error] [pid 144] [client 192.168.10.78:61138] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [01/Dec/2023:22:43:24 +0100] "GET /tiko.php?install=true&hash=07d07f99b13429e56c24fdc3012e6ec7fad436cdaf3d5e4e49f5133c1b02f75 HTTP/1.1" 404 273 192.168.10.78 - - [01/Dec/2023:22:44:16 +0100] "-" 408 -

noiwid commented 10 months ago

il y a un truc bizarre dans tes logs, a certain endroits, il semble chercher la page tiko.php ici : var/www/localhost/htdocs/tiko.php

et dans d'autres c'est dans share/htdocs/tiko/tiko.php...

peux tu me montrer le endpoint dans ton fichier tiko.env?

sur quel environnement tourne ton H.A?

Le ven. 1 déc. 2023, 22:46, letrouf @.***> a écrit :

J'ai supprimé le dossier comme conseillé, j'ai tout remis sans souci jusqu'aux identifiants mais tjs aucun accès à la page de config, même erreur "Not Found The requested URL was not found on this server."

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started No username and/or password was provided. Skipping account set up. SSL is deactivated and/or you are using a custom config. Here is your web file architecture. total 8 -rw-r--r-- 1 root root 0 Nov 30 17:32 index.php -rw-r--r-- 1 root root 0 Nov 27 21:46 index.php~ drwxrwx--x 2 root root 4096 Nov 30 17:33 tiko drwxrwx--x 2 root root 4096 Nov 27 21:47 tiko~ Starting Apache2... [Fri Dec 01 17:25:52.340860 2023] [mpm_prefork:notice] [pid 78] AH00163: Apache/2.4.58 (Unix) PHP/8.1.26 OpenSSL/3.1.4 mod_wsgi/4.9.4 Python/3.11 configured -- resuming normal operations [Fri Dec 01 17:25:52.340981 2023] [core:notice] [pid 78] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Fri Dec 01 17:35:37.839644 2023] [php:error] [pid 145] [client 192.168.10.78:58311] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [01/Dec/2023:17:35:37 +0100] "GET /tiko.php?install=true&hash=6595d4bb07df5fc9506aa15b093fe9e8d521c0b48ed7a8d95d632ee2e84e71c7 HTTP/1.1" 404 273 192.168.10.78 - - [01/Dec/2023:17:36:30 +0100] "-" 408 - [Fri Dec 01 22:39:10.978316 2023] [php:warn] [pid 146] [client 192.168.10.78:61023] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43 [Fri Dec 01 22:39:11.251745 2023] [php:warn] [pid 146] [client 192.168.10.78:61023] PHP Warning: Undefined variable $_SELF in /share/htdocs/tiko/tiko.php on line 854 192.168.10.78 - - [01/Dec/2023:22:39:10 +0100] "GET /tiko/tiko.php HTTP/1.1" 200 2085 192.168.10.78 - - [01/Dec/2023:22:39:23 +0100] "POST /tiko/tiko.php HTTP/1.1" 302 - [Fri Dec 01 22:39:23.121685 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418060 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418131 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418146 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418158 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 134, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.418172 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Trying to access array offset on value of type null in /share/htdocs/tiko/tiko.php on line 135, referer: http://192.168.10.15/tiko/tiko.php [Fri Dec 01 22:39:23.498225 2023] [php:warn] [pid 147] [client 192.168.10.78:61024] PHP Warning: Undefined variable $_SELF in /share/htdocs/tiko/tiko.php on line 854, referer: http://192.168.10.15/tiko/tiko.php 192.168.10.78 - - [01/Dec/2023:22:39:23 +0100] "GET /tiko/tiko.php?install=true&hash=07d07f99b13429e56c24fdc3012e6ec7fad6436cdaf3d5e4e49f5133c1b02f75 HTTP/1.1" 200 2085 192.168.10.78 - - [01/Dec/2023:22:40:15 +0100] "-" 408 - [Fri Dec 01 22:42:21.705538 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "enr_ok" in /share/htdocs/tiko/tiko.php on line 43 [Fri Dec 01 22:42:21.705618 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "hash" in /share/htdocs/tiko/tiko.php on line 89 [Fri Dec 01 22:42:21.705636 2023] [php:warn] [pid 148] [client 192.168.10.78:61132] PHP Warning: Undefined array key "install" in /share/htdocs/tiko/tiko.php on line 89 192.168.10.78 - - [01/Dec/2023:22:42:21 +0100] "GET /tiko/tiko.php HTTP/1.1" 200 - 192.168.10.78 - - [01/Dec/2023:22:42:46 +0100] "-" 408 - [Fri Dec 01 22:43:24.530227 2023] [php:error] [pid 144] [client 192.168.10.78:61138] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [01/Dec/2023:22:43:24 +0100] "GET /tiko.php?install=true&hash=07d07f99b13429e56c24fdc3012e6ec7fad436cdaf3d5e4e49f5133c1b02f75 HTTP/1.1" 404 273 192.168.10.78 - - [01/Dec/2023:22:44:16 +0100] "-" 408 -

— Reply to this email directly, view it on GitHub https://github.com/noiwid/tiko_heating_api/issues/12#issuecomment-1836820224, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFML5A3HCRDIYU5QCI5BZEDYHJF3RAVCNFSM6AAAAAA7NZYMXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWHAZDAMRSGQ . You are receiving this because you were mentioned.Message ID: @.***>

letrouf commented 10 months ago

C'est un home assisant green tout beau tout neuf.

Capture d’écran 2023-12-01 235848

phid78 commented 10 months ago

ton log apache c'est avant ou apres les lignes ssh ?

letrouf commented 10 months ago

Si je comprends bien la question, de base qd j'ouvre Terminal c'est comme ça.

phid78 commented 10 months ago

non , en fait, pour moi ca c'est pas bon : image

tu devrais avoir qu'une ligne index et une ligne tiko.php

letrouf commented 10 months ago

Je remets mon log apache après l'avoir redémarré s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started No username and/or password was provided. Skipping account set up. SSL is deactivated and/or you are using a custom config. Here is your web file architecture. total 4 -rw-r--r-- 1 root root 0 Dec 1 22:35 index.php drwxrwx--x 2 root root 4096 Dec 1 22:39 tiko Starting Apache2... [Sat Dec 02 15:38:18.071480 2023] [mpm_prefork:notice] [pid 78] AH00163: Apache/2.4.58 (Unix) PHP/8.1.26 OpenSSL/3.1.4 mod_wsgi/4.9.4 Python/3.11 configured -- resuming normal operations [Sat Dec 02 15:38:18.073303 2023] [core:notice] [pid 78] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

si je tente d'accéder à http://monip/tiko.php j'ai ça en plus

[Sat Dec 02 15:39:39.470696 2023] [php:error] [pid 143] [client 192.168.10.78:50681] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [02/Dec/2023:15:39:39 +0100] "GET /tiko.php?install=true&hash=07d07f99b13429e56c24fdc3012e6ec7fad436cdaf3d5e4e49f5133c1b02f75 HTTP/1.1" 404 273 [Sat Dec 02 15:39:52.724832 2023] [php:error] [pid 146] [client 192.168.10.78:50682] script '/var/www/localhost/htdocs/tiko.php' not found or unable to stat 192.168.10.78 - - [02/Dec/2023:15:39:52 +0100] "GET /tiko.php HTTP/1.1" 404 273 192.168.10.78 - - [02/Dec/2023:15:40:44 +0100] "-" 408 - 192.168.10.78 - - [02/Dec/2023:15:40:51 +0100] "-" 408 -

phid78 commented 10 months ago

la c'est plus propre PAr contre, tu dois acceder a http://monip/tiko/tiko.php

letrouf commented 10 months ago

Ca me donne une page blanche.

phid78 commented 10 months ago

normalement c'est bon signe si tu rajoute apres tiko.php?hash=ton token tu dois arrivé sur une page avec les infos de tes radiateurs

letrouf commented 10 months ago

Toujours pas désolé. Si je fais http://192.168.10.15/tiko.php?hash=token ca me fait une page blanche, si je fais http://192.168.10.15/tiko/tiko.php?hash=d9a681a28156313c046ba1ce27714086f30dda91b2f47f7fb26f681f j'ai une erreur 404. C'est fou, je vois pas ce que je rate.

phid78 commented 10 months ago

si tu te connecte sur https://portal-engie.tiko.ch/ ca fonctionne ?

letrouf commented 10 months ago

Ouais ouais nickel, j'ai revérifié mais les identifiants sont les bons aussi.

phid78 commented 10 months ago

ok, as tu pensé a modifier le php avant de l'injecter :


///////////////
// FUNCTION
//////////////
if(($hash and $_REQUEST["hash"]==$hash) or $_REQUEST["install"]){
   function f_tiko($json, $token=false, $account_id=false){
      if(!$account_id) {
         $url = "https://portal-engie.tiko.ch/api/v3/graphql/";
         $method = "POST";
      }
      else {
         $url = "https://portal-engie.tiko.ch/api/v3/properties/".$account_id."/consumption_summary/";
         $method = "GET";
      }

avec https://portal-engie.tiko.ch/api/v3/

letrouf commented 10 months ago

Et voilà mon erreur, j'avais pas fait cette modif. J'ai tout supprimé et recommencé à zéro avec la modif. J'ai réussi à passer à la page de config. Nouveau souci. Il faut attendre un peu avant que les données ne remontent? J'ai bien les différents chauffages mais aucune donnée de consigne ni de température ne remonte visiblement. En tout cas merci à vous pour le temps passé à me conseiller.

phid78 commented 10 months ago

reboot ton home assistant, normalement les données remontent immédiatement et se mettent a jours toutes les minutes.

letrouf commented 10 months ago

Malheureusement, ca n'y a rien fait. Pas de remontée de température, tout est grisé. Je peux changer une consigne mais cela n'a aucun effet sur le radiateur ou l'appli tiko. Pourtant les entités ne font pas état d'une erreur.

phid78 commented 10 months ago

grisé comme ca ? ou avec aucune info ? image

letrouf commented 10 months ago

Capture d’écran 2023-12-03 161149 La consigne est modifiable mais n'a aucun effet réel. Capture d’écran 2023-12-03 161301

letrouf commented 10 months ago

Tiens d'ailleurs je vois que par rapport à toi je n'ai pas les boutons de raccourcis (chauffage/extinction) en bas des thermostats. Je les ai bien si je clique sur les 3 points en haut à droite par contre.

phid78 commented 10 months ago

les boutons c'est juste moi qui ai changé la carte. fait une capture dans 'outils de developpement" "etats" dans entité tu ecris "climate"

letrouf commented 10 months ago

Capture d’écran 2023-12-03 162106

phid78 commented 10 months ago

et a cette adresse : https://portal-engie.tiko.ch

letrouf commented 10 months ago

et a cette adresse : https://portal-engie.tiko.ch

Ca marche nickel.

letrouf commented 10 months ago

Tout à fait, aucune erreur de ce côté. Est-ce qu'il y a un log que je peux poster où on pourrait voir à quel endroit la liaison ne se fait pas correctement ?

SylvainDx commented 10 months ago

Toujours pas désolé. Si je fais http://192.168.10.15/tiko.php?hash=token ca me fait une page blanche, si je fais http://192.168.10.15/tiko/tiko.php?hash=d9a681a28156313c046ba1ce27714086f30dda91b2f47f7fb26f681f j'ai une erreur 404. C'est fou, je vois pas ce que je rate.

http://192.168.10.15/tiko/tiko.php?hash=d9a681a28156313c046ba1ce27714086f30dda91b2f47f7fb26f681f&install=true la tu devrais avoir les info qui s'affichent Sinon dans le fichier yaml tu retrouve bien les même url ? normalement tu n'a qu'a copier coller les info que tu récupères sur la page d'info

phid78 commented 10 months ago

Pour ma part @noiwid , j'ai le retour des erreurs Float