Webhook not working

I was just trying out the Webhooks feature in the version 3.1.0-rc8 server to see if I can send images captured during motion detection to a Telegram group. But before I even try to send images, I wanted to test if I could send a simple text message.

So I composed a Telegram webhook url to send a specific text message to a specific Telegram group and tested it by pasting the url into a browser. This seemed to work flawlessly and the message was successfully delivered to the Telegram group.

When I paste the same URL into the Bluecherry Webhook URL field, hit the Create button, and then Test, however, the message does not appear to be delivered to the Telegram group. There is no mention of this webhook test in the logs either.

Just wanted to check if I was doing anything wrong here. Sorry if any of this seems stupid, I started reading about webhooks for the first time today.

And sorry for the recent flood of messages here. I’m just looking to try out all the features of Bluecherry during the trial period, to see if this is something that will work for me, and something I would consider paying a subscription for.

No problem.

This could be related to this in your previous post:

Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): bc_streaming_setup() failed: Invalid argument
Jun 27 09:41:41 kaiju bc-server[153819]: E(2/sauron1): Unable to setup live broadcast from substream

Try disabling the sub stream from the Devices → Camera area…for whatever reason it doesn’t like the substream. This may be fixed in RC9 (Introducing Enhanced HEVC Support and Performance Upgrades for Seamless Video Streaming - Bluecherry announcements) but for now see if disabling it helps.

Try obtain a webhook URL from this site and testing it and let me know the response:

Just added the Webhook.site url to the Bluecherry server and hit Test, but it did not record anything on the Webhook.site dashboard. As before, didn’t show up in the Bluecherry log either.

As a control, copied the Webhook.site url to the browser window and hit Enter. This did register on the Webhook.site dashboard.

Thought this might be relevant to share. Just saw the following log entries when I rebooted my computer:

Jun 28 11:15:47 kaiju bc-server[1316]: PHP Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /usr/share/bluecherry/www/lib/mailer.php:44
Jun 28 11:15:47 kaiju bc-server[1316]: Stack trace:
Jun 28 11:15:47 kaiju bc-server[1316]: #0 /usr/share/bluecherry/www/lib/mailer.php(131): webhook_trigger()
Jun 28 11:15:47 kaiju bc-server[1316]: #1 {main}
Jun 28 11:15:47 kaiju bc-server[1316]: thrown in /usr/share/bluecherry/www/lib/mailer.php on line 44

The rest of the log, in case any context is needed:

Jun 28 11:15:46 kaiju bc-server[1188]: I(): Status reports are served at /tmp/bluecherry_status
Jun 28 11:15:46 kaiju bc-server[1188]: I(): Status reports are served at /tmp/bluecherry_trigger
Jun 28 11:15:46 kaiju bc-server[1188]: I(): Started bc-server 3.1.0 (toolchain 11.3.0) v2.7.6-733-g6e6e1d92 heads/master
Jun 28 11:15:46 kaiju bc-server[1188]: I(): API server started listen to port: 7005
Jun 28 11:15:46 kaiju bc-server[1188]: I(): HLS server started listen to port: 7003 (SSL=0)
Jun 28 11:15:46 kaiju bc-server[1188]: I(): SQL database connection opened
Jun 28 11:15:46 kaiju bc-server[1188]: W(): VAAPI device /dev/dri/renderD128 does not exist or is not readable to bluecherry, hardware acceleration is not available
Jun 28 11:15:47 kaiju bc-server[1188]: I(): Database doesnot contain oldest media file entry
Jun 28 11:15:47 kaiju bc-server[1188]: I(): v3license server started
Jun 28 11:15:47 kaiju bc-server[1188]: I(2/sauron1): Setting up device
Jun 28 11:15:47 kaiju bc-server[1188]: I(3/sauron2): Setting up device
Jun 28 11:15:47 kaiju bc-server[1188]: E(3/sauron2): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 11:15:47 kaiju bc-server[1188]: E(): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 11:15:47 kaiju bc-server[1188]: E(3/sauron2): Error starting substream:
Jun 28 11:15:47 kaiju bc-server[1188]: E(3/sauron2): Error starting device stream:
Jun 28 11:15:47 kaiju bc-server[1188]: E(2/sauron1): Error starting substream:
Jun 28 11:15:47 kaiju bc-server[1188]: E(2/sauron1): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 11:15:47 kaiju bc-server[1188]: E(2/sauron1): Error starting device stream:
Jun 28 11:15:47 kaiju bc-server[1316]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 11:15:47 kaiju bc-server[1317]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 11:15:47 kaiju bc-server[1316]: PHP Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /usr/share/bluecherry/www/lib/mailer.php:44
Jun 28 11:15:47 kaiju bc-server[1316]: Stack trace:
Jun 28 11:15:47 kaiju bc-server[1316]: #0 /usr/share/bluecherry/www/lib/mailer.php(131): webhook_trigger()
Jun 28 11:15:47 kaiju bc-server[1316]: #1 {main}
Jun 28 11:15:47 kaiju bc-server[1316]: thrown in /usr/share/bluecherry/www/lib/mailer.php on line 44
Jun 28 11:15:47 kaiju bc-server[1317]: PHP Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /usr/share/bluecherry/www/lib/mailer.php:44
Jun 28 11:15:47 kaiju bc-server[1317]: Stack trace:
Jun 28 11:15:47 kaiju bc-server[1317]: #0 /usr/share/bluecherry/www/lib/mailer.php(131): webhook_trigger()
Jun 28 11:15:47 kaiju bc-server[1317]: #1 {main}
Jun 28 11:15:47 kaiju bc-server[1317]: thrown in /usr/share/bluecherry/www/lib/mailer.php on line 44
Jun 28 11:15:47 kaiju bc-server[1188]: E(3/sauron2): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 11:15:47 kaiju bc-server[1188]: E(2/sauron1): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 11:15:55 kaiju bc-server[1188]: E(2/sauron1): Substream started after failures
Jun 28 11:15:55 kaiju bc-server[1188]: W(2/sauron1): Likely timestamping error. Ignoring.
Jun 28 11:15:55 kaiju bc-server[1188]: E(3/sauron2): Substream started after failures
Jun 28 11:15:55 kaiju bc-server[1188]: W(3/sauron2): Likely timestamping error. Ignoring.
Jun 28 11:15:59 kaiju bc-server[1188]: E(3/sauron2): Last message repeated 4 times!
Jun 28 11:15:59 kaiju bc-server[1188]: E(3/sauron2): Stream started after failures
Jun 28 11:15:59 kaiju bc-server[1188]: I(3/sauron2): Stream started: Video: hevc (Main), yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 168:95], 1/90000(s) 1/15(c); Audio: aac (LC), 32000 Hz, mono, fltp
Jun 28 11:15:59 kaiju bc-server[1188]: I(3/sauron2): Switching to new recording schedule 'triggered'
Jun 28 11:15:59 kaiju bc-server[1188]: E(2/sauron1): Last message repeated 5 times!
Jun 28 11:15:59 kaiju bc-server[1188]: E(2/sauron1): Stream started after failures
Jun 28 11:15:59 kaiju bc-server[1188]: I(2/sauron1): Stream started: Video: hevc (Main), yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 168:95], 1/90000(s) 1/15(c); Audio: aac (LC), 32000 Hz, mono, fltp
Jun 28 11:15:59 kaiju bc-server[1188]: I(2/sauron1): Switching to new recording schedule 'triggered'
Jun 28 11:15:59 kaiju bc-server[2140]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 11:15:59 kaiju bc-server[2143]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 11:15:59 kaiju bc-server[2140]: PHP Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /usr/share/bluecherry/www/lib/mailer.php:44
Jun 28 11:15:59 kaiju bc-server[2140]: Stack trace:
Jun 28 11:15:59 kaiju bc-server[2140]: #0 /usr/share/bluecherry/www/lib/mailer.php(131): webhook_trigger()
Jun 28 11:15:59 kaiju bc-server[2140]: #1 {main}
Jun 28 11:15:59 kaiju bc-server[2140]: thrown in /usr/share/bluecherry/www/lib/mailer.php on line 44
Jun 28 11:15:59 kaiju bc-server[2143]: PHP Fatal error: Uncaught Error: Call to undefined function curl_multi_init() in /usr/share/bluecherry/www/lib/mailer.php:44
Jun 28 11:15:59 kaiju bc-server[2143]: Stack trace:
Jun 28 11:15:59 kaiju bc-server[2143]: #0 /usr/share/bluecherry/www/lib/mailer.php(131): webhook_trigger()
Jun 28 11:15:59 kaiju bc-server[2143]: #1 {main}
Jun 28 11:15:59 kaiju bc-server[2143]: thrown in /usr/share/bluecherry/www/lib/mailer.php on line 44
Jun 28 11:17:08 kaiju bc-server[1188]: I(): Last message repeated 3 times!
Jun 28 11:17:08 kaiju bc-server[1188]: I(): A new license request is accepted.
Jun 28 11:17:08 kaiju bc-server[1188]: I(): License isn't genuinely activated
Jun 28 11:17:08 kaiju bc-server[1188]: I(): A new license request is accepted.
Jun 28 11:17:08 kaiju bc-server[1188]: I(): License is trially activated
Jun 28 11:17:08 kaiju bc-server[1188]: I(): A new license request is accepted.
Jun 28 11:17:08 kaiju bc-server[1188]: I(): Trial days left: 28

