djdd87 / SynoAI

A Synology Surveillance Station notification system utilising DeepStack AI
GNU General Public License v3.0
207 stars 24 forks source link

DS920+ and DSM 7: Getting some errors I cannot understand #39

Closed euquiq closed 3 years ago

euquiq commented 3 years ago

Hi!

I hope you may throw some light over these errors. I followed the instructions below with great care. I got "everything up and running" but apparently when a motion is detected and passed thru, the log shows at stdout:

warn: SynoAI.Services.AIService[0]
           MYCAM: DeepStackAI: Failed to call API with HTTP status code 'Forbidden'.

fail: SynoAI.Controllers.CameraController[0]
       MYCAM: Failed to get get predictions.

When I perform the "SEND TEST" at SSS, in actions, the url is:


 http://<synoai docker>:8080/Camera/MYCAM

and it tests ok.

Any help is appreciated!

Enrique

djdd87 commented 3 years ago

Do you use 2FA?

euquiq commented 3 years ago

Yes, but not enforced on the synoai user. This is the extended ("information") log upon receiving a motion from SSS:

2021-07-14 15:10:14 | stdout | MYCAM: Failed to get get predictions.
2021-07-14 15:10:14 | stdout | fail: SynoAI.Controllers.CameraController[0]
2021-07-14 15:10:14 | stdout | MYCAM: DeepStackAI: Failed to call API with HTTP status code 'Forbidden'.
2021-07-14 15:10:14 | stdout | warn: SynoAI.Services.AIService[0]
2021-07-14 15:10:14 | stdout | MYCAM: Processing.
2021-07-14 15:10:14 | stdout | info: SynoAI.Controllers.CameraController[0]
2021-07-14 15:10:14 | stdout | MYCAM: Snapshot received (135ms).
2021-07-14 15:10:14 | stdout | info: SynoAI.Controllers.CameraController[0]
2021-07-14 15:10:14 | stdout | MYCAM: Taking snapshot
2021-07-14 15:10:14 | stdout | info: SynoAI.Services.SynologyService[0]
2021-07-14 15:10:14 | stdout | MYCAM: Motion detected, fetching snapshot.
2021-07-14 15:10:14 | stdout | info: SynoAI.Controllers.CameraController[0]
2021-07-14 15:10:14 | stdout | MYCAM: Camera last checked 652ms ago
2021-07-14 15:10:14 | stdout | info: SynoAI.Controllers.CameraController[0]
euquiq commented 3 years ago

Also, upon calling the DeepStack webpage at http://(mynasip):83 I can see the nice blue page stating that Deepstack is activated.

djdd87 commented 3 years ago

Can you provide your config please?

euquiq commented 3 years ago

sure, here is my config:

{
  "Logging": {
    "LogLevel": {
    "Default": "Information",
    "Microsoft": "Warning",
    "Microsoft.Hosting.Lifetime": "Information"
    }
  },

  "Url": "http://192.168.2.8:5000",
  "User": "synoai",
  "Password": "(pwd)",
  "AllowInsecureUrl": true,
  "MinSizeX": 100,
  "MinSizeY": 100,

  "AI": {
    "Type": "DeepStack",
    "Url": "http://192.168.2.8:83"
  },

  "Notifiers": [
    {
       "Type": "Pushbullet",
       "ApiKey": "o.(myapikey)"
    }
  ],

  "Cameras": [
    {
      "Name": "MYCAM",
      "Types": [ "Person" ],
      "Threshold": 40,
      "MinSizeX": 30,
      "MinSizeY": 40,
    }
  ]
}
djdd87 commented 3 years ago

See here.

You probably need to enable vision detection.

euquiq commented 3 years ago

djdd87, you are right, of course !! I had mistyped the VISION-DETECTION var: I was using "VISION-DETECT" instead !

Lame of me! I am sorry I made you waste this time.

djdd87 commented 3 years ago

This isn't the firs time, so I should probably add something to the wiki :).