-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect #40
Comments
A little more information would be nice. Are the environment variables set correctly? |
Yes. They are correct. |
What else is in the log? |
Nothing
…On Fri, 2 Feb 2024, 15:40 z-master42, ***@***.***> wrote:
What else is in the log?
—
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKOFCD6ISJZM3JF7C3WM3DYRT3HVAVCNFSM6AAAAABCCVLOQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRUGAZDANBWGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Ok, that's not really helpful. |
Same Issue here.
or
or
Also not providing both ENV-Variables do not work. Logs:
|
Have you re-registered your SolarFlow on the EU server using the curl command? |
Hi!
|
Does it work if you use the two URLs? The one from your curl command and the one from the answer? |
You mean like this:
Nope. Other ways, I showed at my first comment. How do you use it with EU-Server? |
I didn't switch because I didn't want to lose the statistics in the app. I have now played around with ZEN_MQTT and ZEN_API. I can specify whatever I want. The EU server, the global server or just a jumble of letters. It always works. Apparently it always falls back to the fallback, which is the global server. Have you tried changing that directly in the config.ini and loading it into the container? |
Okay, I switched to global server and it works again. solarflow-statuspage/src/zenapi/ZendureAPI.py Lines 20 to 28 in 740bace
But Global and Europe URL are the following: |
Looks like easiest would be just to use complete url in config and clean up the script. |
@jvinkovic you wanna create a pull request for that change suggestion? Happy to take this into consideration, for the next merge given that Zendure is handling URLs so badly. |
Sure, I'll try to make it these days hopefully (quite busy). Will try to make it backward compatible. |
I have a new hub and wanted to use it today with the status page, but now I get the same error as in this issue here. I haven't changed anything on my container or in the app. Log:
|
Update: Found the error. New hub means new device sharing for the second account. Oh boy. |
I can also not connect: docker run --rm --env-file .env -p 127.0.0.1:5000:5000 --name solarflow-statuspage rbrandstaedter/solarflow-statuspage:master --online curl -i -v --json "{'snNumber': 'H**********', 'account': 'j*******@gmx.at'}" https://app.zendure.tech/eu/developer/api/apply {"code":200,"success":true,"data":{"appKey":"2****","secret":"8***********","mqttUrl":"mqtt.zen-iot.com","port":1883},"msg":"Successful operation"}* Connection #0 to host app.zendure.tech left intact my .env-file ZEN_USER=z******* can you pls give me a hint? |
You are on the EU server. The status page only works as it is here with the global server. You would have to adapt the code manually yourself. |
Aha, where (in the Dockerfile) an how (what I have to change)? @switch to global: |
I have tried it several times with different options ( eu vs global, englisch/ deutsch = Austria/Österreich , different Email-adresses) because of I didn’t receive a verification-code.
Only as I created a new email-account ( ***@***.*** ***@***.***> [ joe_fuchs.gmx.at and ***@***.*** ***@***.***> seem not to work because of then missing point] ) I got the verification-code by mail.
So I cannot say if I at least used eu or global.
Is there a possibilty to check this afterwards?
PS
Die Kommunikation auf Deutsch wäre mir lieber!
Von: z-master42 ***@***.***>
Gesendet: Freitag, 7. Juni 2024 11:39
An: reinhard-brandstaedter/solarflow-statuspage ***@***.***>
Cc: joe63 ***@***.***>; Comment ***@***.***>
Betreff: Re: [reinhard-brandstaedter/solarflow-statuspage] Cannot connect (Issue #40)
Which server (region) are you on in the Zendure app?
—
Reply to this email directly, view it on GitHub <#40 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSAN2DQI2SZGZCHCDEVBOLZGF5SLAVCNFSM6AAAAABCCVLOQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGQ3TIMRRHA> .
You are receiving this because you commented. <https://github.com/notifications/beacon/ABSAN2BXSYFAQ3T7LAQA4SLZGF5SLA5CNFSM6AAAAABCCVLOQKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUANKVOU.gif> Message ID: ***@***.*** ***@***.***> >
|
Wenn ich nichts übersehen habe muss nur in der ZendureAPI.py v2 auf eu geändert werden. Sicherheitshalber ist das in den anderen .py auch noch gegen zu checken. Wechsel auf global heißt Gerät aus der App löschen, Region in der App ändern, Gerät neu hinzufügen. Dann über curl Gerät neu am globalen Server (v2) registrieren. Hinweis: Beim wechsel der Region in der App verbleibt die bisherige Statistik in der App auf dem "alten Server", ist danach also nicht mehr einsehbar. |
Danke der Connect funktioniert jetzt! Ich habe die Region gewechselt! @additionally the statuspage can push the data it reads from Zendure's cloud service to a local MQTT broker |
Da wo du in deiner env-Datei den Zendure-Broker angegeben hast kommt eigentlich wenn dann dein lokaler Broker rein, wenn du einen hast. Die "Statuspage" stellt die einzelnen Hubwerte dann über das Topic solarflow-hub bereit.
|
Ich sehe gerade, EU-Server wird bald auch gehen, nur muss dies explizit über ZEN_API mitgeteilt werden. Hat @jvinkovic vor zwei Tagen erst gepushed. Den Stand hatte ich noch nicht. @mdillmann https://github.com/reinhard-brandstaedter/solarflow-statuspage/blob/master/README.md?plain=1#L39 hier ist ein ` zuviel. |
Wenn man diese Änderung um File durchführt, muss man dann den Container lokal erzeugen?? |
Danke, so ist es sehr gut um es weiterzuverarbeiten. Ein letztes noch für heute: Welche Werte sollten hier drin stehen? |
Ja, solange es noch nicht im master-Branch ist. |
Der aktuelle Verbrauch deines Stromzählers, wenn dieser Wert per MQTT mitgeteilt werden sollte. |
Thanks, I created a PR to correct that typo (VS-Code is sometimes over-enthusiastic ...) |
@der aktuelle Verbrauch deines Stromzählers, wenn dieser Wert per MQTT mitgeteilt werden sollte. über diesen Weg? wird das irgendwo näher beschrieben, wie z.B.: diese Property für den Verbrauch heißen muss damit die Werte dann in diesem Feld angezeigt werden? |
Nein, damit kannst du den SolarFlow Hub regeln. Um deinen aktuellen Bezug in Watt in der Statuspage anzuzeigen musst du diese als reinen Zahlenwert unter dem Topic |
Ich habe mal eine Frage. Ich habe mein HUB2000 freigegeben. Wenn ich das Ding aber registrieren will geht das nur mit dem Haupt-Account welchen ich auf meinem Handy nutze. Gebe ich das Gerät für einen anderen Account frei und nehme dort die Freigabe an sehe ich nur folgenden Fehler. {"code":400,"success":false,"data":{},"msg":"Please bind the device first"} |
Okay its working now when i use the jason on the account which is initially connected with the HUB. Its not working with shared devices. This really isnt that nice as i want to use the main account on my phone but when i relogin on my phone and restart the docker container i get a login failed again. |
Everytime you log in to the Zendure API (with your user/email) a new authentication token is generated for their MQTT server (which is where all the data for the App/statuspage is coming from). So you can't use the statuspage and the app in parallel. |
Use your main account to bind and the secondary account to connect via the status page. Works for me too. |
Sorry, but I have the same issue here.
I added an additional log entry. As you can see I get an empty response when the scripts tries to retrieve the list of devices: Has anybody a fix for me? |
Are you on the global or the EU server? Try 0.19 (if you are on the global server). |
Thank you for your answer! But version 0.19 returns the same error. And yes I think I'am on the global server. I didn't change anything to use the eu server.
|
I am travelling with 0.19 and a Hub 1200 on the global and it works for me. What kind of hub are you using? What does the config or the environment variables look like? |
I'm using a Solarflow Hub 2000.
|
What happens if you use "SolarFlow2.0" as PROD_NAME? |
Nothing has changed :-( Sorry! |
So, I found the issue: But this environment variable has no effect due to the following line of code:
It reads the variable zen_api in configuration file Same with environment variable To fix this for me I had to set correct eu settings in config.ini. So in docker environment it not possible to set eu region with environment variables. You must mount and change config.ini. |
Would it work if there is no config.ini at all? This is not the only variable with a "either config.ini or environment variable". |
What if you define a config.ini as a skeleton which has no settings defined. All settings in config.ini are unset like this:
To define a default just specify the default only when getting it from environment variable, like this:
|
The text was updated successfully, but these errors were encountered: