Thank you for sharing this script.
I have four Atlantic Solius WiFi for heating rooms and one Vertigo Wi-Fi boiler for heating water. At this moment it is being controlled automatically by Cozytouch app on my iOS and Android phone. App is working perfect on Android phone, however on iOS sometimes it is working, sometimes not. Ideally, it would be cool to control through Domoticz and I see that this script is solution for that, since this apartment is controlled by iPad.
I have followed all the steps described at github webpage:
1. Domoticz IP and port has been provided,
2. Cozy username / password has been provided,
3. No authentication has been adjusted to meet apartment network subnet,
4. Library has been installed
I ran the test once. I translated output to english and apparently there is successful connectivity with Cozytouch server. It created the entity "Cozytouch_V4" in hardware page, but there are not any new devices created. Could you please take a look? Appreciate help.
Domoticz log:
Code: Select all
2020-01-26 07:25:05.857 Status: Incoming connection from: 192.168.2.8
2020-01-26 07:25:05.891 Status: Creation nouvelle configuration ...
2020-01-26 07:25:10.852 Status: Cozytouch : Recherche des devices connectes ...
2020-01-26 07:25:10.876 Status: Cozytouch : Device avec classe internal:UPodComponent inconnu
2020-01-26 07:25:10.898 Status: Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu
2020-01-26 07:25:10.921 Status: Cozytouch : Device avec classe internal:UPodComponent inconnu
2020-01-26 07:25:10.944 Status: Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu
2020-01-26 07:25:10.967 Status: Cozytouch : Device avec classe internal:UPodComponent inconnu
2020-01-26 07:25:10.989 Status: Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu
2020-01-26 07:25:11.011 Status: Cozytouch : Device avec classe internal:UPodComponent inconnu
2020-01-26 07:25:11.034 Status: Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu
2020-01-26 07:25:11.056 Status: Cozytouch : Device avec classe internal:UPodComponent inconnu
2020-01-26 07:25:11.078 Status: Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu
2020-01-26 07:25:11.101 Status: Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu
2020-01-26 07:25:11.124 Status: Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.147 Status: Cozytouch : Device avec classe core:OccupancySensor inconnu
2020-01-26 07:25:11.171 Status: Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.193 Status: Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu
2020-01-26 07:25:11.216 Status: Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.238 Status: Cozytouch : Device avec classe core:OccupancySensor inconnu
2020-01-26 07:25:11.258 Status: Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.277 Status: Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu
2020-01-26 07:25:11.296 Status: Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.315 Status: Cozytouch : Device avec classe core:OccupancySensor inconnu
2020-01-26 07:25:11.334 Status: Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.353 Status: Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu
2020-01-26 07:25:11.373 Status: Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.392 Status: Cozytouch : Device avec classe core:OccupancySensor inconnu
2020-01-26 07:25:11.411 Status: Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu
2020-01-26 07:25:11.430 Status: Cozytouch : Device avec classe modbuslink:AtlanticDomesticHotWaterProductionMBLComponent inconnu
2020-01-26 07:25:11.450 Status: Cozytouch : Device avec classe modbuslink:DHWCumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu
Raspbeerry log:
Code: Select all
pi@raspberrypi:~/domoticz/scripts/python/cozytouch $ python cozytouch.py
¤¤¤¤ Demarrage script cozytouch <=> domoticz version 4 (debug :1)
Version python : 2.7.13
**** Test existence / creation configuration cozytouch (hardware domoticz + fichier de sauvegarde) ****
Fichier de sauvegarde de la configuration : /home/pi/domoticz/scripts/python/cozytouch/cozytouch_save
Fichier de sauvegarde de la configuration inexistant, creation hardware cozytouch dans domoticz et nouveau fichier de sauvegarde
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addhardware&htype=15&port=1&name=Cozytouch_V4&enabled=true : 200
(' **** domoticz cozytouch hardware index : ', '8')
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Creation nouvelle configuration ... : 200
Hardware cozytouch dans domoticz et nouveau fichier de sauvegarde de la configuration crees
**** Fin fonction test ****
Test presence du fichier de sauvegarde cozytouch et virtual hardware domoticz OK
**** Tentative interrogation serveur Cozytouch sans login, avec cookie login precedent ****
GET-> https://ha110-1.overkiz.com/enduser-mobile-web/externalAPI/json/refreshAllStates : 401
Erreur HTTP 401 :
!!!! Echec interrogation serveur Cozytouch sans login, connexion serveur Cozytouch ****
POST-> https://ha110-1.overkiz.com/enduser-mobile-web/externalAPI/json/login | userId=****&userPassword=**** : 200
Authentification serveur cozytouch OK
Connexion serveur Cozytouch reussie
GET-> https://ha110-1.overkiz.com/enduser-mobile-web/externalAPI/json/refreshAllStates : 200
Requete refreshAllStates reussie
**** Decouverte devices ****
GET-> https://ha110-1.overkiz.com/enduser-mobile-web/externalAPI/json/getSetup : 200
Gateway Cozytouch : etat off / connexion : DISCONNECTED / version : 1
**** Demarrage procedure d'ajout devices Cozytouch ****
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Recherche des devices connectes ... : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe internal:UPodNetWorkComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe core:OccupancySensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe core:OccupancySensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe core:OccupancySensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:AtlanticElectricalHeaterWithAdjustableTemperatureSetpointMBLComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:TemperatureInCelciusMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe core:OccupancySensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:CumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:AtlanticDomesticHotWaterProductionMBLComponent inconnu : 200
GET-> http://192.168.2.8:8888/json.htm?type=command¶m=addlogmessage&message=Cozytouch : Device avec classe modbuslink:DHWCumulatedElectricalEnergyConsumptionMBLSystemDeviceSensor inconnu : 200
pi@raspberrypi:~/domoticz/scripts/python/cozytouch $ ls -l
total 88
-rw-r--r-- 1 pi pi 79879 Jan 25 22:06 cozytouch.py
-rw-r--r-- 1 pi pi 12288 Jan 26 07:30 cozytouch_save
Thanks,
Maciek