My Initial Experience with Home Assistant

Recently I was having trouble with my existing home automation setup and decided it was time to look for an alternative in the event that the trouble could not be resolved. After some research, Home Assistant looked like a good alternative so I set about to install and test it.

Before deciding about dedicated hardware, I installed it in a virtual machine running on windows. The installation was straightforward and the system came to life as described in the getting started guide.

First I installed several add-ons: zigbee, file edit and google drive backup.

I was then able to discover and install a zigbee bulb and create an automation for it. The first thing I discovered was that, unlike my existing system, there was no setting in the automation setup to set the intensity level of the bulb, so of course it came on at full brightness.

I set the automation to come on at sunset and go off at 2 am. The next day the bulb came on in the early afternoon, suspiciously like 7 hours off from GMT (I’m in Los Angeles).

This prompted my to look at the location setting. Even thought my timezone was set to America/Los_Angeles and the clock time was correct, the map showed my being located in Amsterdam with it’s long and lat. I tried to edit that stuff, but apparently that’s no allowed (WHY?). So I added a second location and set its long and lat, but couldn’t get HA to believe that in wasn’t still in the Netherlands.

Meanwhile I made a local backup and a Google Drive Backup.

I was still bugged about automating the bulb intensity so started searching the web for info I how to set that property. It all apparently involves YAML but I never found any examples that looked anything like the YAML that is created automatically when the automation was created, so I was stalled there.

In the process I came across a YAML for setting the long and lat and thought that I might as well give that a try, so I added a couple of lines to the configuration.yaml file. The system check told me that it didn’t find anything that should prevent a successful restart.

Well - it was wrong. The restart failed and landed me in Safe Mode. At that point none of my add-ons were loaded, it refused to find and restore my local backup.

In other words, the entire installation was trashed. Needless to say, I’m not terribly enthusiastic about starting over again with as system that , while it superficially seems easy to use, is actually incredibly cryptic and inadequately documented (at least as far as examples are concerned).

All of what I perceive to be deficiencies are things that could be corrected, but I certainly don’t know enough about it to do that. It seems to me to have a lot of potential but the learning curve involved in getting from novice to experienced is more like a straight vertical line than a “curve”.

It’s possible that I’m just a crank and the only one who has ever had any difficult with HA, but I’m not inexperienced with other aspects of computing, so I don’t think it’s just me. There may be others who have tried and failed but didn’t bother to report their experience.

Anyway, here is one report of a failure, for what ever it’s worth.

There is a brightness setting you can use with the light.turn_on service. And you can set defaults. See: Light - Home Assistant

The cause of your time error is usually because you need to set your host system timezone correctly (as well as the home assistant one).

It is relatively simple to restore from the backup you made. You should also be able to undo whatever you did to cause the issue when in safe mode.

I’m a recent Hubitat convert running HAOS in VMware on a Windows machine.

For the location, you shouldn’t need to mess with YAML. Just go to Settings → System → General and update everything there. You can drag and drop the pin on the map to your location.

For the light, as @tom_l mentioned, you use the light service. This is different than some other automation platforms since HA does attempt to differentiate a switch from a light. The docs are a good start and here’s an example of setting up and automation from the UI to use it.


From there, you’ll find all the options you’re looking for.

The installation process includes a step called Onboarding. That’s where you get the opportunity to specify your location, country, language, timezone, unit system, etc.

Example:

image

Are you saying that, after you moved the blue pin to your location (or clicked Detect) during the Onboarding step, the new location failed to be saved and reverted to its default in Amsterdam? Or did you overlook to set your location during Onboarding?

1 Like

Believe me, you’re definitely not alone. I’ve been using HA for roughly 1.5 years, and there hasn’t been a month where I didn’t curse like hell over one or another topic. Some things resolved over time, some things make me mad until this very day, again and again.

1 Like

Are you using any usb stick for zwave / zigbee? I’ve found running HA in a VM causes horrible disconnects with the usb sticks and then all my affected devices go offline. One of the reasons why I’m sticking with a RPi3 since its all one system, and I can’t get my Asrock board to accept UEFI boot…

I’m using USB sticks for both. Sonoff dongle for ZigBee and the Zooz ZST10 for ZWave. I’m using VMware player and just setup USB passthrough for both. I haven’t had any disconnects.

When I set the passthrough up, I did it through the vmx file based on the manufacturer name. Even if I swap them around on physical ports, they still get passed through.

usb.autoConnect.device0 = "name:Silicon"

Not sure how to do what you did, but it sounds like it solved the issue for you. I’m pretty tech savvy, but linux really throws me for a head loop.

Well guys as a smart man said once There is no such thing as free lunch. This is GNU/Linux diy project. Some knowledge is expected. It’s hard to learn subject for a people that are not familiar with it. Using windows doesnt count. This does require time, effort and dedication for learning new things.
If one doesn’t have it, well there are commercial solutions that will surly work out of the box. A lot of things you will find here are hacks. Even unofficial repository is called hacks. :smiley:
Unfortunately this is not a perfect world.

1 Like

That line I put is done on the Windows machine that hosts HA. Whether or not you would do the same depends on what VM solution you’re using.

One thing that I did just think about. It could be that the devices are showing up on different ports in HA.

If you go to Settings → System → Hardware, then click the “ALL HARDWARE” button. This will give you a long list of the device as seen by HA (I’m also pretty noob when it comes to *nix, so, only a faint idea what all this is). You should see some entries like these for your USB dongles:

image

When you click on them, they will expand and give you a line item for “ID”:

Copy that and use it in Z2M, Z-Wave JS, etc. if you aren’t already.

Z2M is under the add-on configuration tab:

Z-Wave JS UI is from the settings menu in the UI front-end:

I think most default to using the “device path” option. My understanding is that the ID is unique to each device. The device path is subject to change since it’s generated on a first come, first served basis. Basically, if, for whatever reason, my VM loads the Zooz stick first, then the device path for that Sonoff dongle in the pic could shift to “/dev/ttyUSB1” and Z2M would stop working. By using the ID instead, the port that Z2M, etc. connects to should always work unless you change the actual device.

Thanks so much. I’ll give that a shot. I’m using ZHA, does that make any difference in your directions?

I’m also using VMWare Workstation Player as my VM.
Where do you put that line in the Windows OS? Just CMD?

Looks like you can change the ZHA port from the “configuration” option for the integration.

That line was added to the VMX file for the VM. Shit down the HA VM. Go to the folder that you setup for the VM. There should be a single VMX file. Right click on it and edit with Notepad. Add that line to the bottom. One caveat, if you don’t use the Sonoff dongle, then you may need to edit the line to the manufacturer that shows up for your device.

Thanks, I’ll give that a shot. My solution is a little more complicated by the fact that I’ve got the Nortek GoControl unit that seems to be the same device name for both…

image
image

At the time I thought it was great that they would provide both ZWave and Zigbee but now I’m kind of regretting that choice…

They’re different. “if00” vs “if01” towards the end.

Just saw that, thank you! I’ll give the new path a try.

1 Like

I got the device paths put in as you suggested and it seems to be working OK.

What was the purpose of putting in the Silicon labs in the VM file?

Just to make sure that the USB devices are always passed through. I had issues with them disconnecting when the VM would restart.

OK Cool. Since my devices look like Silicon Labs as well, would the exact line you put originally work for me as well?

Probably, maybe. The line is dependent on how Windows sees them. I’d presume it would show the same as HA and should work. Easy enough to test and just remove the line if not.