bgbraga / homeassistant-apsystems

An APsystems Sensor for Home Assistant
Apache License 2.0
21 stars 13 forks source link

all sensors show unavailable #1

Open Oliv3rDog opened 3 years ago

Oliv3rDog commented 3 years ago

Captura de Tela 2021-05-05 às 19 57 31

I tried two ways on configuration.yaml. With '' and without them... I Got all apsema data, including systemid

I have two entries on Log:

Setup of sensor platform apsystems is taking over 10 seconds. 16:13:16 – (WARNING) Sensor - a mensagem ocorreu pela primeira às 16:13:14 e apareceu 3 vezes

and

Logger: homeassistant.loader Source: loader.py:783 First occurred: 16:13:01 (1 occurrences) Last logged: 16:13:01

You are using a custom integration apsystems which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Yukon1967 commented 3 years ago

Take a look at line 208. The ECU-ID variable is fixed and not applicable for others. It should be made variable for generic usage.

Oliv3rDog commented 3 years ago

OK, I see. I will change that value to match my ecu. Thanks!!!

Could you tell me if these data need "" or ' ' or nothing?

HAEdwin commented 3 years ago

Enclosed in single or double quotes, it doesn't matter. In both cases the variable gets assigned as type str.

Oliv3rDog commented 3 years ago

Take a look at line 208. The ECU-ID variable is fixed and not applicable for others. It should be made variable for generic usage.

I changed that value, but still sensors showing unavailable!!!

bgbraga commented 3 years ago

@Oliv3rDog @Yukon1967 hi guys

sorry for delay... it definitely is a bug related with ecu id... I didn't realised that it was fixed in the code...

I create a new variable to that. Could you try the new version? The readme there is a info about how to get your ecu id.

bgbraga commented 3 years ago

Today I tested the new version and see the APSystems changed the cookie logic from his portal. To have a better component handling it now I'm using a browser logic instead of request API. It will handle cookies in a better way. Available at 1.0.3.

bgbraga commented 3 years ago

@Oliv3rDog version 1.0.3 solves your problem?