Jump to content
C4 Forums | Control4

Alexa Room Awareness Driver


terminaldisclaimer

Recommended Posts

Hi all,

So for years it has really annoyed me that C4 chose not to expose devices properly to Alexa such that you can take full advantage of Alexa's built in room context awareness. 

What do I mean by this? Imagine you want to say "Alexa, turn off the tv." Wouldn't it be cool if it knew which room you were in and turned off the correct TV? Well you can't currently because C4 has chosen to show devices like TVs to Alexa as light switches instead of TVs. Not sure why, but I guess it doesn't matter. Amazon also limits room room awareness to certain devices.

My driver solves this problem and removes any restrictions. It allows you to know for any Alexa routine which Alexa device triggered it. And it puts it in a variable you can use in C4 programming

So I have the driver working, but I need some beta testers to test it. And here is the catch: it requires a nodejs component to be hosted somewhere. Theoretically this could be a C4 controller, but I wouldn't recommend it.  I've created some docker containers to make it easy. I'm looking for some volunteers to help me test it. Ideally, it would be someone with some nodejs experience. But the ability to host docker images is a requirement. Obviously, being able to add drivers to C4 and program it is a requirement too. Any takers?

Thanks,

TD

Link to comment
Share on other sites


I must say this is exactly what C4 needs… it has been frustrating not having this functionality there was a Beta driver (Voice Pod - I think) years ago which had this functionality.  Other than that it has been work arounds, hacks or lots of programming…

I would have loved to test the driver but as I have zero nodejs experience or knowledge, I am afraid that I will have to pass!

Link to comment
Share on other sites

15 hours ago, terminaldisclaimer said:

Hi all,

So for years it has really annoyed me that C4 chose not to expose devices properly to Alexa such that you can take full advantage of Alexa's built in room context awareness. 

What do I mean by this? Imagine you want to say "Alexa, turn off the tv." Wouldn't it be cool if it knew which room you were in and turned off the correct TV? Well you can't currently because C4 has chosen to show devices like TVs to Alexa as light switches instead of TVs. Not sure why, but I guess it doesn't matter. Amazon also limits room room awareness to certain devices.

My driver solves this problem and removes any restrictions. It allows you to know for any Alexa routine which Alexa device triggered it. And it puts it in a variable you can use in C4 programming

So I have the driver working, but I need some beta testers to test it. And here is the catch: it requires a nodejs component to be hosted somewhere. Theoretically this could be a C4 controller, but I wouldn't recommend it.  I've created some docker containers to make it easy. I'm looking for some volunteers to help me test it. Ideally, it would be someone with some nodejs experience. But the ability to host docker images is a requirement. Obviously, being able to add drivers to C4 and program it is a requirement too. Any takers?

Thanks,

TD

I can help you out, i'm on a business trip from tommorow till sunday but i can install it next week and start the testing, i have unraid and also a raspberry pi which is hosting my mqtt broker, zwavejs2mqtt and zigbee2mqtt containers.

 

best regards

Link to comment
Share on other sites

On 2/9/2023 at 1:22 AM, terminaldisclaimer said:

Hi all,

So for years it has really annoyed me that C4 chose not to expose devices properly to Alexa such that you can take full advantage of Alexa's built in room context awareness. 

What do I mean by this? Imagine you want to say "Alexa, turn off the tv." Wouldn't it be cool if it knew which room you were in and turned off the correct TV? Well you can't currently because C4 has chosen to show devices like TVs to Alexa as light switches instead of TVs. Not sure why, but I guess it doesn't matter. Amazon also limits room room awareness to certain devices.

My driver solves this problem and removes any restrictions. It allows you to know for any Alexa routine which Alexa device triggered it. And it puts it in a variable you can use in C4 programming

So I have the driver working, but I need some beta testers to test it. And here is the catch: it requires a nodejs component to be hosted somewhere. Theoretically this could be a C4 controller, but I wouldn't recommend it.  I've created some docker containers to make it easy. I'm looking for some volunteers to help me test it. Ideally, it would be someone with some nodejs experience. But the ability to host docker images is a requirement. Obviously, being able to add drivers to C4 and program it is a requirement too. Any takers?

Thanks,

TD

Am here to test as well, u can DM me! I have a Docker setup I use for a lot of stuff.

Link to comment
Share on other sites

Had installed the driver, I struggled to get it connected, didn’t follow either as I was busy, but the driver crashed my Director twice in a week, it produces the same effect of the old Ping Driver that brings the Director to its knee during those 3 seconds, once removed the error gone and my EA5 became responsive again, any chance to look into your code to see the issue!?

CPU usage jumped to 35% and memory exceed 2000MB every 2-3 days

2023-02-14 22:21:00.526 +0200 ea5-000FFF1C6E8C [4019] (4019) ERROR: Request took too long [name: SendToDeviceAsync][device id: 100115][wall time: 3.34224][cpu time: 3.24752]

Link to comment
Share on other sites

9 minutes ago, terminaldisclaimer said:

Well can you send me logs…and perhaps we can take this to DM. I’m not planning on turning this into a support thread since it’s not ready yet. Did you actually get it connected?

I just removed it remotely while traveling for now, will install it back and try to make it work while grabbing logs.

Sure I will share these in the DM’s, just wanted others to share their testing experience.

Link to comment
Share on other sites

  • 4 weeks later...

All,

 

A few updates. I've switched this over to MQTT and Berto to increase the stability. So now you will be required to use an MQTT broker and Berto agent driver. I've also decided to open source it. The repository is here:

https://github.com/terminaldisclaimer/C4AlexaRoomAwareness

This also includes links to the DockerImage too. 

Link to comment
Share on other sites

On 2/9/2023 at 12:22 PM, terminaldisclaimer said:

Imagine you want to say "Alexa, turn off the tv." Wouldn't it be cool if it knew which room you were in and turned off the correct TV? Well you can't currently because C4 has chosen to show devices like TVs to Alexa as light switches instead of TVs. Not sure why, but I guess it doesn't matter. Amazon also limits room room awareness to certain devices.

Hi, perhaps I'm a bit ignorant here, as I have not played much with my Alexa set up since I first got it running many years ago...
But I believe you simply set up groups in the alexa app for the room and assign C4 devices to the group as well as the alexa device in that room.
Then when you say 'Turn off the TV' alexa knows which device you are talking about.

Same goes for lights, I say turn on the lights in the patio and my scene for three light circuits comes on.

 

However - I am all for more drivers with more control, so better Alexa control will be great!!

 

 

 

Link to comment
Share on other sites

2 minutes ago, brucecampbell said:

Hi, perhaps I'm a bit ignorant here, as I have not played much with my Alexa set up since I first got it running many years ago...
But I believe you simply set up groups in the alexa app for the room and assign C4 devices to the group as well as the alexa device in that room.
Then when you say 'Turn off the TV' alexa knows which device you are talking about.

Same goes for lights, I say turn on the lights in the patio and my scene for three light circuits comes on.

 

However - I am all for more drivers with more control, so better Alexa control will be great!!

 

 

 

Unfortunately, it's not as simple as that. One, you have very limited control as to what qualifies as room context aware in groups (this is an Amazon restriction). For example, lights, TV, thermostat. But not any trigger you want. Second, C4 intentionally cobbles their implementation so that most devices are not exposed correctly. So the net result is you can basically only do a few very basic tasks with room context, like turn off the lights. 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.