Closed themarktudor closed 5 months ago
Seeing the same thing here..
I have seen this issue before. Its because its trying to process data which it never received. Usually caused due to not being able to connect to the sunsynk server. In the last month Sunsynk had multiple downtimes. Which is highly frustrating.
This is how it works.
If it fails at the first step it will continue to try and read files that do not exist. Further more it will try and process value that was not read from the json files and create more errors.
The solution is to the errors are to simply halt when files were not able to be generated in the first place. That will not solve the real problem however.
When I have more time I guess I could look at better error control.
For Piece of mind. Right now I also have the same problem. So does everyone else who use this addon aswell as anyone who is using the the sunsynk app.
If you log into the portal ,go to gateway and look at the last seen date stamp you will see that Sunsynk is down. My date stamp reads last seen 2024-03-25 23:53:06
jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 114: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 115: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 116: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 117: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 118: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 119: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 121: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 122: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 123: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 124: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 125: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 126: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 129: [: ==: unary operator expected jq: error: Could not open file batterydata.json: No such file or directory /run.sh: line 130: [: ==: unary operator expected jq: error: Could not open file griddata.json: No such file or directory /run.sh: line 131: [: ==: unary operator expected jq: error: Could not open file griddata.json: No such file or directory /run.sh: line 132: [: ==: unary operator
Would it be workable solution to insert an offset in seconds into the configuration that could be adjusted based on the reliability of the SunSynk service. The null values in the sensors is what causes the challenges for me. Clearly also the fact that the values would be slightly old is not ideal, but that is the nature of the service that they are currently providing. From what I understand a call to a slightly older timestamp would return a valid dataset.
It also causes the input helper to be cleared without updating the inverter. If the cycle fails to connect, would it be possible to leave the helper populated so that the command can be executed next time?
I have now updated the script to exit to the end of the loop so that when there are any sort of connection errors it will not attempt to update any entities, neither will it clear the helper entity.
I also unfortunately had to add the -k option to curl so that it will ignore certificate errors. Since SunSynk changed certificates Curl cannot verify the validity of the certificate on a random basis.
If you update your add-on now it will resolve most if not all of the issues.
I have updated the add-on (v2.1.12?) and I still face the same issues.
Perhaps the update did not go through ? the latest version is 2.1.13
@martinville Thanks for coding a really useful add on.
I am having a challenge though with the latest release (2.1.12) that I cannot seem to work out. The add on runs fine for about half the time and returns all the parameters of the inverter as expected. For the rest of the time it throws out an error in the log for all the staging .json files that it says it cannot open. There is no pattern to this that I can see other than it tends to come on and off relatively consistently throughout the day.
The refresh is set to 60 seconds that aligns to my SunSynk user settings.
Here is an excerpt from the log file.
It does this for all the json files like griddata.json, outputdata.json, loaddata.json, pvindata.json etc...
It carries on like this either working fine or writing out this error message.
Has this been seen before.