Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Home Assistant

1910121415

Comments

  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    starting my HA journey. Is there a handy YouTube channel or position to start with absolute basics?


    initial priority is probably using sun/solar forecast to inform and drive solar/battery/EV management.

    Then dashboard of some thermometers which may later drive blinds or curtains.

    😎



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    Electric gates currently driven by an old fob, or unrelated new hikvision doorbell/opener.

    is there a way to have HA help me automate gate opening as I come within range of house eg 300metres, or pass a local point, or other trigger?

    😎



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    Yes there is, there is a good video on this page too:

    I have not played with it, but the one thing that it depends on is the HA companion app being installed on your phone.



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    The world and their wives have made HA beginners videos, I'm not sure which is the best though. Best have a click around.

    The install guide for RPi seems fine to get you up and running.

    One piece of advise that I can offer to a noob is to take your time to read about YAML and how it works in HA as that's the most confusing part if you're not au-fait with that structure of configuration. My configuraton.yaml is 700 lines long, but I should really have used the sub-files such as sensor.yaml and binary_sensor.yaml a bit better to make it all easier to read.

    Best get VSCode working and use that to edit the files directly.




  • Registered Users, Registered Users 2 Posts: 4,999 ✭✭✭paulbok


    Stick to the installation/ beginner videos from the last 12 months. The process was a different animal once you start going back a few years (and there have been many great beginner videos over the years), but it's a far simpler process than it used to be. I'm not sure I use my yaml files except for adding login 'secrets' for a few devices.

    Everything Smartphone, Bearded Tinker, Smart Home Junkie, Home Automation Guy, Digiblur Not Enough Tech, Mark Watt Tech are all great channels to look at for different topics as you need them.

    Whatever route you go, after installation, get your head around backups and be religious about making them after every session. Mistakes will get made and you'll bedamn glad to roll back to the last working state.



  • Registered Users, Registered Users 2 Posts: 2,519 ✭✭✭ECO_Mental


    I have my HA up and running for a year and half on a Pi4b and never once did I have to mess with the YAML files (bar the initial user name and password) with the UI you can do practically anything

    6.1kWp south facing, South of Cork City



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    OK, maybe it's just me then, but I'm in the yaml daily! I prefer to code my helpers and such, but I know that the interface has improved hugely in the last while in that respect.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    Want to open a gate automatically when approaching. for example automation to "when iPhone comes within 300m of home, and is connected to car Bluetooth, activate open gate/garage button once". New to HA so basic guidance appreciated.

    😎



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,238 Mod ✭✭✭✭Jonathan


    In terms of automation, it is pretty simple. You need a zone trigger to fire when a person (device_tracker) enters a zone (Home), trigger the gate. You can get fancier and set up a second larger zone outside your house and enable high accuracy location when entering this zone to make the timing more accurate.

    You'll need external access set up to Home Assistant for this to work as your phone needs to be able to trigger the location update once it enters the zone. Do you have this set up?


    Also, HA has an Android Auto mode and you can trigger switches/entries from the dashboard. Not sure if there is something similar for Apple CarPlay.



  • Registered Users Posts: 593 ✭✭✭theintern


    You haven't mentioned how you'll trigger the actual gate. You'll need some way to get Home Assistant to be able to actually send the signal to the gate which depends on how your gate works. You might be able to use a relay wired into the gates power supply (Sonoff or Shelly do good ones), or you might be able to use some sort of RF repeater that will send the same signal as your fob.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    I have an Meross gate/garage door switch, so i can trigger that in HA (can already see it and play with it via HA).

    I also have a hikvision doorbell/gate opener which also works on the gate, - but i need to reset/unlock the doorbell as cant get into admin settings at moment (forgot password details). In time I imagine hikvision will be the best way to manage it.

    I have setup a zone around my house, 300 metres. What I want to get right is the instruction so the gate is not constantly trying to open when i enter the zone, or is not trying to open the gate as I exit the zone. So only "hitting unlock" once, when i am entering the zone.

    It seems a smart way to manage high accuracy, is to turn on high accuracy when phone is connected to car bluetooth....now back to youtube to figure that out.

    Post edited by poker--addict on

    😎



  • Registered Users Posts: 593 ✭✭✭theintern


    Automations in HA should make this pretty easy. The state of your person tracker will change when you enter the zone, so you'll want the automation trigger to be a change in state of your person entity, from away, to home. That should just trigger once.

    When you exit the state change will be from home to away, so it wouldn't trigger in that case.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    id: '1694451677077'

    alias: Gate Triggered by entering 300m zone

    description: ''

    trigger:

     - platform: zone

      entity_id: person.firstname_secondname

      zone: zone.approaching_home_300m

      event: enter

     - platform: zone

      entity_id: person.firstname_secondname

      zone: zone.approaching_home_300m

      event: enter

    condition: []

    action:

     - device_id: 0bb4fba9e328ab3175225d08df63c2c8

      domain: cover

      entity_id: 2200e482835d7893bd5adcf23f039402

      type: open

    mode: single



    Any obvious errors in this automation. It has not worked. The device at end is Meross gate/garage opener. The logic is when both people/trackers enter a 300m radius of home, triggers gate to open.

    HA is setup for remote access.

    Owntracks and iphone tracking is linked to people profiles

    😎



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,238 Mod ✭✭✭✭Jonathan


    Looks fine. If you have remote access set up, I'd suggest just using the location tracking within the Companion App rather than OwnTracks. It syncs any HA zones to the app so the phone can locally determine if it has entered/exited a zone and force an update.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    Happy to get rid of Owntracks, enough tracking going on! will HA app update location frequently enough Jonathan? Given the radius I am using is about 300m, if it is not updating every 30 seconds then Im going to be at the gate waiting....?

    Was also wondering how likely the tracker in cars are updating?

    😎



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,238 Mod ✭✭✭✭Jonathan


    You can do all sorts of smarts like turning on high accuracy mode on entering a zone. This is on Android. Not sure if same exists on iPhone.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    I read somewhere iPhone is a bit funny about this,

    unrelated, anyone managed to get HomeSecure Alarm into HA?

    😎



  • Registered Users, Registered Users 2 Posts: 1,341 ✭✭✭Nelbert


    I ripped mine out once it became obvious their z wave openness talk was marketing and they hadn't an actual clue about it.

    Got a Ring alarm which is fine for HA integration via an add on but I'm considering just connecting all the sensors directly via z wave and being rid of the ring base station.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    My gates are now opening with HA when person/device tracker enters a zone. Win! It can be slow though, which introduces some luck. If the zone is 300 metres, and a GPS update has happened at 310metres, the car will need to sit at the gate waiting for another GPS push. At least this is what I am interpreting is going on. I think apple doesn't facilitate rapid location updates by default, but android might. Suspect this is why some people are using OwnTracks and other apps, to try to drive more frequent pushing of location to HA server.

    What might work is apple shortcuts, and an automation to send location when entering same zone, albeit I am not sure if that app will be monitoring location live either, or if it also has delays between updates?

    😎



  • Advertisement
  • Registered Users Posts: 593 ✭✭✭theintern


    Aren't the HomeSecure alarms Ajax systems? Or perhaps yours was an older version?



  • Registered Users, Registered Users 2 Posts: 1,341 ✭✭✭Nelbert


    Mine was about 5 years ago now that I think of it. They just frustrated me with claims of open till you got in to actually trying to get it to talk to anything else hardware or software wise.



  • Registered Users, Registered Users 2 Posts: 4,999 ✭✭✭paulbok


    Speaking of Ring equipment, do you still need a subscription with them to be able to use all functionality of cameras in HA?



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    got grafana working...now im hooked!

    😎



  • Registered Users, Registered Users 2 Posts: 1,341 ✭✭✭Nelbert


    As far as I know yes.... I plan to eventually migrate to reolink doorbell and cameras.... the alarm is just a matter of pairing the ring sensors to HA via z wave.



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx




  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    video emaherx?

    Anyone with gates? what triggers work for opening gates when leaving house? I am thinking the car starting - is that possible?

    😎



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    That's crazy-smart stuff. How is the dose measured, I don't get that part?



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    I need a steer on this lads if anybody has an idea:

    I need to create a binary_sensor which changes state momentarily based on a trigger. So let's say that the humidity in a room is greater then 75%, I want the binary_sensor to change from on to off momentarily every 3 mins while the condition is true. I can't for the life of me work out how to trigger this in a loop, I've tried playing around with automatons but they all end up being once-off events 3 mins after the initial condition is true and don't repeat.

    So: if humidity gt 75%, pulse a binary_sensor for 1sec once every 3 mins.



  • Registered Users, Registered Users 2 Posts: 1,341 ✭✭✭Nelbert


    Change it to a helper input Boolean...

    You can then use a "while" action by picking repeat and then the while repeat type and adding the condition that needs to stay true for it to keep looping.

    Trigger

    Humidity>75%

    Action

    Repeat - While humidity>75%

    Input Boolean on

    Delay 1s

    Input Boolean off

    Delay 180s



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    Not sure it's a great video demonstration but...

    Basically if the bottle is turned upside-down the "Keppra Given sensor" changes from false to true and if not true by a certain time a notification is sent.

    It can be a busy house in the morning with 2 parents trying to get 3 children to 2 different schools, the youngest has epilepsy and it's important that we medicate her before school and at bedtime. The Alert says check if medication was given if the sensor is false, so it's "check with other parent" as this is a backup/reminder and don't want to have medicated her twice either if HA for whatever reason didn't report correctly.


    The sensor only reports true if turned completely upside-down which it needs to be in order to draw out the dose, so if someone goes rooting for paracetamol in the morning and moves the bottle out of the way they won't accidently trip the sensor.

    ------------------------------------------------------------------------------------------------------------------

    On your car idea, it's totally possible there are probably OBD2 attachments that could utilize or a simple sensor that plugs into the 12V socket or a USB socket that turns on/off with the car. Or just stick a smart button to the dash.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    Thank you.

    I could not find the "while" type under "repeat type" for the longest time. I have this now:

    alias: Ensuite Humidity Stays High
    description: ""
    trigger:
     - platform: numeric_state
       entity_id: sensor.sensor_2_humidity_sensor
       for:
         hours: 0
         minutes: 3
         seconds: 0
       above: 77
    condition: []
    action:
     - repeat:
         while:
           - condition: numeric_state
             entity_id: sensor.sensor_2_humidity_sensor
             above: 77
         sequence:
           - service: switch.turn_on
             target:
               entity_id: input_boolean.ensuite_humidity_stays_high
             data: {}
           - delay:
               milliseconds: 1500
           - service: switch.turn_off
             target:
               entity_id: input_boolean.ensuite_humidity_stays_high
             data: {}
    mode: single
    

    I'll have to go breathe on the sensor now to see if it triggers. 😁



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    It's not and doesn't need to be, the dose is drawn up by a parent, but just sends a reminder if it's detected that the bottle was not turned over to draw out the dose. If it was needed for say an elderly person who is still independent but needs monitoring then I guess a weight sensor may make more sense.



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    Oh, I get you now! I thought that this was a component within a dosing system for animals. 🤣



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    😂

    Well to be fair, that would be my usual form. Sometimes I build stuff for home too 😁.



  • Registered Users, Registered Users 2 Posts: 1,341 ✭✭✭Nelbert


    It should be fine. What's that input Boolean a trigger for out of curiousity?

    Been toying with getting humidity sensors and making extractor fans smart myself.



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,238 Mod ✭✭✭✭Jonathan


    Was going to suggest using the Companion App bluetooth sensor, but that isn't available on iPhone either it seems.

    I don't suppose your car has an API? I have my car integrated with HA and can get all sorts of stats like lock/unlock status, running status, SOC etc. I have an automation to remind me to lock the car it is at home at not locked etc.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    I thought it was auto dozing for cows too - didn't seem the small print just the photo. Your use case is even more clever though and important though. Does anything like this exist? In my mind that is something worth patenting and has huge potential if it doesnt already exist?


    As for my measly gates, small smart button could be the answer. We do have a fob but it's inevitable in a pocket or bag when needed. Small smart button left in car would solve it. Caveat though for anyone brainstorming this too- might want to hide it as a fob or button to open gate in plain sight makes life easier for a thief.

    😎



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,238 Mod ✭✭✭✭Jonathan


    Another possibility avenue is to stick a programmable NFC tag to the dash and scan it to open the gate on the way in/out.



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    I wonder if Tesla has sensor for brake release, that would be the ideal trigger if it was relayed fast enough. Probably still on home WiFi at that point too.

    im sure I saw speed sensor so that may work again if it's fast enough to update, "3kph and increasing in home zone"

    😎



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    I don't have a Tesla, but this suggests handbrake sensor might be an option.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    Yes, I have that integration, and it does have parking brake sensor. The challenge is the update speed.

    The standard is every 10 minutes actually, for polling the car/tesla server. This can be reduced to a matter of seconds, but triggers to reduce and reset must be done very well, otherwise risk of causing battery drain!!! So I could set faster polling when car door opens until I leave home zone, for example, however I am not sure it will see car door is open for up to 10 minutes!!

    I wonder now if my CCTV will read the number plate when car enters a certain zone on the screen, and that could trigger gate opening for departure.

    😎



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    Does it need to read the plate?

    If car moves, open gate.

    Or car moves to certain zone open gate. Could be useful for guests leaving too, presumably no unauthorised cars are on your property when the gates were closed.


    Also depending on the gates it may well be trivial enough to over ride them manually once inside the property anyway meaning the smart button is not that big of a security risk. Plus can be hidden under dash.



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    Can you get HA to display on cars screen when it starts?



  • Registered Users, Registered Users 2 Posts: 1,763 ✭✭✭poker--addict


    no, tesla have that locked, that would solve many issues. I must check via browser though!!

    😎



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    Reports from the internet say it can be accessed via the Tesla's browser. But I guess it's only useful if you can create a shortcut or have it open someway when the car starts.

    Even my crappy Dacia can access via a browser app on Android Auto.



  • Registered Users, Registered Users 2 Posts: 7,714 ✭✭✭10-10-20


    It's a control for a dehumidifier within an ensuite.

    It has three inputs:

    1. If the RH is rising quickly (using a trend sensor).
    2. If the RH is above a set level (77%).
    3. If the absolute humidity in the ensuite is more than 10% greater than the average absolute humidity of the other rooms upstairs.

    If any or all of these inputs are triggered the dehumidifier will run for 15 mins on a resetable timer. It will shut-off if the RH drops to 3% less than the average upstairs absolute humidity. That way I'm not over-drying the room and I'm not battling with the ambient RH in the upstairs of the house.

    I'm cheating somewhat in terms of how I manage the dehumidifier - I'm not using node-red yet so I have employed Blacky's Sensor Light blueprint script to take the three inputs and turn the dehumidifier on. It also allows me to set other controls such as date/time and over-rides, so it's handy in that respect.

    How is all of this automation it better than just leaving the dehumidier to do it's thing? Firstly the dehumidifier sits on the floor and doesn't trigger until the moist air has come down to its level. That causes a very slow reaction time to showers and can also leave very damp air at head-height level for hours. Also the dehumidifier was cycling often and over-drying the room every 30 mins due to hysteresis, and this was causing it to consume around 1kWh per day. Now it's only switching on around 10 times per day and the consumption is down a bit (around 0.7kWh). But the key thing is that it's cycling a lot less.

    I also have a simple trend sensor which is operating an (bathroom) extractor fan within the kitchen. It's wired up to a Sonoff with a temp/RH sensor and it's just the best thing ever. It can detect when a kettle boils at the far side of the kitchen within around 10 seconds and turn on the fan to remove some of the moisture. It has been rock-solid now for 2 years.

     - platform: trend
       sensors:
         humidity_kitchen_rising:
           entity_id: sensor.sonoff_kitchen_humidity
           sample_duration: 60
           max_samples: 30
           min_gradient: 0.01666
           device_class: moisture
           # Percent / seconds = gradient
           # 5 / 180 = 0.0277 (5% over 3 mins)
           # 5% over 5 mins = 0.016666667 
           # 7% over 5 mins = 0.023333333
           # https://www.home-assistant.io/integrations/trend/
    




  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    I guess I could do with a second Git user profile for non farming projects 😂



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    That's cool I'll have to refer back to this, planning on something similar for my own bathrooms.



  • Registered Users, Registered Users 2 Posts: 6,250 ✭✭✭emaherx


    I finally figured out how to make Home Assistant Addons from existing Docker images.

    https://github.com/Farmer-Eds-Shed/Home-Assistant-Addon-Repo/tree/main

    So I made 2.

    • NTFY - A notification Server
    • ruuvi-go-gateway - Gateway for Ruuvi BLE Tags.

    Makes some other projects a bit neater to have all dependencies managed by Home Assistant.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 65 ✭✭meathenterpr


    As others suggested use refurb mini pc. A cheapo i5 with 8G ram and 120G ssd. Look on Amazon, adverts.ie, ebay etc

    Wipe windows and install Debian.

    Can then run supervise Homeassistant in docker.

    Alternatively use Virtualbox, download the image for Homeassisant.

    Or if you have an old pc use it.

    In my case I moved from raspberry pi to my old pc. Have Homeassistant running in Virtualbox.

    Also have sdr dongle running. This pulls data from my Personal Weather station to Homeassistant using mqtt as well as a couple of docker images.

    With a PC you have more options available.



Advertisement