sdesalve / zcsazzurro

ZCSAzzurro by SDeSalve
Other
35 stars 12 forks source link

Codes #12

Closed luca320 closed 2 years ago

luca320 commented 2 years ago
thingkey: [YOUR DEVICE SERIAL - THINGKEY]
authkey: [YOUR AUTHORIZATION HEADER VALUE]
clientcode: [YOUR CLIENT CODE HERE]  

I have to use [abcdefghilm] or 'abcdefghilm' or abcdefghilm when I write the thingkey, authkey and clientcode?

Thank you

sdesalve commented 2 years ago

thingkey: 'aaaaaaaaaa' authkey: 'bbbbbbbbb' clientcode: 'ccccccccc'

However hassio should recognize JSON and validate if it was correctly typed

luca320 commented 2 years ago

Ciao! Ho seguito e copiato tutto, ricontrollato 100 volte ma continua ad uscirmi errore e avvertenza…

Inviato da iPhone

Il giorno 21 lug 2022, alle ore 16:42, sdesalve @.***> ha scritto:

 Closed #12 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

luca320 commented 2 years ago

Il giorno gio 21 lug 2022 alle ore 16:42 sdesalve @.***> ha scritto:

thingkey: 'aaaaaaaaaa' authkey: 'bbbbbbbbb' clientcode: 'ccccccccc'

However hassio should recognize JSON and validate if it was correctly typed

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1191571467, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WAVXMADSKR6JQ2XU7LVVFOUTANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

sdesalve commented 2 years ago

Che errore?

luca320 commented 2 years ago

questo warning: 2022-07-22 12:48:17 WARNING (MainThread) [custom_components.zcsazzurro.sensor] REST result could not be parsed as JSON e a volte questo errore in foto allegata.

tutte le entità sono non disponibili ahimè, ma la configurazione è valida

Il giorno ven 22 lug 2022 alle ore 12:42 sdesalve @.***> ha scritto:

Che errore?

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1192438194, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WHPQD6NPLFU4EVTP63VVJ3HTANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

sdesalve commented 2 years ago

Attiva i log debug per il rest. Cerca negli issue

Ma comunque sono i server che rispondono in maniera non corretta

luca320 commented 2 years ago

A quanto pare a me non rispondono proprio, altro che non corretta. inserisco questo in configuration.yaml logger: default: error logs: homeassistant.components.rest: debug homeassistant.components.rest.data: debug custom_components.zcsazzurro: debug custom_components.zcsazzurro.sensor: debug

Nel mio configuration.yaml ho iniziato copiato il tuo codice e messo sotto a sensor:

sensor:

Il giorno ven 22 lug 2022 alle ore 12:55 sdesalve @.***> ha scritto:

Attiva i log debug per il rest. Cerca negli issue

Ma comunque sono i server che rispondono in maniera non corretta

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1192449180, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WBXTW2HIEEJUGUPL2LVVJ42HANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

luca320 commented 2 years ago

2022-07-22 13:09:37 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from https://third.zcsazzurroportal.com:19003 2022-07-22 13:09:37 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Data fetched from resource: INVALID CLIENT 2022-07-22 13:09:37 WARNING (MainThread) [custom_components.zcsazzurro.sensor] REST result could not be parsed as JSON 2022-07-22 13:09:37 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Erroneous JSON: INVALID CLIENT 2022-07-22 13:09:37 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Return the state: False

Il giorno ven 22 lug 2022 alle ore 12:55 sdesalve @.***> ha scritto:

Attiva i log debug per il rest. Cerca negli issue

Ma comunque sono i server che rispondono in maniera non corretta

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1192449180, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WBXTW2HIEEJUGUPL2LVVJ42HANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

sdesalve commented 2 years ago

Invalid client...

luca320 commented 2 years ago

