openenergymonitor / emonhub

Python service linking and decoding input to MQTT & Emoncms
90 stars 83 forks source link

Automatic configuration of nodes based on available templates #183

Closed TrystanLea closed 2 years ago

TrystanLea commented 2 years 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.