Solar Dashboard Project

Projects related to Solar Power
TripitakaBC
Posts: 19
Joined: Tue Nov 17, 2020 5:12 pm

Re: Solar Dashboard Project

Post by TripitakaBC »

Graham @xion2000

You don't. This was my issue a little earlier in the thread. I ended up having to set up a standalone MQTT server in a jail on my Truenas box that receives the MQTT data and then HA polls the MQTT feed from there. I battled with it for ages in HA but the end result is that HA *requires* user/pass and the SolarDashboard interface doesn't have the facility to provide it.

Previously, you were using the REST API to get the data, no?
xion2000
Posts: 71
Joined: Fri Jan 24, 2020 6:02 am

Re: Solar Dashboard Project

Post by xion2000 »

Thanks for that info, like you say I'm currently using REST api and it works fine I just thought I would give the MQTT thing a go. Is there any advantages to using MQTT for this
TripitakaBC
Posts: 19
Joined: Tue Nov 17, 2020 5:12 pm

Re: Solar Dashboard Project

Post by TripitakaBC »

Only if you need MQTT for other purposes too. At the end of the day, the data is the data. For me, firing up a new jail in Truenas is quick and easy but if you need to buy an extra RPi or equipment then REST would have the edge.
xion2000
Posts: 71
Joined: Fri Jan 24, 2020 6:02 am

Re: Solar Dashboard Project

Post by xion2000 »

Can anyone suggest any reasons why I constantly suffer with the problems identified in the images (screen grabs) I've attached
This is a brand new device from Jonathan with the latest version of hardware & software.
Since setting it up the other day the reboots are getting more frequent & the gaps of missing data are getting longer.
If I connect to the Solar Controller with my PC and run the stock Epever monitoring software I have no issues
Attachments
SnekTek SolarDashboard 15-04-21 #1.jpg
SnekTek SolarDashboard 15-04-21 #2.jpg
SnekTek SolarDashboard 15-04-21 #3.jpg
TripitakaBC
Posts: 19
Joined: Tue Nov 17, 2020 5:12 pm

Re: Solar Dashboard Project

Post by TripitakaBC »

As I understand it (take that as worth exactly what you paid for it...) the issue is that the ESP running the device doesn't have the juice to power the dashboard consistently with a direct (local network) connection. I'm not 100% sure that is a viable reason as I run dashboards on other ESP devices OK but I have no idea what else is consuming cpu power on the Snektek unit.

Try disconnecting from the LAN dashboard and connect to the cloud dashboard and see if that fixes the issue. Don't just connect to cloud without disconnecting from the LAN dashboard though or the problem may continue. Let me know how that goes.
xion2000
Posts: 71
Joined: Fri Jan 24, 2020 6:02 am

Re: Solar Dashboard Project

Post by xion2000 »

I'm currently unable to connect to the cloud, I've put a post on the Cloud page but had no response from Jonathan yet.
xion2000
Posts: 71
Joined: Fri Jan 24, 2020 6:02 am

Re: Solar Dashboard Project

Post by xion2000 »

Thanks for the advise but I don't quite understand what yo mean
TripitakaBC wrote:
Thu Apr 15, 2021 4:34 pm
Try disconnecting from the LAN dashboard and connect to the cloud dashboard and see if that fixes the issue. Don't just connect to cloud without disconnecting from the LAN dashboard though or the problem may continue. Let me know how that goes.
xion2000
Posts: 71
Joined: Fri Jan 24, 2020 6:02 am

Re: Solar Dashboard Project

Post by xion2000 »

Well I think I've got it sorted or at least understand why my problem is occurring
Within Home Assistant I was extracting / reading every entry that the SolarDashboard was creating which appears to affect its stability, I've reduced the number down to 4 from my original 10 and the reboots / missing data stop. If I add another entry or 2 the the reboots start again but only the odd 1.
Thanks TripitakaBC I think that's basically what you were suggesting.
Can anyone explain why this occurs in layman's terms (simple) & if there is a way to resolve it
jonathan
Posts: 237
Joined: Thu Feb 01, 2018 1:12 am

