bilan / connectlife-api-connector

Connectlife API proxy / MQTT Home Assistant integration
51 stars 13 forks source link

ConnectLife API Error on startup #7

Closed hustiez closed 4 months ago

hustiez commented 4 months ago
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Connectlife API proxy / MQTT Add-on
 Integrates Connectlife AC devices with Home Assistant via MQTT and provides an HTTP API
-----------------------------------------------------------
 Add-on version: 1.1.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.5  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.2.2
 Home Assistant Supervisor: 2024.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to DEBUG
s6-rc: info: service base-addon-log-level 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
Config OK
MQTT creds: **************** / ***/ 1883 / no-ssl
2024-02-19 14:15:26,135 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-02-19 14:15:26,146 INFO supervisord started with pid 202
2024-02-19 14:15:27,157 INFO spawned: 'mqtt' with pid 203
2024-02-19 14:15:27,167 INFO spawned: 'www' with pid 204

   INFO  Server running on [http://0.0.0.0:8000].  

2024-02-19 14:15:28,156 INFO success: mqtt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
  Press Ctrl+C to stop the server

2024-02-19 14:15:29,158 INFO success: www entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

In RequestException.php line 113:

  Client error: `GET https://api.connectlife.io/api/v1/appliance` resulted in  
   a `404 Not Found` response                                                  

2024-02-19 14:15:30,076 WARN exited: mqtt (exit status 1; not expected)
2024-02-19 14:15:31,088 INFO spawned: 'mqtt' with pid 210

Did as instructed in README using Home Assistant integration method

bilan commented 4 months ago

Unfortunately Connectlife removed API endpoints causing the application to stop working: https://api.connectlife.io/swagger/index.html

Old endpoints:

Screenshot 2024-02-19 at 12 48 16
moskovskiy82 commented 4 months ago

Can you share the number of downloads for the repo? I have been in contact with Hisense for some time (everything is posted on HA community forums). Just as a try we can start a discussion once again on opening the API. I have read through the Haier case so @Bilan I will make that an anonymous plugin which was downloaded X times, starred 7 times e.tc. 150 unhappy customers telling their first circle what a brat is hisense is 1500 ppl awared. Further it's around 7500 ppl not wiiling to buy hisense )

ekashuba commented 4 months ago

Unfortunately Connectlife removed API endpoints causing the application to stop working: https://api.connectlife.io/swagger/index.html

I think this same thing happened back in December but those "Appliance" API's reappeared after a few hours. https://github.com/deiger/AirCon/issues/160#issuecomment-1853749612

Let's hope that history repeats itself and that those API's will be available again soon.

bilan commented 4 months ago

Can you share the number of downloads for the repo? I have been in contact with Hisense for some time (everything is posted on HA community forums). Just as a try we can start a discussion once again on opening the API. I have read through the Haier case so @Bilan I will make that an anonymous plugin which was downloaded X times, starred 7 times e.tc. 150 unhappy customers telling their first circle what a brat is hisense is 1500 ppl awared. Further it's around 7500 ppl not wiiling to buy hisense )

Screenshot 2024-02-20 at 07 53 56
delumerlino commented 4 months ago

I have experienced a firmware update for the devices from the original app. Maybe they moved the services?

Keany commented 4 months ago

I have experienced a firmware update for the devices from the original app. Maybe they moved the services?

I had firmware upgrade too.

delumerlino commented 4 months ago

I have seen something came back online, but not all... image

delumerlino commented 4 months ago

_Thank you for reaching out to ConnectLife supporting team! We apologize for the inconveniences, however we never offered a public API. Perhaps in the future but at this moment it can not be used.

If you'll be experiencing any other issues related to CL app, please feel free to always reach out to us.

Kind regards_

What does it mean?

moskovskiy82 commented 4 months ago

image

moskovskiy82 commented 4 months ago

But as a question. Could it be an issue on the swagger side? Not quite sure what is an API consumer https://swagger.io/tools/swaggerhub/pricing/

It might be that noticing traffic from different IP's with an API call they contacted HiSense to get some buck?

moskovskiy82 commented 4 months ago

This is a strange answer I got back. Any ideas what is an abuse from HU?

Dear Andrey, API is under the development but because of the community interest for API, we left '' unauthorized '' gate open. Unfortunately integration was abused from HU and we had to close it down until we will make it as it should be to protect users and the system. We appreciate your understanding and your input!

Kind regards Neda Mijatović

alexcroce commented 4 months ago

This is a strange answer I got back. Any ideas what is an abuse from HU?

Dear Andrey, API is under the development but because of the community interest for API, we left '' unauthorized '' gate open. Unfortunately integration was abused from HU and we had to close it down until we will make it as it should be to protect users and the system. We appreciate your understanding and your input!

Kind regards Neda Mijatović

Someone from hungary abused the api

moskovskiy82 commented 4 months ago

@Bilan Maybe you can discuss with them to work out possible solutions? Any problem can be solved i believe )

