On Wednesday, September 14, 2016 at 7:56:56 AM UTC-7, jmltech wrote: > > What would be a good example to follow for creating a new driver and > service? > > I would like to read values from a fronius solar inverter, and store an > archive record in a separate database. Then generate graphs to plot the > data from the database (much like the cmon service) >
I'd hesitate to use mine as a recommended practice, but it does work enough to show at least one way to approach it. I stole/borrowed/based the code on cmon and pmon from Matthew plus some other examples Tom has posted, FWIW. https://github.com/vinceskahan/vds-weewx-local-skin/tree/with-raspi (make sure you get this branch) What I do: - my weewx system is attached to my weather station - I also run a python script periodically via cron on a raspi that has a couple temperature sensors on it and write a json-formatted file out that the pi's nginx can serve up - I created an extension for my weewx system that basically does a web get of that pi-served file using python, feeding a separate database for just those data elements - tweaked my local skin to reference the external db to present the data integrated with the normal weewx weather-station stuff It sounds reasonably similar to what you want to do, so it might be worth at least a quick look as one working example.
