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 the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.