hiveeyes / ds18b20-datalogger

A temperature sensor matrix with heatmap visualization for bee hive monitoring, using Raspberry Pi, Linux, Python, DS18B20, MQTT, Kotori DAQ, and Grafana.
https://community.hiveeyes.org/t/laborprotokoll-4x5-temp-matrix-mit-ds18b20/5102
GNU General Public License v3.0
1 stars 0 forks source link

UX: Improve configuration and first-use #13

Closed amotl closed 7 months ago

amotl commented 7 months ago

Don't forget to fill with your own mqtt connection info and with your sensor ids/device addresses, and it works like a charm.

Originally posted by @bee-mois in https://github.com/hiveeyes/ds18b20-datalogger/issues/9#issuecomment-2068132535

amotl commented 7 months ago

Thanks for your suggestion. Do you think we should improve the situation for first-time users? For example, the make-config scaffolder could emit an invalid configuration file, or inject some attribute that will get recognized that the user did not make any changes to the file, and then, the program will respond appropriately, and raise a relevant admonition to the user that they should adjust the configuration file first, before invoking the data logger. wdyt?

bee-mois commented 7 months ago

some attribute that will get recognized that the user did not make any changes to the file

one of the example sensor ids should be good. not very likely that one of them is already correct for a first-time user. and the placeholders in the mqtt section: same same. two different warnings should possibly result: "Are you shure you privided your specific sensor device path information in datalogger.yml?" and/or "You did not set up your MQTT credentials in datalogger.yml."

amotl commented 7 months ago

We can not use yours if we really want to discriminate between both sections. Otherwise, the logger will not work on your end, but croak instead. I think it will be good enough to have a one-time catch-all warning about the need to edit the configuration before running the program.

Thinking about it once more, I think we can get around any complexities and configuration file markers, by just emitting a corresponding message to STDERR, when invoking the make-config subcommand.

bee-mois commented 7 months ago

by just emitting a corresponding message to STDERR, when invoking the make-config subcommand

yeah, lets keep it simple and still remind people of stuff at the right spot in the right moment. i like that.

amotl commented 7 months ago

Thanks. Improved with 555248eccb on behalf of GH-14.