| 开发者 | xylaender |
|---|---|
| 更新时间 | 2026年9月12日 18:18 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[naws_live] – Live sensor tiles with 24h trend charts and forecast[naws_current] – Current readings of one or all modules as tiles or a list (module_id, parameters, layout, title)[naws_infobar] – Astronomy bar with sunrise, moon phase, felt temperature[naws_value] – Single inline sensor value[naws_calc] – Single computed value (dew point, felt temperature, sunrise, moon phase, …); full list on the Shortcodes page in the backend[naws_history] – Year-over-year comparison charts (supports year parameter)[naws_heatmap] – One year of outdoor daily average temperature as a calendar grid, one tile per day, with a year selector (year, title, legend)[naws_records] – Fifteen records from the daily summary with their dates, as tiles or a table (year, records, layout, title)[naws_on_this_day] – This calendar day in every earlier year, with the day's records marked (date, title)[naws_sunpath] – The sun on its arc over the station, with sunrise, solar noon, sunset and the day length (title)[naws_windrose] – Where the wind comes from and how hard, as a rose of 16 or 8 directions stacked by Beaufort class, with a period switcher (period, from, to, measure, sectors, show, switcher, size, title)[naws_forecast] – Multi-day weather forecast[naws_table] – Readings as a table over a period, grouped by hour, day, week, month or year (module_id, parameters, period, limit, group_by, title)[naws_weather_widget] – Compact forecast widget for a sidebar (days 3 or 5, width 250–500, scheme light, dark or transparent)[naws_weather_icon] – Just the animated icon for the current weather state (size); renders nothing when the state is unknownxtx-integration-for-netatmo folder to /wp-content/plugins/https://yoursite.com/wp-admin/admin.php?page=naws-settingsVisit dev.netatmo.com, log in with your Netatmo account, create a new application and copy the Client ID and Client Secret.
Netatmo sensors transmit every 5 minutes. The plugin sync interval is configurable (5–1440 minutes). Night mode reduces polling between 23:00–06:00.
Yes. The plugin includes a chunk-based historical importer that fetches data from the Netatmo getmeasure API without hitting rate limits.
Yes. Every endpoint is read-only, rate-limited, and requires an API key generated in the admin panel. The key is accepted in the X-NAWS-Key header only — never as a query parameter, so it cannot end up in access logs, the Referer header, browser history or a proxy along the way.
All sensitive data (OAuth tokens, client ID, client secret, API keys) is encrypted with AES-256-GCM before being stored in the database.
Yes. The Appearance page offers 130+ configurable colors with live preview, 4 icon sets, per-sensor colors, chart theming and year comparison palettes.
Yes. The Export/Import feature lets you download weather data, module configs and all settings as JSON. Ideal for migrating to a new WordPress installation.
Open-Meteo (global, default) and Yr.no / MET Norway (optimized for Northern Europe). Both are free and require no API key.
Open XTX Netatmo → Notifications and press "Send test mail". If the page reports that the mail could not be sent, your server sends no mail at all: an SMTP plugin or your hosting provider fixes that, not the plugin. If the test mail arrives but no notifications do, check that the master switch and the rule are switched on and look at the log on the same page. Notifications go out only when a state changes; a battery that has been low since before you switched the rule on is reported at the next fetch, not again afterwards.
naws_sync_failed( $message, $consecutive_errors ) fires wherever a fetch fails; naws_data_synced( $readings ) existed before and is documented now.[naws_records] and [naws_on_this_day] stayed empty on an installation whose daily summary table carried a different collation than the modules table. The three big queries compared module_id across two tables; MySQL refuses that as soon as the collations differ, the query failed, and the plugin returned nothing without a word. The active modules now go into every query as an id list from PHP, so no comparison crosses a table any more — [naws_live], [naws_infobar] and the history are read the same way.records="…" is skipped with a note instead of emptying the whole block.value="dewpoint") reach the shortcode as intended; they used to arrive as quotdewpointquot and fall back to --. All fifteen shortcodes decode them first.color-scheme: only light now, which takes exactly them out of that and leaves the page alone.[naws_windrose] — where the wind comes from, how often, and how hard: one ray per compass direction (16 or 8), its length the share of readings from there, stacked by Beaufort class from the centre outwards, calm in the hub. Below it the main directions, mean, peak and calm share, a legend, and a table for screen readers. Built from the raw ten-minute readings with one grouped query per period, cached as a transient. period (7d, 30d, 90d, year, all), from/to for a fixed range, measure (wind, gust, both), sectors, show, switcher, size, title. Every period of the switcher is rendered on the server; the script only swaps panels and dresses the tooltips. Seven colours on a new Appearance tab.[naws_live] shows the day's strongest gust as a third value, in the configured wind unit, and the gauge gets a third, red needle for it.[naws_live] and [naws_forecast] showed a German visitor "ESE" where "OSO" belongs; the sixteen codes go through gettext now, in German and Norwegian.[naws_records] — fifteen records from the daily summary, each with its date: hottest day, coldest night, warmest night, coldest day, largest daily range, warmest and coldest month, wettest day and month, longest dry and wet spell, strongest gust, longest frost period, longest heat wave and longest run of summer days. As tiles or a table, since the first day with readings or for one year (year="2025"), a subset with records="…". A tie goes to the earlier date, a month needs twenty days to compete, and a gap in the data breaks a run rather than bridging it.[naws_on_this_day] — this calendar day in every earlier year: low, high, mean and rain, newest year first, with the day's record marked in each column. The running year is left out.[naws_sunpath] — the sun on its arc over the station as an inline SVG: sunrise, solar noon and sunset, the part of the day already travelled, and the sun where it stands; at night below the horizon. Under it the day length, the change since yesterday and the year's longest and shortest day at the station's latitude. No script — a page cache shows the sun where it stood when the cache was filled.[naws_weather_widget] was a white card whatever the sidebar looked like. It now has light, dark and transparent — the last draws no card at all and takes the sidebar's own colours. Chosen under Appearance → Sidebar widget, where the preview shows it on a dark ground, or per placement with scheme="dark".admin.js stood behind the line that closes the jQuery block. The purge button works again, and its messages are translated instead of German literals in the script.[naws_heatmap] — a year of outdoor daily mean temperatures as a calendar grid: twelve rows of months, thirty-one columns of days, one coloured tile per day, and a row of buttons to page through the years. What a curve makes you read, a grid lets you see: the cold fortnight in February and the hot week in July are shapes on the page rather than wiggles on a line. It reads the daily averages the annual chart already uses, so there is nothing to import. The ten colour stops are settings under Appearance → Heatmap Scale, values between two stops are interpolated, and they are anchored in Celsius even when the display is set to Fahrenheit, because the colour comes from the stored value and the tooltip from the unit you chose. Where a day has no stored average but does have a minimum and a maximum, the tile shows the mean of the two and its tooltip says so. The grid is a table rather than a drawing: the month column stays put while the days scroll sideways on a phone, colours are rendered on the server so the map is complete without JavaScript, and a screen reader reads "March, 14th, 8.2 °C" instead of "image". Attributes: year, title, legend.[naws_live] or [naws_history] — in the data block, on every chart configuration, in the data-module4, data-indoor and data-outdoor attributes — and it came back out with every request the dashboard made, whose reply carried the base station's address on every one of its thirty-odd readings as well. What travels now is a public reference: outdoor, indoor, wind, rain and in-<name>, resolved back on the server. Pages cached from before the update and the documented NAWS_Chart JavaScript interface both keep working..mo files so that an installation with a German interface would not find an English one the day the update arrived — but WordPress refused both, because the address of the hash table in the file header was wrong. A refused catalogue produces no warning, no log line and no visible difference except that everything stays English. Norwegian, which has no language pack yet, therefore read English throughout 1.9.9.[naws_table] printed a MAC address in its module column when the reading's module was no longer in the modules table. Readings outlive the module they came from, so this was reachable rather than theoretical. The cell stays empty now, the way the chart legend does.group_by wrote a PHP notice into the log. The plugin's own scripts always send it; anything else calling the endpoint did not have to.
Older versions: the complete changelog since 1.0.0 is kept in CHANGELOG.md on GitHub.