Author Topic: Kanfei -- Yet Another Weather App  (Read 1790 times)

0 Members and 1 Guest are viewing this topic.

Offline ku4dd

  • Member
  • *
  • Posts: 13
Kanfei -- Yet Another Weather App
« on: March 24, 2026, 05:14:11 PM »
Hi all,

Looking for hardware testers for an open-source PWS dashboard project I've been building.

Kanfei is a self-hosted weather station platform — browser dashboard, SQLite logging, historical charts, and spray advisory. The core platform is beta, but several hardware drivers need real-world validation from people who own the equipment.

(AI-powered hyper-local nowcasting is in separate development as an optional add-on and isn't available yet.)

Drivers currently needing testers:

- Davis Vantage Pro/Pro2/Vue (serial/USB)
- Ecowitt / Fine Offset (GW1000, GW1100, GW1200, GW2000, HP consoles, branded variants)
- WeatherFlow Tempest
- Ambient Weather WS-2902 / WS-5000
- Davis WeatherLink Live
- Davis WeatherLink IP

Each issue has a test plan. Requires Python 3.10+ and Node.js 18+. If you don't have hardware handy, degraded mode lets you explore the full UI with placeholder values.

Repo and README

Wiki

If you are in Ag, I could really use some testing of the Spray Advisor feature.

As with everything OSS, coding contributions are welcome.

Happy to answer questions here or in the GitHub issues.

Chris
ku4dd

Offline zoomx

  • Forecaster
  • *****
  • Posts: 365
Re: Kanfei -- Yet Another Weather App
« Reply #1 on: March 25, 2026, 10:12:12 AM »
KANFEI_ELEVATION_FT=33
it mean that internally it uses imperial units?

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #2 on: March 25, 2026, 12:10:48 PM »
Good catch. The reality is that the only hardware I have on hand is (very) old Davis hardware. Good stuff, but the native units are Imperial.

Working on the fix now, and it should be up by the end of today.

https://github.com/cnighswonger/kanfei/issues/37

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #3 on: March 25, 2026, 04:03:52 PM »
KANFEI_ELEVATION_FT=33
it mean that internally it uses imperial units?

The entire pipe now uses SI as base units. Individual PWS unit conversion happens in the driver stack.

The main repo has this and other fixes, etc. available now, and we rolled a fresh Beta 4 .deb.

We aim to iterate pretty quickly. I can't always promise same-day fixes, etc., but we'll do our best.

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #4 on: March 26, 2026, 11:53:44 AM »
We added support for installing as a service on Windows.

Any testing reports would be greatly appreciated.

https://github.com/cnighswonger/kanfei/wiki/Installation-and-Deployment

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #5 on: March 27, 2026, 01:03:58 PM »
We have added support for Telegram bots.

Discord bots are next.

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #6 on: March 27, 2026, 04:30:26 PM »
Beta 5 is up and includes Bot support for Telegram and Discord.

https://github.com/cnighswonger/kanfei/releases/tag/v0.1.0-beta5


Chris
ku4dd

Offline iccb

  • Member
  • *
  • Posts: 28
    • Säätilanne Eurassa
Re: Kanfei -- Yet Another Weather App
« Reply #7 on: March 28, 2026, 07:32:35 AM »
Can you share some screenshots?

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #8 on: March 28, 2026, 07:43:55 AM »
Can you share some screenshots?

I'll get some posted shortly.

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #9 on: March 28, 2026, 04:26:15 PM »
Can you share some screenshots?

https://github.com/cnighswonger/kanfei/wiki/Screenshots

And Beta 6 is up:

https://github.com/cnighswonger/kanfei/releases/tag/v0.1.0-beta6

This iteration addresses most security issues. We're trying to keep this at a balance of security and ease of setup. So if you decide to run it in some public-facing setting you will need to run a reverse proxy of some sort.

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #10 on: March 30, 2026, 09:57:18 PM »
Beta 7 fixes some humidity gauge issues:

https://github.com/cnighswonger/kanfei/releases/tag/v0.1.0-beta7

Chris
ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #11 on: April 02, 2026, 04:26:35 PM »
Beta 8:

https://github.com/cnighswonger/kanfei/releases/tag/v0.1.0-beta8

This release includes one security fix and the initial work on a map feature. Note that the isobars on the map are ground level based on hyper-local station data.

Chris
ku4dd

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2158
    • Weather at Eau Claire, WI
Re: Kanfei -- Yet Another Weather App
« Reply #12 on: April 02, 2026, 04:57:07 PM »
Is there one online we can see the display?
I was at github and there wasn't anything obvious....
ECWx.info
&
ECWx.info/t/index.php

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #13 on: April 02, 2026, 06:15:43 PM »
Is there one online we can see the display?
I was at github and there wasn't anything obvious....

Thanks for the reminder.  :grin:

The wiki has been updated and Map View screenshots added here:

https://github.com/cnighswonger/kanfei/wiki/Screenshots#map-view

Chris
ku4dd

Offline DaleReid

  • Forecaster
  • *****
  • Posts: 2158
    • Weather at Eau Claire, WI
Re: Kanfei -- Yet Another Weather App
« Reply #14 on: April 02, 2026, 09:08:22 PM »
Thanks so much.

Looks interesting.  Will study a bit more when I get caught up.  It looks very nice and I'm sure a LOT of work!
ECWx.info
&
ECWx.info/t/index.php

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #15 on: April 13, 2026, 07:23:21 PM »
  Beta 11 is up

  Beta 11

  Custom Theme Editor & Wind Rose

  New features

 
  • Custom theme editorSettings > Display > Theme > Custom. Color pickers for 28 properties across General, Accent &
      Status, Borders, Gauges, Temperature, and Layout groups, each with a usage hint. Font stack inputs. Gauge style sliders. Live preview,
      persisted per-user.
     
  • Wind rose display mode — dashboard edit mode toggle on the wind tile switches between Compass (live direction/speed) and
      Rose (3-hour polar histogram binned by speed). Rose filters calm readings to avoid stuck-direction artifacts and auto-refreshes
      every 60s.
     
UX improvements

 
  • Timezone moved from Display into Units (more natural grouping)
  • Flip tile backs are always opaque (no more transparency bleed-through)

  Chris
  ku4dd

Offline ku4dd

  • Member
  • *
  • Posts: 13
Re: Kanfei -- Yet Another Weather App
« Reply #16 on: May 27, 2026, 08:24:22 PM »
Kanfei — what's new since beta11

A roundup of changes between v0.1.0~beta11 (13 Apr) and v0.1.0~beta21 (27 May). Roughly six weeks of work; grouped by category instead of by release.

Get some here: https://github.com/cnighswonger/kanfei



New features

  • Per-channel sensor mute. Take an individual sensor out of service (during repair, miscalibration, etc.) without dropping the whole station from your public feeds. Nine channels are individually toggleable (outdoor temp + humidity, wind speed
     / direction / gust, barometer, daily / hourly / 24h rain). Muted sensors are dropped from every outbound upload — CWOP, Weather Underground, and the derived values computed from them (wind chill, heat index, dew point) so a known-bad reading
    can't leak through the back door. Muted CWOP fields go out as the APRS-101 "missing value" sentinel so aggregators ignore them. A banner on every dashboard page reminds the logged-in operator which channels are currently muted so the suppression is
    never forgotten; the mute state is auth-gated, so anonymous viewers don't see maintenance state.

  • Peak-time timestamps on daily extremes. Each daily-extreme tile now shows when today's high or low was first reached. Wind tile gains "at HH:MM" under Peak; Temperature, Humidity, and Barometer tiles show H 2:45 PM · L 6:42 AM-style
    timestamps below the H/L values. Mobile compact layout unchanged.

  • Wind history overhaul. New dual-panel chart with direction scatter on top and speed/gust columns on the bottom; combined "Wind History" entry in the History page sensor dropdown. Wind tile's flip-back now shows 4h of wind history instead of
    a 1h sparkline. Wind gust is persisted to the database across every station protocol (not just Davis).

  • Wind tile display mode toggle. Compass or Rose. Rose is a 3-hour polar histogram of direction × speed that filters calm readings and refreshes every 60 seconds.

  • Custom theme editor. Full color, font, and gauge controls under Settings → Display → Theme → Custom. Theme-aware colors propagated through gauges, charts, header forecast icons, and nowcast alerts, so a theme switch updates the whole UI
    rather than just the chrome.

  • Accessibility + polish. aria-labels added across setup wizard, Settings selects, and theme editor; schema-level validation of numeric Telegram / Discord chat IDs; improved contrast on the dashboard edit-pencil button; opaque flip-tile backs
    (no transparency bleed-through).


Bug fixes

  • "Yesterday" rain tile has actually been working since when? Spoiler: never. The midnight rollover task that captures the prior day's rain total has been silently dead on every Kanfei install since v0.1.0 — it raised AttributeError on its
    first loop iteration and asyncio swallowed the exception into the task's exception state with no log line, no daemon restart, no anything visible. Now re-enabled, with hardware-clear-before-persist ordering so a failed clear leaves yesterday untouched
     rather than double-counting on retry. Davis stations with non-default rain_cal now record correct values too. Non-Davis drivers still lack yesterday rollover (tracked separately) but no longer spam misleading "station not connected" warnings
    at midnight.

  • Legacy Davis archive-period readings are correct for the first time. Affects Weather Monitor / Wizard / Perception / GroWeather / Energy / Health. A memory-map register was declared at the wrong link bank since the start, so every read of
    the station's archive-period register returned a different garbage byte from an unrelated sensor field. Symptoms: impossible archive-period values shown in Settings (e.g. 68 or 102 minutes), off-looking history-chart resolution, and the daemon pushing
     bogus values back to hardware on every restart. A one-shot migration on the first connect after upgrade rewrites the canonical archive-period to the correct freshly-read value AND fixes every historical archive_records row tagged with a bogus
    interval — no manual steps required. Vantage Pro / Pro 2 are on a separate driver and were never affected.

  • Davis barometer calibration sign was inverted. The legacy BAR_CAL register stores values with subtract-from-raw semantics, but the UI exposed that raw sign 1:1 — so a user entering "+456 thousandths inHg" actually got "−0.456 inHg" applied
    to their reading. Now negated at the I/O boundary so the UI, the canonical config row, and apply_calibration all use the user-facing "add to reading" sign. A one-time migration flips any existing pre-fix calibration entry on first connect so working
    calibrations carry through the upgrade cleanly.

  • Rain accumulator unit conversion now uses rain_cal. Previous code happened to produce correct mm only when rain_cal=254; every other setting (including the Davis default of 100) under-reported daily and yearly rainfall by a factor of
    254/rain_cal — about 2.54× too low at default. A one-time tool (tools/migrate_rain_unit_fix.py) corrects historical rain_total and rain_yearly rows for rain_cal=100 users. Idempotent, dry-run aware, creates a
    .pre-rain-fix-migration backup, skips automatically when rain_cal=254 (data already correct), refuses unusual values without an explicit --force-rain-cal N confirmation. Operator opts in manually.

  • Archive backfill now reaches the history chart. Previously async_sync_archive wrote recovered records only to archive_records, which charts, extremes, and uploaders don't read — so a reconnect that pulled hours of missed data
    left no visible trace. A new bridge projects each archive record into sensor_readings at the same timestamp, converting Davis-native units to SI tenths and recomputing dew point, wind chill, heat index, feels-like, and theta-e the same way the
    live poller does. Invalid Davis sentinels (-32768/32767 temps, 0/0xFFFF baro, 0xFF wind, 0x80/0xFF humidity, ≥0xFFF solar) are stripped before conversion. Dedupe is archive-interval-aligned, so a live sample inside the covered period correctly
    suppresses the bridge insert without bleeding across the next interval boundary.

  • Force Archive button now syncs the new record. Previously it triggered the link to write a record into its onboard memory but never pulled that record into the database — the new entry sat stranded in SRAM. The button now syncs and reports
    the synced record count in the confirmation.

  • WeatherLink settings drift detection and self-healing. archive_period, sample_period, and calibration are now anchored in a canonical config row. The daemon reconciles the link's actual registers against that row on every
    connect, force-writing on drift and logging the correction. Every successful write reads back the register to confirm persistence — an ACK without a matching readback is reported as failed rather than silently trusted. Settings page's Save handler
    stops sending diff-only payloads, so a Save click can now repair a drift even when the form values appear unchanged.

  • Settings → WeatherLink form gates on live load. Inputs and the Save button are disabled until live values land from the daemon. Previously the placeholder defaults (archive_period=30, sample_period=60, all-zero calibration) displayed
    indistinguishably from real saved values during the serial-I/O latency window — and a user typing corrections against those placeholders and clicking Save could overwrite their actual settings. Load-failure case (daemon down or link disconnected) is
    now distinguished from "still loading" and surfaces a retry link rather than silently locking the section forever.

  • 3D pressure-field surface now smooth on .deb installs. The smooth-surface code path needs SciPy (cubic Clough-Tocher interpolation + Gaussian blur). SciPy was previously declared only in an optional dependency group that the .deb postinst
    doesn't install, so every .deb-installed Kanfei silently fell back to a bumpier IDW grid. SciPy is now in the main runtime dependencies; the postinst's existing pip-install step picks it up on first install or upgrade. Adds ~30MB to the venv install
    size.

  • Backup restore now actually replaces the live database. Restoring a backup taken on an install whose DB file was named anything other than kanfei.db (notably the legacy weather.db convention from Windows dev-checkout installs)
    would silently write to that source-named path instead of the live kanfei.db — leaving the live install untouched and your restored data orphaned on disk while the UI cheerfully reported success. Now derives the destination from
    KANFEI_DB_PATH directly and logs the rename when source and target filenames differ. The CLI station.py restore picks up the same fix, including correct behavior when restoring against a not-yet-existent destination on a fresh install.


Routine frontend dependency bumps (React, Three.js, Vite, Highcharts, ESLint v9 → v10, react-router-dom, typescript-eslint, @types/node, etc.) landed throughout the range alongside the feature work. Test infrastructure was also hardened — the suite
 now unconditionally redirects
KANFEI_DB_PATH to a per-process temp file before any app.* import, eliminating the risk of accidentally wiping an operator's real database by running pytest in the wrong shell.

 

sister-integration
sister-integration
sister-integration
sister-integration