Add dependency on weather-formulas which is used in the api/smartweather.js file below.
api/smartweather.js:
WeatherFlow broadcasts UDP packets on the local network. This adds a UDP listener for events, parses them and stores them in the relative parameters.
This file requires UDP support so it requires (dgram)
Also make use of standard weather formulas for some calculations (weather-formulas)
Index.api:
There is no geo location for the weather station is it is assumed to be in the Home
UDP packets are broadcast on the local network and picked up by the plugin. WeatherFlow broadcasts new data every minute, so the update interval is fixed to 1 minute.
As a local wether station, there are a couple of new characteristics that it has: 1. Light level (Illuminance) is available. As light level is a standard HomeKit characteristic, I coded it in the same style as humidity. 2. Weatherflow devices are battery powered, some with solar to charge. I added a battery characteristic for this data source too, similar to light level. 4.
util/compatibility.js:
The default min/max for light level are too restricted for outdoor light levels (lux), increase the range to support outside light levels
Add another temperature object to support WetBulb temperature
util/characteristics.js:
There are four additional characteristics that I believe are interesting to show. 1. Data reported by the WeatherFlow hardware. LightningStrikes (count of lightning strikes in the area), LightningAvgDistance (the average distance of the strikes) and WindLull (Idle wind speed). 2. TemperatureWetBulb. Calculated characteristic from humidity and temperature. Found it to be useful when viewing the current weather status.
accessories/currentConditions.js:
Added support for the HomeKit characteristics LightLevel and Battery
Changes per file.
package.json
:api/smartweather.js
:Index.api
:util/compatibility.js
:util/characteristics.js
:accessories/currentConditions.js
:config.schema.json
:README.md
: