Hello from a HomeSeer HS4 Refugee

In a nutshell, the state value of most Helpers:

  • input_number
  • input_boolean
  • input_select
  • input_datetime
  • input_text
  • counter

is saved/restored on shutdown/startup. Timer also falls into the Helpers category but is an exception to the rule. :man_shrugging:

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.

Thanks again!

Dennis

See Configuration - Helpers for the virtual devices you want. They should fit your use cases very well.

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:

  1. sending an email in an automation (this has to be really easy)
  2. calling a URL to run a script on an external server (in an automation)
  3. delayed automations, i.e. turn this light on and 30 minutes later turn it off
  4. setting a device’s value to the value of another device or helper
  5. automated backups (scp/rsync/ftp) to a nas or other external storage

Also things that would be interesting if they are supported:

  1. looking to see if there’s a way to have two different actions based on a condition (if-else)
  2. 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.

1 Like

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.

For automated backups, see the fantastic Home Assistant Google Drive Backup.

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 :slight_smile: .

2 Likes

Yes, they do.

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 :slight_smile:

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).

Dennis

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 :smiley:

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:

  1. 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?

Automation question from a previous HomeSeer user

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:

  1. push the button once, light turns on for 10 minutes
  2. push the button again while the light is on, turn off the light.

Quite simple, however here are factors that complicate this scenario:

  1. 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?
  2. 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.

Thanks in advance for any tips!

Dennis

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.

1 Like

Thanks for the info. I’m at the beginning of my HA experience, so I can easily turn back.

If it’s not possible (which seems absurd to me) to permanently mount Windows shares inside of the above setup and use those shares inside Home Assistant and it’s integrations then I don’t think HA is going to work for me.

I have to many HS automatons that rely on disk/file access.

Take a look at this post and see if it helps. I’ll experiment with it on my setup as well since I also run HA with Virtualbox under Windows 10.

1 Like

It will take some work, maybe a lot in some cases, to do the things you want, which I’m sure you realize. If you have a simple home automation system, switching to HA will be easy. But if you have complicated integrations, they will take some time. Best advice I can give is, think back to how much time or effort you put into HS, that’s how much time some complicated integrations will take in HA.

Some of the solutions might take a completely different approach (like Frigate) but overall HA has been a better overall solution for me than HS. Often I’ve had to switch to a different ‘integration’ or install a different application to do what I want.

What are the other reasons you need file-level access to the host machine or other machines on your network? Maybe I can help point you in a direction.

1 Like

Thank you Ken. This indeed provided much of the information needed to get this working, now to see if it will persist across an update, and how to impliment the BI alert paths via MQTT.

For future ref:

I inserted this into my configuration.yaml. Since my HA instance is not using ssl, I can’t use the default media folder to cast to my CCA’s via automation, So I’m using the www folder.

Shell command that creates the folder on HA and mounts it to the Windows Share.

shell_command:
  mount_cctv_media_folder:  mkdir -p /config/www/media/camalerts;mount -t cifs -o username=<WindowsShareUserName>,password=<WindowsShareUserPassord>,domain=WORKGROUP //192.168.1.26/cams /config/www/media/camalerts
  mount_music_media_folder:  mkdir -p /config/www/media/music;mount -t cifs -o username=<WindowsShareUserName>,password=<WindowsShareUserPassord>,domain=WORKGROUP //192.168.1.26/ServerFolders/Music /config/www/media/music

This will replace the default media folder with the www media folder in it’s place

homeassistant:
  media_dirs:
    media: "/config/www/media"

I’m still working on how to access the media inside areas of HA, but I believe the base dir should look something like this:?

/local/media/music/20Hz1Sec.mp3

EDIT: In at least pushover you need to use the full path it seams. In my case “/config/www/media/camalerts/Alerts/” and that path must be included in allowlist_external_dirs:.

It appears I have to re-mount on HA startup.

Automation: On HA Start

alias: Mount Network Folder
description: ''
trigger:
  - platform: homeassistant
    event: start
condition: []
action:
  - service: shell_command.mount_cctv_media_folder
  - service: shell_command.mount_music_media_folder
mode: single

This is how it looks in HA’s Media Browser

1 Like

As it pertains to HA, truer word have never been spoken… :rofl:

Thanks again for your suggestions and help

If HASSOS becomes a limitation you can always reinstall Home Assistant on top of Debian directly. Then you can add any software you want. I’m running that route on both my RPi 4 Dev instance as well as my production VirtualBox instance. Mounting windows shares wouldn’t be a problem there.

I’ve added this to my first post and copied it here:

PLEASE READ:

18Dec2021:
This post was made at the start of the COVID lockdown here in NorCal and at a time when the future of HS4 was in question. After almost 2 years of running HS3, now HS4, and HA in parallel, I’ve decided to shutdown my HA instance and move the little I have running in HA back to HS4.

This is a personal decision and others experiences may differ from mine. I’ve asked the moderators to close this thread, but keep it as an archive record.

Thanks for the ride,
Ken

Thanks for the update, Ken, and best of luck with the HS setup. Hope everything works out for you and in the end as long as “things operate as expected” that’s what’s most important.

My little posts to this thread have helped kick start my HA path, and I am working on building a new thread for Homeseer to Home Assistant migrators. It’ll include everything I’ve learned on how to migrate events to automations, as well as some quirks in HS and how to implement them.

I feel like it would be a useful thread for folks moving over, as seen from the interest in this thread, so I hope to get that started soon.

Thanks!

Dennis

Closed at the request of the OP