I have a Synology Surveillance Station(SS) in my home, and configured the Synology integration in HA. The cameras and sensors works well.
One feature lacking in this integration is motion_detection. The workaround is to let SS use webhook to send a motion_detection
event to HA, using the RESTFUL API. However, RESTFUL API requires a token in the header (Authorization: Bearer
) of the request, which isn’t customizable in Synology SS webhook. (in only let you select GET/POST and the request body)
I found a post from 2018 and the solution was to add trusted_network. This didn’t work for me though. I still received a 401: Unauthorized
even if in the same network with curl
call.
The configuration of trusted network is:
homeassistant:
name: My Home
...
auth_providers:
- type: homeassistant
- type: trusted_networks
trusted_networks:
- 10.0.0.0/24 # my home network
Curl resuest:
curl -X POST -H "Authorization: Bearer " \
-H "Content-Type: application/json" https://<my_lan_domain>:8123/api/events/fire
Does HA support other auth-less restful request? Thanks.
Btw, there’s nothing wrong with the trusted network as I can login without password in the browser.