Tv device
A TV lets you control power, volume, input sources, and channels. Integrating with Alexa through Node-RED enables voice-activated scenes—like automatically dimming the lights and turning on the TV for movie nights.
Output
The following is a sample Node-RED output for this device using default component values:
{
"id": "{--Tv Device ID--}",
"name": "{--Tv Device Name--}",
"type": "tv",
"components": {
"PowerController": {
"powerState": "OFF"
},
"Speaker": {
"volume": 0,
"muted": false
},
"PlaybackController": {},
"PlaybackStateReporter": {
"playbackState": "STOPPED"
},
"ChannelController": {
"channel": {
"number": 1
}
},
"InputController": {
"input": "TV"
}
},
"metadata": {
"previous": {
"components": {
...
}
}
}
}
Components
The following components enable various features and controls for this device. Each component offers specific capabilities, commands, and configurations to enhance your Node-RED Alexa integration.
PowerController
The PowerController is essential for managing the power states of devices.
Commands:
“Alexa, turn on the Living room lights.”
“Alexa, turn off the Kitchen.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
powerState | Indicates the device’s power state. | ON, OFF | OFF |
Speaker
The Speaker controls volume and muting for audio devices.
Commands:
“Alexa, set the volume of the speakers to 50.”
“Alexa, turn the volume down on the stereo by 20.”
“Alexa, turn the volume down on Living Room TV.”
“Alexa, mute speakers.”
“Alexa, unmute speakers.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
volume | Adjusts the volume level. | 0 - 100 | 0 |
muted | Indicates whether the speaker is muted. | true, false | false |
PlaybackController
The PlaybackController manages media playback operations, such as play, pause, and stop.
Commands:
“Alexa, fast forward on {device}.”
“Alexa, next on {device}.”
“Alexa, pause {device}.”
“Alexa, resume {device}.”
“Alexa, play {device}.”
“Alexa, previous on {device}.”
“Alexa, rewind on {device}.”
“Alexa, start over on {device}.”
“Alexa, stop {device}.”
Specification:
Property | Description | Allowed Values | Default |
---|
PlaybackStateReporter
The PlaybackStateReporter shows the current playback state.
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
playbackState | Shows the current playback state. | PLAYING, PAUSED, STOPPED | STOPPED |
ChannelController
The ChannelController allows setting or switching TV channels.
Commands:
“Alexa, go to channel 32.”
“Alexa, watch channel 32.”
“Alexa, channel up on the TV.”
“Alexa, channel down on the TV.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
channel.number | Specifies the channel number to be displayed or tuned to. | 0 - 1000 | 1 |
InputController
The InputController manages input sources for media devices.
Commands:
“Alexa, change the input to DVD on the Living Room TV.”
“Alexa, switch to HDMI two on the Kitchen TV.”
“Alexa, switch to PLAYSTATION on the Living Room TV.”
Specification:
Property | Description | Allowed Values | Default |
---|---|---|---|
input | Defines the input source for the device. | AUX 1, AUX 2, AUX 3, AUX 4, AUX 5, AUX 6, AUX 7, BLURAY, CABLE, CD, COAX 1, COAX 2, COMPOSITE 1, DVD, GAME, HD RADIO, HDMI 1, HDMI 2, HDMI 3, HDMI 4, HDMI 5, HDMI 6, HDMI 7, HDMI 8, HDMI 9, HDMI 10, HDMI ARC, INPUT 1, INPUT 2, INPUT 3, INPUT 4, INPUT 5, INPUT 6, INPUT 7, INPUT 8, INPUT 9, INPUT 10, IPOD, LINE 1, LINE 2, LINE 3, LINE 4, LINE 5, LINE 6, LINE 7, MEDIA PLAYER, OPTICAL 1, OPTICAL 2, PHONO, PLAYSTATION, PLAYSTATION 3, PLAYSTATION 4, SATELLITE, SMARTCAST, TUNER, TV, USB DAC, VIDEO 1, VIDEO 2, VIDEO 3, XBOX | TV |