ha-zcsazzurro
ha-zcsazzurro copied to clipboard
I can't connect my inveter
The problem
i try to connect the inverter, it worked one time and then didnt work, what i can do o connect it;
already thanks for your help.
Version of zcsazzurro integration having the issue?
v0.0.8
Version of Home Assistant Core having the issue?
10.5
Anything in the logs that might be useful for us?
No response
Additional information
No response
same problem...
in my log i found this:
"2023-09-30 20:16:33.408 WARNING (MainThread) [custom_components.zcsazzurro.api] Unable to parse result from ZCS Azzurro portal:
Proxy Error
The proxy server received an invalid
response from an upstream server.
The proxy server could not handle the request
Reason: Error reading from remote server
Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6 Server at third.zcsazzurroportal.com Port 19003 "
no change on my network and i confirm that the zcs app on my smartphone work fine
thank you
Hi guys! Me too, it's been a couple of weeks now that I got the same answer in the logs..
same problem...
in my log i found this:
"2023-09-30 20:16:33.408 WARNING (MainThread) [custom_components.zcsazzurro.api] Unable to parse result from ZCS Azzurro portal:
502 Proxy Error # Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the requestReason: Error reading from remote server
Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6 Server at third.zcsazzurroportal.com Port 19003 " no change on my network and i confirm that the zcs app on my smartphone work fine
thank you
Hi, today it's work for me... no touch no change... it's came back to work it self...
Hi, unfortunately this does not depend on the integration / Home Assistant. It is the ZCS endpoint third.zcsazzurroportal.com that is not responding correctly. I understand that you could see that data is correct on ZCS Azzurro app, but the app is using its own server, not the one for third party integrations such as this. As you can see from log files, the problem is on server side:
Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6
I will keep the situation monitored and I will contact ZCS developer team if the endpoint still responds with this error.
Thank you!
Hi, just to not open a new issue, I post my situation here, sorry. I configured the integration in HA (latest version both for HA and the integration), but it seems to not work. The only entries in the logs I see are:
- ZM
Status: became unavailable - ZM
Status: changed to Not Connected
The system is of course connected to the network.
EDIT: nvm the problem seems to be exactly the same as the one referenced above:
2023-10-03 09:26:12.332 WARNING (MainThread) [custom_components.zcsazzurro.api] Unable to parse result from ZCS Azzurro portal: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request<p>Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/8.0.6 Server at third.zcsazzurroportal.com Port 19003</address>
</body></html>
Hi @aturri, any update?
thx,
AS
@aturri Please try to use the port 19003 in the URL
Hi, sorry, I don't have any update because in these days I've been working a lot, I develop this integration in my free time and it's not so much in these days... However, I'm getting the same error too randomly, sometimes it is available, sometimes it goes down. I'll have to write to ZCS support, because it's a problem on their side. The third party integration is exposed on port 19003, not on standard 80/443.
Thank you Andrea
Hi @aturri, I've a direct contact with ZCS development, if you want please contact me directly.
Ant
Il giorno ven 6 ott 2023 alle ore 17:31 Andrea Turri < @.***> ha scritto:
Hi, sorry, I don't have any update because in these days I've been working a lot, I develop this integration in my free time and it's not so much in these days... However, I'm getting the same error too randomly, sometimes it is available, sometimes it goes down. I'll have to write to ZCS support, because it's a problem on their side. The third party integration is exposed on port 19003, not on standard 80/443.
Thank you Andrea
— Reply to this email directly, view it on GitHub https://github.com/aturri/ha-zcsazzurro/issues/17#issuecomment-1750915745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYRFXED3CMXRZD2YTEBI3TX6AP6LAVCNFSM6AAAAAA4DNYEGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQHEYTKNZUGU . You are receiving this because you commented.Message ID: @.***>
--
Antonino Schembri +39 328 46 26 383 @.: @.
Hi @bonello78, thanks! Could you ask them about this issue on their server?
This is the HTTP request used by integration:
POST / HTTP/1.1
Host: third.zcsazzurroportal.com:19003
Authorization: Zcs {s3cr3t}
Client: {s3cr3t}
Content-Type: application/json
{
"realtimeData": {
"command": "realtimeData",
"params": {
"thingKey": "{s3cr3t}",
"requiredValues": "*"
}
}
}
I've tried it via Postman and it works most of the times. Sometimes, instead it reports the 502 error described above. I observed this behaviour a lot of times in the past. In last days, requests reporting this error are increasing a lot, impacting also the data provided by the integration that is not able to show inverter production.
I've also seen that when querying my inverter from Postman, I get two possible responses:
- sometimes it responds with the 502 error
- if it responds correctly, instead, the provided data is old, since it says that last update is at
2023-10-02T16:36:51Z
in my case. I've checked on other inverters and they are all not updated, last update timestamp is between 02/3-10
The last point makes me think that there is some issue on their third party server. From ZCS Azzurro portal/app data is correctly updated. @bonello78 we need to contact ZCS support.
@aturri they still working on lan mode to share data. If you want please contact me privately.
Il giorno dom 8 ott 2023 alle 13:33 Andrea Turri @.***> ha scritto:
I've also seen that when querying my inverter from Postman, I get two possible responses:
- sometimes it responds with the 502 error
- if it responds correctly, instead, the provided data is old, since it says that last update is at 2023-10-02T16:36:51Z in my case. I've checked on other inverters and they are all not updated, last update timestamp is between 02/3-10
The last point makes me think that there is some issue on their third party server. From ZCS Azzurro portal/app data is correctly updated. @bonello78 https://github.com/bonello78 we need to contact ZCS support.
— Reply to this email directly, view it on GitHub https://github.com/aturri/ha-zcsazzurro/issues/17#issuecomment-1752004787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYRFXBY7KKKPOUJDBX6KFDX6KFQ3AVCNFSM6AAAAAA4DNYEGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAYDINZYG4 . You are receiving this because you were mentioned.Message ID: @.***>
I've also seen that when querying my inverter from Postman, I get two possible responses:
- sometimes it responds with the 502 error
- if it responds correctly, instead, the provided data is old, since it says that last update is at
2023-10-02T16:36:51Z
in my case. I've checked on other inverters and they are all not updated, last update timestamp is between 02/3-10The last point makes me think that there is some issue on their third party server. From ZCS Azzurro portal/app data is correctly updated. @bonello78 we need to contact ZCS support.
First of all, grazie @aturri for the Home Assistant integration: your contribution during your spare time is much appreciated. Second, I confirm your experience. My inverter, when queried via your integration or PostmanRuntime/7.33.0, using the "realtimeData" command, returns stale data:
"lastUpdate": "2023-10-03T04:31:41Z",
I wrote an email to [email protected] this morning, will update when I receive a response.
Clearly is a problem on their end.
I've also seen that when querying my inverter from Postman, I get two possible responses:
- sometimes it responds with the 502 error
- if it responds correctly, instead, the provided data is old, since it says that last update is at
2023-10-02T16:36:51Z
in my case. I've checked on other inverters and they are all not updated, last update timestamp is between 02/3-10The last point makes me think that there is some issue on their third party server. From ZCS Azzurro portal/app data is correctly updated. @bonello78 we need to contact ZCS support.
Hello.
I suggest to change the "retry" function.
Several times, i see there is or a fail in connection or a error 502 for the too many request on the server. I suggest to you to set a retry up to 5 times.
The python script that i'm wraiting is (i write fantasy name isntead correct ones):
try:
rsp = requests.Session()
rsp = requests.post(
'https://third.zcsazzurroportal.com:19003/',
headers={
"Authorization": "Zcs [secre]",
"Client": 'PippoPluto',
"Content-Type": 'application/json'
},
json={
"realtimeData": {
"command": "realtimeData",
"params": {
"thingKey": " ZP1ababababbaba",
"requiredValues": "*"
}
}
},
timeout=1)
if rsp.status_code == 200:
# print(str(rsp.text))
print(str(rsp.text), str(rsp.status_code))
else:
print(str(0), str(rsp.status_code))
except:
print('Script Fail')
i suggest to do this kind of change. I can't test, but should be work.
i suggest to do this kind of change. I can't test, but should be work.
Hi, I tried editing the file, "/config/custom_components/zcsazzurro/api.py" as far as I understand the single while command risks creating an infinite cycle of attempts... The code I modified does not produce errors and still connects but does not solve the underlying problem, updating the sensors with real-time data. This is the code I tried:
( in the top of file )
import asyncio # Aggiungi questa importazione / Add. This importation
None,
string_payload,
False,
DEFAULT_SSL_CIPHER_LIST,
timeout,
)
await rest.async_update()
#--------------------------------------------Start new code
max_retries = 5 # Set the maximum number of retry attempts
retries = 0 # Initialize a counter for attempts
while rest.data is None and retries < max_retries:
_LOGGER.warning("Unable to fetch data from ZCS Azzurro portal... Retry in 5 seconds")
await asyncio.sleep(5)
await rest.async_update()
retries += 1 # Increment the counter at each iteration
#--------------------------------------------End new code
if rest.data is None:
_LOGGER.warning("Unable to fetch data from ZCS Azzurro portal")
return None
i suggest to do this kind of change. I can't test, but should be work.
Hi, I tried editing the file, "/config/custom_components/zcsazzurro/api.py" as far as I understand the single while command risks creating an infinite cycle of attempts... The code I modified does not produce errors and still connects but does not solve the underlying problem, updating the sensors with real-time data. This is the code I tried:
( in the top of file )
import asyncio # Aggiungi questa importazione / Add. This importation
None, string_payload, False, DEFAULT_SSL_CIPHER_LIST, timeout, ) await rest.async_update() #--------------------------------------------Start new code max_retries = 5 # Set the maximum number of retry attempts retries = 0 # Initialize a counter for attempts while rest.data is None and retries < max_retries: _LOGGER.warning("Unable to fetch data from ZCS Azzurro portal... Retry in 5 seconds") await asyncio.sleep(5) await rest.async_update() retries += 1 # Increment the counter at each iteration #--------------------------------------------End new code if rest.data is None: _LOGGER.warning("Unable to fetch data from ZCS Azzurro portal") return None
yes, for sure. Probably need a specific port for HA. I'll try to create a new one just for your requests.
Hi @aturri, I've a direct contact with ZCS development, if you want please contact me directly. Ant Il giorno ven 6 ott 2023 alle ore 17:31 Andrea Turri < @.> ha scritto: … Hi, sorry, I don't have any update because in these days I've been working a lot, I develop this integration in my free time and it's not so much in these days... However, I'm getting the same error too randomly, sometimes it is available, sometimes it goes down. I'll have to write to ZCS support, because it's a problem on their side. The third party integration is exposed on port 19003, not on standard 80/443. Thank you Andrea — Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYRFXED3CMXRZD2YTEBI3TX6AP6LAVCNFSM6AAAAAA4DNYEGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQHEYTKNZUGU . You are receiving this because you commented.Message ID: @.> -- Antonino Schembri +39 328 46 26 383 @.: @.
Ciao hai novita grazie
@aturri they still working on lan mode to share data. If you want please contact me privately. Il giorno dom 8 ott 2023 alle 13:33 Andrea Turri @.> ha scritto: … I've also seen that when querying my inverter from Postman, I get two possible responses: - sometimes it responds with the 502 error - if it responds correctly, instead, the provided data is old, since it says that last update is at 2023-10-02T16:36:51Z in my case. I've checked on other inverters and they are all not updated, last update timestamp is between 02/3-10 The last point makes me think that there is some issue on their third party server. From ZCS Azzurro portal/app data is correctly updated. @bonello78 https://github.com/bonello78 we need to contact ZCS support. — Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYRFXBY7KKKPOUJDBX6KFDX6KFQ3AVCNFSM6AAAAAA4DNYEGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAYDINZYG4 . You are receiving this because you were mentioned.Message ID: @.>
@aturri Please try to use the port 19003 in the URL
ciao hai novità grazie
Hi all, I have a meet scheduled for next week with ZCS support.
Thanks Andrea
Hi all, I have released version v0.0.9 where I've implemented the following:
- in case of 502/503 errors from server, HA will provide the previously cached value up to 25 mins (and sensors will have flag assumed state set as true until a new valid read is available)
- sometimes, remote API is providing "old" values, so HA will always check that the newly read value from API is more recent than last before returning it
- clear logging of all errors, so it is clear what is server side (500-599), what is client side (400-499) and possible timeout errors
Soon there will be a major release where I'll add more sensors for inverter temperature, DC voltage/power/energy and also all other sensors will be more stable, as I'll combine data retrieved from different APIs.
Thanks Andrea
Great...thanks a lot.
Hi Andrea, can you help me to adjust the wrong values of the lasts weeks? where we must edit toput in the right values?
Thank you very much for your great work!
Il giorno lun 16 ott 2023 alle ore 16:38 enricota66 < @.***> ha scritto:
Great...thanks a lot.
— Reply to this email directly, view it on GitHub https://github.com/aturri/ha-zcsazzurro/issues/17#issuecomment-1764625394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIQT6URGUTM4DU5YSZV4E3X7VBHLAVCNFSM6AAAAAA4DNYEGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUGYZDKMZZGQ . You are receiving this because you commented.Message ID: @.***>
-- Giuseppe Defina
Hi @GDefina, it is not possible to fix values in the past.