May 29, 2020 at 15:44 #850
Hey, I am struggling a bit with something that should be really straightforward:
1. My IoT devices are successfully connecting to LTE and sending data to the Telenor Connexion Managed IoT Cloud
2. Now I need to send the data from MIC to my web-server
3. A Webhook seems to be the way to go, but I can’t really get this to work and there is little if any debugging available in MIC.
Is there an example available of how to configure the Webhook in the “Pick Action” section?
Thanks in advance.May 29, 2020 at 15:57 #851
I have successfully written a rule that sends an email when a certain condition is met, so I know that the basic rule works and that the condition is triggered. However I do not want an email every few minutes 🙂 I would like to trigger a POST or GET to a third party server.May 29, 2020 at 16:10 #852PontusKeymaster
Rulas are the way to do it in MIC.
If you want every message to be forwarded you could create a condition that will always be true, e.g. that the timestamp must be above 0.
You should have an action option called “Webhook” (instead of Email), here you can choose your server and HTTP method.
If you expand the “Help” tab you get information about how to include values in your message, if you do not choose to include just the event data.
-PontusMay 30, 2020 at 15:45 #853
Thanks, this is indeed what I am doing. I have a rule that ALWAYS is true, and I am trying to use the Webhook in order to do GET request to another server.
This is what I was trying:
1. I have a URL for a third party server which contains key/value pairs just like any standard GET request
2. I choose GET from the pulldown menu (the choices are as expected GET / PUT / DELETE / POST)
3. I leave Response Path and Message blank
4. I leave Authorization header value blank
However when I click UPDATE to save this Action, I get an error message:
“Error when validating attributes for WebhookRuleAction – undefined. “body” is required”
Problem 1. An HTTP GET method does not need a body, in fact the relevant RFC seems to say it should not have a body at all. So this requirement for a body for the GET request seems incorrect?
Problem 2. The “Pick Action” form does not have an entry for BODY. I am guessing that the “Message” field is supposed to be used for the BODY?
Any help would be appreciated. An actual working example of a webhook rule even more so!
June 5, 2020 at 15:36 #857PontusKeymaster
- This reply was modified 5 months, 3 weeks ago by hakondahle.
Thanks for the input.
Yes you are correct that the body should not be required when using GET method. The error message is also not aligned with the GUI, the “Message”-field is what becomes the HTTP body.
I’ll follow up on this, but you can try for now just to set a value into the “Message” field.
You must be logged in to reply to this topic.