Home Assistant June 2024 – Alexa, Google Home and more

Home Assistant here at Bedrock

I wrote earlier this week about Home Assistant – sorry this isn’t going to be a linear set of articles as I’m not learning linearly – and of course the HA product is changing by the month. Last week I had a pretty boring set of dashboards – still LOTS to work on but at least HA is now pretty (note the background image).

Home Assistant June 2024

The sensors page isn’t as pretty but I just got sidetracked… I’ve been working on my pool solar heating – hence the pretty graph (right) showing water flow and return pipe temperatures- but I digress.

The one big thing that’s stopped me migrating lock, stock and barrel from Node-RED to Home Assistant is (was) voice control. I took a look at the admittedly powerful voice control within Home Assistant – the CLOUD option. I’m sorry – pay €7.95 a month for voice-control? I’ve had Alexa and Google for free for a LONG time now – I’m not about to pay for the same thing.

Well, that’s easy to say but not it seemed as easy to do something about. Yesterday I was reminded of the HA integration into Node-Red – Mr Hardill’s Google Home and Alexa plug-ins for Node-Red… at which point I remembered I’d never had much luck with the Alexa version or getting help to get it to work reliably – Google works fine. However that DID leave me with the option to attach Google voice control to HA for free.

So by end of day I had some basics sitting in a flow in Node-Red, relaying my simple voice on-off commands from Google to HA. Exciting!!

Google Home voice in HA via Node-Red

And why not. So next I thought – this should work with Alexa – EASY. No chance – the Alexa version of the voice-command nodes simple don’t seem to work that well, while sending out to HA would be a similar operation.

When I woke up this morning – ALL CHANGE – at least for Alexa. HA has a Philips HUE integration available and it is quite easy to add Alexa voice commands to HA. Not as you might imagine via a generic setup talking to all HA entities (your devices or features of them) – that would soon get very intensive and I for one don;t want the entire setup exposed to voice control – too many possibilities for disaster. Instead we decided to look a adding in specific entities into the integration. Straight forward except when it isn’t – my HA and Node-Red installations are, as you’ll know if you’ve read previous recent articles in here, based on DOCKER. Look at so many videos out there about hooking Alexa into HA, all good exept that DOCKER brings it’s own dificulties and these often get overlooked.

I was about to give up with the integration when my friend Antonio who is way ahead of me on Docker (and will be reading this if you want to comment) figured out that the port settings in Docker-Compose for HA need to be right and the network mode must be set to network-mode: host – that’s had no adverse effects on the installation – but means that every port opened by that Docker-Compose is directly exposed on the host. There are other ways – if this affects you – leave a comment for Antonio Fragola below for more info. So now, HA takes up real port 80 all for itself and that meant I had to move my LEMP stack to another port – not a problem.

So – to the point….in the configuration.yaml file in HA (can’t do it visually or so it seems) – we added in a section (anywhere in the file)… with, in this case just 3 entities, two of them are single colour light, the other is a GROUP I made of light entities, some of which are colour – some just simple on off spots or faders.

If I say to Alexa “Alexa, set outside lights to GREEN” – the RGB light as part of that group goes to green, the others are unaffected. I could not dream of this only a day ago…. and the “exposed domains” section goes well beyond just lights – check it out.

As you can see I included “exposed domains” “lights” – available are:

[“switch”, “light”, “group”, “input_boolean”, “media_player”, “fan”, “humidifier”]

emulated_hue:
  host_ip: 192.168.1.20
  listen_port: 80
  off_maps_to_on_domains:
    - script
    - scene
  expose_by_default: false
  exposed_domains:
    - light
  entities:
    light.outside_lights:
      name: "Outside Lights"
      hidden: false
    light.athom7w_1:
      name: "Window left"
      hidden: false
    light.athom7w_2:
      name: "Window right"
      hidden: false

