It's not apparent that for any given node, what command class is relevant. Following from this is that the library is poorly designed where there is little typesafety. I could quite easily try and execute a command on a node that makes no sense.
Consider the following
var nodes = await controller.GetNodes();
// get the motionSensor
var motionSensor = nodes[motionSensorID];
// get the SensorAlarm commandclass
var sensorAlarm = motionSensor.GetCommandClass<SensorAlarm>();
var switchBinary = motionSensor.GetCommandClass<SwitchBinary>();
I'm pretty sure my Aeotec Multisensor has no switch; likewise my Smart Switch 6 has no "alarm".
I feel this library is not intuitive either with it's lack of object-orientation. e.g. trying to obtain power consumption for a given meter. It would have been better if there were an actual
var switches = await controller.EnumerateAsync<IBinarySwitch>();
var switch = switches[2];
var consumption = await switch.GetPowerConsumptionAsync();
...rather than the following code which has no compile-time checking:
var switchBinary = device.GetCommandClass<SwitchBinary>();
var report = await switchBinary.Get();
var meter=device.GetCommandClass<Meter>();
var supportedMeter = await meter.GetSupported();
An interesting library but its too immature for me
It's not apparent that for any given node, what command class is relevant. Following from this is that the library is poorly designed where there is little typesafety. I could quite easily try and execute a command on a node that makes no sense.
Consider the following
I'm pretty sure my Aeotec Multisensor has no switch; likewise my Smart Switch 6 has no "alarm".
I feel this library is not intuitive either with it's lack of object-orientation. e.g. trying to obtain power consumption for a given meter. It would have been better if there were an actual
...rather than the following code which has no compile-time checking:
An interesting library but its too immature for me