Repository navigation
Weather Alerts
The node asks the National Weather Service (api.weather.gov) about your
counties every 10 minutes and posts each new alert to MeshCore's Public
channel, once. Everything here is set in config.toml in the node folder.
It's read when the bot starts, so restart after a change:
systemctl --user restart mesh-contingency.
Hilltop Node: Taylor, TX ALERT: Severe Thunderstorm Warning | until Tue 6:00PM | Taylor; Jones
| Part | What it is |
|---|---|
Hilltop Node: |
The node's radio name, added by MeshCore to every channel message. |
Taylor, TX |
The first of your counties the alert covers. |
Severe Thunderstorm Warning |
The NWS event. |
until Tue 6:00PM |
When it ends (or expires), in the node's time zone. |
Taylor; Jones |
The areas the NWS lists, cut short to fit. |
An alert covering several of your counties is posted once. When the NWS
issues an update (a warning extended, say), that's a new alert, and it's
posted too. What has been posted is kept in alerts.json, so a restart
doesn't repeat anything. Details ("moving east
at 30 mph") don't fit in a mesh message: they're at weather.gov.
[alerts]
counties = ["Taylor, TX", "Jones, TX"]
every_minutes = 10 # how often to check; at least 5- Each county is
"Name, ST".Taylor County, TXandtaylor txwork too; a Louisiana parish is"Orleans Parish, LA"or"Orleans, LA". - At startup the bot looks each one up and prints
Watching NWS alerts for 2 counties (Taylor, TX; Jones, TX) every 10 min to Public.A county it can't look up is logged asAuto alerts: couldn't look up the NWS code of Taylr, TX (...), and it tries again each round: check the spelling. - An empty list turns the alerts off (and
install.sh --checkstops on it). - The installer's first question writes this list. Change it here later.
With no filter, every alert for your counties is posted, advisories and statements included. To post fewer:
[alerts]
counties = ["Taylor, TX", "Jones, TX"]
severity = ["Extreme", "Severe"]
# events = ["Tornado Warning", "Severe Thunderstorm Warning", "Flash Flood Warning"]-
severityis the NWS's own level for each alert:Extreme,Severe,Moderate,MinororUnknown. Tornado and severe thunderstorm warnings are usually Severe or Extreme; most advisories are Moderate or Minor. -
eventsis a list of event names, in any case, as the NWS writes them (Winter Storm Warning,Heat Advisory, ...). - With both set, an alert must pass both.
- An alert that's filtered out is still remembered as seen, so loosening the filter later doesn't post old alerts.
- Each round that filters some out logs
Auto alerts: 2 new alert(s) not posted (filtered out by [alerts]).
A test message once a week, so people know the alerts get through:
[alert_test]
weekly = "Wednesday 17:00" # or "Wed 5:00PM"; leave out for none
timezone = "America/Chicago" # defaults to the computer's
# message = "TEST: this is a test of the weather alerts on this channel. No action needed."It posts the message, then the counties watched:
Hilltop Node: TEST: this is a test of the weather alerts on this channel. No action needed.
Hilltop Node: Counties watched for alerts: Taylor, Jones
- It stays at the same local time across daylight saving.
- If the bot isn't running at that time, that week's test is skipped.
- An admin can post it any time with
testalert. - The message must fit in one channel message with the node's name. One that's too long stops the bot at startup, saying how much room there is.
Everything goes to MeshCore's Public channel unless you pick another:
[alerts]
channel = "#wx-test" # or "Public", the default- Public: every MeshCore radio starts with it, and every one has the same key, so anyone in range reads what the node posts there.
-
A hashtag channel such as
#wx-test(the#is optional) is for trying the node out, or for a group that wants its own. Its key comes from its name, so anyone who joins a channel of that name in the MeshCore app reads it. Join it on your own radio to see the posts. - The bot finds the channel by its key, in whatever slot it's in. A hashtag
channel the node's radio doesn't have is added to its first empty slot
(the log says
Added the #wx-test channel to the radio (slot 3).). Public is never added or changed. - The alerts,
alert,testalertand the weekly test all use it, and the log names it:Alerts go to the #wx-test channel (slot 3). - If the node's radio has no Public channel (when that's the one picked),
or no free slot for a hashtag channel, nothing is posted: the bot warns at
startup,
alertandtestalertsay so, andinstall.sh --checkstops.
