I got it to work, in addition to your help, I had to change python to python3 for some reason
# PYTHONPATH=/usr/share/weewx python3 /usr/share/weewx/user/interceptor.py --device=ecowitt-client --mode=listen --port=8000 mapped packet: {'dateTime': 1593010224, 'usUnits': 1, 'pressure': 29.202, 'inHumidity': 56.0, 'inTemp': 74.8} On Wednesday, June 24, 2020 at 10:42:03 AM UTC-4, gjr80 wrote: > > Your PYTHONPATH needs to include /usr/share/weewx. Try using: > > $ PYTHONPATH=/usr/share/weewx python ...... > > > Gary > > On Wednesday, 24 June 2020 22:13:38 UTC+10, John Burricelli wrote: >> >> Also, has anyone been able to run the driver manually? I get this error >> when I try it that way. >> >> $ PYTHONPATH=bin python /usr/share/weewx/user/interceptor.py >> --device=ecowitt --mode=listen --port=8000 >> Traceback (most recent call last): >> File "/usr/share/weewx/user/interceptor.py", line 302, in <module> >> import weewx.drivers >> ImportError: No module named weewx.drivers >> >> >> On Wednesday, June 24, 2020 at 7:51:03 AM UTC-4, John Burricelli wrote: >> >> >> >>> I had a decent storm come through last night with nearly 50 reported >>> lightning strikes via my ecowitt app. As far as i can tell however nothing >>> is being inserted into the database. >>> >>> INSERT INTO archive_day_lightning_energy >>> VALUES(1592884800,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> INSERT INTO archive_day_lightning_energy >>> VALUES(1592971200,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> CREATE TABLE archive_day_lightning_noise_count (dateTime INTEGER NOT >>> NULL UNIQUE PRIMARY KEY, min REAL, mintime INTEGER, max REAL, maxtime >>> INTEGER, sum REAL, count INTEGER, wsum REAL, sumtime INTEGER); >>> INSERT INTO archive_day_lightning_noise_count >>> VALUES(1592884800,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> INSERT INTO archive_day_lightning_noise_count >>> VALUES(1592971200,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> CREATE TABLE archive_day_lightning_strike_count (dateTime INTEGER NOT >>> NULL UNIQUE PRIMARY KEY, min REAL, mintime INTEGER, max REAL, maxtime >>> INTEGER, sum REAL, count INTEGER, wsum REAL, sumtime INTEGER); >>> INSERT INTO archive_day_lightning_strike_count >>> VALUES(1592884800,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> INSERT INTO archive_day_lightning_strike_count >>> VALUES(1592971200,NULL,NULL,NULL,NULL,0.0,0,0.0,0); >>> >>> On Wednesday, June 24, 2020 at 12:46:53 AM UTC-4, Gert Andersen wrote: >>>> >>>> Hi Oliver >>>> >>>> I'm using your patched script and it's working fine. >>>> >>>> I insert these fields into th database: >>>> >>>> [[sensor_map_extensions]] >>>> lightning_strike_count = lightning_num >>>> lightning_distance = lightning >>>> >>>> These 2 fields are also coming from the sensor: >>>> >>>> lightning_time >>>> wh57batt >>>> >>>> But can't be mapped right now as far as I can see. There are other >>>> lightning types in the extended scheme, but they don't fit with these. >>>> >>>> It could also be very nice, to implement the PASSKEY functionality. >>>> >>>> Gert >>>> >>>> On Tuesday, June 23, 2020 at 9:51:37 PM UTC+2, olicat wrote: >>>>> >>>>> Hi! >>>>> >>>>> Are there any experiences with the adjusted script regarding lightning? >>>>> Does it work for you now? >>>>> >>>>> Regards, Oliver >>>>> >>>>> -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ca7f8a4d-ee21-4438-a967-96428b08d14do%40googlegroups.com.