Enigma2 receivers integration

Hi! again.

The problem is not the configuration.
The question is, and more specifically in your case.

If you go to your enigma2, to userbouquet.dbe00.tv and there you customize the name of the channels, that’s when you get the error of the picon in the plugin.

this way, doesn’t work

#NAME TDT
#SERVICE 1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0::LA 1 UHD
#DESCRIPTION LA 1 UHD

That’s when the plugin asks for “channel reference + channel name”, and of course the picon only has the reference.

If you don’t customize the name of the channels, there is no error.

in the normal way. it works

#NAME TDT
#SERVICE 1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0:

If in enigma2 you leave everything by default it works perfectly, the question is if you want / can, correct this error so those who want to modify the name of the channel in enigma2 don’t get this error.

Apart from that it works wonderfully.

Thanks again.

Hi @DelBierzo

Now I understood :slight_smile:

This is how it works, the plugins gets the channel reference and asks for the PICON (png format) using that reference. If you are customizing the channel name, then you also need to customize the picon name, because it seems the custom name is appended to the reference (strange)

For the channel you customized the channel name, does the picon show on the TV and on the OpenWebIf interface ?
For the channel “LA 1 UHD”, with the customized name, go the the openwebif, and if the logo is there, right click and copy the url address and paste the url here (like in the example below).

image

If you want to make a test, go to the login folder on your device and, assuming the reference id that channel is 1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0:

Go to the picon folder on your device and copy the icon 1_0_1F_9C43_9C40_22D4_EEEE0000_0_0_0
.png to 1_0_1F_9C43_9C40_22D4_EEEE0000_0_0_0 LA 1 UHD.png and check if it works.

I will have to do some tests on my devices first, before planning on do a change.
Technically seems possible.

Thanks

Hi! @cinzas

The answer is yes to both questions.

Change the picon name in enigma2 does not work.

channel reference:

1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0:

customizing the channel name, you have to add at the end: colon + channel name

1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0::LA 1 UHD

the plugin, eats the last letter of the channel name.

error, ask for:

Error retrieving proxied image from
http://xxxx:[email protected]/picon/1_0_1F_9C43_9C40
_22D4_EEEE0000_0_0_0_LA%201%20UH.png

copying link address from openwebif on channel name gives me:

javascript:zapChannel('1:0:1F:9C43:9C40:22D4:EEEE0000:0:0:0::LA 1 UHD', 'LA 1 UHD');

although openwebif seems to also request the name, but picón (.PNG) actually does not have it.

Hi @DelBierzo

I just solved with 1 line of code.

Let me correct another small bug and I will upload a new version

New version 1.9.1

  • Picon working if channel has a custon name defined
  • MEDIA_TYPE_CHANNEL and MEDIA_TYPE_TVSHOW warnigns from boot

image

image

2 Likes

@cinzas

Fast work !! Now it works perfect !!! . Thank you very much. :crazy_face:

After racking my brain for a couple of days, it finally worked!

Controlling our Enigma2 with Alexa !! With OpenATV image, it works perfect, with default settings.

We need to install if we don’t have:

  • Node-RED
    .how to install Node-RED → Home Assistant Community Add-on: Node-RED

  • In Node-RED the node “node-red-contrib-virtual-smart-home”
    .Click on the menu button on upper right corner
    .Click palette manager
    .Click install
    .Type in: node-red-contrib-virtual-smart-home
    .Install it

  • The skill for the virtual smart home
    .On our phone in the Alexa app.
    .Search the skill “virtual smart home” and enable it.
    .Complete the account linking process by logging in with your Amazon account credentials.

virtual-smart-home have two plan: one free and one paid

FREE plan free of charge for as long as you want, it is currently limited to 7 virtual devices.
PAID plan. For 12 EUR per year, you can deploy up to 200 virtual devices. You can upgrade to the “Pro” plan from the Connection dialog within Node-RED.

For our purpose, free plan is enough!

  • And add the shell_command to our configuration.yaml
    .in each line of the shell_command we have to change:
    .curl -u root:YourEnigma2Password -X POST "http://x.x.x.x
    .with our Enigma2 password and our Enigma2 IP

Once we have prepared everything and restarted our home assistant.

In node-red we import the flow or copy the content of it and paste
.Click on the menu button on upper right corner
.Click import
.Click paste or finde the flow and import

