As I continue connecting things in my camper, I have discovered how cool the Shelly Plus Uni is… especially when tasmotized. First, it can be powered directly off of the 12v battery bank. Second, the ADC range is much higher than ESP devices. Third, the outputs handle higher voltages. As such, this device is quite versatile without additional components.
A couple of use cases in my camper:
Tank Level Sensors - I have three Uni’s for the three tanks - fresh, gray and black. Using the uni outputs, I activate the sensor for 15 seconds to allow it to normalize. Then using the ADC inputs I measure voltage - empty is roughly 9v, full is roughly 2.5v - and then turn the tank sensor back off. Using tasmota’s adcparams, this voltage is inversely converted to 0-100%. Fresh water readings run on a 30 minute schedule and subsequently kick off the gray then black water unis.
Camper Ceiling/Exhaust Fan - my camper fan has two buttons - a speed control button (4 speeds) and an off button. I paralleled the two Uni outputs to these buttons. I then tied the Uni adc input to the output of the fan control board. Similar to the tanks, at full speed, the adc reads basically zero. When the fan is off, the adc reads full battery voltage. In tasmota, I assigned a third (virtual) relay to an unused GPIO. I then created rules that turn on that virtual relay when adc voltage goes below 90% of the battery voltage and turns off that virtual relay at/above 90%. Additionally, I created rules that when the virtual relay is turned on or off, the speed and off outputs momentarily close accordingly. So, now I have a simple virtual switch that toggles the fan on/off and maintains accurate status when the fan is operated manually. The kicker - battery voltages drop during a boondocking trip, so to accurately determine 90% of the “off” voltage, I created an additional rule that updates an “off” voltage variable every 60 seconds -if- the fan has been off for 30 seconds. All of this is done through tasmota so the only things I expose are a power toggle switch and a speed “button”.