Re: [weewx-user] Re: Adding lightening sensor to weewx
I am monitoring acurite strike data (6045M with rtl_433 not weewx). One tricky thing about acurite is that strike count 1) is a cumulative count of strikes, so it needs differencing if you want strikes in some interval. Presumably that's the count in the archive interval for weewx. 2) rolls over from 255 to 0, so you also need to undo that if you want cumulative count as a number. Then you need to figure out when you do want to reset it, or how you want to deal with that, because the un-wrapped value will increase without bound. But it will likely not overflow an int32_t in your lifetime. I'm really unclear on how people deal with this issue. and then as your code indicates, distance is only valid in a transmission where count has increased from the previous transmission. That's complicated because if you miss a transmssion where it increments, you miss it, but it seems the next one you will perceive the incremented count and the distance will still be the same. Hope this helps more than it is confounding. -- 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/rmih74tzynt.fsf%40s1.lexort.com. signature.asc Description: PGP signature
Re: [weewx-user] Re: Adding lightening sensor to weewx
I have tried to get this to work with varying degrees of success. We seldom have lightning which makes troubleshooting more involved. ### Comparing the raw output of your sdr driver (sdr.txt) with your sensor map in the first post, this looks correct. lightning_distance = *strike_distance.0010.AcuriteAtlasPacket* lightning_strike_count = *strike_count.0010.AcuriteAtlasPacket* parsed: {'dateTime': 1654733294, 'usUnits': 1, 'model.0010.AcuriteAtlasPacket': 'Acurite-Atlas', 'channel.0010.AcuriteAtlasPacket': 'A', 'sequence_num.0010.AcuriteAtlasPacket': 2, 'message_type.0010.AcuriteAtlasPacket': 39, ' *strike_count.0010.AcuriteAtlasPacket*': 27, ' *strike_distance.0010.AcuriteAtlasPacket*': 7, 'wind_speed.0010.AcuriteAtlasPacket': 8.0, 'uv.0010.AcuriteAtlasPacket': 1, 'lux.0010.AcuriteAtlasPacket': 45660, 'battery.0010.AcuriteAtlasPacket': 0} ### And from the weewx log, we have a delta, which looks a bit odd: INFO user.sdr: deltas is {'rain': 'rain_total', 'lightning_strike_count': 'lightning_strike_count'} Reading here <https://groups.google.com/g/weewx-user/c/xBihBm0jVls> adds some background. This is what I have, it may not be correct: INFO user.sdr: deltas is {'lightning_strike_count': 'strikes_total', 'rain': 'rain_total'} lightning_distance = distance.3C47.AcuriteLightningPacket strikes_total = strikes_total.3C47.AcuriteLightningPacket [StdCalibrate] [[Corrections]] #lightning_distance = lightning_distance if lightning_strike_count > 0 else None lightning_distance = None if lightning_strike_count == 0 or lightning_strike_count is None else lightning_distance [Accumulator] [[lightning_strike_count]] extractor = sum [[lightning_distance]] extractor = min merger = minmax [image: Screenshot_2022-06-09_06-42-31.png] [image: Screenshot_2022-06-09_07-28-30.png] root@debian:/home/weewx/skins/Seasons# sqlite3 /home/weewx/archive/weewx.sdb -header -column "select dateTime, lightning_distance, lightning_strike_count from archive where lightning_strike_count > 0 ORDER BY dateTime DESC LIMIT 10 ;" dateTimelightning_distance lightning_strike_count -- -- -- 1654476300 28.01.0 1654434900 28.039.0 1654325400 28.0128.0 1653567000 28.039.0 1653128100 28.01.0 1653127800 28.01.0 1653095100 28.01.0 1652670600 0.0 128.0 165700 28.01.0 1652220600 15.02.0 Andy On Wednesday, June 8, 2022 at 5:49:17 PM UTC-7 dave.sp...@gmail.com wrote: > Thanks for all the info you provided below, but I am still stumped. I only > have one the Acurite Atlas with lightning detector and BME280. Might be > thinking that my RTL-SDR is picking up other weather stations nearby. > > > > I have attached separate files showing that the lightning distance and > count that there is data there. > > > > MySQL even shows that the data is there. > > > > > > But the issue is on the website. There is no graph/data show lightning > distance and strike count. Here is what the website is showing. > > > > > > > > > > Any other ideas on what could be going on? > > > > Thanks > > Dave > > > > > > *From:* weewx...@googlegroups.com *On Behalf > Of *gjr80 > *Sent:* Tuesday, June 7, 2022 9:41 PM > *To:* weewx-user > *Subject:* Re: [weewx-user] Re: Adding lightening sensor to weewx > > > > Dave, > > > > Thanks, the log is great resource for troubleshooting; if you include the > WeeWX startup portion of the log it provides detail on how WeeWX is > configured and if you have debug set high enough you get a good picture of > what is going on. The log is the first place to look when things don't work. > > > > It looks like the SDR driver is not being fed any data from rtl_433 that > contains lightning related data. Your sensor map maps fields from > AcuriteAtlasPacket packets (which appears to be correct) and correctly > sets up lightning_strike_count as a delta: > > > > Jun 7 16:14:29 raspberrypi weewx[25278] INFO user.sdr: sensor map is > {'outTemp': 'temperature.0010.AcuriteAtlasPacket', 'outHumidity': > 'humidity.0010.AcuriteAtlasPacket', 'windSpeed': > 'wind_speed.0010.AcuriteAtlasPacket', 'windDir': > 'wind_dir.0010.AcuriteAtlasPacket', 'UV': 'uv.0010.AcuriteAtlasPacket', > 'rain_total': 'rain_total.0010.AcuriteAtlasPacket', 'radiation': > 'lux.0010.AcuriteAtlasPacket', 'outTempBatteryStatus':
Re: [weewx-user] Re: Adding lightening sensor to weewx
data is being > received and stored into the database, but what I am not getting is any > type of graph with the distance and strike counts on the web site. That is > what I need help with. How do I make that show up? > > > > I have included a log output > > > > Thanks > > Dave > > > > *From:* weewx...@googlegroups.com *On Behalf > Of *gjr80 > *Sent:* Monday, June 6, 2022 7:14 PM > *To:* weewx-user > *Subject:* [weewx-user] Re: Adding lightening sensor to weewx > > > > Hi, > > > > Going to need a little more info. What driver are you using? SDR? If so > what does your weewx.conf [SDR] stanza contain? Again assuming SDR, have > you run the driver directly as per the SDR readme > <https://github.com/matthewwall/weewx-sdr#readme>? What does the WeeWX > log show? Post a log extract with debug = 1 showing the full WeeWX > startup and a couple of archive periods, this WeeWX wiki page > <https://github.com/weewx/weewx/wiki/Help!-Posting-to-weewx-user#the-system-log> > > will give you instructions on how to get such a log extract. > > > > Gary > > > > On Tuesday, 7 June 2022 at 08:16:10 UTC+10 dave.sp...@gmail.com wrote: > > Good afternoon all, I am trying to get the lightening detector sensor to > show in weewx. The sensor is Acurite Atlas > > > > I have added the following under [[sensor_map]] > > lightning_distance = strike_distance.0010.AcuriteAtlasPacket > > lightning_strike_count = strike_count.0010.AcuriteAtlasPacket > > > > Any help getting this working would be great > > > > Thanks > > > > -- > 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+...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/cce095de-a364-4987-ad60-cae4f905c70fn%40googlegroups.com > > <https://groups.google.com/d/msgid/weewx-user/cce095de-a364-4987-ad60-cae4f905c70fn%40googlegroups.com?utm_medium=email_source=footer> > . > -- 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/872288eb-7a27-4476-a242-7950a96c9129n%40googlegroups.com.
RE: [weewx-user] Re: Adding lightening sensor to weewx
Gary thanks for the reply. Sorry I didn’t provide enough data. So here it what I am running. My driver is SDR. I have verified that data is being received and stored into the database, but what I am not getting is any type of graph with the distance and strike counts on the web site. That is what I need help with. How do I make that show up? I have included a log output Thanks Dave From: weewx-user@googlegroups.com On Behalf Of gjr80 Sent: Monday, June 6, 2022 7:14 PM To: weewx-user Subject: [weewx-user] Re: Adding lightening sensor to weewx Hi, Going to need a little more info. What driver are you using? SDR? If so what does your weewx.conf [SDR] stanza contain? Again assuming SDR, have you run the driver directly as per the SDR readme <https://github.com/matthewwall/weewx-sdr#readme> ? What does the WeeWX log show? Post a log extract with debug = 1 showing the full WeeWX startup and a couple of archive periods, this WeeWX wiki page <https://github.com/weewx/weewx/wiki/Help!-Posting-to-weewx-user#the-system-log> will give you instructions on how to get such a log extract. Gary On Tuesday, 7 June 2022 at 08:16:10 UTC+10 dave.sp...@gmail.com <mailto:dave.sp...@gmail.com> wrote: Good afternoon all, I am trying to get the lightening detector sensor to show in weewx. The sensor is Acurite Atlas I have added the following under [[sensor_map]] lightning_distance = strike_distance.0010.AcuriteAtlasPacket lightning_strike_count = strike_count.0010.AcuriteAtlasPacket Any help getting this working would be great Thanks -- 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 <mailto:weewx-user+unsubscr...@googlegroups.com> . To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/cce095de-a364-4987-ad60-cae4f905c70fn%40googlegroups.com <https://groups.google.com/d/msgid/weewx-user/cce095de-a364-4987-ad60-cae4f905c70fn%40googlegroups.com?utm_medium=email_source=footer> . -- 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/017701d87abc%24a34925f0%24e9db71d0%24%40gmail.com. =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2022.06.07 16:14:26 =~=~=~=~=~=~=~=~=~=~=~= Jun 7 16:14:28 raspberrypi systemd[1]: Starting LSB: weewx weather system... Jun 7 16:14:29 raspberrypi weewx[25274] INFO __main__: Initializing weewx version 4.5.1 Jun 7 16:14:29 raspberrypi weewx[25274] INFO __main__: Using Python 3.7.3 (default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0] Jun 7 16:14:29 raspberrypi weewx[25274] INFO __main__: Platform Linux-5.10.60-v7+-armv7l-with-debian-10.10 Jun 7 16:14:29 raspberrypi weewx[25274] INFO __main__: Locale is 'en_US.UTF-8' Jun 7 16:14:29 raspberrypi weewx[25274] INFO __main__: PID file is /var/run/weewx.pid Jun 7 16:14:29 raspberrypi weewx[25278] INFO __main__: Using configuration file /home/weewx/weewx.conf Jun 7 16:14:29 raspberrypi weewx[25278] INFO __main__: Debug is 0 Jun 7 16:14:29 raspberrypi weewx[25278] INFO weewx.engine: Loading station type SDR (user.sdr) Jun 7 16:14:29 raspberrypi weewx[25264]: Starting weewx weather system: weewx. Jun 7 16:14:29 raspberrypi systemd[1]: Started LSB: weewx weather system. Jun 7 16:14:29 raspberrypi weewx[25278] INFO user.sdr: driver version is 0.78 Jun 7 16:14:29 raspberrypi weewx[25278] INFO user.sdr: sensor map is {'outTemp': 'temperature.0010.AcuriteAtlasPacket', 'outHumidity': 'humidity.0010.AcuriteAtlasPacket', 'windSpeed': 'wind_speed.0010.AcuriteAtlasPacket', 'windDir': 'wind_dir.0010.AcuriteAtlasPacket', 'UV': 'uv.0010.AcuriteAtlasPacket', 'rain_total': 'rain_total.0010.AcuriteAtlasPacket', 'radiation': 'lux.0010.AcuriteAtlasPacket', 'outTempBatteryStatus': 'battery.0010.AcuriteAtlasPacket', 'lightning_distance': 'strike_distance.0010.AcuriteAtlasPacket', 'lightning_strike_count': 'strike_count.0010.AcuriteAtlasPacket', 'luminosity': 'lux.0010.AcuriteAtlasPacket'} Jun 7 16:14:29 raspberrypi weewx[25278] INFO user.sdr: deltas is {'rain': 'rain_total', 'lightning_strike_count': 'lightning_strike_count'} Jun 7 16:14:29 raspberrypi weewx[25278] INFO user.sdr: startup process 'sudo /usr/local/bin/rtl_433 -M utc -F json' Jun 7 16:14:29 raspberrypi /weewxd: bme280: bme280wx configuration {'i2c_port': '1', 'i2c_address': '0x77', 'usUnits': 'US', 'temperatureKeys': 'inTemp', 'temperature_must_have': '', 'pressureKeys': 'pressure', 'pressure_must_have': 'outTemp', 'humidityKeys': 'inHumidity', 'humidity_must_have': ''} Jun 7 16:14:29 raspberrypi /weewxd: bme28