So, essentially I have a light group entity in HA comprising several floodlights and some RGB strip. I can now say “Alexa, set outside lights to green” and only the RGB section will respond but of course “Alexa, turn outside lights off” will turn them all off. Window left” and “Window right” are just temporary – after all, before this afternoon I could not do any of this without some convoluted controls in Node-Red (which have served me well for years I may add – but time moves on.

This lot will never replace my entirely local control HA APP and PC controls but handy for spouses, visitors and the odd time I’ve left the phone in another room.

If anyone wants more detail – we’lll happily pad this out – but then, you may all be miles ahead of me so I’ll stop here for now. Oh, did I mention, it seems you can no longer simply get Google Home onboard to work the same as Alexa – so for now, my Google NR solution still stands (I prefer Google) but I have to say I’m impressed with how easy this Alexa (free) solution turned out.

If anyone’s been wondering why I’ve been doing less writing than usual – well, for one thing – for the last 2 weeks I’ve had childhood measles take it’s revenge over half a century later – and we think we have a grip on virii — no chance.

I could lie down and get bored and still hurt – or get on with my Home Assistamt project – and that’s what I’ve been doing. I decided to add some pretty colours and text changes – stress-free? You would think so – but now, the HA designers have seen to it that simple colour changes are as stressful as anything else…. SO… here’s what I have.

I discovered a well known integration called card-mod and STUMBLED on this styling to let me change borders and backgounds of cards – both easy and text colour – NOT easy given the amount of just WRONG information out there. If this appeals, by all means just copy. Now, buttons and other panels can be set up in the nice easy UI environment but sometimes I find it easier to drop into the YAML editor option where I discovered I could drop in some styling as below “show code editor”…

button card in HA

If you get it right – colours will change in front of your eyes as you edit the yaml..

button card in HA yaml config

AND – my newly tarted up main dashboard panel on the PC (looks the same on the phone but adjusted automatically to work with phone screens). How did I arrrive at –primary-text-color? Purely good luck.

My new HA main panel

The panels at the TOP of each section are not the section title which I left invisible but are called markdown cards with a little styling… I’ve put all my sensors on another dashboard to keep scrolling to a minimum – and those light controls are simply manual overrides – lighting as you might expect is done by background automations – more on that when I’m no longer a rank amateur at automations in Home Assistant. Why automationd, well, generally lights come on at night IF one or both of us are at home OR the weather is blleak during the day – all of that is FAIRLY easy to achieve in HA with phone integrations and say Zigbee light sensors. I also added in a movement sensor – not much point in office lights being on if I’m not in the office – same with the aircon.

For now that overall background is just an uploaded image which you’ve been able to do since the July release of Home Assistant (2024.6). Someday I’ll figure out how to put a smooth-scrolling animation there but an image is ok for now.

Facebooktwitterpinterestlinkedin

11 thoughts on “Home Assistant June 2024 – Alexa, Google Home and more

  1. I know you’re focused on Home Assistant, but thought I’d mention that openHAB provides free cloud access to users. You might want to check it out as an option for getting a handful of devices into Alexa and Google.

    1. Good – and fine for many folk, but I’m now retired and goodness knows how many 7.95 payments I pay for every month – trying not to add more. I’ve no ssue with one-off payments but keep adding more monthlies…

    2. for google, we configured Pete’s HA to continue using his old (working) nodered flow he detailed here somewhere…
      for alexa, we set up the hue emulation integration which allows him to expose to alexa just the entities he wants…

      1. Understood, I do something similar as well with NodeRed.

        However, the ease of use (important to me) was the nabu integration. They have a trial available too.
        If you dont want to (or cant) support Home Assistant team, they detail how to set it up and show the Alexa skills required.

  2. Ah! yes. Take a look at DuckDNS and Caddy Home Assistant addons. DuckDNS gives a hostname if (like me) you have a dynamic IP address. Caddy is a reverse proxy that passes the data to the internal home assistant address. DuckDNS and Caddy provide a SSL cert via a service the name I forget. Certs are refreshed every 6 months – Caddy / DuckDNS handle it.
    I don’t know if it will work with a 4G connection but I think it will. You will need to open some ports on your router.

    1. Well that looked promising at first but To use Google Assistant, “your Home Assistant configuration has to be externally accessible with a hostname and SSL certificate” – I don’t thank that’s going to happen on a 4G+ broadband connection – no external IP address, yes?

      Has to be a way….

      1. there is a way, using cloudflare tunnels (free), but requires a domain managed by cloudflare, and a dns zone assigned to this on THEIR (free) dns service…

        or maybe it can be used duckdns, which i saw in 1 of the following videos: i don’t know, i used a .xyz domain, if composed by ONLY numbers is just 1€/year…

        i’ve exactly this, and as it acts as a reverse proxy, no ports need to be opened and works in 4g, too…




Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!


The maximum upload file size: 512 MB. You can upload: image, audio, video, document, spreadsheet, interactive, text, archive, code, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here