Daily logging of produced energy from solar inverter - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Daily logging of produced energy from solar inverter (/showthread.php?tid=1429) |
Daily logging of produced energy from solar inverter - tintsch - 06.06.2018 Hi, I'd like to log the daily energy production (kWh) of my solar inverter. I created a scheduled script running once a day. This script reads the energy production of the previous day from the inverter. Is it possible to save daily data consisting of a timestamp and a value? I tried to save it with the following script, but obviously the value of 'pv' gets overriden every time. Code: save = { Can data be appended with the storage object? Or how could this be accomplished? The goal of this logging is to produce bar charts later on. thanks! Valentin RE: Daily logging of produced energy from solar inverter - buuuudzik - 06.06.2018 Maybe better create table in storage: Code: pvLogs = storage.get('pvLogs') In such logs it is enough to use only os.time() and only when show you can then convert it to readable format. RE: Daily logging of produced energy from solar inverter - admin - 06.06.2018 Why not use trend logs? RE: Daily logging of produced energy from solar inverter - buuuudzik - 06.06.2018 All in all, the admin has right RE: Daily logging of produced energy from solar inverter - tintsch - 06.06.2018 Hi, thanks buuuudzik for the hint how to append values to a table. I tested it and it works as expected. admin: I tried to achieve this by using trends and ran into the following limitations: - Trend resolution is too small, I need to log one value once a day. - I'm logging the total amount of kWh produced on every day. This value increases throughout the current day until it reaches a maximum value (when the inverter deactivates itself). So when I create a trend of the produced kWh's there's too much information in it. As far as I read here in the forum, an averaging is performed on the trend data when it dates back more than 30 days (or whatever value was chosen when creating the trend). This averaging is not apropriate in this case, as the maximum value is wanted. - Finally it's going to be displayed as a bar chart, with daily/monthly/yearly values. thanks again. Here's the script and the view of the storage attached as png. Code: -- Log PV-Production RE: Daily logging of produced energy from solar inverter - buuuudzik - 06.06.2018 I like in LM controller that it is amazingly elastic and with some knowledge you can do nearly everything in not only one way And when you add to this unlimited power on the client you can do much more |