MakeMagazinDE / SPIDR

löst Solar-Inverter aus der Cloud
3 stars 0 forks source link

inverter.h is missing #1

Open schullef opened 2 weeks ago

schullef commented 2 weeks ago

tried to compile this for Wemos Lolin32 but was not successfull because of missing inverter.h in the source code.

marxram commented 2 weeks ago

Hello @schullef:

The code here was just a small subset and was only ment for explanations.

Please check out my official Repo here: https://github.com/marxram/spidr

schullef commented 2 weeks ago

Hello,

thanks for your quick answer. I tried this repo and was able to compile and upload it to a Memos Lolin32 board but I still have some problems. Display is working and I see that connect to WiFi is successful but NTP access fails and afterwards the board is rebooting with a core1 panic and the following output on serial monitor. I have no idea why this is happening. I also tried the provided binary spidr_1.1.ino.WemosESP32_128x64_lolin32.bin but this is not working at all on my hardware.

-------------------------------------------------------------

[Start Up] Setup()

-------------------------------------------------------------

Initialize Preferences Manager... Load Preferences into Variables...

-------------------------------------------------------------

[Preferences] Loading Preferences

-------------------------------------------------------------

Loaded Home WiFi SSID: xxx Loaded Home WiFi Key: [DEBUG]xxxxxxxxx Loaded Inverter WiFi SSID: AP_xxxxxxxxxxx Loaded Inverter WiFi Key: [DEBUG] 12345678 Loaded Relais WiFi SSID: EM_12345678 Loaded Relais WiFi Key: [HIDDEN] Loaded MQTT Broker Host: Loaded MQTT Broker Port: 1883 Loaded MQTT Broker User: Client-USER Loaded MQTT Broker Password: [HIDDEN] Loaded Inverter Web Access User: admin Loaded Inverter Web Access Password: [HIDDEN] NTP Sync Enabled: 1 GMT Offset Seconds: 0 DST Offset Seconds: 0 NTP Server: ntp1.informatik.uni-erlangen.de NTP Fallback Server: ptbtime2.ptb.de WiFi Connection Time Window (seconds): 10 Duration Stay In Home Network (ms): 180000 Duration Stay In Home Network First Boot (ms): 10000 Duration Stay In AP Network (ms): 180000 WiFi AP Mode Attempt Window For Home Network (s): 10 Inverter Offline Timeout (seconds): 360 WiFi AP Name: SPIDR-net WiFi AP Password: [DEBUG] SPIDR-pass Timing Display Duration Power (ms): 5000 Timing Display Duration Energy Today (ms): 5000 Timing Display Duration Energy Total (ms): 5000 Timing Display Duration Energy Time (ms): 4000 Timing Display Duration Energy Graph (ms): 10000 Initialize Display Manager...

-------------------------------------------------------------

[Start Up] Setup Time()

-------------------------------------------------------------

-------------------------------------------------------------

[WiFi Connect] Attempting to connect to SSID: xxxxxxxx

-------------------------------------------------------------

. [wifi_connect] Connected to WiFi network:xxx with IP: xxx.xxx.xxx.xxx Build Date: Jun 16 2024 Build Time: 18:57:42 Now() = 21 Build Epoch1718564262 NTP Server: ntp1.informatik.uni-erlangen.de NTP Fallback Server: ptbtime2.ptb.de GMT Offset: 0h DST Offset: 0h Connected to Wi-Fi. Waiting for time to synchronize with NTP server... Now() = 44 Build Epoch 1718564262 Failed to obtain time from NTP server. Using build time as fallback.

-------------------------------------------------------------

[Skipping] MQTT Manager as Server is empty

-------------------------------------------------------------

-------------------------------------------------------------

[WiFi Connect] Attempting to connect to SSID: xxx

-------------------------------------------------------------

[wifi_connect] Already connected to xxx with IP: xxx.xxx.xxx.xxx EnergyDisplay: Initializing display intervals. Intervals set to: Power: 5000 ms, Today: 5000 ms, Total: 5000 ms, Graph: 10000 ms, Time: 4000 EnergyDisplay started. Generate Test Data

-------------------------------------------------------------

[STATECHANGE] ENTERING >> HOME_NETWORK_MODE

-------------------------------------------------------------

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump: PC : 0x400d6965 PS : 0x00060130 A0 : 0x800df505 A1 : 0x3ffb2180
A2 : 0x00000000 A3 : 0x3ffc37d0 A4 : 0xffffff5c A5 : 0x3ffb2230
A6 : 0x3ffc5d50 A7 : 0xff000000 A8 : 0x800d695d A9 : 0x3ffb2160
A10 : 0x3ffb219c A11 : 0x3f400bfe A12 : 0x3ffb220c A13 : 0x3ffb21ac
A14 : 0x3ffb21bc A15 : 0x3ffb21cc SAR : 0x0000000a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000098 LBEG : 0x4008ba79 LEND : 0x4008ba89 LCOUNT : 0xfffffffe

Backtrace: 0x400d6962:0x3ffb2180 0x400df502:0x3ffb2250 0x400df54d:0x3ffb2270 0x400ed004:0x3ffb2290

ELF file SHA256: e29b52cabcb9bf75

Rebooting... ets Jul 29 2019 12:21:46

Best regards schullef

Am 16.06.2024 um 17:46 schrieb xRAM @.***>:

Hello @schullef https://github.com/schullef:

The code here was just a small subset and was only ment for explanations.

Please check out my official Repo here: https://github.com/marxram/spidr https://github.com/marxram/spidr — Reply to this email directly, view it on GitHub https://github.com/MakeMagazinDE/SPIDR/issues/1#issuecomment-2171748991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNJ26WN6NQT3T55MGQ6AO3ZHWXNJAVCNFSM6AAAAABJMPQRBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRG42DQOJZGE. You are receiving this because you were mentioned.

marxram commented 2 weeks ago

Did you configure a Server for MQTT? There is an issue, if the MQTT Broker is not configured. Might be a similar issue like: https://github.com/marxram/spidr/issues/10

Regarding NTP: For me it also most oftenly fails during the first boot (I don't know why yet). Later it is syncing never the less.

If you can checlk if your topic is similar to the other issues in my Repo, I can esier create a fix. But everybody is welcome to contribute some bugfixes :-)

marxram commented 2 weeks ago

Try To Set your MQTT Broker to some non empty String. I guess that might be enought. I will also need do a better exception handling.

Loaded Relais WiFi Key: [HIDDEN] Loaded MQTT Broker Host: Loaded MQTT Broker Port: 1883

marxram commented 2 weeks ago

@schullef : Sorry, but please check and change your previous comment, there are some info inside, that shouldn't be public. I will add a ticket in SPIDR that the DEBUG Output is disabled by default.

schullef commented 2 weeks ago

thanks for the hint, updated the comment, but it was only a test network , all the ssid and passwords were only temporary. With the MQTT broker set all is working fine, ntp is also syncing now.