I’ve been trying to setup a script for netwatch that will send a notification through pushover when a host is down/up. Since I’m using a KNOT (using ATT nb-iot), I’ve noticed that the connection for fetch will often time out before the modem has had time to establish connection, etc, so I’ve been trying to build a script to work around this and retry the connection.
What I’ve noticed though, is that if I run fetch via the CLI directly with my parameters, it will run the request and I’ll get a notification. However, if I put the same code in a script, and then run the script from the CLI, returns with an HTTP 400 bad request.
Tried on ROS 6.48.3 as well as 6.49.2
Working from CLI:
/tool fetch http-method=post mode=https url="https://api.pushover.net/1/messages.json" http-data="?token=myToken&user=myUser&title=myTitle&message=myMessage&priority=1"
Not working from script:
:do {
/tool fetch http-method=post mode=https url="https://api.pushover.net/1/messages.json" http-data="?token=myToken&user=myUser&title=myTitle&message=myMessage&priority=1"
}
I’ve tried setting the url and the http data in variables, as well as a couple other things over the last couple days, but this one has me stumped.
It would be awesome if fetch had a timeout to deal with the cellular delay for connections like NB-IOT on the KNOT ![]()