Read the statement by Michael Teeuw here.
Receive a HTTP request and subsequently wake up display and display alert/notification
-
@MMRIZE All I have is this:
https://www.doorbird.com/downloads/manual_d10x_en_de.pdf
It works when I include the notification in the URL like this:
http://MMIP:8090/remote?action=NOTIFICATION¬ification=SOMEONE_AT_THE_DOOR
That is sweet. Now I need to exec a shell script also.
-
Also, do you know the syntax for executing a shell script in MMM-NotificationTrigger?
I though it would be like this:
{ module: "MMM-NotificationTrigger", config: { useWebhook: true, triggers: [ { trigger: "SOMEONE_AT_THE_DOOR", fires: [ { fire: "SHOW_ALERT", exec: "home/Kragh/monitor_on.sh", payload: { title: "PORTEN", message: "Der er nogen ved porten!", timer: "10000", } } ] } ] } }
monitor_on.sh is set as executionable.
-
@MilkShake said in Receive a HTTP request and subsequently wake up display and display alert/notification:
It works when I include the notification in the URL like this:
http://MMIP:8090/remote?action=NOTIFICATION¬ification=SOMEONE_AT_THE_DOOR
Simply, you can use this.
http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
That is the
GET
method.for the shellscript, your trial seems right, but you should take care for the path and the permission.
I think this would be right. (It depends on your environment)exec: "bash /home/Kragh/monitor_on.sh", // OR exec: ". /home/Kragh/monitor_on.sh",
-
Oh well, succeded in turning the display on as well:
{ module: "MMM-NotificationTrigger", config: { useWebhook: true, triggers: [ { trigger: "SOMEONE_AT_THE_DOOR", fires: [ { fire: "SHOW_ALERT", exec: "vcgencmd display_power 1", payload: { title: "PORTEN", message: "Der er nogen ved porten!", timer: "20000", } } ] } ] } },
Last thing to do is to also play the doorbell. I need to configure the speaker on the rasp4 first.
-
@MMRIZE said in Receive a HTTP request and subsequently wake up display and display alert/notification:
@MilkShake said in Receive a HTTP request and subsequently wake up display and display alert/notification:
It works when I include the notification in the URL like this:
http://MMIP:8090/remote?action=NOTIFICATION¬ification=SOMEONE_AT_THE_DOOR
Simply, you can use this.
http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
That is the
GET
method.for the shellscript, your trial seems right, but you should take care for the path and the permission.
I think this would be right. (It depends on your environment)exec: "bash /home/Kragh/monitor_on.sh", // OR exec: ". /home/Kragh/monitor_on.sh",
Well, I got it working, sort off.
I cannot get http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR to work. It returns a 200:OK but nothing is displayed.
I have to use http://MMIP:8090/remote?action=NOTIFICATION¬ification=SOMEONE_AT_THE_DOOR for it to work.
-
@MilkShake said in Receive a HTTP request and subsequently wake up display and display alert/notification:
I cannot get
http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR
to work. It returns a 200:OK but nothing is displayed.http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
read carefully.
-
@MMRIZE said in Receive a HTTP request and subsequently wake up display and display alert/notification:
@MilkShake said in Receive a HTTP request and subsequently wake up display and display alert/notification:
I cannot get
http://192.168.1.100:8090/webhook?action=notification=SOMEONE_AT_THE_DOOR
to work. It returns a 200:OK but nothing is displayed.http://MMIP:8090/webhook?notification=SOMEONE_AT_THE_DOOR
read carefully.
You are absolutely correct. Thanks for pointing it out.
-