Page 1 of 1

S0 meter with format check to prevent wrong values

Posted: Monday 23 January 2017 10:58
by jurgen
Hi All,

I have running a S0 meter over tcp to collected the kwh from my solar panel inverters.
Sometimes there are wrong values insert in the database, so i it would be nice if a format check is possible to prevent that wrong values can be insert in the database. I know that it is possible to edit the values in de DB but it would be better if it is possible to prevent.
Is there a way to build a format checker?

The values that are send from the S0 meters will look like this:
ID:30514:I:10:M1:0:3872:M2:0:9526

Thank you!

Re: S0 meter with format check to prevent wrong values

Posted: Wednesday 01 February 2017 15:05
by Misterik
perhaps with a database trigger (before insert)https://www.tutorialspoint.com/sqlite/s ... iggers.htm