This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A custom weewx driver to support collecting data from a MQTT broker. | |
In combination with https://github.com/WouterGritter/433-mqtt-bridge, this driver can be used to | |
collect information from any 433, 868 or 915 MHz weather station using a Software Defined Radio dongle. | |
Using a MQTT broker as a go-between, the same raw data can be used in other places, for example in | |
Home Assistant or in Grafana. | |
This driver expects the units to be in a specific metric format. See conversion in the source-code | |
below (around line 70), and feel free to modify the multiplier values. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class RegexMap<T> implements Map<string, T> { | |
private readonly backend: Map<string, T>; | |
constructor(entries?: readonly (readonly [string, T])[] | null) { | |
this.backend = new Map<string, T>(entries); | |
} | |
toJSON(): { [key: string]: T; } { | |
const result: { [key: string]: T; } = {}; |