The issue when I add the "Event-triggered Http Request API." - 事件Http Request通知沒有觸發
Answered問題如下,英文在前中文在後
I would like to ask if anyone has encountered a similar issue. I have added the "Camera Disconnection" and "Motion Detection" events. When these events occur, an Http Request is sent to a specified URL.
The settings and parameters can be referred to in the attached image.

Content-type : Auto
Authen : Auto
Method : Auto
However, when these events occur, the specified URL does not receive any event notifications. I have also tested that posting to the specified URL works correctly from the same computer. Is there a need for additional configuration, or could there be a mistake in my settings?
In addition to this, I have also configured desktop event notifications, and these notifications are functioning properly.
I would greatly appreciate it if those who have encountered a similar issue could provide some insight. Thank you.
------------------------
想請教一下大家是否有碰到類似的問題
我新增了「攝影機斷線」 以及「位移偵測」的事件,並且當事件發生時發送Http Request 到指定的網址,設置及參數可以參考附圖 
但是當事件發生時,指定網址並沒有收到任何的事件通知
我也有測試過在同一台電腦可以正常Post 到指定的網址
是否需要進行額外的設定或是我內容有設置錯誤呢?
除此之外我有同時設定桌面事件提示,但桌面事件有正常提示..
再麻煩各位如果有碰到類似問題的幫我解答一下
感謝
Nx Version: 5.1.0.37133
-
Hi Kevin Lai,
Have you ever collected the Wireshark packet on the target host and checked whether any request was sent from Nx?
You may try with the particular HTTP method, and check whether the authentication is required for the request.Thank you.
0 -
Hi Wendy Chuang
Thank you very much for your response. Sorry for the delayed reply.
I tried to collect data with Wireshark, but I didn't receive any data from NX. After trying several times, I realized that the issue was due to using the same server. So, I changed to another server to receive the request.
The new issue is that I received a request, but it didn't contain the correct content.
Here is what I received:

Shouldn't it change
{event.source}to the actual data? Why is it being sent as a string?Do you have any ideas about this?
Best regards,
Kevin0 -
Hi Kevin Lai,
From your original description, the HTTP request should be sent when a "Motion detection" or "Camera offline" event is triggered. Unfortunately, the placeholder only supports the Analytic event and Generic event. Please refer to the section Event Rules > Event Field Placeholders from the user manual:

Thank you.0 -
Hi Wendy Chuang
First of all, thank you for your answer.
I also have a couple of related questions to further inquire:
-
When handling Generic events, is it possible to obtain the CameraID from the source?
Because it's possible to receive Generic events from third parties, but I need to handle them by referencing the CameraID. -
If I wish to receive relevant notifications when the camera goes offline or detects object movement, and also identify which camera triggered the event, is there a way to achieve or detect this?
Thank you again for your assistance.
0 -
-
Hi Kevin Lai,
I'm sorry for missing your questions.
Based on your event criteria, you couldn't obtain the cameraID from any placeholder from the generic event at the moment. The only way is to create a rule for each camera separately and put the static cameraID in the content of the HTTP request.Please let me know if you have any questions still. Thank you :-)
0
Post is closed for comments.
Comments
5 comments