SimpliSafe very unreliable as of late

How do I see this event in Home Assistant? I looked in logs, history and development tools. Simplisafe is not captured there.

Are you wanting to see what the event payload looks like? If so, the documentation outlines that: https://www.home-assistant.io/integrations/simplisafe#events

If you’re wanting to “watch” for an event in real-time, you can go to Developer Tools -> Events and use the Listen to events area to output these events as they occur.

I would like to see the log file of the events. Why are they not captured?

Home Assistant doesn’t log every event received by every integration. One thing you can do is set your SimpliSafe logging to DEBUG-level:

logger:
  default: info
  logs:
    homeassistant.components.simplisafe: debug
    simplipy: debug

…and you will see them. Be advised, however, that with DEBUG-level logs, you are likely to see a deluge of information; look for lines that contain New websocket event or New system notifications.

What I was asking is a database entry. Then you could use logbook or history. I most likely said it wrong above. What I am trying to do is monitor a 97 year old with dementia. I have other sensors that I get notifications on. I wanted to use the Simplisafe one as a second one that the person has left the house. If not possible with the current setup, I’ll just add another sensor that can do this.

You could write an automation that logs these events to the logbook (using the logbook.log service: https://www.home-assistant.io/integrations/logbook#custom-entries).

An (untested) example might look like:

automation:
  - alias: "Log SimpliSafe events and notifications"
    trigger:
      - platform: event
        event_type: SIMPLISAFE_EVENT
      - platform: event
        event_type: SIMPLISAFE_NOTIFICATION
    action:
      service: logbook.log
      data:
        name: SimpliSafe
        message: >
          {% if trigger.event.event_type == "SIMPLISAFE_EVENT" %}
            {% set message = trigger.event.data.last_event_info %}
          {% elif trigger.event.event_type == "SIMPLISAFE_NOTIFICATION" %}
            {% set message = trigger.event.data.message %}
          {% endif %}

          📥 SimpliSafe Message: {{ message }}

You can use any of the data fields shown in https://www.home-assistant.io/integrations/simplisafe#events.

1 Like

Thanks. This gets me closer. I still am missing many of the events that come directly from Simplisafe. I get the notification almost instantly to my phone. All do not show up in Home Assistant. I just had 5 messages from the simplisafe notifications and none showed up in the logs. I don’t think this is an issue with the app, it just is not reliable to use the sensors for anything thing else.

What are examples of the events that you’re seeing in the SimpliSafe app, but not in Home Assistant. You mention sensors?

Garage door open, (contact sensor) hallway (motion sensor). Both are setup as secret alerts. I see them all texted to my phone as well as in the simplisafe web app history. Missing a lot in home assistant. As a test I opened the door 5 times. All showed in simplisafe, none during the test showed up in Home Assistant. Sometimes they do show, other times they don’t. No idea why or why not?
Also when it does work, can I do a filter on the automation that you gave me as an example, to send me a message when i.e. the garage is triggered?
The automation made this in the log file

SimpliSafe 📥 SimpliSafe Message: Secret Alert: Motion Sensor Front Door Triggered

I see no way of filtering the log or having this to trigger a notification.

The answer lies in the documentation I posted previously. Specifically regarding SIMPLISAFE_EVENT:

event_type , being one of the key fields automations might be built from, can have the following values:

  • camera_motion_detected
  • doorbell_detected
  • entry_detected
  • motion_detected

I only see these everything else can be tracked via state changes to the appropriate entities (e.g., I won’t fire an event when the alarm arms because you can monitor the alarm_control_panel’s state to get that information).

Thanks for spending this much time helping me out. Hopefully I get there. When I do, I’ll post the automations and settings for others. So from your comments above, I can only see entry detected, not which entry?
I still am not sure what to do about the number of dropped notifications to HA. Just did another trial and 4 reached Simplisafe, 1 reached HA.

I am also seeing that the timeline has a lot more entries from the secret alerts than are texted to me. Hard to have an integration work correctly when the company can not even handle data that it sends.

I reset my alerts on the phone and it is now matching the simplisafe time line. For some reason it seems to be better in Home Assistant also.

SIMPLISAFE_EVENT

in the developers tools seems to work well as it catches all of the secret alerts.
Now can I use any of the responses

"last_event_type": "motion_detected",
 "last_event_info": "Secret Alert: Entry Sensor Garage Opened",
 "last_event_sensor_name": "Garage",

to trigger an automation on the specific sensor?

Yep – per the example above, trigger.event.data will contain the entire event payload.

Can someone offer some insight here? I created an automation to play media over speakers when the doorbell rings. I confirmed the automation works by manually firing the doorbell_detected event. However, ringing the physical doorbell doesn’t trigger the automation. Here’s the log when I press the doorbell:

2021-01-23 10:34:30 INFO (MainThread) [engineio.client] Received packet MESSAGE data 2/v1/user/2396302,["event",{"eventTimestamp":1611416066,"eventCid":1170,"zoneCid":"1","sensorType":12,"sensorSerial":"","account":"account","userId":userid,"sid":sid,"info":"\"Front Door\" Camera Detected Motion","pinName":"","sensorName":"Front Door","messageSubject":"Camera Detected Motion","messageBody":"\"Front Door\" Camera Detected Motion on 1-23-21 at 10:34 am","eventType":"activityCam","timezone":0,"locationOffset":-300,"internal":{"isSubscribed":true,"shouldNotify":true,"type":"doorbellPir","mainCamera":"camera","mainCameraName":"Front Door","mainCameraFirmwareVersion":"2.6.1.154","micEnable":true,"cameraSupportedFeatures":{"providers":{"webrtc":"none","recording":"simplisafe","live":"simplisafe"},"audioEncodings":["speex"],"resolutions":["480p","720p","1080p"],"id":"id","pir":true,"videoAnalytics":true,"privacyShutter":false,"microphone":true,"fullDuplexAudio":false,"wired":true,"networkSpeedTest":false,"speaker":true,"spotlight":false,"colorNightMode":false,"videoFlip":false,"doorbell":true,"videoAnalyticsZones":true,"pairedToBasestation":false,"siren":false,"videoEncoding":"h264"},"dispatcher":"cops"},"senderId":"","eventId":13030087599,"serviceFeatures":{"monitoring":true,"alerts":true,"online":true,"video":true,"hazard":false},"copsVideoOptIn":true,"video":{"key":{"clipId":7281077853,"preroll":5,"postroll":60,"cameraName":"Front Door"}},"videoStartedBy":1}]
2021-01-23 10:34:30 INFO (MainThread) [socketio.client] Received event "event" [/v1/user/#]
2021-01-23 10:34:32 INFO (MainThread) [simplipy] Watchdog triggered – sleeping for 900 seconds

It seems like the system is receiving information that the doorbell is being pushed, but the doorbell_detected event doesn’t fire.

Here’s my automation, which does work when I manually trigger doorbell_detected in the Developer Tools:

alias: Doorbell
description: ''
trigger:
  - platform: event
    event_type: doorbell_detected
    event_data: {}
condition: []
action:
  - service: media_player.play_media
    data:
      entity_id: media_player.office_speaker
      media_content_id: /local/doorbell.mp3
      media_content_type: music
    entity_id: media_player.office_speaker
mode: single

Quick check-in: my day job has been commanding the majority of my attention, but I haven’t forgotten this; will get back to you as soon as I can!

1 Like

Following up. I’m looking at your logs and notice only one from the simplipy logger (the first two use the engine.client and socketio.client loggers, respectively). Do you see any other simplipy or home assistant.components.simplisafe entries around the time you press the doorbell?

Also, what happens when you listen for the SIMPLISAFE_EVENT event in Home Assistant (using the “Events” developer tool in Home Assistant) and press the doorbell?

Here’s what happens when I listen for the event:

{
    "event_type": "SIMPLISAFE_EVENT",
    "data": {
        "last_event_changed_by": "",
        "last_event_type": "doorbell_detected",
        "last_event_info": "Someone is at your \"Front Door\"",
        "last_event_sensor_name": "Front Door",
        "last_event_sensor_serial": "",
        "last_event_sensor_type": "doorbell",
        "system_id": [systemid],
        "last_event_timestamp": "2021-01-28T22:01:32+00:00"
    },
    "origin": "LOCAL",
    "time_fired": "2021-01-28T22:01:37.478539+00:00",
    "context": {
        "id": "[id]",
        "parent_id": null,
        "user_id": null
    }
}

My doorbell automation didn’t fire, and I don’t see anything from simplipy in the log, just the same engineio.client message. Additionally, I tried the untested log automation you posted in post #13, and I don’t get any entries in the log. According to the automation, it triggered about 30 minutes ago, but the matching log entry is another Watchdog entry like the one I posted above. In fact, when I search the log file in Notepad++ for all instances of simplipy, it’s nothing but Watchdog expired – calling async_reconnect and Watchdog triggered – sleeping for 900 seconds.

I was going to paste my log automation, but when I select edit as YAML it throws an error. That makes me think there’s something wrong with that automation, although it should be unrelated to why I’m not seeing the doorbell_detected event fire.

image

EDIT: This character caused the error. I’ve deleted it to see if it somehow allows the log automation to work properly and maybe give me some data.

I don’t think your automation is looking for the right thing. Instead of this:

trigger:
  - platform: event
    event_type: doorbell_detected
    event_data: {}

…try this:

trigger:
  - platform: event
    event_type: SIMPLISAFE_EVENT
    event_data:
        last_event_type: doorbell_detected
2 Likes

That makes sense. I was wondering how to implement SIMPLISAFE_EVENT. The fact that the documentation refers to it and doorbell_detected as event_type had me confused. I’ll try it with the updated code and see if it works.

EDIT: I’m also going to figure out how to edit documentation in Github to update the SIMPLISAFE_EVENT section with the correct attributes (last_event_type vs event_type, etc.)

1 Like