2.0 Discussion: Units, sensor types and protocol
-
-
@hek said:
V_DUST_LEVEL - ug/m3
g/m3 if you standardize on SI
Same for distance BTW. Might be more...@Yveaux said:
g/m3 if you standardize on SI
Same for distance BTW. Might be more...I choose to scale the SI units to something relevant for thing getting measured. E.g. g/m3 would give a VERY small small value for dust.
Distance is mainly for the distance sensor now, which only has a small range.
Rain - measure in meters would also render very small numbers.
So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.
-
I would like a way to configure a sensor from the gateway, to e.g calibrate a sensor or store some ID. Maybe a V_CONFIG can be added, where childid indicates the actual variable written. Or define a few V_CONFIG0,V_CONFIG1 etc.
What do you think? -
@hek said:
V_WIND - m/s (average wind speed during last hour)
V_GUST - m/s (highest wind speed during last hour)Why average/highest over last hour? My weather station reports wind speed every minute and I like to see the minute detail instead of averaging everything over an hour.
-
@Yveaux said:
g/m3 if you standardize on SI
Same for distance BTW. Might be more...I choose to scale the SI units to something relevant for thing getting measured. E.g. g/m3 would give a VERY small small value for dust.
Distance is mainly for the distance sensor now, which only has a small range.
Rain - measure in meters would also render very small numbers.
So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.
@hek said:
So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.
When values are sent as floats it doesn't matter. Scaling is implicitly store in the floating point value when sent as binary float. When transfered as ASCII you're right, but that isn't required with 1.4 anymore...
-
@ServiceXp said:
V_RELAY_STATUS 1=Active, 0=Deactive
Not sure what differs this form V_LIGHT_STATUS.
Maybe we need a better word than LIGHT that describes a thing-that-can-be-turned-on-or-off? -
@HEK I'll bite:
Use under scores consistently ? eg V_RAINRATE and V_LIGHT_LEVEL
The units to be used here can be clearer:
V_VOLTAGE ---> V_VOLTS
V_CURRENT ---> V_AMPSWhere the base unit is not used - should the name reflect that? eg V_DISTANCE --> V_DISTANCE_CM
Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
V_IMPEDANCE --> V_RESISTANCEHUM is a bit vague - suggest: V_HUM --> V_HUMIDITY
V_DIRECTION may be confused with an angle or up/down. Could use V_COMPASS_POINT, but that may be confused with magnetic or true north!
V_LIGHT could be confused with V_LIGHT_LEVEL. Could use V_LIGHT_STATUS
V_TEMP while often used, can be confused with a temporary variable? Could use V_TEMPERATURE
V_VOLUME could be confused with audio volume? Could use V_CUBIC_MEASURE
V_HEATER_MODE for V_HEATER?Could add V_DEW_POINT
STATUS always be used for binary values eg on/off, locked/unlocked?
V_LOCK_STATUS
V_LIGHT_STATUS
V_HEATER_STATUS@a-lurker said:
Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
V_IMPEDANCE --> V_RESISTANCEI think the impedance-variable comes from the RFXTRX plugin. And it is related to body fat measurements for body scales.
http://code.mios.com/trac/mios_rfxtrx/browser/trunk/L_RFXtrx.lua
If I understand it correctly Impedace is used for AC and resistance for DC. Not sure what would be most useful in this setup.
-
@hek said:
So, until we have a scaling factor in the protocol or something similar we'll have select a proper scaling at the source and agree on it between sensor and controller.
When values are sent as floats it doesn't matter. Scaling is implicitly store in the floating point value when sent as binary float. When transfered as ASCII you're right, but that isn't required with 1.4 anymore...
-
@a-lurker said:
Electrical impedance and resistance are not the same thing- suspect resistance is intended here?
V_IMPEDANCE --> V_RESISTANCEI think the impedance-variable comes from the RFXTRX plugin. And it is related to body fat measurements for body scales.
http://code.mios.com/trac/mios_rfxtrx/browser/trunk/L_RFXtrx.lua
If I understand it correctly Impedace is used for AC and resistance for DC. Not sure what would be most useful in this setup.
@hek Moisture or Water detecded... Might be 2 different ?
Thinking different applications: Moisture in ground. (I.e. Water needed? Ground dry?) And Water level, hmm, if you have a fluid level meter to detect overfill. or leakage. Fluid flow -
@Yveaux said:
When transfered as ASCII you're right, but that isn't required with 1.4 anymore.
Most users still use the serial protocol. Which means strings like "0.000003423" must be generated and transferred to the controller from gateway.
@hek said:
strings like "0.000003423" must be generated and transferred
Ok, but is this a problem? You could even pass it as 3.423e-6....
You don't want this string on air if you can transfer the same thing in 4 bytes, that's true.
I only want to state that if you transfer it purely in SI units, without scaling, you always know what the actual value is. -
I'm still in doubt if we really need all these different value types...
In principle a (light) switch, water level sensor, burglar alarm, heater status <fill in your own binary switch> all just return or take 0 or 1. V_BINARY should suffice for all of them.
For other values you see the struggle between defining them as bare units (V_AMPS, V_VOLTS, V_CUBIC_MEASURE) and function (V_FLOW, V_WEIGHT, V_HUMIDITY).
Can't we just live with transfering values by specifying their units only and leave the interpretation of it to the controller (e.g. V_AMPS, V_BINARY, V_PERCENTAGE) ?
I'm not familiar with Vera, but e.g. the OpenHAB/MQTT combination doesn't care at all what type of value is exchanged. It's up to the configuration of OpenHAB how a value is interpreted. -
@hek Moisture or Water detecded... Might be 2 different ?
Thinking different applications: Moisture in ground. (I.e. Water needed? Ground dry?) And Water level, hmm, if you have a fluid level meter to detect overfill. or leakage. Fluid flow@Damme said:
Moisture or Water detecded... Might be 2 different ?
For water detected I would probably use V_TRIPPED.
Hmm.. Soil Moisture.. I have no idea how to represent this. Help me! The ebay sensors we're using isn't super accurate and comes uncalibrated.
-
@Damme said:
Moisture or Water detecded... Might be 2 different ?
For water detected I would probably use V_TRIPPED.
Hmm.. Soil Moisture.. I have no idea how to represent this. Help me! The ebay sensors we're using isn't super accurate and comes uncalibrated.