Inovelli switches/dimmers to control music use case with Home Assistant

I recently installed Inovelli red dimmers in a bathroom remodel project. Part of the remodel was to install in-ceiling speakers. The combination of these two components along with Home Assistant led me to an interesting and (if I do say so myself) creative use case-- controlling music with inovelli scenes. For example: double tapping up on one of the switches starts playing music automatically. Double tapping on another switch skips to the next track. The possibilities are basically endless. You could play/pause, control volume, or have multiple playlists or stations. This has become my favorite automation in my home.

PROS:

  • The advantage of this setup is that it is very clean. There’s no need for in-wall media controls.

CONS:

  • The one down side I can think of is that it could be difficult to remember what switch does what. But keeping it simple, (on/off and skip track controls) is quite intuitive.

I left a glowing review of the inovelli dimmer switches on their website explaining the use case. I was contacted by an inovelli employee asking for more information on how I accomplished it. So I figured I’d post a public explanation here so it could benefit others.

Components I’m using to make this work:

  • Polk Audio In-Ceiling Speakers

  • Denon Receiver

  • Home Assistant

  • Spotify Premium

  • Inovelli Red Dimmer Switches

  • Spotcast Home Assistant Addon

  • Denon Home Assistant Integration

  • Chromecast

Obviously, not everyone will have exactly the same components. There can be some flexibility to this list. If you’re savvy with Home Assistant you could probably accomplish this same automation with other receivers, music providers and speakers. With spotify, the most challenging piece was getting spoifty to start playing music on an idle chomecast. I’m not going to go into great detail on all the components here just a couple of areas/challenges that held me up as I tried to get this work. If you have more specific questions, I’ll do my best to help.

Get Scenes (double tap, triple tap, etc) working with inovelli switches in HA:

This was probably the most challenging piece. When I connected my switches to HA I believe the openzwave version I was using did not support central scenes. I’m still unclear if this has been fixed, but I had to edit my zwcfg_*.xml file in my HA config folder. For each switch/dimmer node I had to add some values. There is information on that here: https://www.home-assistant.io/docs/z-wave/device-specific/#inovelli-scene-capable-onoff-and-dimmer-wall-switches

Once you have scene support working you can use the scenes of inovelli switches to trigger automations. You’ll need to know the zwave node number of each switch. When you write your trigger, you’ll also need to know the Scene ID and Scene Data that the inovelli switch sends. This table shows the different values:

Button Press Scene ID Scene Data
1 x Up 2 7680
1 x Down 1 7680
2 x Up 2 7860
2 x Down 1 7860
3 x Up 2 7920
3 x Down 1 7920
4 x Up 2 7980
4 x Down 1 7980
5 x Up 2 8040
5 x Down 1 8040
1 x Config 3 7680
Hold Up 2 7800
Release Up 2 7740
Hold Down 1 7800
Release Down 1 7740

So for example, if I want a trigger for a double-top on the “up” my scene id would be “2” and my scene data would be “7860”.

Get Spotify to play music to idle chromecast:

For this, I stumbled across a handy little addon called SpotCast (may now be called “Start Spotify on chromecast). This can be installed using HACS.

Just search for “Spotify” in the integrations area of HACS.
Picture1
You’ll want to follow the installation directions for obtaining your sp_dc and sp_key for spofity using the instructions here : GitHub - fondberg/spotcast: Home assistant custom component to start Spotify playback on an idle chromecast device. It’s pretty straightforward. Once you have those, add them to your HA configuration. Mine looks something like this:

spotcast:
   sp_dc: AASDF458-4389FHG4-47FHGK34J78-3489FG337FG73-DGHF4376HD64
   sp_key: 34897265df-34986cv-3489f-23498

(these are obviously not my real keys)

Testing Spotcast:

Test to make sure you can start music on a chromcast. Here is a simple script to test:
Picture2

The device name is the friendly name of the chromecast device on the network. The spotify playlist URI can retrieved from any playlist or station under the share button in the spotify app.

Create the Automation:

Once you have scenes and spotcast working, it’s time to put it altogether in an automation.

Here’s my trigger for turning on the music using a double tap up on the vanity lights switch:
Picture3

Here are the actions that take place when this trigger is fired:

(This turns on the receiver using the denon integration)
Picture4

(This starts the playlist playing to the “Homecast” chromecast.)
Picture2

That’s it! You can create similar scenes for skipping the track which are simple media player controls by calling service : media_player.media_next_track

6 Likes

Dang, this is awesome! Thanks @curtis and welcome to the community.

Nice write up. Thanks OP.
Scenes control in HA is nice with nodered and the subflow some geniuses created and shared. Does the same thing you already did, just helps with repeatability. Save you from having to look up the codes too.

2 Likes