Google Cast BlueIris Cameras with Home Assistant!

OK big thanks to @Zpeed for his help on this. Sharing this as promised in this thread

I recommend anyone attempting this to be confident with Home Assistant and Blue Iris first (you should know which section of code is relevant to you and what isn’t). With the steps below you’ll be able to get the below in your Home Assistant UI. This will allow you use Home Assistant and Blue Iris to Cast any Security Camera you have to any Chromecast capable device (i.e. Google Smart Display, Chromecast or Android TV).

Blue Iris Setup

  1. Enable WebServer on your BlueIris Install

  2. Set Authentication to be “non-lan only”

  3. Configure the Encoding settings so they’re compatible for Chromecast devices.

  4. Enable Re-Encoding

Home Assistant Setup:

input_select:
  camera_dropdown:
    name: Cast camera
    options:
      - CAM1
      - CAM2
      - CAM3
      - Cycle Cameras
      - All Cameras
    initial: All Cameras
    icon: mdi:camera
  cast_to_screen_dropdown:
    name: To Screen
    options:
      - Google Smart Display
      - Chromecast
      - Android TV
    initial: Google Smart Display
    icon: mdi:cast

script:
  execute_cast_dropdown:
    alias: Press to execute
    sequence:
      - service: media_player.play_media
        data_template:
          entity_id: >
            {% if is_state("input_select.cast_to_screen_dropdown", "Google Smart Display") %}
              media_player.YOUR_GSD_DEVICE
            {% elif is_state("input_select.cast_to_screen_dropdown", "Chromecast") %}
              media_player.YOUR_C_DEVICE
            {% elif is_state("input_select.cast_to_screen_dropdown", "Android TV") %}
              media_player.YOUR_ATV_DEVICE
            {% endif %}
          media_content_id: >
            {% if is_state("input_select.camera_dropdown", "CAM1") %}
              http://192.168.01.01:81/mjpg/CAM1/video.mjpg
            {% elif is_state("input_select.camera_dropdown", "CAM2") %}
              http://192.168.01.01:81/mjpg/CAM2/video.mjpg
            {% elif is_state("input_select.camera_dropdown", "CAM3") %}
              http://192.168.01.01:81/mjpg/CAM3/video.mjpg
            {% elif is_state("input_select.camera_dropdown", "Cycle Cameras") %}
              http://192.168.01.01:81/mjpg/@index?/video.mjpg
            {% elif is_state("input_select.camera_dropdown", "All Cameras") %}
              http://192.168.01.01:81/mjpg/index?/video.mjpg
            {% endif %}
          media_content_type: 'image/jpg'

group:
  Cast_Cameras_Group:
    name: Cast Camera to Screen
    view: no
    entities:
     - input_select.camera_dropdown
     - input_select.cast_to_screen_dropdown
     - script.execute_cast_dropdown

NOTE: Updated 13 April 2019: Hello Everyone out there reading this thread. After the release of Home Assistant v0.91, there’s a much better way to do this with native integration to the Google Assistant via Blue Iris. Refer to the post below: Google Cast BlueIris Cameras with Home Assistant!

22 Likes

Thanks for the guide with screenshots and config !!!

Let me know how you go. Happy to share given the Home Assistant community has helped me so much!

This is something I’ve been wanting for my smarthome for so long. I’ll be trying this very soon. Thank you thank you thank you!!!

Thank you. Adding this to my to do list for when i get my cameras going. Thanks!!

For those who don’t have BlueIris it may be possible to get a stream directly from your camera without BlueIris so long as it conforms to Googles casting formats found here: https://developers.google.com/cast/docs/media

1 Like

Thanks again. Now that I’ve got the ability to cast my cameras to my chromecast-connected TV’s, I can play around with even more fun automations!

Like, if someone arrives at the front gate (detected by Blue Iris motion), I would like the nearest TV (based on motion sensors around the house) to display that camera feed to me. It should be possible. I get way too excited about this stuff… I’m glad my girlfriend is so understanding. :wink:

1 Like

I’ve done this very thing, and even have Alexa tell me which cameras detected motion!

Took a lot of time…haha.
(Using Blue Iris/MQTT/NodeRED)

2 Likes

Can you share your node red flow (after removing api/passwords, etc) Thanks !

I’ve a Google Lenovo Smart Display which I’ve configured to show a feed of what’s happening when motion is detected. When it’s an outside camera it shows the “all cameras" feed, which is really nice!

The smart display is in my kitchen and living area. And it’s perfect cause as opposed to a TV it doesn’t interfere with whatever show you’re watching. Much better when it comes to WAF or GAF (girlfriend acceptance factor)

[
{
    "id": "93fd9ed1.715b6",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Announce Movement",
    "server": "",
    "service_domain": "media_player",
    "service": "alexa_tts",
    "data": "",
    "mergecontext": "",
    "x": 1280,
    "y": 540,
    "wires": [
        [
            "8e0a4f52.ef639"
        ]
    ]
},
{
    "id": "a86147a9.721cc8",
    "type": "template",
    "z": "591813ae.77999c",
    "name": "Message Convert",
    "field": "payload",
    "fieldType": "msg",
    "format": "handlebars",
    "syntax": "mustache",
    "template": "{ \"data\": \n{ \"entity_id\" : \"media_player.kitchen, media_player.master_bedroom, media_player.living_room_2\",\n\"message\" : \"{{payload}}\" }\n}",
    "output": "json",
    "x": 1050,
    "y": 540,
    "wires": [
        [
            "93fd9ed1.715b6"
        ]
    ]
},
{
    "id": "8fcecb8c.58e798",
    "type": "switch",
    "z": "591813ae.77999c",
    "name": "",
    "property": "payload",
    "propertyType": "msg",
    "rules": [
        {
            "t": "eq",
            "v": "ON",
            "vt": "str"
        },
        {
            "t": "neq",
            "v": "ON",
            "vt": "str"
        }
    ],
    "checkall": "true",
    "repair": false,
    "outputs": 2,
    "x": 370,
    "y": 280,
    "wires": [
        [
            "fe775fb1.1f8f5",
            "18761d3c.8a1043"
        ],
        [
            "d1c30640.b89778",
            "18761d3c.8a1043"
        ]
    ]
},
{
    "id": "f9ab8435.80b738",
    "type": "delay",
    "z": "591813ae.77999c",
    "name": "",
    "pauseType": "delay",
    "timeout": "13",
    "timeoutUnits": "seconds",
    "rate": "1",
    "nbRateUnits": "1",
    "rateUnits": "second",
    "randomFirst": "1",
    "randomLast": "5",
    "randomUnits": "seconds",
    "drop": false,
    "x": 940,
    "y": 340,
    "wires": [
        [
            "576b63fe.0f0dfc",
            "5497a58b.216e3c",
            "9859e536.a475d8"
        ]
    ]
},
{
    "id": "e200f3ed.19506",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Play Camera Stream",
    "server": "",
    "service_domain": "media_player",
    "service": "play_media",
    "data": "",
    "mergecontext": "",
    "x": 1460,
    "y": 140,
    "wires": [
        [
            "cc1c49fb.f51ce8"
        ]
    ]
},
{
    "id": "a3e802d0.83504",
    "type": "delay",
    "z": "591813ae.77999c",
    "name": "",
    "pauseType": "delay",
    "timeout": "250",
    "timeoutUnits": "milliseconds",
    "rate": "1",
    "nbRateUnits": "1",
    "rateUnits": "second",
    "randomFirst": "1",
    "randomLast": "5",
    "randomUnits": "seconds",
    "drop": false,
    "x": 950,
    "y": 300,
    "wires": [
        [
            "d9ee0f84.e543a"
        ]
    ]
},
{
    "id": "d090d82a.628c68",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Switch to Chromecast",
    "server": "",
    "service_domain": "remote",
    "service": "turn_on",
    "data": "{ \"entity_id\": \"remote.living_room_harmony\",   \"activity\": \"Watch Funky Cold\" }",
    "mergecontext": "",
    "x": 1460,
    "y": 300,
    "wires": [
        [
            "bc877772.e59c68"
        ]
    ]
},
{
    "id": "576b63fe.0f0dfc",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "Last Harmony Activity",
    "server": "",
    "halt_if": "",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "input_text.last_harmony_activity",
    "x": 1220,
    "y": 340,
    "wires": [
        [
            "7f744077.7559e"
        ]
    ]
},
{
    "id": "7f744077.7559e",
    "type": "template",
    "z": "591813ae.77999c",
    "name": "Activty Conversion",
    "field": "payload",
    "fieldType": "msg",
    "format": "handlebars",
    "syntax": "mustache",
    "template": "{ \"data\": \n  {\"entity_id\": \"remote.living_room_harmony\",\n  \"activity\": \"{{payload}}\"}\n}",
    "output": "str",
    "x": 1450,
    "y": 340,
    "wires": [
        [
            "3333b094.49642"
        ]
    ]
},
{
    "id": "661eefbd.a47f5",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Stop camera Stream",
    "server": "",
    "service_domain": "media_player",
    "service": "media_stop",
    "data": "{  \"entity_id\": \"media_player.funky_cold\" }",
    "mergecontext": "",
    "x": 1380,
    "y": 460,
    "wires": [
        []
    ]
},
{
    "id": "3333b094.49642",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Switch Back",
    "server": "",
    "service_domain": "remote",
    "service": "turn_on",
    "data": "",
    "mergecontext": "",
    "x": 1710,
    "y": 340,
    "wires": [
        [
            "aae8fddb.ae771"
        ]
    ]
},
{
    "id": "e4a56143.25bc6",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Motion Detected Message",
    "server": "",
    "template": "{% if is_state('binary_sensor.porch_camera_motion', 'on') %}\n  Motion detected by the porch camera.\n{% elif is_state('binary_sensor.back_yard_camera_motion', 'on') %}\n  Motion detected by the back yard camera.\n{% elif is_state('binary_sensor.driveway_camera_motion', 'on') %}\n  Motion detected by the driveway camera.\n{% elif is_state('binary_sensor.side_camera_motion', 'on') %}\n  Motion detected by the side camera.\n{% else %} \n{% endif %}",
    "x": 810,
    "y": 540,
    "wires": [
        [
            "a86147a9.721cc8"
        ]
    ]
},
{
    "id": "5dbe9d0f.bfe414",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Which Camera Stream?",
    "server": "",
    "template": "{% if is_state('binary_sensor.porch_camera_motion', 'on') %}\n  http://LocalBlueIrisIPAddressHere/mjpg/porch/video.mjpg\n{% elif is_state('binary_sensor.back_yard_camera_motion', 'on') %}\n  http://LocalBlueIrisIPAddressHere/mjpg/backyard/video.mjpg\n{% elif is_state('binary_sensor.driveway_camera_motion', 'on') %}\n  http://LocalBlueIrisIPAddressHere/mjpg/driveway/video.mjpg\n{% elif is_state('binary_sensor.side_camera_motion', 'on') %}\n  http://LocalBlueIrisIPAddressHere/mjpg/side/video.mjpg\n{% else %} \n{% endif %}",
    "x": 990,
    "y": 140,
    "wires": [
        [
            "a8fea8bf.96c258"
        ]
    ]
},
{
    "id": "a8fea8bf.96c258",
    "type": "template",
    "z": "591813ae.77999c",
    "name": "Stream Convert",
    "field": "payload",
    "fieldType": "msg",
    "format": "handlebars",
    "syntax": "mustache",
    "template": "{ \"data\": \n{\n \"entity_id\": \"media_player.funky_cold\",\n \"media_content_id\": \"{{{payload}}}\",\n \"media_content_type\": \"image/jpg\"  \n}\n}",
    "output": "str",
    "x": 1200,
    "y": 140,
    "wires": [
        [
            "e200f3ed.19506"
        ]
    ]
},
{
    "id": "650b159e.1143fc",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Current Harmony State",
    "server": "",
    "template": "{{state_attr('remote.living_room_harmony', \n'current_activity')}}",
    "x": 990,
    "y": 220,
    "wires": [
        [
            "ac1423f0.b58dd"
        ]
    ]
},
{
    "id": "ac1423f0.b58dd",
    "type": "template",
    "z": "591813ae.77999c",
    "name": "Activity Name",
    "field": "payload",
    "fieldType": "msg",
    "format": "handlebars",
    "syntax": "mustache",
    "template": "{ \"data\": \n{ \"entity_id\" : \"input_text.last_harmony_activity\",\n\"value\" : \"{{payload}}\" }\n}",
    "output": "str",
    "x": 1200,
    "y": 220,
    "wires": [
        [
            "84585fc4.b341"
        ]
    ]
},
{
    "id": "84585fc4.b341",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Set Last Activity",
    "server": "",
    "service_domain": "input_text",
    "service": "set_value",
    "data": "",
    "mergecontext": "",
    "x": 1440,
    "y": 220,
    "wires": [
        [
            "88da5adc.4a4378"
        ]
    ]
},
{
    "id": "80ed5624.8c4348",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Pause Current Activity",
    "server": "",
    "service_domain": "remote",
    "service": "send_command",
    "data": "",
    "mergecontext": "",
    "x": 1220,
    "y": 180,
    "wires": [
        [
            "4da8c887.980b38"
        ]
    ]
},
{
    "id": "eaefc4d3.6ea188",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Pause Current Media",
    "server": "",
    "template": "{% if is_state('input_text.last_harmony_activity', 'Watch Apple TV') %}\n  { \"data\": \n    { \"entity_id\" : \"remote.living_room_harmony\",\n       \"device\": \"50819014\",\n       \"command\": \"Pause\"\n    }\n  }\n{% else %} false \n{% endif %}",
    "x": 980,
    "y": 180,
    "wires": [
        [
            "80ed5624.8c4348"
        ]
    ]
},
{
    "id": "2b51a0a.63aa06",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Resume Media",
    "server": "",
    "template": "{% if is_state('input_text.last_harmony_activity', 'Watch Apple TV') %}\n  { \"data\": \n    { \"entity_id\" : \"remote.living_room_harmony\",\n       \"device\": \"50819014\",\n       \"command\": \"Play\"\n    }\n  }\n{% else %} false \n{% endif %}",
    "x": 1360,
    "y": 500,
    "wires": [
        [
            "d62345fe.197538"
        ]
    ]
},
{
    "id": "d62345fe.197538",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Resume Media",
    "server": "",
    "service_domain": "remote",
    "service": "send_command",
    "data": "",
    "mergecontext": "",
    "x": 1720,
    "y": 500,
    "wires": [
        []
    ]
},
{
    "id": "8e0a4f52.ef639",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Announcement",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1500,
    "y": 540,
    "wires": []
},
{
    "id": "cc1c49fb.f51ce8",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Camera Stream",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1720,
    "y": 140,
    "wires": []
},
{
    "id": "5497a58b.216e3c",
    "type": "delay",
    "z": "591813ae.77999c",
    "name": "",
    "pauseType": "delay",
    "timeout": "3",
    "timeoutUnits": "seconds",
    "rate": "1",
    "nbRateUnits": "1",
    "rateUnits": "second",
    "randomFirst": "1",
    "randomLast": "5",
    "randomUnits": "seconds",
    "drop": false,
    "x": 1180,
    "y": 460,
    "wires": [
        [
            "2b51a0a.63aa06",
            "661eefbd.a47f5"
        ]
    ]
},
{
    "id": "145a8116.f1c55f",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Apple TV Pause",
    "server": "",
    "template": "{% if is_state('input_text.last_harmony_activity', 'Watch Apple TV') %}\n  { \"data\": \n    { \"entity_id\" : \"remote.living_room_harmony\",\n       \"device\": \"50819014\",\n       \"command\": \"Pause\"\n    }\n  }\n{% else %} false \n{% endif %}",
    "x": 1360,
    "y": 420,
    "wires": [
        [
            "a4698f08.89ec7"
        ]
    ]
},
{
    "id": "a4698f08.89ec7",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Apple TV Pause",
    "server": "",
    "service_domain": "remote",
    "service": "send_command",
    "data": "",
    "mergecontext": "",
    "x": 1540,
    "y": 420,
    "wires": [
        [
            "cf75b377.e2b84"
        ]
    ]
},
{
    "id": "9859e536.a475d8",
    "type": "delay",
    "z": "591813ae.77999c",
    "name": "",
    "pauseType": "delay",
    "timeout": "250",
    "timeoutUnits": "milliseconds",
    "rate": "1",
    "nbRateUnits": "1",
    "rateUnits": "second",
    "randomFirst": "1",
    "randomLast": "5",
    "randomUnits": "seconds",
    "drop": false,
    "x": 1190,
    "y": 420,
    "wires": [
        [
            "145a8116.f1c55f"
        ]
    ]
},
{
    "id": "cf75b377.e2b84",
    "type": "delay",
    "z": "591813ae.77999c",
    "name": "",
    "pauseType": "delay",
    "timeout": "250",
    "timeoutUnits": "milliseconds",
    "rate": "1",
    "nbRateUnits": "1",
    "rateUnits": "second",
    "randomFirst": "1",
    "randomLast": "5",
    "randomUnits": "seconds",
    "drop": false,
    "x": 1710,
    "y": 420,
    "wires": [
        [
            "af2253c9.aca4d"
        ]
    ]
},
{
    "id": "af2253c9.aca4d",
    "type": "api-render-template",
    "z": "591813ae.77999c",
    "name": "Apple TV Rewind",
    "server": "",
    "template": "{% if is_state('input_text.last_harmony_activity', 'Watch Apple TV') %}\n  { \"data\": \n    { \"entity_id\" : \"remote.living_room_harmony\",\n       \"device\": \"50819014\",\n       \"command\": \"Rewind\"\n    }\n  }\n{% else %} false \n{% endif %}",
    "x": 1890,
    "y": 420,
    "wires": [
        [
            "b50b79bd.8bfae8"
        ]
    ]
},
{
    "id": "b50b79bd.8bfae8",
    "type": "api-call-service",
    "z": "591813ae.77999c",
    "name": "Apple TV Rewind",
    "server": "",
    "service_domain": "remote",
    "service": "send_command",
    "data": "",
    "mergecontext": "",
    "x": 2090,
    "y": 420,
    "wires": [
        []
    ]
},
{
    "id": "88da5adc.4a4378",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Last Activity",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1710,
    "y": 220,
    "wires": []
},
{
    "id": "aae8fddb.ae771",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Switch Back",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1870,
    "y": 340,
    "wires": []
},
{
    "id": "5891b76d.e27418",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "TV State",
    "server": "",
    "halt_if": "off",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "remote.living_room_harmony",
    "x": 760,
    "y": 260,
    "wires": [
        [
            "eaefc4d3.6ea188",
            "650b159e.1143fc",
            "a3e802d0.83504",
            "5dbe9d0f.bfe414"
        ]
    ]
},
{
    "id": "a0ebc1c5.247d2",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "TV State",
    "server": "",
    "halt_if": "off",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "remote.living_room_harmony",
    "x": 760,
    "y": 300,
    "wires": [
        [
            "f9ab8435.80b738"
        ]
    ]
},
{
    "id": "fe775fb1.1f8f5",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "Automation State",
    "server": "",
    "halt_if": "off",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "input_boolean.camera_motion_detection",
    "x": 550,
    "y": 260,
    "wires": [
        [
            "5891b76d.e27418",
            "16e5141f.42e7dc"
        ]
    ]
},
{
    "id": "d1c30640.b89778",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "Automation State",
    "server": "",
    "halt_if": "off",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "input_boolean.camera_motion_detection",
    "x": 550,
    "y": 300,
    "wires": [
        [
            "a0ebc1c5.247d2"
        ]
    ]
},
{
    "id": "4da8c887.980b38",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Pause Activity",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1440,
    "y": 180,
    "wires": []
},
{
    "id": "bc877772.e59c68",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Switch to Chromecast",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 1740,
    "y": 300,
    "wires": []
},
{
    "id": "2e000c0a.f87854",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "Check if Alerts Allowed",
    "info": "",
    "x": 560,
    "y": 220,
    "wires": []
},
{
    "id": "a8857a2f.6b7758",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "TV On or Off?",
    "info": "",
    "x": 770,
    "y": 220,
    "wires": []
},
{
    "id": "cce03bd7.055078",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "Where was motion detected?",
    "info": "",
    "x": 820,
    "y": 500,
    "wires": []
},
{
    "id": "2c071a2d.1dd746",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "Cameras",
    "info": "",
    "x": 160,
    "y": 180,
    "wires": []
},
{
    "id": "1e81a769.12e5f9",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "HTML Address Format",
    "info": "The Payload MUST be in tripple brackets\n{{{payload}}}\nOtherwise, the URL will not pass correctly",
    "x": 1220,
    "y": 100,
    "wires": []
},
{
    "id": "2b31fce7.6f11e4",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "Since Harmony's Apple TV \"On\" command is just play, this section pauses and rewinds to properly resume",
    "info": "",
    "x": 1480,
    "y": 380,
    "wires": []
},
{
    "id": "3d379467.3ea82c",
    "type": "comment",
    "z": "591813ae.77999c",
    "name": "This delay is to allow storing of the last Harmony Activity before switching",
    "info": "",
    "x": 1140,
    "y": 260,
    "wires": []
},
{
    "id": "d9ee0f84.e543a",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "Halt if On Chromecast",
    "server": "",
    "halt_if": "Watch Funky Cold",
    "override_topic": true,
    "override_payload": true,
    "entity_id": "remote.living_room_harmony",
    "x": 1220,
    "y": 300,
    "wires": [
        [
            "d090d82a.628c68"
        ]
    ]
},
{
    "id": "16e5141f.42e7dc",
    "type": "api-current-state",
    "z": "591813ae.77999c",
    "name": "Anyone Home?",
    "server": "",
    "halt_if": "off",
    "override_topic": false,
    "override_payload": false,
    "entity_id": "switch.virtual_presence_switch",
    "x": 780,
    "y": 460,
    "wires": [
        [
            "e4a56143.25bc6"
        ]
    ]
},
{
    "id": "18761d3c.8a1043",
    "type": "debug",
    "z": "591813ae.77999c",
    "name": "Detected",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "x": 520,
    "y": 380,
    "wires": []
},
{
    "id": "67a1055c.99a0dc",
    "type": "mqtt in",
    "z": "591813ae.77999c",
    "name": "Porch",
    "topic": "BlueIris/Porch",
    "qos": "2",
    "broker": "",
    "x": 150,
    "y": 220,
    "wires": [
        [
            "8fcecb8c.58e798"
        ]
    ]
},
{
    "id": "66ed0213.09713c",
    "type": "mqtt in",
    "z": "591813ae.77999c",
    "name": "Driveway",
    "topic": "BlueIris/Driveway",
    "qos": "2",
    "broker": "",
    "x": 140,
    "y": 260,
    "wires": [
        [
            "8fcecb8c.58e798"
        ]
    ]
},
{
    "id": "2e5efd24.81c762",
    "type": "mqtt in",
    "z": "591813ae.77999c",
    "name": "Side",
    "topic": "BlueIris/Side",
    "qos": "2",
    "broker": "",
    "x": 150,
    "y": 300,
    "wires": [
        [
            "8fcecb8c.58e798"
        ]
    ]
},
{
    "id": "23f388c8.ebd9d8",
    "type": "mqtt in",
    "z": "591813ae.77999c",
    "name": "Back Yard",
    "topic": "BlueIris/Back_Yard",
    "qos": "2",
    "broker": "",
    "x": 140,
    "y": 340,
    "wires": [
        [
            "8fcecb8c.58e798"
        ]
    ]
},
{
    "id": "",
    "type": "server",
    "z": "",
    "name": "",
    "url": "",
    "pass": ""
},
{
    "id": "",
    "type": "mqtt-broker",
    "z": "",
    "name": "",
    "broker": "localhost",
    "port": "1883",
    "clientid": "",
    "usetls": false,
    "compatmode": true,
    "keepalive": "60",
    "cleansession": true,
    "birthTopic": "",
    "birthQos": "0",
    "birthPayload": "",
    "closeTopic": "",
    "closeQos": "0",
    "closePayload": "",
    "willTopic": "",
    "willQos": "0",
    "willPayload": ""
}

]

Hopefully I did this right…if you find better ways to do some of what I did, please let me know! This was an ambitious first stab at Node-RED for me. :slight_smile:

Hi

Thanks very much for this code! I am trying to apply it to my config file but am having a syntax issue and I wonder if you can see any issues? Here is my ‘script’ code:

But when I apply this I get this error:

image

It seems like it doesn’t like the {% endif %} line. Any ideas?

Thanks

Craig

Try removing/adding your commented sections. It looks like that might be breaking it.

Your error is on line 404 per the logs. I can’t see what line is what from your screenshot.

media_content_type appears to have one less space in its indentation. I know YAML is very finicky about spacing, so maybe that’s it.

So I’m not exactly sure of the cause, I just scrapped the whole script and pasted it in again and amended the bits I needed to one by one, checking the config after each one, and it worked. Thanks everyone for the responses :slight_smile:

Hi

Sorry to post again but am having another issue that I hope someone might be able to help with. When I try to cast using the input box all I have showing on my TV is a black screen. Something is obviously being cast but there is no video to see. I have double checked all the Blue Iris settings and there is a difference. In Step 4. of the guide by OP above it shows this:

image

Yet on my Blue Iris I see this:

So I do not have the option of Yes (H.264). I have tried all the options I have in the drop down followed by a restart but to no avail. It feels like this is a stream issue as in the stream from BI isn’t in the correct format for the cast to work but this is the setting this is different? If any one has any ideas it would be appreciated. Thanks.

Craig

Mine says “Intel HD hardware acceleration (restart)” and yours says something else. Why don’t you pick “intel” then restart and see if the options change for you?

The Intel option is H.264, Since the developer included Nvidia support. He renamed H.264

This is awesome. Thanks so much! Any suggestions on how to cast a specific camera via Google Home to the TV? “Cast Ryan’s Bedroom to Main TV” - or something similar?