[Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Vous avez créé un script LUA dont vous êtes fier, un .sh génial, un programme Python hors du commun, un Tuto, c'est ici que vous pouvez les partager.
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

Bonjour, depuis quelques temps, lors des mises à jour Domoticz en version beta, le programme dysfonctionne : il n’y a plus de remontées de température, consolation de gaz…., seul le changement on/off/eau fonctionne
On est obligé de repasser à une version antérieure (Version: 2023.1 (build 15112) )pour que de nouveau domo2vito.py refonctionne
Pas de message d erreur noté
Quelqu’un a-t-il le même problème ou éventuellement une solution ?
hestia
Messages : 397
Inscription : 12 sept. 2018, 22:36

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par hestia »

bonjour,
peut-être un pb d'autorisation?
A vérifier l'onglet security dans le settings => voir le message d'erreur côté vito pour un diagnostic...
WARNING: from Beta build 2022.2 build 14708 and up API URLs with username and password as parameters are not supported anymore!!
#Use https://username:password@IP:PORT/json.htm instead.
# set the IP in dz setting instead
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

bonjour
je ne suis pas un pro de l informatique
je ne comprend pas trop ce que tu me dis de faire
peux tu m expliquer plus simplement comme si tu parlais a un débutant ;)
hestia
Messages : 397
Inscription : 12 sept. 2018, 22:36

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par hestia »

bonjour,
tu as tout de même pu installer un RPI (ou autre serveur) avec des programmes un peu compliqués et le fameux "programme [qui] dysfonctionne" (domo2vito.py ?)... qui doit être dans un cron (*/3 * * * * /home/pi/domoticz/scripts/python/domo2vito.py update ?) comme indiqué dans le 1er post.
Pourrais-tu te connecter à ce RPI et lancer à la main le fameux "programme [qui] dysfonctionne" et voir le message d'erreur s'il y en a un... pour avancer sur le diagnostic...
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

je suis juste un autodidacte sans formation
pi@rasp2:~/domoticz/scripts/python $ sudo ./domo2vito.py update
Connected to viTalk telnet !
Check viTalk data OK ! (no NULL data received)
0) command : get mode => 1
1) command : get saving => 0
2) command : get party => 0
3) command : get party_soll_temp => 20
4) command : get outdoor_temp => 8.90
5) command : get raum_soll_temp => 18
6) command : get raum_ist_temp => 17.90
7) command : get k_ist_temp => 70.00
8) command : get ww_soll_temp => 54
9) command : get ww_ist_temp => 59.10
10) command : get k_abgas_temp => 44.30
11) command : get power => 0.0
12) command : get errors => 000,000,000,000,000,000,000,000,000,000
13) command : get runtime => 32410626
14) command : get red_raum_soll_temp => 15
+Now I check if I need to update some values into Viessmann boiler or into Domoticz...
Get setpoint temp error - IDX:4
Traceback (most recent call last):
File "./domo2vito.py", line 331, in <module>
temp=int(float(get_setpoint_temp(dummy_idx['party_soll_temp'])))
TypeError: float() argument must be a string or a number
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

voila ce que j ai avec une version qui fonctionne :
  • pi@rasp2:~/domoticz/scripts/python $ sudo ./domo2vito.py update
    Connected to viTalk telnet !
    Check viTalk data OK ! (no NULL data received)
    0) command : get mode => 1
    1) command : get saving => 0
    2) command : get party => 0
    3) command : get party_soll_temp => 20
    4) command : get outdoor_temp => 7.20
    5) command : get raum_soll_temp => 18
    6) command : get raum_ist_temp => 18.30
    7) command : get k_ist_temp => 60.00
    8) command : get ww_soll_temp => 54
    9) command : get ww_ist_temp => 57.30
    10) command : get k_abgas_temp => 24.00
    11) command : get power => 0.0
    12) command : get errors => 000,000,000,000,000,000,000,000,000,000
    13) command : get runtime => 32410626
    14) command : get red_raum_soll_temp => 15
    +Now I check if I need to update some values into Viessmann boiler or into Domoticz...
    NOT Holiday mode : I check if reduced temp. = domoticz reduced setpoint temp.
    +Now I calculate the gas consumed since last script call:
    -Viessmann boiler runtime since last script call (sec) = 0
    -Viessmann boiler power average (%) = 0.0
    -Estimated gas used (liter) = 0.0
    +Now I check boiler error...
    -no internal error : all it is OK (previous code=0)
hestia
Messages : 397
Inscription : 12 sept. 2018, 22:36

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par hestia »

donc ça marche ou ancienne log?
Si toujours KO, pourrais-tu essayer sur la commande suivante depuis le RPI de la chaudière pour vérifier les autorisations

Code : Tout sélectionner

curl "http://IPDOMOTICZ:8080/json.htm?type=command&param=switchlight&idx=205&switchcmd=Toggle"
en mettant l'IP de dz
le port si pas 8080
205 = l'idx d'un switch qui fonctionne (dummy)
si ok ça donne

Code : Tout sélectionner

{
        "status" : "OK",
        "title" : "SwitchLight"
}
et voir si le switch s'allume / s'éteint

si ko probablement

Code : Tout sélectionner

<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>xxxx@yyyy
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

voila ce que j ai avec avec IDX 4 qui dysfonctionne et qui est party_soll_temp : pi@rasp2:~/domoticz/scripts/python $ curl "http://192.168.1.27:9090/json.htm?type= ... cmd=Toggle"
{
"message" : "Error sending switch command, check device/hardware (idx=4) !",
"status" : "ERROR",
"title" : "SwitchLight"
damolc
Messages : 240
Inscription : 24 juil. 2016, 22:08

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par damolc »

je ne comprend pas trop
IDX 4 : donne bien la valeur : 3) commande : get party_soll_temp => 20
est j ai comme réponse : temp=int(float(get_setpoint_temp(dummy_idx['party_soll_temp'])))
TypeError: float() argument must be a string or a number
pourtant la valeur est bonne?
hestia
Messages : 397
Inscription : 12 sept. 2018, 22:36

Re: [Tuto] Contrôler sa chaudière Viessmann avec Domoticz via une interface infrarouge

Message par hestia »

je ne comprend pas trop
moi non plus :!:
le test

Code : Tout sélectionner

curl "http://IPDOMOTICZ:8080/json.htm?type=command&param=switchlight&idx=205&switchcmd=Toggle"
est indépendant des widgets de la chaudière, il s'agit de vérifier que depuis le RPI de la chaudière on a les droits par passer une commande à dz. Donc le switch dummy pour le test est un switch juste pour ce test. Sommes-nous d'accord? Est-ce bien ce test que tu as fait?
Répondre