Closed luca320 closed 2 years ago
thingkey: 'aaaaaaaaaa' authkey: 'bbbbbbbbb' clientcode: 'ccccccccc'
However hassio should recognize JSON and validate if it was correctly typed
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.
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: @.***>
Che errore?
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: @.***>
Attiva i log debug per il rest. Cerca negli issue
Ma comunque sono i server che rispondono in maniera non corretta
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:
platform: command_line name: Temperatura CPU command: "cat /sys/class/thermal/thermal_zone0/temp" unit_of_measurement: "°C" value_template: '{{ value | multiply(0.001) | round(1) }}' scan_interval: 10
platform: pirateweather api_key: X8Ey***8YFJ2u8c4p6P scan_interval: '00:15:00' monitored_conditions:
platform: zcsazzurro name: fotovoltaico thingkey: 'ZM2E1T747' authkey: 'Zcs eHWAYO0' clientcode: 'Lucab*****di'
platform: integration name: power_generating_spent_zcs source: sensor.power_generating_zcs unit_prefix: k round: 2 method: left
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: @.***>
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: @.***>
Invalid client...
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: @.***>
Posta configurazione e codice Lovelace
Probabilmente il nome del sensore dichiarato non è lo stesso di Lovelace
template:
sensor:
name: "Potenza Istantanea" unit_of_measurement: "W" state: > {% set power = state_attr('sensor.zcsazzurro','current')['powerGenerating'] | int(0) %} {{ power }} state_class: measurement device_class: power icon: mdi:solar-power
name: "Batteria" unit_of_measurement: "%" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['batterySoC'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:battery-90
name: "Consumo Giorno Casa" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyConsuming'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:power-socket-it
name: "Autoconsum Giorno" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyAutoconsuming'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:power-plug-outline
name: "Scarica" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyDischarging'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:battery-low
name: "Carica" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyCharging'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:battery-high
name: "Produzione" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyGenerating'] | float(0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:solar-power
name: "Prelievo" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyImporting'] | float(0)%} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:transmission-tower
name: "Immissione" unit_of_measurement: "kWh" state: > {% set energy = state_attr('sensor.zcsazzurro','current')['energyExporting'] | float (0) %} {{ energy | round(2) }} state_class: measurement device_class: energy icon: mdi:solar-power
- 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: @.***>
È 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.
Questa è la definizione del sensore
Qua si chiama fotovoltaico, quindi devi aggiornare i tuoi sensori
{% set energy = state_attr('sensor.fotovoltaico','total')['energyDischarging'] | float(0) %}
I have to use [abcdefghilm] or 'abcdefghilm' or abcdefghilm when I write the thingkey, authkey and clientcode?
Thank you