offset \ˈȯf-ˌset\ noun

a force or influence that makes an opposing force ineffective or less effective

Home Automation Redux

Thinking how Home Assistant has REST integration to enable it to interact with various services online, BOINC came to mind, but, to my disappointment, it does not really serve the info from a single point via REST. There are services that parse public data but they should not be scraped and don't provide an API. I had to resort to parsing XML instead from two endpoints that I'm a part of to get the proper data. I also had to do some manual calculation in the template, but it works. My instance now has a card that updates daily and shows my BOINC status.


/media/images/boinc_home_assistant.png

But, then again, Home Assistant supports multiple cards, right, so I went wild a bit with it:

  1. a picture-glance card to show the photo of the kitchen in two states. Are the lights on or off?
  2. streaming web camera in the room to see the state, also with a picture-glance. This is not always on. I was just playing with it to see if it can be done (it can - I did it with a mjpeg integration)
  3. a picture-elements card with a floor plan

1 and 2 are pretty easy to set up according to the instructions, but the mjpeg integration takes a bit more work. I tried using the webcamera on Windows as my source for the streaming video. What I did was install cam2ip with CV on Windows. It can connect to the camera, but the window is always present to keep the server going. I minimized it to tray with another piece of software called RBTray and put everything in start-up. There's still some manual work but it's not as annoying. The rest is setting up the camera integration with mjpeg platform in the Home Assistant and binding it to the picture-glance card. While mentioning Windows augmentations, you might want to check out Power Toys from Microsoft itself. It's also very good. I used it to quickly grab some color samples from images of the apartment.

Onto number 3. The most powerful card of the visual bunch is picture-elements. Some people use just that one to set everything up and remove other cards to have their Home Assistant interface use only that. Whatever the case, setting up picture-elements takes a lot of work. I use it just as another card in the dashboard because there's currently a whole lot of them. I added all the devices in the house to the device_tracker (wired and wireless networks and Bluetooth) so they would serve as a set of icons on the plan. For the ones that had the integration, I used the proper device instead. I did toy with the alternate image states for the devices, but in the end went with the icons. Nevertheless, the option is there. I might return to it if the current looks annoy me.

I initially made the floor plan with Homestyler, but I didn't want to stick with it. I could not save things without an account and it has only the imperial units for dimensions so I switched to Sweet Home 3D, a desktop version and redrew everything. Textures and colors for the walls and furniture I made by taking photos around the apartment. I used PowerToys mentioned above to sample colors quickly. Now it's a fancy card that shows our household and the states of things inside. The apartment file should be useful in case we decide to move out and want to show the dimensions to other folks.

As for the other automations, I played a bit with lighting where the color would shift throughout the day to be easy on the eyes. There are three temperature options on the cheap IKEA bulbs so I bound them to three times a day to change the temperature. It has issues so I'm not really pleased with it at the moment because it's sketchy. What was to be simple "Turn on the lights, change the color, turn it off" turned into adding delays, special cases for the specific lights and it still managed to work half the time.