S0 meter with format check to prevent wrong values

Moderator: leecollings

Post Reply
jurgen
Posts: 30
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

S0 meter with format check to prevent wrong values

Post 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!
Misterik
Posts: 28
Joined: Sunday 11 December 2016 18:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: S0 meter with format check to prevent wrong values

Post by Misterik »

perhaps with a database trigger (before insert)https://www.tutorialspoint.com/sqlite/s ... iggers.htm
RPI-3 : RFLink + Zigbee2MQTT + Shelly + MySensors + Milight
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest