Home Assistant
  • Home Assistant is a smart things hub for everything. For people asking for homekit support Home Assistant is the way to go.

    I would love to be able to use SS with Home Assistant.

    Here is a list of support systems. https://www.home-assistant.io/components/#camera

    I tried using - https://www.home-assistant.io/components/camera.generic/ and https://www.home-assistant.io/components/camera.mjpeg/

    Issue here was the fact I am using H.246 and I don't want to stop using it.

    Ben, am I able to stream from SS to Home Assistant?

    Side note... Home Assistant is amazing and has a great community. I know if you built a plugin for it you would sell a heaps of SS to the community! You would also then have the benefit of all the other amazing thing people could do with SS using Home Assistant!!
  • I just discovered with sub stream is, so I got it working but all the above still applies!!
  • You know you want to Ben..
  • This is interesting, we will have a look at the possibility of a SecuritySpy plugin for Home Assistant, I think that would be a good idea.

    The "Generic MJPEG IP Camera" plugin seems to be the best one to use currently. The MJPEG URL to supply would be something like this:


    (see the SecuritySpy Web Server Specification document for a full description of the ++video request.

    You can obtain the correct camera number from the Camera Info window in SecuritySpy - if you don't currently have this column displayed, click the header bar where you see the column names, and you will get a pop-up menu that allows you to add the Camera Number column.
  • I agree, from what I've seen on the web so far there would be a great demand for something like this. The NEST solution is Clould based and insanely expensive. I genuinely think that a home server solution which could integrate with Google Home and Homekit would be very popular.
  • I am working with Home Assistant to develop a series of switches that arm and disarm individual cameras. The benefit will be to enable the switches to be used with other automatons or scripts within Home Assistant. Here is the yaml I am using in my Home Assistant configuration.yaml.

    - platform: command_line
    command_on: '/usr/bin/curl -k "http://{ip}:8000/++ssControlMotionCapture?cameraNum=3&arm=1&auth={authkey}"'
    command_off: '/usr/bin/curl -k "http://{ip}:8000/++ssControlMotionCapture?cameraNum=3&arm=0&auth={authkey}"'
    command_state: '/usr/bin/curl -k --silent "http://{ip}:8000/++cameramodes?cameraNum=3&auth={authkey}" | grep -oP "(?<=M:).*"'<br /> value_template: '{{ value == "ARMED" }}'

    where {ip} = my camera IP address and {authkey} = my authentication. Ignore the not sure why that keeps popping up value_template is a separate line in the yaml.

    I suspect my error is in the syntax of the grep command because when I use curl on the command line in terminal to fetch the state of the camera it returns


    however, as soon as I add the grep command it fails. If I can get this working I should be able to control this camera's motion capture, notifications, etc.. with switches in Home Assistant.
  • Anyone else have any experience with integrating security spy with home assistant. I am close, but do not have it working successfully yet.
  • Hi jjbanker
    This: {authkey} will not work in a command_line switch. Either you will have to type the full Auth Key or you will have to put the whole line in the secrets file with the typed auth key and then just do something like:
    command_on: !secret cam1_on
    command_off: !secret cam1_off
    command_state: !secret cam1_state

    Your value template is fine and so is you grep command. I use exactly the same and it works.
  • I'd like to get my SS install working with HA too. I'm curious about ben's aug 23rd post. Is this method known to work, or is this just speculation?

    Has anyone made any more progress on this?
  • Things I've done with SS/HASS.

    Cameras display in the HASS dashboard.
    PIR sensors (or any sensors or event changes) in HASS trigger SS recordings.
    Telegram notifications with camera screenshots when an event is triggered.

    I can probably do a write up if people are interested?
  • Thanks for the info Boxgrove, pretty self explanatory. I'll tweak my setup based on your info.
  • Ben mentioned in an earlier post that using the "++video request" method would be the best approach for pulling live video into HA today. It seems to work well, but is there a way to get only the video feed, without the "live" title and links to "main page", "captured files" and "cant view?" ?
  • Hi @bonfireva the ++video request is for the MJPEG live video stream itself. So there is no associated HTML page with titles etc. It sounds like you are referring to the "live" request, which gets you an HTML page with the titles and other text that you describe, containing the video image.

    This "live" page comes from an HTML template, which you can edit to remove the stuff you don't want. Please see Customising SecuritySpy’s Web Interface.
  • Thanks Ben, that's exactly what I was looking for. And you are correct, I was trying to use the new iFrame card in Home Assistant to display live video using the live request feature.
  • Ben, any update on a plugin for Home Assistant?
  • Has anyone had more luck integrating with Home Assistant?
  • I am sure security spy will eventually become a standard integration in home assistant, but I suspect this is pretty low in priority, especially since there are ways to make it work today with some configuring. The security spy server is just as easy to use as setting up cameras are in home assistant. Its actually not that hard, just takes a little tinkering to integrate the two together. See comments from Boxgrove above, Boxgrove was kind enough to share some of his config files. If you are using home assistant you should be familiar with yaml and how to create switches, automations, saving backups, etc..

    I run home assistant in a virtual machine on an old computer, 2012 Macmini in my case, so I just save a snapshot of my working virtual machine before I start tinkering and if I crash home assistant or break my configuration, I just restore my vm from the snap shot and its back up and running.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!