2022-07-22 13:18:51 DEBUG (MainThread) [homeassistant.components.rest.data] Updating from https://third.zcsazzurroportal.com:19003 2022-07-22 13:18:52 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Data fetched from resource: {"realtimeData": {"params": {"value": [{"ZM2ES060N1T747": {"energyConsuming": 4.53, "energyGenerating": 6.3, "energyConsumingTotal": 292.4, "powerAutoconsuming": 696, "energyAutoconsumingTotal": 132.9, "powerImporting": 0, "thingFind": "2022-07-21T15:36:28Z", "energyDischarging": 2.77, "energyChargingTotal": 140.9, "powerDischarging": 0, "batterySoC": 84, "powerExporting": 0, "energyImportingTotal": 10.5, "energyGeneratingTotal": 273.8, "energyCharging": 4.68, "lastUpdate": "2022-07-22T08:38:27Z", "powerGenerating": 3456, "energyImporting": 0.14, "energyDischargingTotal": 149.0, "energyExportingTotal": 0.0, "powerCharging": 2760, "powerConsuming": 696, "energyExporting": 0.0, "energyAutoconsuming": 1.62, "batteryCycletime": 7}}]}, "success": true}} 2022-07-22 13:18:52 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Return the state: True 2022-07-22 13:18:52 DEBUG (MainThread) [custom_components.zcsazzurro.sensor] Return the state attributes

Ho provato a mettere maiuscola anche la lettera del nome, riavviato e ora pare che i dati arrivino, ma se guardi la f0to allegata mi dice che le entità non sono disponibili. scusa se sono una frana e ti rompo, non accadra più una volta che sistemo

Il giorno ven 22 lug 2022 alle ore 13:12 sdesalve @.***> ha scritto:

Invalid client...

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1192463019, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WHQZADMLLUHZ4DDIWLVVJ63TANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

sdesalve commented 2 years ago

Posta configurazione e codice Lovelace

Probabilmente il nome del sensore dichiarato non è lo stesso di Lovelace

luca320 commented 2 years ago
current

template:

total
  - name: "Produzione Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyGenerating'] | float(0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:weather-sunny

  - name: "Prelievo Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyImporting'] | float (0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:transmission-tower

  - name: "Immissione Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyExporting'] | float(0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:flash-circle

  - name: "Autoconsum Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyAutoconsuming'] | float(0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:power-plug-outline

  - name: "Scarica Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyDischarging'] | float(0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:battery-low

  - name: "Carica Totale"
    unit_of_measurement: "kWh"
    state: >
      {% set energy =

state_attr('sensor.zcsazzurro','total')['energyCharging'] | float(0) %} {{ energy | round(2) }} state_class: total_increasing device_class: energy icon: mdi:battery-high

type: entities entities:

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Mail priva di virus. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Il giorno ven 22 lug 2022 alle ore 14:14 sdesalve @.***> ha scritto:

Posta configurazione e codice Lovelace

Probabilmente il nome del sensore dichiarato non è lo stesso di Lovelace

— Reply to this email directly, view it on GitHub https://github.com/sdesalve/zcsazzurro/issues/12#issuecomment-1192510698, or unsubscribe https://github.com/notifications/unsubscribe-auth/APD42WE7DOMBWJC434K3HATVVKGC3ANCNFSM54H4DRRA . You are receiving this because you authored the thread.Message ID: @.***>

luca320 commented 2 years ago

È questo?! Se si sostituisco in yaml tutti i sensor.azzurrozcs con questo?

Inviato da iPhone

Il giorno 22 lug 2022, alle ore 14:14, sdesalve @.***> ha scritto:

 Posta configurazione e codice Lovelace

Probabilmente il nome del sensore dichiarato non è lo stesso di Lovelace

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

sdesalve commented 2 years ago

Questa è la definizione del sensore

Screenshot_2022-07-22-15-36-57-256_com android chrome

sdesalve commented 2 years ago

Qua si chiama fotovoltaico, quindi devi aggiornare i tuoi sensori

{% set energy = state_attr('sensor.fotovoltaico','total')['energyDischarging'] | float(0) %}