Alexa control for Homey


#1

Hi all,

I’m a new Homey owner and hoping to predominatly use Alexa to control my Homey.

After a few days of trial and error I’m finding that i cannot get my flows to work as i want. I’ve learnt that I need to use Virtual Devices to trigger the flows but the Virtual Devices that the Alexa app will recognise are very limited - I can only add a switch.

An example of the issue I’m having is with my TV. I’ve created a Virtual Device (switch) and can use Alexa to turn my TV on or off without a problem, until someone uses the remote to turn the TV off. This causes the state of the TV (off) to be out of sync with the Virtual Device (on). If I then ask Alexa to turn the TV on the flow isn’t trigged as Alexa thinks its already on. I have tried to create a flow which monitors the state of the TV (via a socket power meter) and changes the state of the Virtual Device accordingly but have had no luck in achieving this. It works when I test the flow but otherwise nothing. It should work but it doesn’t and I can’t for the life of me work out what I’m doing wrong.

Am i wasting my time with the hope of having voice activated automation with a Homey / Alexa combination? I’m sure there are much smarter people out there than myself who might be able to help or at least point me in the right direction?

Thanks


Virtual Devices
#2

Think you’r on the right way, probably your TV-Off detection is not optimal
Probably the best is to take the power measurement change as the Trigger (If column) then in the And Column paste a Logic card and choose “Higher than”, drag the "Power"Tag(Energie) from the first column to the Logic card and add a value in between Off an On of the TV, in the Then column you can set a “Better Logic” boolean-variable (tv-is-on) to True or False depending on the power that was measured. This BetterLogic variable, you can use for reference to see if your TV is On or OFF


#3

The Aeotec switched socket I have doesn’t have the “Power” tag to drag across but I was able to make it work using the same principal via a “Power” tag from the tag drop down menu. Still not sure what I have done is best practice but it works for now. Thanks for the advice @JPe4619


#4

Hi, @Azz24 Good to hear the solution I mentioned was helpful, but are you sure this works well?
what sensor did you use? Is it a sensor that is measuring the power of the connected TV? If so then it is alright, but if you still use the Aeotec switched socket, then I’m afraid something goes wrong, when there is no power-tag, it mostly means the socket is not able to measure power. So maybe you should check the Name-Tag by dragging it to a Speech or Log card, so you can check it. Eventually, you can compare the device name in the And column with another Logic card.


#5

The switch I’m using is an Aeotec Z-Wave Smart Switch 6. It does measure power, I can view the power change in the device as it turns on/off. I don’t like the trigger card I am using but cant find a work around since when I place the smart switch in the When Column the only options I have are “turned on” or “turned off” and neither have tags associated to them. The tag I am using with the logic card is from the Tag drop down menu and is directly associated with the smart switch. I did have a logic card with the “name” tag dragged to it to verify the device but it made no difference so I removed it.


#6

@Azz24 You probably selected the “light attached” during inclusion, this is currently a bug in the homey software that will be fixed in v2 of its software.
You can work around it by repairing it in homey and select the “other is connected” option.

When the update will come, nobody knows yet, not too long anymore.


#7

You were spot on @Caseda. Thanks


#8

Ran into the same problem (different usecase)
Solved it this way:
Create 2 new virtual devices for your TV, (TV on, TV off)
But do not make it a switch but a button.
A button does not have a state and can be used to start a flow multiple times.


#9

Hi @FKey, unfortunately this solution doesn’t work with Alexa. Alexa will only recognise a Virtual Device set as a “switch”. I did try to make a “button” but had no luck.

The above mentioned solution has been working without fault for almost a week now so I’m content at this point. It did take an extra device to achieve but I can see the TV’s power consumption which is nice.