-
G’Day Steve! Hope all is well with you. Still loving and using your ‘acMqtt’ project 😊. Looking to pick your brain on how to go about changing the way I have integrated some Somfy blinds. I currently have them set up with the object keywords like ‘MQTT, select, sa=Living Room, img=mdi:blinds, lvl=Close:0/Favourite:1/Stop:5/Open:255’, and this works great, I have buttons in HA that can set the select level as I need it, all works. My next bright idea was to expose them to Alexa using the do-it-yourself method. I should also state my Alexa integration works perfectly fine for most things already, lights, buttons, switches yada yada. The crux of it is I can’t expose my ‘select’ entities to Alexa, this integration doesn’t seem to support them. My reluctance at the time was these Somfy units generally use 4 levels – 0,5&255 like a typical C-Bus shutter/blind relay, but they also have an additional level of “1” which is like a favourite or preset position. You just manually set your ‘favourite’ position on the blind itself with its own remote. As far as the C-Bus integration goes, you just set the object/level to 1 and it all works fine. Also, I can ‘only’ use the level presets with my blinds, I can’t use them like a slider and just drive them to wherever I want from 0-100% etc. I had a quick look over the lua code in ‘MQTT send receive.lua’ (which admittedly is now so good and efficient it is surpassing my amateur sleuth abilities!) but I can’t see how the current ‘cover’ config can work for these things that need 4 presets. Any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
G'day Paddy. Long time! (Thanks, BTW.) Alexa not supporting input_select is a bummer. But maybe there is a way around this. As a test, what if you set up some templated boolean or switch entities in HA that when fired run an automation to set the desired select entity level for a blind? That way you could keep the select, the HA UI and your favourites even though Alexa doesn't grok that. This wouldn't be so bad for a small number of blinds. It would be a pain if every room in your house was wired for, "Can't be arsed to get off me bum and open a blind manually..."
What's behind the buttons? Are they already templated things that fire automations to set the select? Can those be exposed to Alexa?
🤣 Sounds like you sleuthed just fine. |
Beta Was this translation helpful? Give feedback.
-
Hey Steve, yes, I'm calling it a success! For anyone else that may read this, these are Somfy blinds controlled via RTS radio codes, achieved by connecting a 'Somfy RS485 RTS Transmitter' to a SHAC/NAC and sending it various commands via LUA code. They are NOT standard hardwired blinds controlled by C-Bus shutter/blind relays. The details behind all that are not relevant to this conversation really, but just mentioned for context. In C-Bus/Toolkit, each blind is simply assigned to a group, and this group has 4 levels associated with it, to control the blind (0,1,5&255). In the SHAC/NAC, if you apply the keywords ‘MQTT, select, sa=My Blind, img=mdi:blinds, lvl=Close:0/Favourite:1/Stop:5/Open:255’ to it, Steves acMqtt code will automatically expose it to home assistant (As a 'select' entity). To convert this to a 'cover' in homeassistant, which you can then expose to Alexa/Homekit etc, you can use the following YAML example in your 'configuration.yaml' file
Example code offered as-is - it works for me to control via Amazon Alexa 🙂. There are probably neater ways to write it, maybe using variables instead of repeating the entity names multiple times etc... Also for 'Homekit' specifically, I found it was terrible at doing the positional control. It seems to never issue actual Open/Close commands, but instead sends the levels 0 and 100, which won't work for these kinds of blinds. The UI feedback in Homekit was also really slow and usually out of sync... Best to just not use it, so just remove the section in the YAML for 'set_cover_position' piece... If you omit that, it just becomes a simple Up/Down blind and plays nice with homekit. |
Beta Was this translation helpful? Give feedback.
G'day Paddy. Long time! (Thanks, BTW.)
Alexa not supporting input_select is a bummer. But maybe there is a way around this.
As a test, what if you set up some templated boolean or switch entities in HA that when fired run an automation to set the desired select entity level for a blind? That way you could keep the select, the HA UI and your favourites even though Alexa doesn't grok that.
This wouldn't be so bad for a small number of blinds. It would be a pain if every room in your house was wired for, "Can't be arsed to get off me bum and open a blind manually..."
What's behind the buttons? Are they already templated things that fire automations to set the select? Can tho…