Now configure your “virtual device”
.name: “the one you will see on Alexa and to which you will give the orders”
.connection: your account
.type “Here you have to put: Entertainment Device”

And we need to change only the “entity” of our media player with double click we edit and select ours:
.Set Volume to… {media player}
.Set Channel to… {media player}

Once everything is configured, we click deploy (to save the changes)
Every change we make is only saved when we hit delpoy, so don’t forget.

If we did everything correctly, at this moment, in the Alexa app, a new device “TV” appeared, and

¡¡¡ we can now control it !!!

  • if you copy the flow for a second enigma2, we need change it to shell_command_pvr2 <— and so on
  • and of course also change the media player entity

You can ask Alexa to:

  • turn on
  • turn off
  • restart
  • previous channel
  • next channel
  • change to channel (number)
  • volume down
  • volume up
  • volume to (1 through 100)
  • mute
  • unmute

change to channel (number)

The only thing is that in the media player in Home Assistant we will only see the changes in the channels that we have in the first bouquet of the media player. That is, if it has 20 channels and we change to channel 30 of the “second bouquet” the channel change in the decoder but we will not see this change in the media player.

The volume steps in “volume down / volume up” are the ones we have configured in our Enigma2.

With OpenATV image, it works perfect, with default settings.
With another firmware perhaps would have to change:
.*Channel down: shell_command.pvr_left or shell_command.pvr_previous
.*Channel up: shell_command.pvr_right or shell_command.pvr_next

Taking advantage of the notify:

Without having to do the above, if you have the Ulanzi Pixel Clock, with AWTRIX 3 firmware, and mqtt installed you can view on the clock each channel change and what is being broadcast with the following automation.

*change “media_player.xxxxx” and topic “awtrix_xxxxx”

alias: Awtrix - Enigma2
description: ""
triggers:
  - entity_id:
      - media_player.xxxxxx
    attribute: media_title
    trigger: state
conditions:
  - condition: state
    entity_id: media_player.xxxxxx
    state: "on"
actions:
  - data:
      topic: awtrix_xxxxxx/notify
      payload: |-
        {"textCase": 0,
         "repeat": 3,
         "text": "{{states.media_player.xxxxxx.attributes.media_title}}"
        }
    action: mqtt.publish
mode: single

Give thanks to @knuti1960, a member of another community where I got the information about the shell_command.

And of course @cinzas for his work with the add-on for enigma2.

I think I didn’t forget anything and that’s all.

enigma2_shell_command

# 
# just put this file in your home assistant /config dir, and add to your configuration.yaml
# shell_command: !include enigma2_shell_command.yaml
#
# or copy the content below direct to your configuration.yaml
# if you copy, in this case do not forget to remove hash symbol/key # from shell_command:
#
# you have to edit each line with your Enigma2password and Enigma2 IP
# curl -u root:YourEnigma2Password -X POST "http://x.x.x.x
#

#shell_command:
  ### ENIGMA2 (1) ### 
  pvr_reboot: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/powerstate?newstate=2"'
  pvr_on: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/powerstate?newstate=4"'
  pvr_off: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/powerstate?newstate=5"'
  pvr_channel_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=402"'
  pvr_channel_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=403"'
  pvr_mute: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=113"'
  pvr_volume_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=115"'
  pvr_volume_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=114"'
  pvr_restart_enigma2: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/powerstate?newstate=3"'
  pvr_left: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=105"'
  pvr_right: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=106"'
  pvr_previous: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=412"'
  pvr_next: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.51/web/remotecontrol?command=407"'

  ### ENIGMA2 (2) ### 
  pvr2_reboot: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/powerstate?newstate=2"'
  pvr2_on: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/powerstate?newstate=4"'
  pvr2_off: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/powerstate?newstate=5"'
  pvr2_channel_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=402"'
  pvr2_channel_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=403"'
  pvr2_mute: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=113"'
  pvr2_volume_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=115"'
  pvr2_volume_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=114"'
  pvr2_restart_enigma2: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/powerstate?newstate=3"'
  pvr2_left: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=105"'
  pvr2_right: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=106"'
  pvr2_previous: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=412"'
  pvr2_next: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.52/web/remotecontrol?command=407"'

  ### ENIGMA2 (3) ###
  pvr3_reboot: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/powerstate?newstate=2"'
  pvr3_on: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/powerstate?newstate=4"'
  pvr3_off: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/powerstate?newstate=5"'
  pvr3_channel_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=402"'
  pvr3_channel_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=403"'
  pvr3_mute: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=113"'
  pvr3_volume_up: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=115"'
  pvr3_volume_down: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=114"'
  pvr3_restart_enigma2: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/powerstate?newstate=3"'
  pvr3_left: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=105"'
  pvr3_right: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=106"'
  pvr3_previous: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=412"'
  pvr3_next: 'curl -u root:YourEnigma2Password -X POST "http://192.168.1.53/web/remotecontrol?command=407"'

