nettigo / namf

Nettigo Air Monitor Firmware
GNU General Public License v3.0
33 stars 19 forks source link

[Feature request] Add MAC address to the `config.json` #43

Closed bieniu closed 3 years ago

bieniu commented 3 years ago

Is it possible to add the MAC address of the device to the config.json?

This would be helpful for Home Assistant integration. Currently, the backend library gets the MAC address of the device from the values endpoint (via regex). If the MAC address is available in config.json the library will make one less request (config.json is fetched on init to check if auth is required).

netmaniac commented 3 years ago

/config.json is meant to return real current configuration. Since MAC address is not part of it (as for now) I don't think it is good solution to add it. OTOH config file parser ignores silently all unknown for it variables, so introducing it in config.json does affect sensor. Problem may arise, that somebody may expect that he can change MAC address :) OK, I need to think about solution.