Thanks Tom

I have looked and looked but have missed the crucial information.

Will get back into it later today.

Neville

On Friday, December 23, 2016 at 8:39:27 AM UTC+10, Tom Keffer wrote:
>
> You must tell weewx where to find the search list extension. The directions 
> on writing an SLE 
> <http://weewx.com/docs/customizing.htm#extending_the_list> tell you how 
> to do this. Look at the bottom of the section, or search for the text "*The 
> final step that we need to do is to tell the template engine where to find 
> our extension*"
>
> -tk
>
> On Thu, Dec 22, 2016 at 2:21 PM, Neville Davis <[email protected] 
> <javascript:>> wrote:
>
>> Guys
>>
>> I have this skin working with forecast for Brisbane Beaudesert area and 
>> all looks good, I would like to add the $aus search tag to another of my 
>> skins. I have placed aussearch.py in user dir but do I have to edit 
>> weewx.conf to make it available to other skins? I have tried this and 
>> everything comes to a screening halt. I will have to edit feels like 
>> because they are a little different at this location :).
>>
>> Great work on this skin.
>>
>> Neville
>>
>> On Tuesday, October 11, 2016 at 12:06:45 AM UTC+10, Glenn McKechnie wrote:
>>>
>>> (Argh, Re-sending as I forgot to Reply All)
>>>
>>> And Thank you for your appTemp notes Peter. I'll concentrate on those 
>>> soon - hopefully very soon!
>>>
>>> cself -> self    Just a typo? I didn't think of that one!
>>>
>>> Regarding your templates, I couldn't find where the &trade; (trademark) 
>>> entity was creeping in from - the two xml source files appeared to be clean.
>>>
>>> Attached are working Adelaide and Glenelg templates, along with the 
>>> skin.conf that prepares them - I used the naming scheme I mentioned below 
>>> (above? where-ever!). I also assume you're Glenelg.
>>>
>>> They work for me, hopefully they'll transition for you - but the 
>>> warnings are Victoria's still, you'll need to fix the link as it 404'd
>>>
>>> I'm guessing it should be 
>>> http://www.bom.gov.au/fwo/IDZ00057.warnings_sa.xml   ?
>>>
>>>
>>> Cheers
>>>  Glenn
>>>
>>> rorpi-raspberry pi + weewx: now with scripts 
>>> <https://github.com/glennmckechnie/rorpi-raspberrypi>
>>>
>>> On 10 October 2016 at 23:12, Peter Ferencz <[email protected]> wrote:
>>>
>>>> Hi Glenn,
>>>> Thanks for the info.  I haven't had time to digest it all yet.
>>>>
>>>> I too was missing the pytz module and had to install it to get past the 
>>>> error.  As for the 'cself' error, it's a small typo on Darren's part.  I 
>>>> came across it myself and just corrected it to 'self' (remove the 'c').  
>>>> It's only used to create the cache directory if it doesn't exist.
>>>>
>>>> To include 'appTemp' in pages, it needs to be added to your database.  
>>>> Once there, weewx will automatically populate it.  I am using an sqlite 
>>>> database and basically I manually added the column (take backup of 
>>>> database 
>>>> first):
>>>>
>>>> # sudo sqlite3 weewx.sdb
>>>> sqlite> *alter table archive add column appTemp REAL;*
>>>> sqlite> *.schema archive*
>>>> CREATE TABLE archive (`dateTime` INTEGER NOT NULL UNIQUE PRIMARY KEY, 
>>>> `usUnits` INTEGER NOT NULL, `interval` INTEGER NOT NULL, `barometer` REAL, 
>>>> `pressure` REAL, `altimeter` REAL, `inTemp` REAL, `outTemp` REAL, 
>>>> `inHumidity` REAL, `outHumidity` REAL, `windSpeed` REAL, `windDir` REAL, 
>>>> `windGust` REAL, `windGustDir` REAL, `rainRate` REAL, `rain` REAL, 
>>>> `dewpoint` REAL, `windchill` REAL, `heatindex` REAL, `ET` REAL, 
>>>> `radiation` 
>>>> REAL, `UV` REAL, `extraTemp1` REAL, `extraTemp2` REAL, `extraTemp3` REAL, 
>>>> `soilTemp1` REAL, `soilTemp2` REAL, `soilTemp3` REAL, `soilTemp4` REAL, 
>>>> `leafTemp1` REAL, `leafTemp2` REAL, `extraHumid1` REAL, `extraHumid2` 
>>>> REAL, 
>>>> `soilMoist1` REAL, `soilMoist2` REAL, `soilMoist3` REAL, `soilMoist4` 
>>>> REAL, 
>>>> `leafWet1` REAL, `leafWet2` REAL, `rxCheckPercent` REAL, `txBatteryStatus` 
>>>> REAL, `consBatteryVoltage` REAL, `hail` REAL, `hailRate` REAL, 
>>>> `heatingTemp` REAL, `heatingVoltage` REAL, `supplyVoltage` REAL, 
>>>> `referenceVoltage` REAL, `windBatteryStatus` REAL, `rainBatteryStatus` 
>>>> REAL, `outTempBatteryStatus` REAL, `inTempBatteryStatus` REAL, appTemp 
>>>> REAL);
>>>> sqlite> *.quit*
>>>>
>>>> The ".schema archive" command should show the new 'appTemp' column at 
>>>> the end whose data type is REAL (Real Number).
>>>>
>>>> I then dropped all the daily summaries and backfilled them (but I don't 
>>>> think you really need to).  I was hoping all the appTemp values would be 
>>>> calculated and populated but that wasn't the case.
>>>>
>>>> # sudo wee_database /etc/weewx/weewx.conf --drop-daily
>>>> # sudo wee_database /etc/weewx/weewx.conf --backfill-daily
>>>>
>>>> weewx should start populating the 'appTemp' column in the database from 
>>>> that time onwards (as long as you are using weewx 3.5 or better).
>>>>
>>>> I haven't had a lot of luck getting the forecasting to work.  With the 
>>>> bit of time I have had to tinker, I copied Darren's skin in and if I use 
>>>> it 
>>>> verbatim (make no edits), it works perfectly but I get his webcam and 
>>>> forecast for Sydney, etc. (as expected).  If I change the 
>>>> [AusSearch][xml_files] to use XML's for Adelaide (and don't rename the 
>>>> search tags NSWMETRO, SYDNEY & NSWWARNINGS) I get an error:
>>>>
>>>> [[xml_files]]
>>>>    # Find your forecast at BOM
>>>> # aussearch extension then makes XML available for cheetah
>>>> NSWMETRO = ftp://ftp.bom.gov.au/anon/gen/fwo/IDS10044.xml
>>>> SYDNEY = ftp://ftp.bom.gov.au/anon/gen/fwo/IDS10034.xml
>>>> NSWWARNINGS = http://www.bom.gov.au/fwo/IDZ00054.warnings_sa.xml
>>>>
>>>> Oct 10 21:35:17 raspi01 weewx[26725]: reportengine: Caught 
>>>> unrecoverable exception in generator 
>>>> weewx.cheetahgenerator.CheetahGenerator
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****  undefined entity 
>>>> &trade;: line 274, column 114
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****  Traceback (most 
>>>> recent call last):
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/weewx/reportengine.py", line 238, in run
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****      obj.start()
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/weewx/reportengine.py", line 271, in start
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****      self.run()
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 147, in run
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****     
>>>>  self.initExtensions(gen_dict[section_name])
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/weewx/cheetahgenerator.py", line 188, in initExtensions
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****     
>>>>  self.search_list_objs.append(class_(self))
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/user/aussearch.py", line 100, in __init__
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****     
>>>>  generator.converter)
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File 
>>>> "/usr/share/weewx/user/aussearch.py", line 202, in __init__
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****      self.dom = 
>>>> ET.parse(open(self.local_file_path, "r"))
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File "<string>", 
>>>> line 62, in parse
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****    File "<string>", 
>>>> line 38, in parse
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****  ParseError: 
>>>> undefined entity &trade;: line 274, column 114
>>>> Oct 10 21:35:17 raspi01 weewx[26725]:         ****  Generator terminated
>>>>
>>>> I haven't been able to figure out what's causing this error yet.  The 
>>>> XML's are correctly downloaded into the cache directory 
>>>> (/var/lib/weewx/aussearch).  Best I can make out is aussearch.py is trying 
>>>> to parse each XML file but I don't know enough about debugging python to 
>>>> figure out what the problem is.  Hopefully Darren can help.
>>>>
>>>> Regards,
>>>>
>>>> Peter
>>>>
>>>>
>>>>
>>>
>

Reply via email to