Amazon Echo Control to voice control a TV

Hi, I’m tryng to control with my amazon echo my Sony Tv.

I have full control of the TV using the simpleIP binding and I want to voice control On/Off, volume and mute.

I have 3 items, one switch called TELE that turns on/off TV, another switch called TELE_MUTE that turns on/ff mute and a dimmer called TELE_VOLUME to control tv volumen. Everything works perfect from my sitemap.

Now, I’ve added metadata to TELE_VOLUME assigning Television.VolumeLevel and I changed device name (in the advanced tab) to SONY so now, I can say “ALexa increase volume on Sony” and this works.

Now I want to be able to say “Alexa turn ON SONY”, so I’ve assigned metadata Television.PowerState to my TELE item, but when I say “Alexa turn on SONY” it says “Sony can’t do that”, If I delete the Sony Volumen Item, then it works.

Seems like instead of adding a new capability to the SONY object, Alexa replaces it so only one command can be understood under the SONY object.

Does anyone managed to set up something like this? (Diferent actions under the same name based on the metadata type)

Thx on advance, hope I’ve explained well enoght :slight_smile:

You need a group for your TV and add metadata to the group as well as individual items

Here’s how I do it - watching the last TTS command from Alexa from a room.

This turns off a Samsung TV, Onkyo Receiver and Nvidia Streamer.

			if (triggeringItem.state == 'echo tv off' || triggeringItem.state == 'tv off' || triggeringItem.state == 't v off' || triggeringItem.state == 'television off' || triggeringItem.state == 'tea off' || triggeringItem.state == 'hi off') { 

				if (TheRoom_TTS == 'Echo_LivingRoom_TTS' || TheRoom_TTS == 'Echo_Parker_TTS' || TheRoom_TTS == 'Echo_Jay_TTS') {
				
					logInfo("tAlive","CREATING Generic 193 Timer!")
					createTimer(now().plusNanos(1000), [ |

						Living_TV_Power.sendCommand(OFF)
							Thread::sleep(1500)
						Living_TV_Power.sendCommand(OFF)
						
						var OnkyoLRThing = getThingStatusInfo("onkyo:onkyoAVR:avrlivingroom")
						if ((OnkyoLRThing !== null) && (OnkyoLRThing.getStatus().toString() == 'ONLINE')) {
		
							OnkyoLRPower.sendCommand(OFF)
								Thread::sleep(1500)
							OnkyoLRPower.sendCommand(OFF)
						}					
		
						var String TVOffMsg5 = '<speak><prosody rate="fast">I have turned the TV, and receiver Off.</prosody></speak>'
						TheRoom_TTS.sendCommand(TVOffMsg5)
												
						Echo_LivingRoom_LastVoiceCommand.postUpdate(nullValue)
						
						logInfo("tAlive","CREATING Generic 256 Timer!")		// Catch ALL
						createTimer(now().plusSeconds(5), [ |
						
							var OnkyoLRThing = getThingStatusInfo("onkyo:onkyoAVR:avrlivingroom")
							if ((OnkyoLRThing !== null) && (OnkyoLRThing.getStatus().toString() == 'ONLINE' && OnkyoLRPower.state != OFF)) {
			
								OnkyoLRPower.sendCommand(OFF)
									Thread::sleep(1500)
								OnkyoLRPower.sendCommand(OFF)
							}	
						])	

						logInfo("tAlive","CREATING Generic 257 Timer!")		// Catch ALL
						createTimer(now().plusSeconds(5), [ |

							if (Living_TV_Power.state != OFF) {
			
								Living_TV_Power.sendCommand(OFF)
									Thread::sleep(1500)
								Living_TV_Power.sendCommand(OFF)
							}	
						])
					])
					
						Thread::sleep(1500)
					NVidiaLR_ScreenState.sendCommand(OFF)
						Thread::sleep(1500)
					NVidiaLR_AwakeState.sendCommand(OFF)			
					return;	
				}
}

Best, Jay

Thank you @Matze0211 . Working!!

Thx for the idea, but Matze0211’s idea seems simpler and it’w working.