The Flows for Node-RED

[
    {
        "id": "7e20344bc034be5c",
        "type": "group",
        "z": "3c9fc4da31e7f319",
        "style": {
            "stroke": "#999999",
            "stroke-opacity": "1",
            "fill": "none",
            "fill-opacity": "1",
            "label": true,
            "label-position": "nw",
            "color": "#a4a4a4"
        },
        "nodes": [
            "562040cf29c7d424",
            "a569b5aba8c377e8",
            "b2e28b86f904da7d",
            "1a0f9e2d1ecb79dd",
            "8cd1313767677423",
            "fdc4698a3655d11e",
            "5f39b64683233f86",
            "903cf8e937a76957",
            "1bfdf29d54fd9d58",
            "1c9406eb4fc791f0",
            "110510273821e5e1",
            "e03a329302417f61",
            "b5bc65683f5874d1",
            "a72dc53614e0a672",
            "cfee494360d0652f",
            "31dd3814c1d98b75",
            "db5684b35e6aa9da",
            "b046c54de93a325b",
            "3593c2d63d2a4def",
            "715ebeebee8012e8",
            "0b6737f4831b742c",
            "58ab113a48e13b4a",
            "5e6d1b6f2223c517",
            "56579d7b971b91d2",
            "5f4fa90d41af8d34",
            "3be0e74eccfabf5c",
            "7dcc2790a6faeb69",
            "dfc158ccc99f71f3",
            "d6b6aa235aaeea30",
            "14a842fb81428ae2",
            "5cae9c2950d6f4cc",
            "6463100de24c1be9",
            "77b21e49617a1e58",
            "67644423b54f31ce",
            "b70c2f04a8742472",
            "a248dc41c9feee9a"
        ],
        "x": 514,
        "y": 6499,
        "w": 1952,
        "h": 842
    },
    {
        "id": "562040cf29c7d424",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Set Volume to.... {media player}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "media_player.volume_set",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.gbip4k"
        ],
        "labelId": [],
        "data": "{ \"volume_level\": \"{{payload.volume}}\" }",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "media_player",
        "service": "volume_set",
        "x": 1870,
        "y": 6980,
        "wires": [
            []
        ]
    },
    {
        "id": "a569b5aba8c377e8",
        "type": "switch",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "You command, I obey",
        "property": "payload.directive",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "StartOver",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "TurnOn",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "TurnOff",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "SetMute",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "SetVolume",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "AdjustVolume",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "SkipChannels",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "ChangeChannel",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 8,
        "x": 1000,
        "y": 7040,
        "wires": [
            [
                "5f39b64683233f86"
            ],
            [
                "fdc4698a3655d11e"
            ],
            [
                "8cd1313767677423"
            ],
            [
                "1a0f9e2d1ecb79dd"
            ],
            [
                "b2e28b86f904da7d"
            ],
            [
                "cfee494360d0652f"
            ],
            [
                "a72dc53614e0a672"
            ],
            [
                "b5bc65683f5874d1"
            ]
        ]
    },
    {
        "id": "b2e28b86f904da7d",
        "type": "function",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "change volume from 0/100 to 0/1 {media player request}",
        "func": "msg.payload.volume = msg.payload.volume/100;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1490,
        "y": 6980,
        "wires": [
            [
                "562040cf29c7d424"
            ]
        ]
    },
    {
        "id": "1a0f9e2d1ecb79dd",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Mute {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_mute",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_mute",
        "x": 1380,
        "y": 6920,
        "wires": [
            []
        ]
    },
    {
        "id": "8cd1313767677423",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Power off {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_off",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_off",
        "x": 1400,
        "y": 6860,
        "wires": [
            []
        ]
    },
    {
        "id": "fdc4698a3655d11e",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Power on {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_on",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_on",
        "x": 1400,
        "y": 6800,
        "wires": [
            []
        ]
    },
    {
        "id": "5f39b64683233f86",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Reboot decoder {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_reboot",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_reboot",
        "x": 1180,
        "y": 6740,
        "wires": [
            []
        ]
    },
    {
        "id": "903cf8e937a76957",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Reboot enigma2 image {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_reboot",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_reboot",
        "x": 1200,
        "y": 6700,
        "wires": [
            []
        ]
    },
    {
        "id": "1bfdf29d54fd9d58",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Volume down {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_volume_down",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_volume_down",
        "x": 1630,
        "y": 7040,
        "wires": [
            []
        ]
    },
    {
        "id": "1c9406eb4fc791f0",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Volume up {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_volume_up",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_volume_up",
        "x": 1620,
        "y": 7080,
        "wires": [
            []
        ]
    },
    {
        "id": "110510273821e5e1",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Channel down / previous channel {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_channel_down",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_channel_down",
        "x": 1650,
        "y": 7180,
        "wires": [
            []
        ]
    },
    {
        "id": "e03a329302417f61",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Channel up / next channel {shell command}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": false,
        "action": "shell_command.pvr_channel_up",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "labelId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "shell_command",
        "service": "pvr_channel_up",
        "x": 1630,
        "y": 7220,
        "wires": [
            []
        ]
    },
    {
        "id": "b5bc65683f5874d1",
        "type": "api-call-service",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Set Channel to.... {media player}",
        "server": "44bb2d4a.187a64",
        "version": 7,
        "debugenabled": true,
        "action": "media_player.play_media",
        "floorId": [],
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "media_player.gbip4k"
        ],
        "labelId": [],
        "data": "{ \"media_content_id\": \"{{payload.channel}}\",   \"media_content_type\" : \"channel\" }",
        "dataType": "json",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "blockInputOverrides": true,
        "domain": "media_player",
        "service": "play_media",
        "x": 1210,
        "y": 7300,
        "wires": [
            []
        ]
    },
    {
        "id": "a72dc53614e0a672",
        "type": "switch",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Channel down/up",
        "property": "payload.rawDirective.directive.payload.channelCount",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "-1",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "+1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1330,
        "y": 7200,
        "wires": [
            [
                "110510273821e5e1"
            ],
            [
                "e03a329302417f61"
            ]
        ]
    },
    {
        "id": "cfee494360d0652f",
        "type": "switch",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Volume down/up",
        "property": "payload.rawDirective.directive.payload.volume",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "-10",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "+10",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1370,
        "y": 7060,
        "wires": [
            [
                "1bfdf29d54fd9d58"
            ],
            [
                "1c9406eb4fc791f0"
            ]
        ]
    },
    {
        "id": "31dd3814c1d98b75",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Control Enigma2 with virtual smart home + alexa + {shell_command + media_player}",
        "info": "",
        "x": 890,
        "y": 6580,
        "wires": []
    },
    {
        "id": "db5684b35e6aa9da",
        "type": "vsh-virtual-device",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "",
        "topic": "",
        "metadata": "",
        "connection": "",
        "template": "ENTERTAINMENT_DEVICE",
        "retrievable": false,
        "passthrough": true,
        "diff": false,
        "filter": false,
        "filterTopic": false,
        "plan": "free",
        "x": 690,
        "y": 7040,
        "wires": [
            [
                "a569b5aba8c377e8"
            ]
        ]
    },
    {
        "id": "b046c54de93a325b",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "With OpenATV image, it works perfect.",
        "info": "",
        "x": 2010,
        "y": 7120,
        "wires": []
    },
    {
        "id": "3593c2d63d2a4def",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "this flow uses the shell_command_pvr <--- for the first Enigma2",
        "info": "",
        "x": 1950,
        "y": 6540,
        "wires": []
    },
    {
        "id": "715ebeebee8012e8",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "¡¡¡ if you copy the flow for a second enigma2, it would be shell_command_pvr2 <--- and so on !!!",
        "info": "",
        "x": 2050,
        "y": 6580,
        "wires": []
    },
    {
        "id": "0b6737f4831b742c",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "¡¡¡ the same happens with \"entity\" media_player.xxxxx, don't forget to change it !!!",
        "info": "",
        "x": 2000,
        "y": 6620,
        "wires": []
    },
    {
        "id": "58ab113a48e13b4a",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "The name you give to the virtual device",
        "info": "",
        "x": 690,
        "y": 6740,
        "wires": []
    },
    {
        "id": "5e6d1b6f2223c517",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "is the name you will see on Alexa !",
        "info": "",
        "x": 680,
        "y": 6780,
        "wires": []
    },
    {
        "id": "56579d7b971b91d2",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "then you could tell him for example...",
        "info": "",
        "x": 680,
        "y": 6820,
        "wires": []
    },
    {
        "id": "5f4fa90d41af8d34",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "Alexa switches to channel 5 on \"virtual device name\"",
        "info": "",
        "x": 730,
        "y": 6860,
        "wires": []
    },
    {
        "id": "3be0e74eccfabf5c",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "by default let reboot decoder, you can change it to reboot the Enigma2 image",
        "info": "",
        "x": 1650,
        "y": 6700,
        "wires": []
    },
    {
        "id": "7dcc2790a6faeb69",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "If you change the name to your \"virtual device\" automatically",
        "info": "",
        "x": 760,
        "y": 6900,
        "wires": []
    },
    {
        "id": "dfc158ccc99f71f3",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": " in Alexa you will see the change reflected as well",
        "info": "",
        "x": 720,
        "y": 6940,
        "wires": []
    },
    {
        "id": "d6b6aa235aaeea30",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "the command is: Alexa restart \"virtual device name\"",
        "info": "",
        "x": 1570,
        "y": 6740,
        "wires": []
    },
    {
        "id": "14a842fb81428ae2",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "case you decide to change it",
        "info": "",
        "x": 660,
        "y": 6980,
        "wires": []
    },
    {
        "id": "5cae9c2950d6f4cc",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "<--- change only your \"entity\" media player",
        "info": "",
        "x": 1520,
        "y": 7300,
        "wires": []
    },
    {
        "id": "6463100de24c1be9",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "<--- change only your \"entity\" media player",
        "info": "",
        "x": 2180,
        "y": 6980,
        "wires": []
    },
    {
        "id": "77b21e49617a1e58",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": " Channel down to: shell_command.pvr_left or shell_command.pvr_previous",
        "info": "",
        "x": 2120,
        "y": 7200,
        "wires": []
    },
    {
        "id": "67644423b54f31ce",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": " Channel up to: shell_command.pvr_right or shell_command.pvr_next",
        "info": "",
        "x": 2100,
        "y": 7240,
        "wires": []
    },
    {
        "id": "b70c2f04a8742472",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "With another firmware perhaps would have to change:",
        "info": "",
        "x": 2060,
        "y": 7160,
        "wires": []
    },
    {
        "id": "a248dc41c9feee9a",
        "type": "comment",
        "z": "3c9fc4da31e7f319",
        "g": "7e20344bc034be5c",
        "name": "by default: shell_command.pvr_channel_down and shell_command.pvr_channel_up",
        "info": "\n",
        "x": 2150,
        "y": 7280,
        "wires": []
    },
    {
        "id": "44bb2d4a.187a64",
        "type": "server",
        "z": "3c9fc4da31e7f319",
        "name": "Home Assistant",
        "addon": true,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "",
        "connectionDelay": false,
        "cacheJson": false,
        "heartbeat": false,
        "heartbeatInterval": "",
        "statusSeparator": "",
        "enableGlobalContextStore": false
    }
]
2 Likes

@DelBierzo : Excellent Work.

I don’t use node red, but I can try to have a look on how to this manually.
I also don’t have Alexa, i have multiple google devices instead :slight_smile:

Let me think how we can optimize this.

I could add this information to the github in case more people is interested.

As I wrote some postings above: I once made a “remote” for the dashboard.
Based on scripts and associated shell commands. This can also be used for Alexa, as I have described here (another forum, German language). You can also find all the shell commands and scripts you need there. I don’t use Node Red. But it’s great that @DelBierzo has managed to do it with Node Red.
With these options, an Enigma2 box can be fully controlled from HA.

2 Likes