I guess I'm not understanding this. If you create a config section for the installer, it will be faithfully reproduced as it gets injected into weewx.conf, including any comments.
As an example, take a look at install.py <https://github.com/tkeffer/weewx-nmea-xdr/blob/master/install.py> for weewx-nmea-xdr <https://github.com/tkeffer/weewx-nmea-xdr>. Or, am I missing something? -tk On Wed, Dec 23, 2020 at 2:20 PM vince <vinceska...@gmail.com> wrote: > One of the things that we see FAQs about for many extensions, in > particular the combination of weewx-mqtt and Belchertown, is related to > what to edit+add in weewx.conf to salt to taste, so to speak. > > I was thinking it might be helpful to be able to insert relatively large > commented-out blocks of config file into a section, to aid folks in knowing > what to tweak to do frequently desired things, and to do this as part of an > extension being installed. > > For example, using the weewx-mqtt extension as an example... > > By default it adds: > [[MQTT]] > server_url = INSERT_SERVER_URL_HERE > > But to do MQTT for Belchertown realtime stats you need to (a) edit the > server_url line and (b) add a few more lines so the result is: > > [[MQTT]] > server_url = mqtt://192.168.1.123:1883 > topic = weather > binding = archive, loop > aggregation = aggregate > log_success = false > > Is it possible to easily extend install.py to insert a block of additional > lines, commented out, into the right place(s) as part of installing the > extension ? I was thinking that some better enhanced 'uncomment this to > do that' stuff for a lot of extensions might make it easier for folks to > figure out. > > I know it's easy to hack on the install.py to add 'uncommented' things. > I'm looking to have it also be able to insert comments into that area. > Even being able to read in an external file'o'comments might be good enough > if that's possible as an alternative. > > [[MQTT]] > server_url = mqtt://192.168.1.123:1883 > #--- uncomment the lines below if you use MQTT with Belchertown > #--- and make sure your Belchertown skin references weather/loop > #--- as the MQTT topic > # > # topic = weather > # binding = archive, loop > # aggregation = aggregate > # log_success = false > > Yes I know it's also possible to expect people to RTFM but sometimes TFM > get a bit cryptic. I was thinking some inline 'comment this out to do > that' things would be helpful if the extension installer had a way to do > that. > > Ideas ? > > -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to weewx-user+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/e8243a7f-d32e-4555-93d7-37c58e72ce2dn%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/e8243a7f-d32e-4555-93d7-37c58e72ce2dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEBaT5QmqppjkzCiDj8ZEtM-VMN77BauEGQWhgEbUs9tuQ%40mail.gmail.com.