Solved: NOAA Weather Data
Hey everybody,
My RainMachine stopped accessing NOAA data a long time ago. (Probably years ago.)
If you run Docker at home, have ssh enabled on your RainMachine, and have access to a competent LLM, ask it something like this:
My RainMachine (IP: <RAINMACHINE_IP>, Web Pwd: <PASSWORD>) can no longer fetch weather.
The root cause is that its embedded Python 2.7 only speaks TLS 1.0 (no SNI), which modern
weather APIs reject. Updating CA certs will not work.Please fix this via a LAN HTTP reverse proxy shim for NOAA:
1. SSH Access:
- Password auth is disabled; OpenSSH 5.9 on the controller requires a 4096-bit RSA key (Ed25519 is not
supported).
- Get an access token via `POST https://<RAINMACHINE_IP>:8080/api/4/auth/login` (body: `{"pwd": "<PASSWORD>",
"remember": 1}`).
- Upload the RSA public key via `POST https://<RAINMACHINE_IP>:8080/api/4/dev/import/sshkey`.
- Connect using `ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa root@<RAINMACHINE_IP>`.2. Controller DNS:
- On the controller, ensure DNS points to my LAN resolver (`<DNS_IP>`) using `ndc resolver setifdns wlan0
<DOMAIN> <DNS_IP>`, `/system/etc/resolv.conf`, and `net.dns1` in `/system/build.prop`.3. Deploy NOAA Proxy Shim (on a LAN Docker/Linux host):
- Stand up an Nginx container proxying HTTP requests to `https://api.weather.gov` with `proxy_ssl_server_name
on;` and NOAA `User-Agent: (rainmachine.com, tech@rainmachine.com)`.
- Use Nginx `sub_filter` to rewrite `https://api.weather.gov` to the proxy's address in JSON responses.4. Point RainMachine to Proxy:
- Disable failing METNO via API: `POST /api/4/parser/2/activate` (`{"activate": false}`).
- On the controller, edit `/system/rainmachine-app/RMParserFramework/parsers/noaa-parser.py` to set `baseUrl =
'http://<PROXY_IP_OR_HOST>:<PORT>'` and ensure `__openURL` routes through `baseUrl`.
- Enable NOAA (`POST /api/4/parser/7/activate`) and run `POST /api/4/parser/run` to verify weather ingestion.
Happy trails!
P.S. Dear RainMachine, if you all regroup and launch a new product, I'd be happy to buy one. You did me right. I've experienced years of reliable use. I greatly appreciate your use of Linux, ssh, python, et al!
Please sign in to leave a comment.
Comments
0 comments