hass-cozytouch icon indicating copy to clipboard operation
hass-cozytouch copied to clipboard

Device not available : Atlantic Pass APC Boiler, DHW and HeatingZone

Open ooOO00OOoo opened this issue 4 years ago • 34 comments

Hello

I received and plugged my Cozytouch bridge two days ago, downloaded cozytouch app, created my account on cozytouch (and my two heaters where detected). To test it, i used google home to get temperature, all is ok).

So… i wanted to use cozytouch component. I installed it within hacs (integration page). At this step, all seems to be good (logo is green in hacs integration page).

So i restarted, went to configuration > integration > add integration > Cozytouch. It asked me my user and password for Cozytouch bridge … I put user/password and had : 'User or password inccorect'

In home-assistant.log i have this error :

‘2020-05-02 04:02:35 ERROR (MainThread) [custom_components.cozytouch.config_flow] Error: Unknown device None’

I set debug mode and got this log 2020-05-03 16:52:35 DEBUG (SyncWorker_4) [cozytouchpy.client] Request : {‘userId’: ‘[email protected]’, ‘userPassword’: ‘XXXXX’} 2020-05-03 16:52:35 DEBUG (SyncWorker_4) [cozytouchpy.client] {‘JSESSIONID’: ‘XXXXXXXXXXXXXXXXXXX’} 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.client] Request : {} 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.POD 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.HEATER 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.ELECTRECITY 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.OCCUPANCY 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.CONTACT 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] DeviceType.TEMPERATURE 2020-05-03 16:52:35 DEBUG (SyncWorker_12) [cozytouchpy.objects] None 2020-05-03 16:52:35 ERROR (MainThread) [custom_components.cozytouch.config_flow] Error: Unknown device None

could you help me please ?

ooOO00OOoo avatar May 03 '20 22:05 ooOO00OOoo

Hello,

I'm a French guy, so sorry for my bad english...

I have the same issue, with HA 108.9, and now with 109.6... I change my password for the cozytouch app on my smartphone, but it does not work... i have the same error "Utilisateur ou mot de passe incorrect". I don't know what to do. Can you help me ?

palm17 avatar May 14 '20 17:05 palm17

Do you have any special characters in your password? In this case you can try with a password without those. If possible try with a password with only alpha numeric chars (ie a-zA-Z0-9). If it works you can add others.

bestlibre avatar May 14 '20 19:05 bestlibre

I don t have any special charactere in mine...

@palm17 je suis également français. On se tient au courant si l un de nous trouve

ooOO00OOoo avatar May 15 '20 00:05 ooOO00OOoo

I asked that because I think I had a problem with special chars.

@palm17 can you send us a log in debug?

In @ooOO00OOoo log it seems that the login went through since you get a session id. Can you post a full log ? With only cozytouchpy and hass-cozytouch in debug ?

I'm also french. If it's too difficult to communicate in english, we can switch to french.

bestlibre avatar May 15 '20 06:05 bestlibre

Hello,

@ooOO00OOoo Cool !

@bestlibre I don t have any special character, only letters up and down, and number ; and no "-" I reset my password, but no change... et cool que tu sois également Français !

The log of the day

2020-05-16 12:15:41 DEBUG (SyncWorker_17) [cozytouchpy.client] Request : {'userId': '[email protected]', 'userPassword': 'AAAA1234aaaa'} 2020-05-16 12:15:41 DEBUG (SyncWorker_17) [cozytouchpy.client] {'JSESSIONID': 'xxxxxxxxxxxx'} 2020-05-16 12:15:41 DEBUG (SyncWorker_16) [cozytouchpy.client] Request : {} 2020-05-16 12:15:41 DEBUG (SyncWorker_16) [cozytouchpy.objects] DeviceType.POD 2020-05-16 12:15:41 DEBUG (SyncWorker_16) [cozytouchpy.objects] None 2020-05-16 12:15:41 ERROR (MainThread) [custom_components.cozytouch.config_flow] Error: Unknown device None

In the Cozytouch App on my smartphone, i have linked a boiler. I don't know if this material is compatible with HA integration.

Thanks for your help !

palm17 avatar May 16 '20 10:05 palm17

Could you get the json response from the API ? @Cyr-ius explained here how to get it.

@Cyr-ius : I think that the hass integration should be resistant to unknown device type. So instead of an exception beiing raised in objects.py it could be a error log ? Or the exception should be catch inside the loops calling the build method.

bestlibre avatar May 16 '20 11:05 bestlibre

Bonjour @bestlibre désolé pour la réponse tardive, et merci de te pencher sur le problème avec nous. J'ai exactement la même log que @palm17 .

J'ai essayé le 1er lien fourni : curl -X POST -k -H 'Content-Type: application / x-www-form-urlencoded' -i 'https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/login' --data '[email protected]&userPassword=aaaaaaaa' (en changeant évidement le mot de passe et login).

j'ai essayé en changeant d'email et mot de passe (juste avec des lettres sauf le @ et le '.' du mail évidement.

La réponse obtenue est la suivante : {"errorCode":"AUTHENTICATION_ERROR","error":"Missing parameter or invalid parameters combination : please provide one of [userId+userPassword, userId+ssoToken, accessToken, jwt]"}

En essayant en revanche le lien dev.duboc.pro/tahoma/api en selectionnant Cozytouch

j'arrive bien a me connecter, à avoir une réponse JSOn qui correspond bien à mon compte

ooOO00OOoo avatar May 16 '20 22:05 ooOO00OOoo

I'm going to answer in English to allow non french people to follow. Don't hesitate to continue in french if it's easier, I will make an abstract when necessary before answering.

Can you post the json (you can change the names/location if needed). The idea is to check if there is an unknown device and to add it in the support list or at least ignore it. You can post it in a gist or in private bin.

I will check my command history to get a curl example that works for later reference.

bestlibre avatar May 17 '20 06:05 bestlibre

Hello,

no problem to stay in english. You can find my Json answer here https://gist.github.com/ooOO00OOoo/82d834e12d1abad788f01117be17a072

I just think something. I tried the curl command on my Pi (with SSH). I have the same error as Home assitant (witch is on my PI too)

But .. with dev.duboc.pro/tahoma/api (used on my computer), i have a JSON answer.

Maybe i got this error due to my PI ? (closed port,... ???)

ooOO00OOoo avatar May 17 '20 11:05 ooOO00OOoo

I had a problem also with the curl command from @Cyr-ius . To get a json with curl I did the following :

curl -X POST -k -i 'https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/login' -F 'userId=xxxxx@xxxxx' -F 'userPassword=xxxxxxx'

the response look like :

Date: Sun, 17 May 2020 12:38:11 GMT
Server: overkiz
Strict-Transport-Security: max-age=31536000; includeSubDomains
Content-Type: application/json;charset=UTF-8
Set-Cookie: JSESSIONID=XXXXXXXXXXXXXXXXXXX; Path=/enduser-mobile-web; Secure; HttpOnly
Transfer-Encoding: chunked

{"success":true,"roles":[{"name":"ENDUSER"}]}

Then I used the JSESSIONID in the following request :

curl -X GET -k -i 'https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/setup' -b JSESSIONID=XXXXXXXXXXXXX

bestlibre avatar May 17 '20 12:05 bestlibre

yes with your command i got the same answer

Date: Sun, 17 May 2020 12:46:13 GMT Server: overkiz Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Type: application/json;charset=UTF-8 Set-Cookie: JSESSIONID=XXXXXXXXXXXXXXXXXXXXXXXXXXX; Path=/enduser-mobile-we b; Secure; HttpOnly Transfer-Encoding: chunked

With tis JSESSIONID, and using your 2nd command, i got the same JSON Answer as https://gist.github.com/ooOO00OOoo/82d834e12d1abad788f01117be17a072

ooOO00OOoo avatar May 17 '20 12:05 ooOO00OOoo

Hello,

With the first command, i got exactly the same answer :

HTTP/1.1 200 Date: Sun, 17 May 2020 17:12:51 GMT Server: overkiz Strict-Transport-Security: max-age=31536000; includeSubDomains Content-Type: application/json;charset=UTF-8 Set-Cookie: JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Path=/enduser-mobile-we b; Secure; HttpOnly Transfer-Encoding: chunked

With my JSESSIONID, and using your 2nd command, i got the same JSON Answer as

https://gist.github.com/palm17/144b96314c9ed81ff37aaccebbe6faf4

Thank u for your help !

palm17 avatar May 17 '20 17:05 palm17

I have look at your json. The problem come from unsupported devices, the message should not be "incorect login/password". I have made a pull request to add a more informative message (#10). I also have made a PR (https://github.com/Cyr-ius/cozytouchpy/pull/8) to allow the use of the integration when some devices are not supported. This is your case @ooOO00OOoo, you have an unsupported light dimer. If @Cyr-ius cannot validate the PR, you can always try to remove the dimmer light from your account if you want to try the home-assistant integration.

For @palm17 this is more complicated since the boiler is not supported. And I don't have the time to add the support know.

If you have some python knowledge, the modification have to be done both in this project and in the low level library (https://github.com/Cyr-ius/cozytouchpy).

bestlibre avatar May 18 '20 21:05 bestlibre

Thank you for your reply and the time spent looking for my problem. But i don t have python knowledge ; so, i'm waiting for a new release with the supported boiler ! Thanks for your help !

palm17 avatar May 19 '20 11:05 palm17

The PR were merged. And I have seen that a PR was also merged with preliminary support for an APC Heat Pump with sensors similar to @palm17 file. Not sure if it's exactly the same and if some work is still needed in the home-assistant integration.

bestlibre avatar May 19 '20 18:05 bestlibre

Thank you for your reply and the time spent looking for my problem. But i don t have python knowledge ; so, i'm waiting for a new release with the supported boiler ! Thanks for your help !

I started integrating the boiler and heating box that manages the areas What are the orders you want to place.

cyr-ius avatar May 21 '20 13:05 cyr-ius

Hello Cyr-ius,

I would like to control the on / off of the boiler.

For heating, the room temperature (a room thermostat is coupled to the boiler), the day / night / absence instructions, and the on / off for each zone.

For domestic hot water production, on / off, and boost. I have an independent solar water heater, but with the infos of the balloon probes and home assistant, I will be able to start the heating of the balloon thanks to the command which, I hope, you will develop !!!

In fact, I would like to be able to recover as much information and orders as possible!

I know, that's a lot, but it's a new challenge for you !!

Thank you for this development!

palm17 avatar May 23 '20 08:05 palm17

hello @bestlibre . Thanks a lot. i will try to update it . I don't have some python knowlegde, but java knowlegde.

ooOO00OOoo avatar May 24 '20 13:05 ooOO00OOoo

please test version 1.4.5 (with HACS , enable Beta Version on my component)

  • Add boiler
  • Add Heating Zone (like Heater)

cyr-ius avatar May 24 '20 16:05 cyr-ius

I have installed Cozytouch via HACS : it runs ! In my configuration, at home, i have one boiler, one room sensor, one external sensor. The integration creates 4 devices and 3 entities

  • Maison (zone name in the cozytouch smartphone app) ----- 1 entity : room temperature
  • Cozytouch (no entity, but the firmware of the bridge i think)
  • All house Atlanticpassapcdhw ----- 1 entity : room temperature (name different than the first)
  • All house Atlanticpassapcboiler ------ 1 entity : sensor.all_house_atlanticpassapcboiler (i don't know what is it)

It is late for me. Go to bed.

Thank you for your app Cyr-ius, and your reactivity !

palm17 avatar May 24 '20 20:05 palm17

Hello,

i updated Cozytouch with the last version, and it's ok for me too, i see my 3 devices.

Thanks a lot.

ooOO00OOoo avatar May 25 '20 09:05 ooOO00OOoo

I have installed Cozytouch via HACS : it runs ! In my configuration, at home, i have one boiler, one room sensor, one external sensor. The integration creates 4 devices and 3 entities

* Maison (zone name in the cozytouch smartphone app)
  ----- 1 entity : room temperature

* Cozytouch (no entity, but the firmware of the bridge i think)

* All house Atlanticpassapcdhw
  ----- 1 entity : room temperature (name different than the first)

* All house Atlanticpassapcboiler
  ------ 1 entity : sensor.all_house_atlanticpassapcboiler (i don't know what is it)

It is late for me. Go to bed.

Thank you for your app Cyr-ius, and your reactivity !

In your json, I see the following equipment (widget):

  • Pod --> Cozytouch Bridge (no entity , only firmware , it's OK)
  • AtlanticPassAPCBoiler -> Boiler
  • AtlanticPassAPCDHW -> Water Heater in Boiler or independent ???
  • TemperatureSensor
  • CumulativeFossilEnergyConsumptionSensor
  • CumulativeFossilEnergyConsumptionSensor
  • CumulativeFossilEnergyConsumptionSensor
  • AtlanticPassAPCHeatingZone -> Maison -> Room Thermostat
  • TemperatureSensor

cyr-ius avatar May 25 '20 11:05 cyr-ius

I consider the thermostat as a heater, both in the cozytouchpy API and in the HA plugin Can you tell me what you see?

cyr-ius avatar May 25 '20 11:05 cyr-ius

In your json, I see the following equipment (widget):

  • Pod --> Cozytouch Bridge (no entity , only firmware , it's OK)
  • AtlanticPassAPCBoiler -> Boiler
  • AtlanticPassAPCDHW -> Water Heater in Boiler or independent ???
  • TemperatureSensor
  • CumulativeFossilEnergyConsumptionSensor
  • CumulativeFossilEnergyConsumptionSensor
  • CumulativeFossilEnergyConsumptionSensor
  • AtlanticPassAPCHeatingZone -> Maison -> Room Thermostat
  • TemperatureSensor

I consider the thermostat as a heater, both in the cozytouchpy API and in the HA plugin Can you tell me what you see?

I don' know want you mean with "can you tell me what you see ?"

Here my screen capture :

https://www.dropbox.com/sh/35w8vk0apm0cqxs/AAD3bVSjJ-6P4CBj6Zo-2i-Ea?dl=0

Tell me if it is that you want. And if it is all that you want, or more. Thanks.

palm17 avatar May 25 '20 17:05 palm17

Just an information : i have installed your last release ; all my 3 entities are unavailable. Thanks.

palm17 avatar May 27 '20 11:05 palm17

Just an information : i have installed your last release ; all my 3 entities are unavailable. Thanks.

In latest version I ve a little bug, please selection Integration/Cozytouch/ Option : all and restart HA Only if you've a heaters If KO , please enable debug log in configuration.yaml

logger:
  default: info
  logs:
    custom_components.cozytouch: debug
    cozytouchpy: debug


cyr-ius avatar May 27 '20 19:05 cyr-ius

It's OK after restart HA. Now i have 1 additional entity : switch.all_house_maison. Scenario : In the app on smartphone, the heating zone is on (prog) ; When i click on the switch, after 2-3s, it returns to its initial position (on - click - off ...... on). In the app on the smartphone, the heating zone change to off -- Yeah !!!! But the sensor Atlanticpassapcboiler stands in the heating position. When i toggle off the boiler on the smarthphone app, the sensor Atlanticpassapcboiler show "stop". When i click on the switch in HA, it returns to its initial position, but nothing appends : the heating zone stays off.

For the AtlanticPassAPCDHW temperature, it's an independant heater (solar heater with independant reglation); for the boiler, only one sensor is connected : heat of the hot water tank. For the moment, the AtlanticPassAPCDHW is the same at the room sensor.

Have a nice day.

palm17 avatar May 28 '20 11:05 palm17

It's OK after restart HA. Now i have 1 additional entity : switch.all_house_maison. Scenario : In the app on smartphone, the heating zone is on (prog) ; When i click on the switch, after 2-3s, it returns to its initial position (on - click - off ...... on). In the app on the smartphone, the heating zone change to off -- Yeah !!!! But the sensor Atlanticpassapcboiler stands in the heating position. When i toggle off the boiler on the smarthphone app, the sensor Atlanticpassapcboiler show "stop". When i click on the switch in HA, it returns to its initial position, but nothing appends : the heating zone stays off.

For the AtlanticPassAPCDHW temperature, it's an independant heater (solar heater with independant reglation); for the boiler, only one sensor is connected : heat of the hot water tank. For the moment, the AtlanticPassAPCDHW is the same at the room sensor.

Have a nice day.

OK , please test version 1.4.8 (beta) Add Heater from Heating Zone Add DHW from APC Water Heater I've add a service to select mode for a boiler. (Please look service in HA)

cyr-ius avatar May 30 '20 11:05 cyr-ius

I have installed 1.4.9. Now i have 5 devices and 6 entities :

  • All House Atlanticpassapcboiler ;
    • sensor.all_house_atlanticpassapcboiler ( boiler's state : stop / heating)
  • All House Atlanticpassapcdhw ;
    • sensor.all_house_all_house_atlanticpassapcdhw_temperature (room temperature (A59))
    • water_heater.all_house_atlanticpassapcdhw (state (Inactif / ), and set point heater water on/off)
  • Cozytouch ;
  • Maison ;
    • sensor.all_house_maison_temperature (room temperature (A59))
    • switch.all_house_maison (problem with this entity)
  • Maison Heating
    • climate.maison_heating (state of the zone 1 (called Maison) : Chauffe - internal schedule and room temperature)

And in service, i have 3 choices :

  • cozytouch.set_operation_mode ;
  • cozytouch.set_away_mode ;
  • cozytouch.set_boost_mode.

Wich mode can we use for each service (on off prog...). I try some of them, with no result.

Thank you for your time ! Have a nice day !

Edit : i did not see the card in HA ! Great ! I play with and i say you !

palm17 avatar Jun 02 '20 11:06 palm17

After the game ;-), my findings :

-The 4 icons don't work for me - i understand it is for heat pump, but when i click on the standby button, an error "Echec d'appel du service "climate/set_hvac_mode".'CozytouchHeater' object has no attribute 'set_targeting_mode' ; -The temperature setpoint are OK ; -The ambiant temperature is OK ; -When i switch from "internal scheddle" to "eco" in the préréglage menu, in the smartphone app, it switch from "PROG." to "MANU", but with the Confort temperature, not the Eco. -When i switch to "stop" in the préréglage menu, in the smartphone app, it switch to "MANU", with the Confort temperature

  • sometimes, the mode "internal schedule" create an error : Capture d'écran 2020-06-02 19 52 46
  • the menu operation don't work (like the icon in the card) ;
  • the operation of the menu "Préréglage" is random...

For the stop menu, you put the temperature at 0,0 ? You can't put off the Zone ?

Thanks for this great work !

palm17 avatar Jun 02 '20 18:06 palm17