On Thursday, September 8, 2016 at 7:29:33 PM UTC-4, Steve Sykes wrote:
>
> Lightning detection doesn't seem to work properly yet but if a database 
> isn't created I will never see it.
>
>
steve,

you don't need a second database - that is an optional feature of the 
as3935 extension.

the reason your second database is not working is because of how you 
defined it. in your weewx.conf, this:

    [[lightning_sqlite]]
        root = %(WEEWX_ROOT)s
        database_name = archive/lightning.sdb
        driver = weedb.sqlite

is incorrect - that is how databases were specified in weewx 2.  you want 
this:

    [[lightning_sqlite]]
        database_type = SQLite
        database_name = lightning.sdb

but you should walk before you run.  

remove the data_binding = lightning_binding from the [AS3935] section so 
that lightning data are saved only to the wx database.

run weewx directly to be sure that lightning data are actually being 
captured.

sudo weewxd /etc/weewx/weewx.conf

you should see LOOP data with the lightning fields.

then make sure the data are getting into your wx database:

sqlite3 /var/lib/weewx.sdb
sqlite> select dateTime, avg_distance, lightning_strikes from archive;

note that the two fields are avg_distance and lightning_strikes.  you need 
to modify your schema, since you are using lightning and lightning_strikes.  
you can also eliminate the lightning references in your extensions.py.

after all of that is working properly, add the lightning data (avg_distance 
and lightning_strikes) to your reports.

the separate lightning database records the distance to and time of each 
strike.  it has its own schema and is completely independent of the weewx 
wx database.

m

-- 
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