victronenergy / node-red-contrib-victron

MIT License
90 stars 18 forks source link

Add a data type validation functionality #42

Closed pkronstrom closed 5 years ago

pkronstrom commented 5 years ago

The services.json has a 'dataType' property for each path. This could be used to validate the data that is sent as an input to the control (output) nodes.

pkronstrom commented 5 years ago

An error is actually alrady printed in dbus-listener if the dbus data type differs from the one being sent. The only issue I see here is that the user can write values to enums outside the defined range. In my opinion, this should be handled on the dbus side, though.