I have a pair of linear 5v pressure sensors that I need to monitor for a water purification system.
I also have a MiMo2+ available, so my plan is to use the MiMo2 analog inputs with threshold detection disabled to monitor the outputs of the two linear analog sensors.
Unfortunately though the MiMo2+ supports periodic sends of ADC data from SIG1 and SIG2, the minimum interval is 30s, which is too long for the system to take meaningful action in the event of pressure too high or low events. Accordingly, my plan is to disable the periodic send function and poll at a smaller interval of say 2-3 seconds.
I can set up a schedule to issue a status poll every 2-3 seconds, but this seems to clutter the log as I have not found a way to inhibit log posting for this device.
Since I already have a python script created to convert the ADC codes to PSI pressure values, my thought is that I could perform the status read function from within python script.
Given that my indigo python skills are still in their infancy, can someone suggest a python code syntax that would be use to read the ADC status from the MiMo2+ device?
My thought was something like..
adc_code = indigo.devices[123456789].states #where 123456789 is the device ID of the MiMo2+ SIG1 input device
Thanks.