Ok, I was successful in creating my own parser from the simple.txt template
I did. Is there any way to strip the output of any unit?

31/01/18 15:27:00
28.1C
28.1C
30.7C
21.9C
69%
1005.9 mbar
1.4 m/s
45
NE
0.0 mm/hr
28.2C
   N/A
   N/A
   N/A

For easier parsing I thought that it would be easier not to include the
units like C, mbar, m/s. So I saw that its configured in skin.conf but if i
remove all units, all my templates would not show the units. Is there any
way to get the raw value (without the units)?

On Tue, Jan 16, 2018 at 3:06 PM, Pogz Sy Ortile <[email protected]>
wrote:

> Just to update everyone, I used the approach recommended by Thomas. Simple
> and clean.
>
> created /etc/weewx/skins/Standard/simple.txt.tmpl with these values
>
> $current.dateTime
> $current.outTemp
> $current.windchill
> $current.heatindex
> $current.dewpoint
> $current.outHumidity
> $current.barometer
> $current.windSpeed
> $current.windDir
> $current.windDir.ordinal_compass
> $current.rainRate
> $current.inTemp
> $current.UV
> $current.ET
> $current.radiation
>
> Edited /etc/weewx/skins/Standard/skin.conf (add under the
> CheetahGenerator section)
>
>         [[simple]]
>             encoding = strict_ascii
>             template = simple.txt.tmpl
>
> Now ill just tell the guys to modify the aggregator script pull the data
> from there.
>
> On Tue, Jan 9, 2018 at 4:55 AM, Paul Bartholdi <[email protected]>
> wrote:
>
>> Hello,
>>
>> I like the SQL access because it gives you the widest possibilities to
>> get any already recorded data, be it just now or any older ones.
>> I suppose that the problem you had is sqlite vs sqlite3. Weewx uses
>> sqlite3, so you should use sqlite3 to interrogate the dB.
>>
>> So :   sqlite3 /var/lib/weewx/weewx.sdb    ( not sqlite /var/... )
>>
>> I assume you are using some sort of linux OS.  You can check that
>> weewx.sdb is for sqlitte3 with the command  :
>> $ file /var/lib/weewx/weewx.sdb
>>
>> In my case I get :
>>
>> $ file PAS-weewx-20171203.sdb
>> PAS-weewx-20171203.sdb: SQLite 3.x database, last written using SQLite
>> version 3008010
>>
>> I hope this helps you.
>>
>> Happy New Year !     Paul
>>
>>
>>
>> On Sunday, January 7, 2018 at 1:56:17 PM UTC+1, Allan Ortile wrote:
>>>
>>> Hi, I've been looking through a bunch of documentation and group threads
>>> on how to get the current data as simple as possible. Right now im thinking
>>> of these approaches:
>>>
>>> 1.) Using the RSS feed of Weewx, read the current data which is enclosed
>>> in CDATA.
>>>
>>> I tried this one and throught to myself, how hard can it be? Then I
>>> tried beautifulsoup to read/parse the rss, tried some other libraries but
>>> ended up wasting an hour not getting anywhere.
>>>
>>> 2.) Maybe I can just run wee_device --current and just parse the data
>>> there
>>>
>>> It works for a time, til I get the annoying "weewx.WeeWxIOError: [Errno
>>> 16] Resource busy" errors. Dont get me wrong, the device is still polling
>>> and is still updating the HTTP website with fresh data its just that
>>> wee_device is so unreliable that i'd even consider this as an option
>>>
>>> 3.) Directly pull the latest data from the SQLite database
>>>
>>> Well, i tried the command sqlite /var/lib/weewx/weewx.sdb and got the
>>> error Unable to open database "/var/lib/weewx/weewx.sdb": file is encrypted
>>> or is not a database
>>>
>>> Man this gets weirder and weirder.
>>>
>>> 4.) Use the weewx python library
>>>
>>> I saw some guys use the weewx python via import, but theres no reference
>>> libraries i can turn to.
>>>
>>> 5.) Curl an endpoint?
>>>
>>> Is there an endpoint i can curl to just get raw data from the sensor?
>>>
>>> ========================================
>>>
>>> I honestly just want the current values from weewx. Is it too much to
>>> ask? :(
>>>
>>> My end goal would be to write a simple python aggregator to get my
>>> sensor data from weewx + some other sensor data directly connected to the
>>> pi (soil, uv, etc) then send it via an http request to my server which
>>> stores it on a database and processes everything collectively (this wont be
>>> just one weather station, we will deploy many).
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "weewx-user" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/weewx-user/P8L4qHt5e_o/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to