-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on ViessmannOauthClient::getCode() #1
Comments
C'est parce que tu as un retourn à la ligne en trop dans ton fichier
credentials.properties.
Assure toi bien de n'avoir que 2 lignes dans ton fichier et donc pas de
ligne en dessous du password.
Bien à toi,
Le ven. 7 sept. 2018 à 14:30, drlaplace <notifications@github.com> a écrit :
… I get following errors when I start Main.php. Before I insert user and pwd
in credentials.
PHP Notice: Undefined offset: 0 in /home/ss/Downloads/Viessmann-Api-master/src/Oauth/ViessmannOauthClient.php on line 78
PHP Fatal error: Uncaught TypeError: Return value of Viessmann\Oauth\ViessmannOauthClient::getCode() must be of the type string, null returned in /home/ss/Downloads/Viessmann-Api-master/src/Oauth/ViessmannOauthClient.php:78
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AQ_DU4GJpJ9xsX8_Z_6XQiJEyWOtivLLks5uYmbjgaJpZM4WevfN>
.
|
Sorry didn't notice you did write in english.
So be carreful to avoid having a carriage return after the second line
containing the password in the credentials.properties file.
Best Regards,
Le ven. 7 sept. 2018 à 14:40, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… C'est parce que tu as un retourn à la ligne en trop dans ton fichier
credentials.properties.
Assure toi bien de n'avoir que 2 lignes dans ton fichier et donc pas de
ligne en dessous du password.
Bien à toi,
Le ven. 7 sept. 2018 à 14:30, drlaplace ***@***.***> a
écrit :
> I get following errors when I start Main.php. Before I insert user and
> pwd in credentials.
>
> PHP Notice: Undefined offset: 0 in /home/ss/Downloads/Viessmann-Api-master/src/Oauth/ViessmannOauthClient.php on line 78
> PHP Fatal error: Uncaught TypeError: Return value of Viessmann\Oauth\ViessmannOauthClient::getCode() must be of the type string, null returned in /home/ss/Downloads/Viessmann-Api-master/src/Oauth/ViessmannOauthClient.php:78
>
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#1>, or mute the
> thread
> <https://github.com/notifications/unsubscribe-auth/AQ_DU4GJpJ9xsX8_Z_6XQiJEyWOtivLLks5uYmbjgaJpZM4WevfN>
> .
>
|
Thanks for your fast answer! |
Tu peux "hardcoder les user/mdp" directement dans le main si jamais. Je
suis passé par un fichier externe pour éviter de commiter par erreur mes
credentials sur le github.
Donc dans le Main.php tu mets:
$params=[
"user"=>"tonUser",
"pwd"=>"tonPassword",
"uri"=>"vicare://oauth-callback/everest"
];
Le ven. 7 sept. 2018 à 15:19, drlaplace <notifications@github.com> a écrit :
… Thanks for your fast answer!
Unfortunately I have no carriage return after the second line. Error still
the same.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ_DU7rRnGHePDySuwGTBhHG6Vf8eS-2ks5uYnJLgaJpZM4WevfN>
.
|
Sorry my bad. I get this Error code: |
Normalement non les librairies que j'utilises sont censées se trouver dans
vendor/lib.
J'utilise composer pour gérer les dépendances. Ce dernier génère un fichier
autoload.php à inclure dans son code afin de charger toutes les dépendances.
Normalement c'est fait dans le main via
require __DIR__ . '/../vendor/autoload.php';
Le ven. 7 sept. 2018 à 15:34, drlaplace <notifications@github.com> a écrit :
… Sorry my bad. I get this Error code:
Fatal error: Uncaught Error: Class 'TomPHP\Siren\Entity' not found in
/home/ss/Downloads/Viessmann-Api-master/src/API/ViessmannAPI.php:58
Do I have to install anything?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ_DUwWNeSiKlnX1b8wREfmq5CFrfQt_ks5uYnX9gaJpZM4WevfN>
.
|
Dans la class ViessmannApi je défini
use TomPHP\Siren\{ActionBuilder, Entity, Action};
C'est censé importer la class Entity qui est visiblement celle qu'il ne
trouve pas.
Pourriez-vous m'envoyer votre Main.php(sans les user/pwd bien sûr) ?
Le ven. 7 sept. 2018 à 15:38, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… Normalement non les librairies que j'utilises sont censées se trouver dans
vendor/lib.
J'utilise composer pour gérer les dépendances. Ce dernier génère un
fichier autoload.php à inclure dans son code afin de charger toutes les
dépendances.
Normalement c'est fait dans le main via
require __DIR__ . '/../vendor/autoload.php';
Le ven. 7 sept. 2018 à 15:34, drlaplace ***@***.***> a
écrit :
> Sorry my bad. I get this Error code:
> Fatal error: Uncaught Error: Class 'TomPHP\Siren\Entity' not found in
> /home/ss/Downloads/Viessmann-Api-master/src/API/ViessmannAPI.php:58
> Do I have to install anything?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AQ_DUwWNeSiKlnX1b8wREfmq5CFrfQt_ks5uYnX9gaJpZM4WevfN>
> .
>
|
En fait, j'ai les mêmes problèmes que vous en lançant en command line. Je
lançais toujours via mon ide.
Je vais regarder.
Bien à vous,
Le ven. 7 sept. 2018 à 15:40, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… Dans la class ViessmannApi je défini
use TomPHP\Siren\{ActionBuilder, Entity, Action};
C'est censé importer la class Entity qui est visiblement celle qu'il ne
trouve pas.
Pourriez-vous m'envoyer votre Main.php(sans les user/pwd bien sûr) ?
Le ven. 7 sept. 2018 à 15:38, thetrueavatar Thetrueavatar <
***@***.***> a écrit :
> Normalement non les librairies que j'utilises sont censées se trouver
> dans vendor/lib.
> J'utilise composer pour gérer les dépendances. Ce dernier génère un
> fichier autoload.php à inclure dans son code afin de charger toutes les
> dépendances.
> Normalement c'est fait dans le main via
> require __DIR__ . '/../vendor/autoload.php';
>
>
> Le ven. 7 sept. 2018 à 15:34, drlaplace ***@***.***> a
> écrit :
>
>> Sorry my bad. I get this Error code:
>> Fatal error: Uncaught Error: Class 'TomPHP\Siren\Entity' not found in
>> /home/ss/Downloads/Viessmann-Api-master/src/API/ViessmannAPI.php:58
>> Do I have to install anything?
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#1 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AQ_DUwWNeSiKlnX1b8wREfmq5CFrfQt_ks5uYnX9gaJpZM4WevfN>
>> .
>>
>
|
Hum. Apparemment en ligne de commande l'autoload ne fonctionnerait qu'en
"interactive shell"(php -a). Je vais creuser pour voir comment mon ide fait.
Le ven. 7 sept. 2018 à 15:46, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… En fait, j'ai les mêmes problèmes que vous en lançant en command line. Je
lançais toujours via mon ide.
Je vais regarder.
Bien à vous,
Le ven. 7 sept. 2018 à 15:40, thetrueavatar Thetrueavatar <
***@***.***> a écrit :
> Dans la class ViessmannApi je défini
> use TomPHP\Siren\{ActionBuilder, Entity, Action};
> C'est censé importer la class Entity qui est visiblement celle qu'il ne
> trouve pas.
> Pourriez-vous m'envoyer votre Main.php(sans les user/pwd bien sûr) ?
>
> Le ven. 7 sept. 2018 à 15:38, thetrueavatar Thetrueavatar <
> ***@***.***> a écrit :
>
>> Normalement non les librairies que j'utilises sont censées se trouver
>> dans vendor/lib.
>> J'utilise composer pour gérer les dépendances. Ce dernier génère un
>> fichier autoload.php à inclure dans son code afin de charger toutes les
>> dépendances.
>> Normalement c'est fait dans le main via
>> require __DIR__ . '/../vendor/autoload.php';
>>
>>
>> Le ven. 7 sept. 2018 à 15:34, drlaplace ***@***.***> a
>> écrit :
>>
>>> Sorry my bad. I get this Error code:
>>> Fatal error: Uncaught Error: Class 'TomPHP\Siren\Entity' not found in
>>> /home/ss/Downloads/Viessmann-Api-master/src/API/ViessmannAPI.php:58
>>> Do I have to install anything?
>>>
>>> —
>>> You are receiving this because you commented.
>>> Reply to this email directly, view it on GitHub
>>> <#1 (comment)>,
>>> or mute the thread
>>> <https://github.com/notifications/unsubscribe-auth/AQ_DUwWNeSiKlnX1b8wREfmq5CFrfQt_ks5uYnX9gaJpZM4WevfN>
>>> .
>>>
>>
|
OK. take your time. I can only test it again on Monday |
tkt l'avantage c'est que j'ai le même prob donc je peux le fixer tout seul
;-).
Le ven. 7 sept. 2018 à 16:26, drlaplace <notifications@github.com> a écrit :
… OK. take your time. I can only test it again on Monday
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ_DU856U3p3Fs7AxkxadIvk3WEFMmOcks5uYoH9gaJpZM4WevfN>
.
|
Bon en fait, en effet, les librairies siren ne sont pas dans le github pour
une raison que j'ignore.
Je vais les rajouter...
Le ven. 7 sept. 2018 à 16:31, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… tkt l'avantage c'est que j'ai le même prob donc je peux le fixer tout seul
;-).
Le ven. 7 sept. 2018 à 16:26, drlaplace ***@***.***> a
écrit :
> OK. take your time. I can only test it again on Monday
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AQ_DU856U3p3Fs7AxkxadIvk3WEFMmOcks5uYoH9gaJpZM4WevfN>
> .
>
|
Voila c'est réparé. J'avais mis une dépendance sur le master de Siren et
donc il voulait pas commiter. J'ai mis une dépendance sur la release 0.1 et
c'est en ordre now. J'ai fait moi même le test. Pas encore résolu le
problème du fichier de configuration mais si tu hardcodes le user/pwd ça
devrait marcher.
Le ven. 7 sept. 2018 à 16:46, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… Bon en fait, en effet, les librairies siren ne sont pas dans le github
pour une raison que j'ignore.
Je vais les rajouter...
Le ven. 7 sept. 2018 à 16:31, thetrueavatar Thetrueavatar <
***@***.***> a écrit :
> tkt l'avantage c'est que j'ai le même prob donc je peux le fixer tout
> seul ;-).
>
> Le ven. 7 sept. 2018 à 16:26, drlaplace ***@***.***> a
> écrit :
>
>> OK. take your time. I can only test it again on Monday
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#1 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AQ_DU856U3p3Fs7AxkxadIvk3WEFMmOcks5uYoH9gaJpZM4WevfN>
>> .
>>
>
|
J'ai corrigé le problème de chargement depuis le fichiers. Tout devrait
être en ordre.
Le lun. 10 sept. 2018 à 10:12, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… Voila c'est réparé. J'avais mis une dépendance sur le master de Siren et
donc il voulait pas commiter. J'ai mis une dépendance sur la release 0.1 et
c'est en ordre now. J'ai fait moi même le test. Pas encore résolu le
problème du fichier de configuration mais si tu hardcodes le user/pwd ça
devrait marcher.
Le ven. 7 sept. 2018 à 16:46, thetrueavatar Thetrueavatar <
***@***.***> a écrit :
> Bon en fait, en effet, les librairies siren ne sont pas dans le github
> pour une raison que j'ignore.
> Je vais les rajouter...
>
> Le ven. 7 sept. 2018 à 16:31, thetrueavatar Thetrueavatar <
> ***@***.***> a écrit :
>
>> tkt l'avantage c'est que j'ai le même prob donc je peux le fixer tout
>> seul ;-).
>>
>> Le ven. 7 sept. 2018 à 16:26, drlaplace ***@***.***> a
>> écrit :
>>
>>> OK. take your time. I can only test it again on Monday
>>>
>>> —
>>> You are receiving this because you commented.
>>> Reply to this email directly, view it on GitHub
>>> <#1 (comment)>,
>>> or mute the thread
>>> <https://github.com/notifications/unsubscribe-auth/AQ_DU856U3p3Fs7AxkxadIvk3WEFMmOcks5uYoH9gaJpZM4WevfN>
>>> .
>>>
>>
|
Thanks. It works!! |
Ben c'est un peu le problème que je recontre. Certaines données accessibles
avant ne le sont plus. Perso je n'arrive même plus à récupérer la
température courante de mon eau chaude sanitaire. Je vois que ViCare non
plus et pour cause elle n'est pas dans les données renvoyée par le nouveau
service.
Par contre, l'application VitrolPlus a la donnée mais elle attaque un tout
vieux service en SOAP et qui devrait prochainement être décommisionné...
j'ai déjà contacté le support Viessmann et il semble que la maj de fin Août
a été faite par erreur. Du coup l'application ViCare n'était pas prête et
c'est pour ça qu'on a accès à que dalle dedans. Le gars m'a dit que ça
serait ok dans la version 2.0.5. Pour le problème de données manquante, il
devait transmettre en Allemagne car c'es eux qui gère le backend exposant
les données....
Le lun. 10 sept. 2018 à 11:28, drlaplace <notifications@github.com> a
écrit :
… Thanks. It works!!
Is there any to get the gas consumption? The given URL can't be found:
heating.gas.consumption.dhw
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ_DU-2v3s7rL7mZWFFXtDQGgRzwsa2Oks5uZjDBgaJpZM4WevfN>
.
|
Pour info, j'ai un peu adapté la façon de fonctionner. Je souhaitais que
mon api soit une librairie externe et j'ai réussi. Je compresse cela en
phar.
Désormais dans le répertoire bin il y a un bin/Viessmann-Api-0.1.phar
Dans le fichier d'appel, il suffit d'inclure
include 'phar://../bin/Viessmann-Api-0.1.phar/index.php';
J'ai mis le Main.php dans le répertoire example.
Comme cela, tu n'auras besoin que du fichier phar sur le raspberry en plus
du script Main.php.
Bien à toi,
Claude
Le lun. 10 sept. 2018 à 12:01, thetrueavatar Thetrueavatar <
thetrueavatar@gmail.com> a écrit :
… Ben c'est un peu le problème que je recontre. Certaines données
accessibles avant ne le sont plus. Perso je n'arrive même plus à récupérer
la température courante de mon eau chaude sanitaire. Je vois que ViCare non
plus et pour cause elle n'est pas dans les données renvoyée par le nouveau
service.
Par contre, l'application VitrolPlus a la donnée mais elle attaque un tout
vieux service en SOAP et qui devrait prochainement être décommisionné...
j'ai déjà contacté le support Viessmann et il semble que la maj de fin
Août a été faite par erreur. Du coup l'application ViCare n'était pas prête
et c'est pour ça qu'on a accès à que dalle dedans. Le gars m'a dit que ça
serait ok dans la version 2.0.5. Pour le problème de données manquante, il
devait transmettre en Allemagne car c'es eux qui gère le backend exposant
les données....
Le lun. 10 sept. 2018 à 11:28, drlaplace ***@***.***> a
écrit :
> Thanks. It works!!
> Is there any to get the gas consumption? The given URL can't be found:
> heating.gas.consumption.dhw
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AQ_DU-2v3s7rL7mZWFFXtDQGgRzwsa2Oks5uZjDBgaJpZM4WevfN>
> .
>
|
Problème fixé |
I get following errors when I start Main.php. Before I insert user and pwd in credentials.
The text was updated successfully, but these errors were encountered: