This is an application for receiving continuesly information from solar systems and showing them on a webside, with graphs, historical information and all the other cool information stuff the system reports.
Also there is some user permission management and some tested readings scripts for specific devices.
I just couldn't find one that fits my recommendations
To check out the look or register "if possible sometime" look here
Way one Clone the code and run the application yourself. Second way register on my running instance and use that one (with some limitations)
Create an account and create a new Solar System of the type you need. Copy generated push token and install one of the push scripts on your reading device and insert token and endpoint Switch to the dashboard side and enjoy the graphs and shown information.
There are different Solar System types. They differ by shown values on Website and config options.
A system that only contains charging watt
A system that only contains charging values v.e. current power in watt, ampere and voltage
A system combined with a battery, with all possible Values, v.e. AC,DC input and AC,DC output. Also current battery status.
A system, powering the local power grid. Supported values are charge values and discharge values on grid.
A system, powering the local power grid, with battery for own consumption. Supported values are charge values and discharge values on grid.
On the system page it is possible to set and change permissions for other users
You like to share your solar system information with other persons or only host a dashboard to show it anywhere. Create a second account and give that one view permissions on your system. The "view account" will only have access to view the dashboards and nothing else.
Allows the user to change all system information and generate a new data push token.
Allows the user to also perform permissions changes on a system
Data is send to System by continuous rest requests.
There are two endpoints. One for only one data sample and another for Multiple data samples.
- Url for one Sample: {PROTOCOL}://{HOST}:{PORT}/api/solar/data?systemId=[ID]
- Url for multiple Sample: {PROTOCOL}://{HOST}:{PORT}/api/solar/data/mult?systemId=[ID]
The only parameter is the System id, so the application knows the System the data is for.
To send Date for Systems there ist only one DTO object but most of the parameters are optional. Some attributes are multiple times available. The higher ones override the lower ones and the lower anes are calculated by the higher ones. That means if on a sample input, output or battery values are set the device and samples values are also set. But when values are also set on device or sample these are taken as values for device or total data.
For pushing data it is necessary to have an access token for the specific system. The access token is shown on system creation but can be regenerated on the settings page of the system. The token must be set in Rest Request Http Header with name: clientToken
While the documentation (and the scripts) are not finished you can checkout the existing test scripts here
Yasdi is a serial connection Interface that allows you to check loader status of SMA devices. Last update is from 2012 and original it is a c Implementation but it also comes with a CommandlineInterface, that I used for my implementation. As I understand correct it supports connecting the SunyBoys directly via modbus rs485 and the controller via rs232. (I only tested rs323 controller)
There are some Python wrapper implementations in the web but none of them worked for me so I implemented my own by using Python subcommand library to parse the interactive shell. I suppose it was never designed to use it that way :P
However, the Implementation is here, you have to change some parameters in the code for now. (TODO make it more comfortable, but for now that's the way) Before to use it you have to install Yasdi. Have a look here. For information how to compilation look into the Readme in the Source of Yasdi.
#Implementation
For the historical information influx is used. The user and permission information are stored in mongo.
The backend uses Spring Boot. It handles incoming solar data requests and stores tem in the database. Also web requests form browsers are handled and influx querys are generated and send against the database. Then the result is formatted and send back to the client.
The frontend is typescript with react. For the graphs the library recharts is used.
The web authorization is done by jwt token stored in the browser cookie
Todo -> how to start docker-compose files