Open AdiAbuAli opened 3 years ago
It's not doable at the moment as it requires a configurable JSON packet as well as a URL to access the file. It's something I can look at in the future.
https://kb.synology.com/en-in/DSM/help/Chat/chat_integration?version=6
While it's trivial to send the text, it ;ooks like it needs the image uploading separately somewhere first, e.g. how Pushover works. However, Pushover has it's own storage mechanism whereas Synology Chat doesn't and requires a file URL.
Thinking about it, we have all the files stored in the NAS, so I could expose the images directory and then access them directly, e.g. http://nas-ip:port/images/2022-02-07T09:00.000.png
This is mostly done. The only odd thing I'm trying to find an alternative for is that you will need to specify the SynoAI URL in the Synology Chat config. I'm not sure if that feels right, so I'll hunt for an alternative way of providing the images before going down that route.
@djdd87 Thanks for your work, but it seems not working.
It looks like the following code has issue.
file_url = new Uri(new Uri(Config.Url), new Uri($"Image/{camera.Name}/{notification.ProcessedImage.FileName}", UriKind.Relative))
The Config.Url seems to be the Synology URL but not SynoAI URL.
Synology Chat will require a SynoAI URL and download the image file at first, this is wierd design but this is how it works.
https://kb.synology.com/en-id/DSM/help/Chat/chat_integration?version=7
Please add a Config.SynoAIUrl configuration or get SynoAI URL automatically.
This isn't done yet and isn't supported until it's in the docs.
Hi, I tried to use Webhook feature in Synology chat as notifier, but it fails...any success story or special parameters? Attached is the description of Webhook Synology chat integration:
Thanks,