Has anyone been successful in extending weewx to create a realtime.txt file in Cumulus format? Perhaps based on the WURF service so that a new file could be created each LOOP?
Sorry to be a nuisance, but as a Linux newbie, I'm a bit hazy about the correct location for crt.py. The path looks like a reference relative to $WEEWX_ROOT but in a default weewx installation from .deb, then $WEEWX_ROOT doesn't appear to have definitive value? Or is the implication that attempts to extend weewx are better made from a setup.py installation?
Nothing after this, but if I do 'sudo service weewx status', it says it's not running.
did I miss something ?
I haven't had a chance to look at this in detail yet so ICBW, but I'd question whether this is likely to be what I'd regard as a genuine realtime.txt generator - 'genuine' in the sense that realtime should mean what it says, ie reflect LOOP values for rapidly changing parameters like wind speed/direction and be capable of updates/uploads every few seconds and not just be another skin reflecting the latest archive data, eg every 5 minutes. In other words, similar to a WURF upload generator.
I haven't had a chance to look at this in detail yet so ICBW, but I'd question whether this is likely to be what I'd regard as a genuine realtime.txt generator - 'genuine' in the sense that realtime should mean what it says, ie reflect LOOP values for rapidly changing parameters like wind speed/direction and be capable of updates/uploads every few seconds and not just be another skin reflecting the latest archive data, eg every 5 minutes. In other words, similar to a WURF upload generator.
Making progress in that the version with the updated config file and crt.py present will now launch without errors, but syslog reveals that it's not saving data because it thinks that the database is read only. Any idea why this should be? The only change that I've made in addition to those suggested in this thread are to save the updated weewx.conf file with a different name and starting weewx with the new conf file as the argument.
I don't suppose that there's a key anywhere? (I mean to the file output, not the expected raw LOOP pattern, which I know).
The line:f.write(','.join(values))is throwing an error: 'TypeError sequence item 0: expected string, float found'Presumably the values just need forcing to strings. Is that just .join(values.tostring) ? (Sorry don't know enough Python to be sure of the type conversion syntax.)
@mwall
@mwallThanks again - that's really helpful - now managed to get a Loop file output working that means something. But looking at the output , I'm scarcely surprised that I couldn't decode the nominal Loop output - the sequence and nature of the fields is hugely different from eg the standard Davis LOOP. But it doesn't really matter - once you have the key then it can all start to make sense. I just need to work with it now to understand exactly which fields are present and how to work with them. I'll be back...
--
You received this message because you are subscribed to the Google Groups "Weewx user's group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Haven't had a chance to try the full service yet - hopefully over the weekend. But just to comment on some of the FIXME points:
Jun 3 08:51:48 gunther weewx[3749]: **** engine.run()
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/weewx/wxengine.py", line 181, in run
Jun 3 08:51:48 gunther weewx[3749]: **** self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/weewx/wxengine.py", line 210, in dispatchEvent
Jun 3 08:51:48 gunther weewx[3749]: **** callback(event)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 282, in handle_new_loop
Jun 3 08:51:48 gunther weewx[3749]: **** data = self.calculate(event.packet, archive)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 312, in calculate
Jun 3 08:51:48 gunther weewx[3749]: **** archive, ts)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 151, in calcTrend
Jun 3 08:51:48 gunther weewx[3749]: **** return new_val - old_val[0]
Jun 3 08:51:48 gunther weewx[3749]: **** TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
Jun 3 08:51:48 gunther weewx[3749]: **** Exiting.
Jun 3 08:54:36 gunther weewx[3849]: wxengine: Initializing weewx version 2.6.3
Jun 3 08:54:36 gunther weewx[3849]: wxengine: Using Python 2.7.6 (default, Mar 22 2014, 22:59:56) #012[GCC 4.8.2]
Jun 3 08:54:36 gunther weewx[3849]: wxengine: pid file is /var/run/weewx.pid
Jun 3 08:54:36 gunther weewx[3851]: wxengine: Using configuration file /etc/weewx/weewx.conf
Jun 3 08:54:36 gunther weewx[3851]: wxengine: Loading station type WMR100 (weewx.drivers.wmr100)
Jun 3 08:54:37 gunther weewx[3851]: wxengine: StdConvert target unit is 0x1
Jun 3 08:54:37 gunther weewx[3851]: forecast: MainThread: Zambretti: interval=600 max_age=604800 hemisphere=NORTH lower_press
I tried the setup from here: http://sourceforge.net/p/weewx/wiki/crt/
But it does not work on my side: it make weewx stops and set those error message in syslog:
Jun 3 08:51:35 gunther weewx[3749]: wxengine: Starting main packet loop.
Jun 3 08:51:48 gunther weewx[3749]: wxengine: Caught unrecoverable exception in wxengine:
Jun 3 08:51:48 gunther weewx[3749]: **** unsupported operand type(s) for -: 'NoneType' and 'float'
Jun 3 08:51:48 gunther weewx[3749]: **** Traceback (most recent call last):
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/weewx/wxengine.py", line 954, in mainJun 3 08:51:48 gunther weewx[3749]: **** engine.run()
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/weewx/wxengine.py", line 181, in run
Jun 3 08:51:48 gunther weewx[3749]: **** self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/weewx/wxengine.py", line 210, in dispatchEvent
Jun 3 08:51:48 gunther weewx[3749]: **** callback(event)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 282, in handle_new_loop
Jun 3 08:51:48 gunther weewx[3749]: **** data = self.calculate(event.packet, archive)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 312, in calculate
Jun 3 08:51:48 gunther weewx[3749]: **** archive, ts)
Jun 3 08:51:48 gunther weewx[3749]: **** File "/usr/share/weewx/user/crt.py", line 151, in calcTrend
Jun 3 08:51:48 gunther weewx[3749]: **** return new_val - old_val[0]
Jun 3 08:51:48 gunther weewx[3749]: **** TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
Jun 3 08:51:48 gunther weewx[3749]: **** Exiting.
M
Hello mwall !
Nice! now it's running !
I checked with sudo weewxd weewx.conf and I can see the LOOP message every few seconds with the different packets and REC message every 5min
But...no file in my /var/www/weewx/realtime directory.
Is there some syslog or weewxd ouput I could add to investigate deeper ?
I think it might be an "import syslog" that is missing at beginning of crt.py ?
Oh my god, it is in /var/tmp !!! :-) and works !!
did I miss something in weewx.conf ?
By the way, is there a possibility to make such issue dont stops completly weewx?
and put the interval inside `` as it seems that in mySQL the interval is "reserved" word.
Although I don't understand anything about coding this seems to be working ;)
Great job !
--
You received this message because you are subscribed to a topic in the Google Groups "Weewx user's group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/-tihrtU-iyQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.