Originally, everything was done by defining it in YAML … and then you had to restart Home Assistant for the change to take effect. That was a ‘culture shock’ for me coming from Premise where you can do anything (add/remove integrations or entities, change one thing in a script, etc) and never have to restart it. Even today, Home Assistant is still not at parity with Premise’s transparent reloading abilities (and possibly never will since they employ very different internal architectures).
Home Assistant is an open-source project largely built by volunteers and the paid employees of Nabu Casa (if you use Nabu Casa’s remote-access service, your subscription fee pays their salaries). All it takes is for someone, with requisite software development skills (in python), time, and interest, to create and submit the “make groups via UI” feature (submissions are posted to the appropriate GitHub repository).
FWIW, there’s a boatload of very useful enhancements in the Feature Requests section that have never been implemented. Why not? Because no developer has been sufficiently inspired to create them. In other words, no matter how good we think the feature may be, its merit doesn’t somehow bump up its priority (there is no pipeline or prioritization); it’s all up to the “kindness of strangers” and only if they’re sufficiently interested.
EDIT
I overlooked to mention that there’s an existing Feature Request that you may wish to vote for (unless you already have):
Combined a bunch of automations into a blueprint and added some functionality for creating groups. Hopefully, it holds us over until a better group interface is added. Take a look!
Hello and this is my first post here. I’ve got over 150+ over on the HS forums
I’m a fairly happy HS4 user and am one of the seemingly few that find it a significant improvement over HS3 although I don’t care at all about the mobile stuff, I use something called HSBuddy for a mobile dashboard and it works great.
Anyway, I’ve been playing with HA on a Pi4 and have a Nortek Z-wave/Zigbee interface on it and they both work for those integrations. I tried adding the Insteon setup (since I have a ton of those products) and it connected and pulled in all the devices, but then HS4 stopped talking to the Insteon hub so I had to disable it for now. And Mike, thanks for the post about the DSC Envision issues, I haven’t gotten there yet as I know the Envision module will only talk to one host at a time for some reason, so mine is still on HS4. I like triggering lights at night when opening DSC monitored doors.
My primary questions are, after reading through the hundreds of posts here trying to find answers to them, are:
I use the HS counters and timers extensively. Not sure how easy it would be to emulate that stuff in HA - I use a lot of counters as flags so if there’s a way to create virtual devices (on/off or whatever) then that would probably work. But HS’s integration of counters and timers made events easy. I see there’s something called “hass-variables” but it’s unclear to me if those survive reboots. An example of a counter I use is “pool-setup” which is either a 1 or 0. Daily timed events occur that look for that counter value and run a pool filter for a period of time if it’s a “1”. Another is “holiday_lights” that trigger outdoor outlets for lights when I set them up and change the counter value. Again, a virtual device would suffice for these items. I know I can go and enable/disable automations, but flipping a counter value is really a simple “switch”.
In regards to timers, those are also useful to me and I’m not sure if there’s a way to do this in HA. The basic idea is that I create a timer, give it a name, and events can either “start”, “stop”, or “reset” and they remain in place (their time values) after a reboot, until they are changed again. The values can be referenced from events (i.e. is timer xxx greater than 5:00).
One feature that was promised in HS4 was the “if-then-else” integrations into events. This feature seems dead at this point based on what I’ve read about it. Wondering how that works in HA – in other words based on conditions can I run different actions? Currently in HS I have to create multiple events to do this; i.e. event 1 fires based on a trigger, then it runs event 2 with the caveat that the trigger conditions are met, etc.
I will say that I’m very happy HA is linux. I’ve been using HS on a Win10 box just so it’s native. I never liked the mono implementation of it. But I would have preferred my SH system to be on linux.
Well, thanks for everyone’s contributions and very informative posts in this thread. And I’m looking forward to seeing what the future holds in my smart home world – all while keeping the WAF as high as possible!
Side note - I work at Google and am very active in an internal group called “Home automation” or something like that, and just about everyone there uses HA so that’s another reason I’m willing to give things a go here!
Oh also – entities, states, services, blueprints… all new ideas to me!
My first challenge was trying to set a Philips Hue bulb to an RGB color. I thought it would be straightforward but it wasn’t initially. Turns out I have to use that “service” called “light.turn_on” instead of the device directly. I used some yaml code somewhere to make it work.
My mind was shocked when I went back just now to see what that code was called and the visual editor loaded instead of the yaml editor, and the action looks totally different than before, when it was just a device action. The action is now “Call Service” and it has all the light options, including RGB options in an easy to use visual editor. Very cool!
I would recommend reviewing the automation triggers and conditions in HASS and evaluating your current events against them. You may find that what drove you to choose counters and timer devices in HS can be done a different way. HASS supports variables in automations, loops, and some other things not supported in HS that allow for multiple HS events to be collapsed into one HASS automation.
I’m in the early stages of evaluating my HS event logic using the same logic. I’m compiling a comparison of HASS triggers and conditions to HS triggers and conditions and working on documenting automation patterns so I can apply them to my HS event conversions.
Slow and painful work, but I’d rather not have to redo things once I put them in HASS.
The State Trigger’s for option can be used in place of situations where a standalone timer is often employed.
The following will trigger when the door is opened and left open for at least 15 seconds.
trigger:
- platform: state
entity_id: binary_sensor.door
to: 'on'
for: '00:00:15'
If the door is closed prior to the 15 seconds, the trigger doesn’t fire (and the countdown is reset).
An important point to remember is that all automations are reset after a restart or just executing Reload Automations (which happens transparently whenever you use the Automation Editor and save a newly created or modified automation). What that means is any automation that is in-progress, perhaps iterating a repeat, or counting down a delay, or idling within a wait_template or wait_for_trigger, is instantly cancelled and reset. The same is true for a State Trigger’s foroption.
tl;dr
Pretty much anything that waits for a specified amount of time is reset by a restart/reload.
Active/paused timers are also reset after a restart (and Reload Timers). However, I created a method to mitigate it (link posted above).
To mitigate this ‘reset the world’ behavior, various design patterns have been devised. After a restart, you can’t make an automation pick up exactly where it left off but you can ensure it, at the very least, gets re-triggered again. You can see some of them described here:
Thanks, that helps those of us migrating from a different automation platform.
HomeSeer kept “entity states” across a restart, I’m curious do all HASS entities go through an “unknown” state after restart until the integration determines the current state? I’m guessing this would impact automations that triggering “from” a specific state. Generally in HomeSeer there was no “unknown” state except some Z-wave entities. If you shutdown a plugin (the loose equivalent of integrations) the state simple never changed again.
HomeSeer has a device state “save at shutdown” and “restore at startup” built into its core, assuming HS is shutdown gracefully. Other than effort, is there a technical reason this couldn’t be done in HA? I have a lot of events in HS that rely on the “state” of a device and I can’t easily move those to HA.
Well, you don’t know what happened while the system was off, right? A light switch may have been turned off. It might have become dark. So assuming that states are as they were when the system powered down is risky. The safer behavior is to have the states unknown at startup until they report or are polled.
is saved/restored on shutdown/startup. Timer also falls into the Helpers category but is an exception to the rule.
The state value of all other entities is derived from their respective integrations on startup or, in the case of entities based on the Template integration, computed on startup.
unavailable and unknown are valid states. Obviously they’re undesirable states but nevertheless useful for indicating when something goes awry. unavailable typically indicates an entity no longer exists whereas unknown indicates the entity’s value can’t be acquired.
For example, sometimes one of my WiFi-based switches drops off the network momentarily then reappears. When it drops off, its state value is unavailable. I can use that in an automation to report when it winks in and out of existence:
- alias: 'Monitor Switches'
id: monitor_switches
trigger:
- platform: state
entity_id:
- switch.whatever_1
- switch.whatever_2
to: 'unavailable'
- platform: state
entity_id:
- switch.whatever_1
- switch.whatever_2
from: 'unavailable'
action:
- service: persistent_notification.create
data:
title: 'WARNING {{now().timestamp()|timestamp_local()}}'
message: '{{ trigger.to_state.name }} changed from {{ trigger.from_state.state }} to {{trigger.to_state.state}}.'
The first State Trigger detects when either of the two switches changes state from anything to unavailable.
The second State Trigger detects when either of the two switches changes state from unavailable to anything else.
If I am made aware the problem exists and can detect a pattern of when it happens then maybe I can figure out why it happens (because normally the WiFi coverage is good). In one case, an exterior porch outlet, located a foot above the porch and with a fair connection (-56 dBm through a brick wall), frequently dropped off and reconnected in the summer despite a previously flawless record of operation during fall, winter and spring. The cause was determined to be the addition of various RF-blocking things on the porch (in summer) … like a full watering-can often placed next to the outlet (directly in its line-of-sight to the access point).
Thanks everyone for the great feedback and helpful information.
I realize that I still need to find a solution for what I am calling virtual switches/devices, something I can manually flip on a dashboard (card?) to control timed events, like should the pool filter run on a timed schedule. We don’t always have the pool set up, so I’d want to have a switch I flip off to disable those events. As I mentioned before, this is one example, and yes, one could argue that I could simply disable those events that run the pool filter. I guess I like the idea of a master switchboard to control certain events and whether they will occur.
So, is there such a thing as a virtual device where you can pick states/values? One of my HS4 events changes 3 virtual devices at midnight each day. The devices are called daily_color_hue, daily_color_sat, and daily_color_dim. I set them to values I’ve selected for each day for some lights in our family room. Each day they come on in the morning in a different color (preset by me). The event that turns on these lights simply sets those 3 values for each lamp to whatever the virtual device values are, if that makes sense. This gives me my changing colors depending on the day. As I think through it, I suppose creating “scenes” of all the pertinent lights for each day and having 7 of them that can only run on their specific day would also accomplish this. Someone else mentioned that moving to HA will probably require some rethinking of how I do things in HS4 and this is one example of that.
I’m not as concerned about timers surviving a restart; heck, HS4 used to crash for me quite frequently (usually it was related to some .net thing) and I had to sort out a reliable watchdog to kick things back in gear. The most recent complication was introducing DeConz and a Conbee zigbee stick into the mix. There was now a precedent for which items started when, and to ensure tcp ports weren’t conflicting (i.e. http 80).
But I have a totally different feeling about something linux based running on reliable hardware. Can I ask everyone’s opinion about how reliable HA is? Does anyone have to deal with things crashing? Are there systems in place to watchdog critical components and start/restart them as necessary? Just curious how robust the whole system is. Not how reliable z-wave is, or any integrations, just the core system itself. I’m going to make an assumption that it’s reliable and once it’s running it’ll keep doing it’s thing as long as the hardware is running. Please enlighten me if that’s not a valid assumption.
I’m still a little confused what an “entity” is but I’m still reading docs and I’m sure it’ll become clearer to me. I just added pushover notifications via an addition to the configuration.ini file. It’s also unclear to me why just adding some configuration data to that file can implement a new service. I don’t recall downloading anything for pushover (in HS it’s a plug-in that’s installed, like an integration). There’s also the useful service called “light” that is built in, so I guess pushover was just another thing built-in… if I am guessing correctly.
Anyway, as you all can tell things are new to me so pardon the slight stream of consciousness as I work through things.
Wow – yes the helpers are awesome! That’s exactly what I needed. It took me a little time to figure out how to manage the helper entities but I believe I got that sorted out. My thoughts were that a toggle was a device I could change, but it’s a service: input_boolean.turn_on thing not a device thing.
Saw a timer there; still looking into how to control it. Wonder if the helper states survive a reboot?
Things I’m still researching that I used on Homeseer:
sending an email in an automation (this has to be really easy)
calling a URL to run a script on an external server (in an automation)
delayed automations, i.e. turn this light on and 30 minutes later turn it off
setting a device’s value to the value of another device or helper
automated backups (scp/rsync/ftp) to a nas or other external storage
Also things that would be interesting if they are supported:
looking to see if there’s a way to have two different actions based on a condition (if-else)
integration with a separate Raspberry Pi - controlling outputs and reading inputs. I used an HS4 plugin for this before and I’m sure there’s a way to do it with HA. The external Pi has a relay control board that I use for low-voltage circuits.
Thanks again for all the help and advice! I’ve got a good friend who’s trying to migrate HS3->HS4 and my neighbor who are both very interested in following my footsteps here.
I switched over from HS to HA two years ago and haven’t looked back. Loved HS – great product – but love HA even more.
For me, I found the Automations complex. I implemented Node Red (as an add-on via the Supervisor), and do almost all of my automation logic there. This is definitely not intended to be a statement that Node Red is “better” than Automations. I truly believe it’s a matter of how your brain works… and for me NR is easier to grok. And it can do all of your points 1 - 4.
I started on a Pi4, and it was fine while I was learning and experimenting. But within a few months I repurposed an old Dell laptop, installed Proxmox (after a learning curve for that), and installed HA there following the scripts found on this forum. It’s much faster and (in my opinion) a much more stable environment to run the household. Of course, your mileage may vary .
Thanks, I’m playing and learning on the Pi4 for now but my end goal will be to install HA on my spare Intel NUC I was running the old HS3 on. I think that’ll be a better machine for it in the long run, although my second choice will be to run it on the small ITX PC I built for HS4 but I need to run things in parallel for a while during my migrations.
I’ve been learning a lot and have come across Node Red on several occasions, including in the HS4 world, and have a tab open for a YT video called Node-RED Basics with Home Assistant. I’ll start there and see how it “sinks in” for me
I’m really impressed so far with HA - two things I had recently talked to my friend about were 1) we wished there was something simple to just report low battery levels on anything battery powered, and 2) some vacation option that learned from previous behavior and imitates that. Well lo and behold! There are blueprints for both of them and they were super easy to implement!
The only thing I’ve had trouble with is trying to get more icons. I found a set of Hue icons that work for me but the .js isn’t working so the pop-up examples don’t work when selecting an icon. But I can type in the name, like hue:bloom and it works that way, so that’s OK with me. I tried installing something called fontawesome but couldn’t get it working at all. I think it might be related to the HACS setup I needed to do for the hue icons. If folks recommend I stay away from HACS I’ll listen to that advice.
I’m comfortable in a linux environment so have no issues diving into problems as they arise, so HACS is interesting to me (for the time being).
Well, was a long time active user on hs2-hs3-hs4.
I fully migrated to home assistant.
hs4 use to much CPU and ram.
i was active on hs2 till hs4, but i made the choice to migrate to home assistant.
all those years i needed to make scripts and plug-ins, here on home assistant its done within a click.
Or i used jon00 scripts
So all those years of coding on hs2 till hs4 i migrated within a week to make the same system on home assistant and fully shutdown hs4.
i did try the bridge and it works really good, but i did prefer to migrate to home assistant.
I enjoyed to use homeseer for those years but now i cant get enough of home assistant
I’m Stuck, and I’m hoping my fellow HomeSeer refugees can offer a solution. It deals with media (music,BlueIris cam alert images, etc) access located on the Windows host (I’m using the VirtualBox with the HA .vdi image)
My plan was to move the NON Z-Wave automation’s first, but have only managed to move some minor Plex (MQTT) (Pushover) stuff, and a single Time announcement cast.
The next set of automation’s depends on accessing files on the host machine. This is a non-issue for HomeSeer as it’s a host program, so accessing these files are trivial, not so with Home Assistant.
I didn’t think this was going to be such a problem (spent a week trying mounts attempts, and what seems like a few hundred different attempts) to end in failure. It’s strange, I have no issues with NextCloud running in Hyper-V as it pertains to host shares, but I’m no programmer so what do I know.
This is the second set of automation’s that I can’t move because of this seemingly HA deficit. The first was some audio casting functions (can’t create symlinks on this version of HA and I can’t duplicate the files to the www folder because of the amount of files)
The current roadblock is:
BlueIris alert image (Windows host path to image) via MQTT to be included in Pushover texts. Much like the audio file access, it appears HA can’t access remote windows shares.
I have tried so many things, I can’t remember the last thing.
Question: Is it “easily” possible to permanently mount Windows shares inside of the above setup and use those shares inside Home Assistant integrations? In this case Pushover?
I’m trying to create a basic automation that I was hoping to get some guidance on. I am going to point out how I did this in HS, and I realize that HA requires different thinking sometimes when automations are created.
Devices: Single push button and a smart light bulb
Desired actions:
push the button once, light turns on for 10 minutes
push the button again while the light is on, turn off the light.
Quite simple, however here are factors that complicate this scenario:
Within the 10 minute window, when the button is pushed to turn off the light, how do I “clear” the scheduled event that will turn off the light in 10 minutes?
If the light is turned on via another method (i.e. lovelace, phone) after the button was pushed and then pushed again (all within 10 minutes) - how do I prevent the light from turning off after 10 minutes of the button press? In other words, like #1, how do I clear any pending off events?
I’m assuming that when a button press triggers the automation it will have a check to see if the light is off, and if so turn the light on, then wait 10 minutes (another action), then turn it off (3rd action).
In HS for “delayed device actions” like this it creates a new event in a category called “Delayed Events” and another event can “Cancel a delayed device event” to clear those if they exist. I’m just looking for how HA handles scenarios like this.
Not an answer to your specific question, but a better more long term solution.
Highly recommend going down another rabbit hole… frigate to replace blueiris. It’s free, Linux based, has excellent person detection and notification and integrates very well with home assistant. It’s intended to be used with cheap coral accelerator for local object (person, dog, etc.) detection and can be installed as either an add on or as a separate container. Not as fully featured as Blueiris but it’s very close (I haven’t found anything lacking) and very actively developed. Plus you can use another project, doubletake with it for specific person detection. For instance, use it when an unknown person is detected, again all local.
It has a simple web page to view 24/7 recordings (if that’s what you want) or clips when something is detected.
With frigate there’s no need to worry about shares.
Wasn’t easy but I’ve used it to completely replace blueiris and am very happy. Plus this was the last reason to keep windows around. Now completely free of Microsoft and their updates!
Using their integration and custom Lovelace card, you will have access to live camera feeds, and notification clips all through Lovelace. There’s even a notification blueprint that sends video clips to your iPhone or android when a person is detected.