I'm using EmonCMS for a few weeks now and apart from some small things I enjoy it a lot. It has a lot of potential and has given me lots of insight already.
Some background: I read my kWh and Power values from my Smart Meter every 10 seconds (that's the default time between messages as received from my smart meter). This gives me lots of insight in my current power usage. But it comes at a price: my four kWh-feeds are getting HUGE with lots of duplicates being stored in the database. This isn't useful and makes the database slow. Deleting duplicate values from a MySQL database is a real pain, and now that it has thousands of records I can't add an unique column. You may ask why I store all those values: I need to add & substract four kWh-values to extract my net kWh-usage and using the kWh/d processor just doesn't cut it.
Request: make the 'data' column for all kWh-feeds UNIQUE in MySQL. For Power/current and other types of feeds this isn't needed, but for kWh-feeds it makes no sense to store the same value multiple times over.
Preventing huge database sizes
Submitted by Guest on Mon, 19/11/2012 - 19:47I'm using EmonCMS for a few weeks now and apart from some small things I enjoy it a lot. It has a lot of potential and has given me lots of insight already.
Some background: I read my kWh and Power values from my Smart Meter every 10 seconds (that's the default time between messages as received from my smart meter). This gives me lots of insight in my current power usage. But it comes at a price: my four kWh-feeds are getting HUGE with lots of duplicates being stored in the database. This isn't useful and makes the database slow. Deleting duplicate values from a MySQL database is a real pain, and now that it has thousands of records I can't add an unique column. You may ask why I store all those values: I need to add & substract four kWh-values to extract my net kWh-usage and using the kWh/d processor just doesn't cut it.
Request: make the 'data' column for all kWh-feeds UNIQUE in MySQL. For Power/current and other types of feeds this isn't needed, but for kWh-feeds it makes no sense to store the same value multiple times over.