Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Synology Chat #52

Open
AdiAbuAli opened this issue Sep 6, 2021 · 6 comments
Open

Integrate with Synology Chat #52

AdiAbuAli opened this issue Sep 6, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@AdiAbuAli
Copy link

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:
Capture

Thanks,

@djdd87
Copy link
Owner

djdd87 commented Sep 8, 2021

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.

@djdd87 djdd87 added the enhancement New feature or request label Dec 31, 2021
@djdd87
Copy link
Owner

djdd87 commented Feb 6, 2022

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.

@djdd87
Copy link
Owner

djdd87 commented Feb 7, 2022

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

djdd87 added a commit that referenced this issue Feb 14, 2022
…ill need a reference to SynoAI's URL to get the images from the ImageController.
@djdd87
Copy link
Owner

djdd87 commented Feb 14, 2022

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.

@jinlife
Copy link

jinlife commented Jun 8, 2023

@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.

@djdd87
Copy link
Owner

djdd87 commented Jun 8, 2023

This isn't done yet and isn't supported until it's in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants