I want to create a new device called a Voltage Sensor.
I am using an Adicon SECU8 for my analog input. It reads 0 to 5V. But in some cases I will REALLY be measuring much higher voltages and using an external circuit to scale down.
ADI has ADI_InputAnalogEx as the type of it's inputs.
There exists in Premise AnalogInputEx which has all the logic/proprites I need to manage the scaling.
I want my Voltage Sensor class to:
- have the following properties when added to a Home object
PowerState (True/False) (ValueProperty) (True of voltage > 0)
Voltage (Real)
BoundObject (to the ADI_InputAnalogEx)
The appropriate properties of AnalogInputEx (e.g. RawValue, Offset, Gain)
- Be added to a Home Object as either an HVAC, Saftey, or Appliance object (I don't care, I just want it to show up).
I have massively confused myself on how to create such a class. It's been so long since i've hacked on Premise I just don't remember all the details. Can someone please explain the right recipe?
Oh, and while I'm at it, does anyone know why ADI_InputAnalogEx and ADI_InputCurrentEx inherit from DigitalInputEx instead of AnalogInputEx. It seems like if they had just done this right...
I am using an Adicon SECU8 for my analog input. It reads 0 to 5V. But in some cases I will REALLY be measuring much higher voltages and using an external circuit to scale down.
ADI has ADI_InputAnalogEx as the type of it's inputs.
There exists in Premise AnalogInputEx which has all the logic/proprites I need to manage the scaling.
I want my Voltage Sensor class to:
- have the following properties when added to a Home object
PowerState (True/False) (ValueProperty) (True of voltage > 0)
Voltage (Real)
BoundObject (to the ADI_InputAnalogEx)
The appropriate properties of AnalogInputEx (e.g. RawValue, Offset, Gain)
- Be added to a Home Object as either an HVAC, Saftey, or Appliance object (I don't care, I just want it to show up).
I have massively confused myself on how to create such a class. It's been so long since i've hacked on Premise I just don't remember all the details. Can someone please explain the right recipe?
Oh, and while I'm at it, does anyone know why ADI_InputAnalogEx and ADI_InputCurrentEx inherit from DigitalInputEx instead of AnalogInputEx. It seems like if they had just done this right...