Yeah this is a good idea to make it more flexible. I know I sent you a test package but that content may actually change a bit with the full 0.7 release, so make sure you have backups!
Your best bet right now, at least to get things started, is to copy the portions from Gary's highchartsX generator file, into the Belchertown highcharts generator, then you would have to add those new fields to the skins/Highcharts_Belchertown/json/day.js.tmpl (folder name is changed in the new 0.7rc2 that I'm working on) and repeat for week/month/year json files. Then add the plots and series data to the belchertown/js javascript files. Lastly you'd need to update the container ID in skins/Belchertown/index.html.tmpl and skins/Belchertown/graphs/index.html.tmpl to add/replace the div to show the plots you want instead. 1. So if you wanted to add humidity you'd need the bin/user/belchertown_highchartsSearchX.py to get those SQL vectors into a json format. Probably an easy copy/paste from Gary's code. 2. Then edit the day.json template and add those into the json output. Also probably an easy copy/paste from Gary's code. 3. Then update the skins/Belchertown/js/highcharts-dayplots.js.tmpl to add your humidity. This is where trial and error come into play as well as using your Google Developers console to see JS errors. But basically you need map the JSON data to a highcharts series and that series has its own set of options. Then create a new highcharts chart using the new Highcharts.Chart() function. Then those options tell it where to "renderTo" which is the ID of a div in the index.html. Something like humidity could probably be paired into the temperature plot easily enough. I think there's humidity already in my files as it is, just commented out. So maybe it's a quick win for you to mess around with. It can get confusing quick, and it might take me a little while to get to this. So no ETA at this time. I have some business travel coming up soon which will slow me down quite a bit. Feel free to take an initial attempt though! On Friday, September 7, 2018 at 9:07:15 AM UTC-4, Philip Kutzenco wrote: > > I moved this here from weewx-user. I hope this is the correct place. > > Pat, > I am using your Belchertown skin to display data from a Davis Vantage Vue > weather station. The Vantage Vue does not have a UV sensor, so the Charts > feature of the Belchertown skin shows an empty chart for solar radiation. > > I would like to replace the solar radiation chart and history with a chart > of humidity and history. I assume that change would require a change to > belchertown_highchartsSearchX.py. It appears that Gary's original > highchartsSearchX.py does, in fact, include humidity data. > > The most flexible solution would be to add humidity data to the > belchertown_highcharts and set things up so that choices about which charts > are included would be options in the [[EXTRAS]] part of weewx.conf for > Belchertown. Things like calculated cloud base could also be an added > option. Any chance you would be willing to do that? If not, could you point > me to the way to what I would need to change in > belchertown_highchartsSearchX.py (and any other scripts required) to > replace solar radiation with humidity (I've done programming in the past, > but never Python coding). I guess I could also try implementing the > flexible solution of allowing choices in weewx.conf, though that may be > beyond my abilities at this point. > > I'm still working to implement MQTT updating on my Belchertown > installation and will then publish my website externally. > > Phil >