bilan commented 4 months ago

New addon version 2.0.0 is out now.

alexcroce commented 4 months ago

New addon version 2.0.0 is out now.

Works it again?

bilan commented 4 months ago

I hope so :) please note the ID of devices will change.

alexcroce commented 4 months ago

I hope so :) please note the ID of devices will change.

I can't Update in homeassistant, i see version 1.1.0

ustix commented 4 months ago

I hope so :) please note the ID of devices will change.

I can't Update in homeassistant, i see version 1.1.0

Same for me. Edit: Had to restart HA and wait for it.

Bolo92 commented 4 months ago

Home assistant -> settings -> addons -> up, right corner -> click checks for updates -> go to this addons and you will see update button. After update it works for me only entity was changed. @Bilan brillant work ;) thanks

alexcroce commented 4 months ago

`In AcDevice.php line 39:

[ErrorException]
Undefined array key "t_swing_direction"

Exception trace: at /home/app/app/Services/AcDevice.php:39`

It doesn't work for me.

bilan commented 4 months ago

`In AcDevice.php line 39:

[ErrorException] Undefined array key "t_swing_direction"

Exception trace: at /home/app/app/Services/AcDevice.php:39`

It doesn't work for me.

You need to adjust devices_config addon setting because you have different device model than me. Paste your logs here, I will try to make it for you.

bilan commented 4 months ago

@alexcroce I deleted your logs because of access token was there. I will try to fix your problem in v2.1

alexcroce commented 4 months ago

@alexcroce I deleted your logs because of access token was there. I will try to fix your problem in v2.1

Thanks so much!

bilan commented 4 months ago

@alexcroce v2.1.0 is out now.

alexcroce commented 4 months ago

@alexcroce v2.1.0 is out now.

It Works! Thanks. If you need something to develope swing settings please tell me

bilan commented 4 months ago

You will need to click on each swing option in the application and save the API response.

alexcroce commented 4 months ago

You will need to click on each swing option in the application and save the API response.

How can i save the Api responses?

delumerlino commented 4 months ago

Hi Bilan, thanks a lot for this update. Worked in 2.0.0, but in 2.1.0 I can no more select swing modes. TY

bilan commented 4 months ago

@delumerlino you need to adjust devices_config in add-on configuration.

For deviceFeatureCode 117 it should be:

{"117":{"t_work_mode":["fan only","heat","cool","dry","auto"],"t_fan_speed":{"0":"auto","5":"super low","6":"low","7":"medium","8":"high","9":"super high"},"t_swing_direction":["straight","right","both sides","swing","left"],"t_swing_angle":{"0":"swing","2":"bottom 1\/6 ","3":"bottom 2\/6","4":"bottom 3\/6","5":"top 4\/6","6":"top 5\/6","7":"top 6\/6"}}}

delumerlino commented 4 months ago

How may I know my deviceFeatureCodes?

bilan commented 4 months ago
image
delumerlino commented 4 months ago

Oh nice. I have 009, it supports only up/down swing, should I remove t_swing_direction?

moskovskiy82 commented 4 months ago

@Bilan how did you make it work? Did HiSense help

bilan commented 4 months ago

I decompiled the application and saw how it worked. I didn't ask for the manufacturer's help.