PS: Any ideas why I might be getting the hardware acceleration failed message? I do see the /dev/dri/renderD128 device.

Can you see if the php curl package is installed?

dpkg -l |grep curl

Strangely enough php-curl wasn’t installed. When I installed Bluecherry, I remember facing a bit of a hiccup since I already had apache installed. I found that adding the ppa:ondrej/apache2 and ppa:ondrej/php repositories and upgrading packages resolved this issue. I don’t know if php-curl was somehow removed in this process. I believe the ppa:ondrej/php repository installed php v8.2 on my system. Not sure if this could be the source of any issues.

In any case, just installed php-curl, which has gotten rid of the error messages in the log, as you can see below. When I reboot my computer, the saved webhooks are successfully executed twice for some reason. But when I go to the Webhooks page and click Test, it fails to execute. Again, there is no mention of the successful or failed execution of the webhooks in the log.

Jun 28 13:18:50 kaiju bc-server[1194]: I(): Status reports are served at /tmp/bluecherry_status
Jun 28 13:18:50 kaiju bc-server[1194]: I(): Status reports are served at /tmp/bluecherry_trigger
Jun 28 13:18:50 kaiju bc-server[1194]: I(): Started bc-server 3.1.0 (toolchain 11.3.0) v2.7.6-733-g6e6e1d92 heads/master
Jun 28 13:18:50 kaiju bc-server[1194]: I(): API server started listen to port: 7005
Jun 28 13:18:50 kaiju bc-server[1194]: I(): HLS server started listen to port: 7003 (SSL=0)
Jun 28 13:18:50 kaiju bc-server[1194]: I(): SQL database connection opened
Jun 28 13:18:50 kaiju bc-server[1194]: W(): VAAPI device /dev/dri/renderD128 does not exist or is not readable to bluecherry, hardware acceleration is not available
Jun 28 13:18:52 kaiju bc-server[1194]: I(): Determined oldest media time: 2023/06/28 11-50-37
Jun 28 13:18:52 kaiju bc-server[1194]: I(): Initial media cleanup finished: removed(0), archived(0), errors(0), others(0)
Jun 28 13:18:52 kaiju bc-server[1194]: I(): v3license server started
Jun 28 13:18:53 kaiju bc-server[1194]: I(2/sauron1): Setting up device
Jun 28 13:18:53 kaiju bc-server[1194]: I(3/sauron2): Setting up device
Jun 28 13:18:53 kaiju bc-server[1194]: E(2/sauron1): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 13:18:53 kaiju bc-server[1194]: E(): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 13:18:53 kaiju bc-server[1194]: E(2/sauron1): Error starting substream:
Jun 28 13:18:53 kaiju bc-server[1194]: E(2/sauron1): Error starting device stream:
Jun 28 13:18:53 kaiju bc-server[1194]: E(3/sauron2): Error starting substream:
Jun 28 13:18:53 kaiju bc-server[1194]: E(3/sauron2): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 13:18:53 kaiju bc-server[1194]: E(3/sauron2): Error starting device stream:
Jun 28 13:18:53 kaiju bc-server[1331]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 13:18:53 kaiju bc-server[1330]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 13:18:53 kaiju bc-server[1331]: I: No matching rules
Jun 28 13:18:53 kaiju bc-server[1194]: E(3/sauron2): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 13:18:53 kaiju bc-server[1194]: E(2/sauron1): Failed to open stream. Error: -101 (Network is unreachable)
Jun 28 13:19:01 kaiju bc-server[1194]: E(2/sauron1): Substream started after failures
Jun 28 13:19:01 kaiju bc-server[1194]: W(2/sauron1): Likely timestamping error. Ignoring.
Jun 28 13:19:01 kaiju bc-server[1194]: E(3/sauron2): Substream started after failures
Jun 28 13:19:01 kaiju bc-server[1194]: W(3/sauron2): Likely timestamping error. Ignoring.
Jun 28 13:19:04 kaiju bc-server[1194]: E(2/sauron1): Last message repeated 5 times!
Jun 28 13:19:04 kaiju bc-server[1194]: E(2/sauron1): Stream started after failures
Jun 28 13:19:04 kaiju bc-server[1194]: I(2/sauron1): Stream started: Video: hevc (Main), yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 168:95], 1/90000(s) 1/15(c); Audio: aac (LC), 32000 Hz, mono, fltp
Jun 28 13:19:04 kaiju bc-server[1330]: I: No matching rules
Jun 28 13:19:04 kaiju bc-server[2141]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 13:19:04 kaiju bc-server[1194]: E(3/sauron2): Last message repeated 5 times!
Jun 28 13:19:04 kaiju bc-server[1194]: E(3/sauron2): Stream started after failures
Jun 28 13:19:04 kaiju bc-server[1194]: I(3/sauron2): Stream started: Video: hevc (Main), yuvj420p(pc), 2688x1520 [SAR 1:1 DAR 168:95], 1/90000(s) 1/15(c); Audio: aac (LC), 32000 Hz, mono, fltp
Jun 28 13:19:04 kaiju bc-server[2143]: PHP Warning: The magic method VarPub::__wakeup() must have public visibility in /usr/share/bluecherry/www/lib/VarPub.php on line 10
Jun 28 13:19:06 kaiju bc-server[2141]: I: No matching rules
Jun 28 13:20:36 kaiju bc-server[1194]: I(): Last message repeated 3 times!
Jun 28 13:20:36 kaiju bc-server[1194]: I(): A new license request is accepted.
Jun 28 13:20:36 kaiju bc-server[1194]: I(): License isn't genuinely activated
Jun 28 13:20:36 kaiju bc-server[1194]: I(): A new license request is accepted.
Jun 28 13:20:36 kaiju bc-server[1194]: I(): License is trially activated
Jun 28 13:20:36 kaiju bc-server[1194]: I(): A new license request is accepted.
Jun 28 13:20:36 kaiju bc-server[1194]: I(): Trial days left: 28

