sdesalve / zcsazzurro

ZCSAzzurro by SDeSalve
Other
35 stars 12 forks source link

Problem update data since yesterday #9

Closed dicemans closed 2 years ago

dicemans commented 2 years ago

Hello, since yesterday i can no longer receive data correctly from the zcs cloud. Does it happen to you too or is it just my problem? thx for support

Template variable error: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'total' when rendering '{% set energy = states.sensor.test_zcsazzurro.attributes.total.energyImporting | float | default (0) %} {{ energy | round(2) }}'
10:32:43 – (ERRORE) helpers/template.py - il messaggio si è verificato per la prima volta alle 09:21:43 e compare 1095 volte

TemplateError('UndefinedError: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'total'') while processing template 'Template("{% set energy = states.sensor.test_zcsazzurro.attributes.total.energyImporting | float | default (0) %} {{ energy | round(2) }}")' for attribute '_attr_native_value' in entity 'sensor.prelievo_totale'
09:21:43 – (ERRORE) Template - il messaggio si è verificato per la prima volta alle 09:21:43 e compare 15 volte

Error while processing template: Template("{% set energy = states.sensor.test_zcsazzurro.attributes.total.energyImporting | float | default (0) %} {{ energy | round(2) }}")
09:21:43 – (ERRORE) helpers/template.py - il messaggio si è verificato per la prima volta alle 09:21:43 e compare 15 volte
demaiopacido commented 2 years ago

You are not alone!! Same problem since yesterday

Corrado56 commented 2 years ago

Confirmed, also for me, nothing is working, but it seems something has changed on ZCS side.

I checked using Postman, and this very simple call is no more responding (was working on 16/05) image

sdesalve commented 2 years ago

Please ask ZCS if they had changed something...

If postman doesn't recognize thingkey is there a problem their side...

Corrado56 commented 2 years ago

I think thingkey is recognized and also authkey. If I change authkey the response is "not authenticated" I sent a request to ZCS assistance and will update this thread when I receive any answer

aturri commented 2 years ago

Me too, the same problem since yesterday. I contacted ZCS assistance, let's see...

aturri commented 2 years ago

Does anyone have any news?

superino1 commented 2 years ago

Does anyone have any news?

No, same problem. Send mail to Zcs, but no answer.

dicemans commented 2 years ago

Support answered me to this:

Good morning,
to use the API requests it is necessary to provide an authorization code and a customer code. The latter, provided in the previous email ('xxxxxxxxxx'), has become mandatory for a week and must be entered at the time of the request.

Sincerely

I hope it will be useful to the developer

sdesalve commented 2 years ago

Please ask they the updated API documentation so I can update custom component

aturri commented 2 years ago

Hi, I have found that it is necessary the header "Client" with the client code that was sent you by email.

Screenshot 2022-06-29 at 18 50 49

In this way, I'm using the API correctly with Postman.

Thank you Andrea

sdesalve commented 2 years ago

please update to v3.0.0. YOU WILL NEED to update your sensor definition.

thanks to @aturri

spady7 commented 2 years ago

Hi, is possibile to know how update sensor definition? Something like that:

`sensor:

Regards

sdesalve commented 2 years ago

You must ask to zcs your clientcode. They had started to send within the mail with apikey only recently....

spady7 commented 2 years ago

You must ask to zcs your clientcode. They had started to send within the mail with apikey only recently....

Thank you for reply. I supposed that ZCS had to send me clientcode. What i needed was to know how configure your custom component. Anyway, having a look to "sensor.py" i realized that i have to add 'clientcode: "" ' . Hope can help this someone else.

Regards

sdesalve commented 2 years ago

Anyway, having a look to "sensor.py" i realized that i have to add 'clientcode: "" ' .

Yep it's stated in changelog...

image