Re: Solar Dashboard Project

Post by jonathan »

TripitakaBC wrote:
Thu Apr 15, 2021 4:34 pm
As I understand it (take that as worth exactly what you paid for it...) the issue is that the ESP running the device doesn't have the juice to power the dashboard consistently with a direct (local network) connection. I'm not 100% sure that is a viable reason as I run dashboards on other ESP devices OK but I have no idea what else is consuming cpu power on the Snektek unit.

Try disconnecting from the LAN dashboard and connect to the cloud dashboard and see if that fixes the issue. Don't just connect to cloud without disconnecting from the LAN dashboard though or the problem may continue. Let me know how that goes.
Thanks for helping out.

So there are various things going on, ill try to explain a bit.

Why did we chose to use ESP8266 over the other solutions? It's very power efficient, price is right and the drivers are very mature compared to ESP32.

The ESP8266 inside the solar dashboard will reboot if it runs out of memory. Previously we had lots of issues where simply loading the dashboard via local network connection would cause it to run out of memory and reboot. To the user this looks like an unresponsive web site that didn't load. We were able to do some tricks to make it work very reliably since software version 3. Because the solar dashboard is meant for off grid use, it has to supply all the JavaScript libraries that help style the chart and gages, along with their dependent libraries. Like moment.js and others. This causes the payload size to increase. We have chosen all the minimum versions of the libraries, and then we use a script that takes all these files and compresses them, gzips them into a single file. This reduces the payload significantly.

Second thing we did is memory optimize the code. This involves going through and looking for ways to reduce stack and heap use, optimizing data structures. These 2 improvements helped and now it runs OK locally.
jonathan
Posts: 237
Joined: Thu Feb 01, 2018 1:12 am

Re: Solar Dashboard Project

Post by jonathan »

xion2000 wrote:
Thu Apr 15, 2021 7:59 am
Can anyone suggest any reasons why I constantly suffer with the problems identified in the images (screen grabs) I've attached
This is a brand new device from Jonathan with the latest version of hardware & software.
Since setting it up the other day the reboots are getting more frequent & the gaps of missing data are getting longer.
If I connect to the Solar Controller with my PC and run the stock Epever monitoring software I have no issues
xion2000 wrote:
Fri Apr 16, 2021 4:32 am
Well I think I've got it sorted or at least understand why my problem is occurring
Within Home Assistant I was extracting / reading every entry that the SolarDashboard was creating which appears to affect its stability, I've reduced the number down to 4 from my original 10 and the reboots / missing data stop. If I add another entry or 2 the the reboots start again but only the odd 1.
Thanks TripitakaBC I think that's basically what you were suggesting.
Can anyone explain why this occurs in layman's terms (simple) & if there is a way to resolve it
Yea so this is very obvious what is happening. You're on the right track.

The way the dashboard works internally is there are various tasks that must be accomplished, kind of like a repeating schedule. Some of these tasks, it's not clear how long they will take and can take longer depending on external factors. For example, if the WiFi connection is weak, it might take longer for the cloud server or mqtt broker to respond, extending the length of time it takes to do the task. I'll give some examples of scheduled tasks:

- Collecting sample from solar controller
- Averaging the last minute's samples and writing to SD card
- Checking NTP server for time
- Publishing to mqtt, if enabled
- Checking in with the cloud, if enabled
- etc.

Then there are events that must be handled as they happen, such as data update from an open web browser session. These can interfere with the tasks and take time away.

If there is not enough time to do all the tasks according to the schedule, some tasks will be skipped until the next time the processor is available.

There is usually enough time to do everything, in theory, and the programming can try to prioritize certain tasks to make it not noticeable.

From your charts, you can see that either task 1 or 2 or both are being delayed by probably the mqtt task so there are larger gaps in some of the data. Can you post your logs for these days on the forum?
Post Reply