-
-
Notifications
You must be signed in to change notification settings - Fork 464
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
Added database feature. #935
base: master
Are you sure you want to change the base?
Conversation
The database ist stored persistently on LittleFS. The AC total energy is written every hour to the database, together with a timestamp. Each entry to the database requires 8 bytes on the LittleFS partition. The database can be read with the API call /api/database Ralf Bauer
This code is working and has to be integrated into the UI.
Added database feature.
Looking excellent. Really hoping for this to get merged.🙏 Btw, your inverter's serial bumper is visible in the screenshot. You might want to edit that out. |
I have one last problem with the code. |
Thank you for the notification about the serial number. |
Just a few first remarks:
|
Thank you for your comments, let me clarify a few points.
|
So it will not work offline or in AP mode. And you are transfering data to google in US (which will require a DSGVO hint and a Opt-Out)..... As I said... please no libraries from external servers....
But you cannot extend a 150kb by 10bytes if you have only 50kb left... As I said, LittleFS is a copy-on-write filesystem. That means at each file operation, it creates a copy of the file, makes the changes and adjusts the file pointer in the last step to be 100% sure that there is no corrupted file system. |
|
Thats enough to require a DSVGO hint because the IP address of the fetch operation is transmitted to google. |
Hi guys, |
@t2on, I have also thought about stoing the data on an SD-card, but I decided to stay with my current solution and store all high resolution data in my InfluxDB, which is much easier and faster to query. This is pretty easy to do by using MQTT and Telegraf. |
Imo NVS partition would be better fitted than LittleFS |
How about just using an external Google spreadsheet for storage:
|
@pkese yes this would be the next best thing to do, if not for the privacy concerns involved. Currently appending to files via WebDAV is neither announced nor supported by the backend. |
@pkese But how is this accessible while being offline? Also, I think the Prometheus API would be better fitted |
One year OpenDTU-Database
The database ist stored persistently on LittleFS.
The AC total energy is written every hour to the database, together with a timestamp. Each entry to the database requires 8 bytes on the LittleFS partition. The database can be read with the API call /api/database
ToDo:
UI component is still missing.
Modification for chunked response needed.
Ralf Bauer
P.S.: Thanks for the great job on OpenDTU !