openenergymonitor / emonhub

Python service linking and decoding input to MQTT & Emoncms
88 stars 81 forks source link

Automatic configuration of nodes based on available templates #183

Closed TrystanLea closed 1 year ago

TrystanLea commented 1 year ago

Rather than pre-populating a default emonhub.conf with all possible OpenEnergyMonitor nodes (within a limit of nodeids 1-30). This chance would ship a default emonhub.conf without any node decoders. Then received nodes would be matched against those listed in emonhub.conf to check first for matches with the same data length and then if multiple matches are found it match by nodeids. If a node matches the template the configuration is copied from available.conf to emonhub.conf. Providing a clean configuration file with only the nodes that the user has received.

This new autoconf mode will only activate on systems with:

[hub]
  autoconf = 1 

in their emonhub.conf configuration files.