Hi all, I am using a TFA Nexus weather station which is know for losing its sensors if connected to USB. The usage of a long USB cable with ferrites on either end made it better, but a real improvement was the deactivation of USB power after every import which is easy to handle on a raspberry pi with uhubctl.
Until now the following line is implemented in crontab and executed every 15 minutes: sudo uhubctl - a on -p 2 && sudo service weewx start && sleep 10 && sudo wee_reports /etc/weewx/weewx.conf && sleep 5 && sudo service weewx stop && sudo uhubctl -a off -p 2 Because USB power is just switched on for several seconds, connection to the sensors is not lost any more (exceptions possible), but I see disadvantages because of the multiple terminations of weewx. The graphs show missing data entries, the regular archive interval is interrupted and - the worst thing in my eyes - after every start of weewx all report files are recreated, e.g. every jpg file, favicon.ico etc. These files usually only are created once after start, and on further archive periods only the files are recreated which are stated in the skin.conf. I know I could improve my graphs by using 'line_gap_fraction <http://weewx.com/docs/customizing.htm#line_gap_fraction>' or to change the skin.conf to avoid the multiple creation of report files. But instead I would like to start weewx only once and to switch on USB power just for the short period of the data import. Following things would be possible: - in crontab just switch on/off USB every 15 minutes and in weewx set up archive interval also to 15 minutes, hoping that both events correspond long-lasting. Disadvantage: I do not know how to harmonize both events so that USB is certainly active if the archive interval starts. Moreover, it could be dangerous if the USB connection was terminated within a data import. - let weewx execute the switch of USB with uhubctl Every time before data is imported by weewx from the weather station, weewx should switch on USB, when import is complete it should turn off USB using 'sudo uhubctl - a on/off p 2'. Would this be possible? Great, but I do not have a clue about implementing this feature in weewx. Any ideas? Could this be solved easily just by inserting a command in a skin or report? The ftp report for example also causes console commands, doesn't it? Thanks for your help and ideas, Andreas -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/83802d85-ea61-4a8d-b904-df7d3b1faf43%40googlegroups.com.
