Home Automation - Smartkit

Arduino + Ultrasonic sensor installed in my water tank, and Sonoff POW on the wellpoint pump - my tank and irrigation is now fully automated.

Couple of minor glitches with the sensor readings, doesn't seem to like it when the server goes down - or the MQTT broker restarts.

View attachment 912466
View attachment 912468
View attachment 912470
View attachment 912472

Looks great! I am planning something similar myself, I just need to get around to doing the required soldering.
 
very cool! You can probably filter out those false readings (no way you can instantly go from 2000 l to 0)
 
very cool! You can probably filter out those false readings (no way you can instantly go from 2000 l to 0)

Still thinking on how to do that safely - without disabling the sensor updates completely... was thinking of just creating another sensor - and only updating it if the Arduino sensor change is within a certain percentage variance.
 
Still thinking on how to do that safely - without disabling the sensor updates completely... was thinking of just creating another sensor - and only updating it if the Arduino sensor change is within a certain percentage variance.
Have a look at the HA Filter sensor, specifically the outlier.
 
Here's a tip - double check your code, instead of
- service: switch.turn_off
entity_id: switch.wellpoint_pump

I had

- service: switch.turn_stop
entity_id: switch.wellpoint_pump

Needless to say, pump didn't turn off and overflowed, drowning the sensor... fortunately I bought two.
 
How and where did you mount it in the tank?

Inside the tank - at the top - in the waterproof electrical box, the arduino is at the plug point in the pictures above - I ran a CAT5 cable in a conduit from the top of the tank to the electrical box down below connecting the sensor to the arduino.
 
Here's a tip - double check your code, instead of
- service: switch.turn_off
entity_id: switch.wellpoint_pump

I had

- service: switch.turn_stop
entity_id: switch.wellpoint_pump

Needless to say, pump didn't turn off and overflowed, drowning the sensor... fortunately I bought two.

Eek, that's unfortunate.

I sometimes build in additional "safety" automations -- i.e. if pump ran for more than 1 hour, turn off regardless of anything else.

Simple example - I have a temp/humidity Zigbee sensor in my bathroom. It controls the extraction fan. If the humidity falls below X, turn off the fan. Turns out when the sensor battery goes low it sends updates less frequently, so I started noticing that the fan keeps on for much longer -- until it runs for an hour of course.

Luckily just wasting electricity in this case, but still a useful addition.

Of course, you might still find that your HA goes offline while the pump is running, so perhaps a timer on the POW that resets every time it activates, otherwise turns off the relay after x hours of running?
 
Eek, that's unfortunate.

I sometimes build in additional "safety" automations -- i.e. if pump ran for more than 1 hour, turn off regardless of anything else.

Simple example - I have a temp/humidity Zigbee sensor in my bathroom. It controls the extraction fan. If the humidity falls below X, turn off the fan. Turns out when the sensor battery goes low it sends updates less frequently, so I started noticing that the fan keeps on for much longer -- until it runs for an hour of course.

Luckily just wasting electricity in this case, but still a useful addition.

Of course, you might still find that your HA goes offline while the pump is running, so perhaps a timer on the POW that resets every time it activates, otherwise turns off the relay after x hours of running?

I actually have exactly like - using the PulseTime on the POW as a safety - unfortunately, the tank was already at 90% - and I was busy testing the automations - got distracted by a phone call.

Fortunately, I did it in such a way that its easy to swap out - installed the new sensor, now lets try again.

I need to try and find stock of a waterproof sensor though.
 
I actually have exactly like - using the PulseTime on the POW as a safety - unfortunately, the tank was already at 90% - and I was busy testing the automations - got distracted by a phone call.

Fortunately, I did it in such a way that its easy to swap out - installed the new sensor, now lets try again.

I need to try and find stock of a waterproof sensor though.
I have a simpler idea for you.
Add an overflow outlet on the tank, so that if it doesnt turn off, the water just start leaving the tank instead of damaging the sensor?

Unless the pump...pumps faster than the water would drain through the outlet, in which case it needs to be bigger or more than one.
 
I have a simpler idea for you.
Add an overflow outlet on the tank, so that if it doesnt turn off, the water just start leaving the tank instead of damaging the sensor?

Unless the pump...pumps faster than the water would drain through the outlet, in which case it needs to be bigger or more than one.

I actually plan on intalling one, but looking for a one way valve of sorts, I don't want crap creeping up the pipe and into the tank.
 
I actually plan on intalling one, but looking for a one way valve of sorts, I don't want crap creeping up the pipe and into the tank.
Non-return valve or something
Expensive little things those. You get them for copper pipes but don't be surprised when you see the jaw dropping price for it.
 
Have a look at the HA Filter sensor, specifically the outlier.
For reference, the difference between the original and the filter sensor.

Curious to see how long the ultrasonic sensor lasts - it gets fairly wet in the tank.
2ffbd075f515c3d8c990785eba555e0c.jpg
49317438b57cfbdb77a2b6c0d0925af5.jpg
 
Which filter did you end up using?

A combination, see below - however, it looks like the sensor can't handle the humidity - it randomly shot up to 6cm last night and stayed there... took everything out this morning, cleaned it - and put it back, and its working again. I've now coated the entire sensor in marine silicone - see how it does.

Code:
- platform: filter
  name: "Water Tank - Sensor Distance To Water"
  entity_id: sensor.water_tank_sensor_distance_to_water_raw
  filters:
    - filter: outlier
      window_size: 8
      radius: 2.0
      precision: 0
    - filter: range
      upper_bound: 168
      lower_bound: 0 
    - filter: lowpass
      time_constant: 5
      precision: 0
 
Waiting for my 2 gang and 3 gang qualitel light switches to arrive.


Will see if they work in my switches. If not, bought 2 qualitel smart bulbs R99 each as alternate solution.
 
Waiting for my 2 gang and 3 gang qualitel light switches to arrive.


Will see if they work in my switches. If not, bought 2 qualitel smart bulbs R99 each as alternate solution.
Smart lights work perfectly. Instant setup via Smart Life app and immediate connection to google home.
 
Top
Sign up to the MyBroadband newsletter
X