JamesMcCarthy79 / Home-Assistant-Config

Home Assistant Configuration & Documentation for my Smart House.
1.33k stars 158 forks source link

Garden irrigation #37

Closed markrennie71 closed 6 years ago

markrennie71 commented 6 years ago

Hello

I am loving your set up and found someone who has more stuff than me :)

I also have the Mi Floras but I cannot get mine to work. They work fine in the APP but when un-paired they just don't work, no data comes back. Any idea please?

And when I do get them to work the range is too far for the bluetooth and have seen you did this "These connect back to a Raspberry Pi Zero W via Bluetooth which I installed the Bluetooth add on and they integrated to HA pretty easily. "

how does this work please? run another version of HA on the Zero? I already have a RPi3 in the garage only running as an iBeacon, so could use it to do the same.

Thanks Mark

JamesMcCarthy79 commented 6 years ago

Hi Mark,

Yes I had the same problem with bluetooth not connecting to my main hass. I installed hassio on a pi zero w with only the bluetooth addon. Once your addon scans the mac addresses you add the sensors like this

  - platform: miflora
    mac: 'c4:7c:8d:66:21:0b'
    name: Bougainvillea
    force_update: false
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery

You will then need to create rest sensors to find out the states of those. All of the config for my garden sensors is in packages/garden

markrennie71 commented 6 years ago

nice one thanks for the reply James, I'll give it a blast when I get home.

Cheers Mark

JamesMcCarthy79 commented 6 years ago

I also use the garden pi zero for presence detection if I'm outside with my phone which is normal over the weekend. This will turn on the power plug to my entertainment area equipment giving me access to tell alexa to turn on music, tv lights etc as I normally have this area powered down.

markrennie71 commented 6 years ago

mine is for presence detection but just as the iBeacon which works perfectly for me for arriving home. Well I tried various things tonight and the only thing to work for me was zewelor/bt-mqtt-gateway which works a treat. Thank you for the idea in the 1st place though! This sends mqtt directly to my mqtt docker to HA

JamesMcCarthy79 commented 6 years ago

Awesome, now you can use these sensors to implement the plant monitor sensors which will wrap up your sensors readings and also allow you to create thresholds for each like min moisture and battery is the 2 I utilise

JamesMcCarthy79 commented 6 years ago
plant:
  Bougainvillea:
    sensors:
      moisture: sensor.bougainvillea_moisture
      battery: sensor.bougainvillea_battery
      temperature: sensor.bougainvillea_temperature
      conductivity: sensor.bougainvillea_ph_level
      brightness: sensor.bougainvillea_light_intensity
    min_moisture: 10
    min_battery: 15
markrennie71 commented 6 years ago

cheers! I am wanting to use mine for in the greenhouse as I have automatic irrigation system setup and runs each morning if needed or not. Now it can run only when needed... perfect

JamesMcCarthy79 commented 6 years ago

awesome is it a drip type irrigation mine is pretty crude just a sonoff pow with 12v solenoid turn on if moisture level is below x in winter once a day and twice a day in summer.

markrennie71 commented 6 years ago

same, drip type using a sonoff basic and an old marine tank pump in a 220L water butt. No need to run it in the winter here in England :D