You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I want to say this project is fantastic so thank you to anyone who has contributed especially cuppa-joe. I have setup an SDR on my RPi3 using multimon and dsame exactly as described in these examples. I am getting all EAS alerts and decoding them with dsame properly. However, I am trying to call an alert.sh script that will then POST the alert data to my server so I can trigger follow on actions. The script gets called correctly and the POST happens correctly but the parameters are empty. Here are a few more details.
The command I run is:
python dsame.py --source rtl_source.sh --call alert.sh --command "{event}" "{EEE}" "{MESSAGE}"
The contents of rtl_srouce.sh are the exact same as the rtl source file in this repo, with one slight adjustment (the frequency in my area is 162.550M instead of 162.500M).
The contents of alert.sh are as follows:
#!/bin/bash
curl -X POST --header "Content-Type: application/json" --data-binary "{"event":"$EVENT","code":"$CODE","msg":"$MSG"}" $URL
As yo can see, I am just trying to read in the 3 parameters and curl to a local service (for now).
What I see when I run this is the proper alert text printed to stdout as well as the following object:
{"event":"","code":"","msg":""}
Naturally, that same object is what gets POSTed to my API service.
Am I missing something obvious to get the parameters to be passed into alert.sh?
Thank you!
Jason
The text was updated successfully, but these errors were encountered:
Hi Everyone!
First off, I want to say this project is fantastic so thank you to anyone who has contributed especially cuppa-joe. I have setup an SDR on my RPi3 using multimon and dsame exactly as described in these examples. I am getting all EAS alerts and decoding them with dsame properly. However, I am trying to call an alert.sh script that will then POST the alert data to my server so I can trigger follow on actions. The script gets called correctly and the POST happens correctly but the parameters are empty. Here are a few more details.
The command I run is:
python dsame.py --source rtl_source.sh --call alert.sh --command "{event}" "{EEE}" "{MESSAGE}"
The contents of rtl_srouce.sh are the exact same as the rtl source file in this repo, with one slight adjustment (the frequency in my area is 162.550M instead of 162.500M).
The contents of alert.sh are as follows:
#!/bin/bash
URL=localhost:1880/v1/weather/alert
EVENT=$1
CODE=$2
MSG=$3
curl -X POST --header "Content-Type: application/json" --data-binary "{"event":"$EVENT","code":"$CODE","msg":"$MSG"}" $URL
As yo can see, I am just trying to read in the 3 parameters and curl to a local service (for now).
What I see when I run this is the proper alert text printed to stdout as well as the following object:
{"event":"","code":"","msg":""}
Naturally, that same object is what gets POSTed to my API service.
Am I missing something obvious to get the parameters to be passed into alert.sh?
Thank you!
Jason
The text was updated successfully, but these errors were encountered: