04.09.2025, 06:32 
		
	
	
		Hello everyone,
I'm currently building a custom energy monitoring application on Lm5. I’ve successfully accessed real-time values using
grp.getvalue() and identified the key trends (energy, power, consumption, etc.).
Now I’d like to implement period-based calculations (daily, weekly, monthly, yearly) using the periods.lp file to track
energy consumption over time.
My goal is to:
Questions:
	
	
	
I'm currently building a custom energy monitoring application on Lm5. I’ve successfully accessed real-time values using
grp.getvalue() and identified the key trends (energy, power, consumption, etc.).
Now I’d like to implement period-based calculations (daily, weekly, monthly, yearly) using the periods.lp file to track
energy consumption over time.
My goal is to:
- Store the trend index at midnight (e.g. for photovoltaic energy)
 
- Compare it with the current index to calculate daily production
 
- Extend this logic to weekly, monthly, and yearly periods
 
Questions:
- What is the recommended way to store and retrieve trend indexes at specific timestamps (e.g. midnight) using 
 periods.lp ?
 
- Is there a built-in API or LogicMachine function to manage periods and deltas?
 
- Should I create a custom structure inside periods.lp , or is there a standard format I should follow?
 
- Has anyone implemented similar logic for periodic energy calculations and could share best practices?
 
 
 

 