Hrm, we force php 7.4 ppa currently, I doubt that is the problem or the web ui would have complained loudly.

I’m also unable to click the test button on a clean install either.

For now, as a test, create the webhook you want, either with telegram or the webhook test site and make sure you select all options for notifications and the cameras.

Then disable one of the cameras…this will fire off a webhook saying a device was disabled…which is alot of work for a test but worth a shot….then after a few seconds enable the camera

Ah yes, that seems to work just fine. Seems to work with both “Motion Event” detection and “Device Status” updates. No idea what “Bluecherry analog capture card (solo)” means though.

Don’t know why I didn’t think it could be an issue with just the Test button :slight_smile:

That said, I noticed that Bluecherry stores a snapshot along with a video each time motion is detected. Is there any way this snapshot image could be sent via the Telegram webhook url? This would be very handy to quickly see what’s going on around the house each time motion is detected.

Yes, we can add that functionality.

1 Like

Great! Oddly enough, I can see in the storage directory, that snapshots are only being stored along with some videos recorded via motion detection; not all. Not sure why, and not sure if this might be an issue when implementing something like that.

Part of the enhancements mentioned here (Introducing Enhanced HEVC Support and Performance Upgrades for Seamless Video Streaming - Bluecherry announcements) will provide better snapshot support which should resolve the issue.

1 Like