Skip to main content
blog.chobble.com

Getting Thingino webhooks to play nice with ntfy

A quick fix for anyone else who's got a Thingino firmware'd camera and wants to send notifications with screenshots to ntfy via Thingino's 'webhook' option.

By default it won't work, because behind the scenes Thingingo calls curl -F 'image=@$attachment' and sends the image as form data. You will receive an attachment.bin file which won't open:

A screenshot of the ntfy interface showing 'You received a file: attachment.bin'

To play nicely with ntfy you need to change this to -F to a -T for "upload file". And while you're in there you might as well add a nice title and icon too:

A screenshot of the ntfy interface showing 'Front door motion detected. You received a file: camera.jpg' and the actual photo itself

You'll need to:

Change line 36 from build_cmd "-F 'image=@$attachment'" to something like:

build_cmd "-T '$attachment' -H 'Filename: camera.jpg'" -H 'Tag: camera_flash' -H 'Title: Front door motion detected'

Save and you're done. Easy!