Reply
Highlighted
Member
Posts: 151
Registered: ‎03-06-2013
Kudos: 56
Solutions: 1

mPort custom analog sensor does not report to controller

This is my first experience with custom sensors, and so far it has not gone well.  I hope someone knowledgeable about this is still around.

 

The sensor is a capacitve soil moisture sensor with 0 to +3 Volt output.  I attenuated this to 0 to 2 Volts for presentation to Port 3.

 

Just to get acquainted I tried selecting the standard "Input Analog" sensor.  It works as expected; reports the attenuated analog value to the mFi controller where it appears on the Devices page and is available for rule making.  But I need control of the power and digital output pins (set power to off and output to 5 Volts) so I composed the following JSON configuration:

 

{"VH400 Moisture Sensor" : {
    "desc" : "soil moisture volume water content",
    "analog" : true,
    "rj45_v1" : false,
    "tblock_v1" : true,
    "output" : true,
    "do_volt0" : 5,
    "pwr_volt" : 0,
    "rep_analog" : 1,
    "rep_sum" : 0,
    "rep_rms" : 0,
    "rep_input0" : 0,
    "default_tag" : "volts",
    "analog_tag" : "sensor volts",
    "conversion" : "xyz*1.465",
    "unit" : "Volts",
    "precision" : 2
    }

}

 

I removed the standard sensor, restarted the mPort, and installed the custom sensor.  I then had proper control over the power and output pins, but the analog value is not reported to the controller.  It does not appear on the Devices page and is not available for making rules.

 

The inside workings of the mPort seem to be proper.  Telnetting in, the analog input value and the conversion result are visible at /proc/analog/ai3 and /proc/analog/value3.  I have tried many variations of the JSON configuration but none allows the value to be reported.

 

Can anyone please suggest what I have done wrong, and how to correct it?

 

Many thanks for your attention.

New Member
Posts: 11
Registered: ‎11-13-2014
Kudos: 4
Solutions: 1

Re: mPort custom analog sensor does not report to controller

were you able to get this sorted?

Member
Posts: 151
Registered: ‎03-06-2013
Kudos: 56
Solutions: 1

Re: mPort custom analog sensor does not report to controller

No, I finally gave up and have been using the standard sensor settings for the past 11 months.  Its a compromise, but got me through the growing season last summer.

 

The sensors are capacitive moisture sensors (0 to 3 volts output) I place in hydroponic growing sites to control when nutrient solution delivery to the plants (tomatoes).

 

Have you had any luck with custom JSON settings?

 

 

 

 

Reply