Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightning_hour clarification #45

Open
tlskinneriv opened this issue Apr 2, 2023 · 11 comments
Open

lightning_hour clarification #45

tlskinneriv opened this issue Apr 2, 2023 · 11 comments

Comments

@tlskinneriv
Copy link

Ambient weather devices do not seem to send this as a value to custom endpoints with the Ambient Weather API style communication. Is this field calculated server side? If so, what is the formula for calculation? Thanks!

@themoosman
Copy link

Here is some data to back this up. Here is my lightning data retrieved from the API today. Strikes per day and distance match what's on the UI, but the strikes per hour make no sense.

image

@tlskinneriv
Copy link
Author

tlskinneriv commented Apr 5, 2023

What is the delta time/transmit interval between each row of data?

EDIT: or if you can dump the table with the timestamps from the transmits, that works, too.

@themoosman
Copy link

Here are CSVs for yesterday (image above) and some data from today (today.csv)

yesterday.csv
today.csv

@tlskinneriv
Copy link
Author

So far, from the patterns that I can pick out, it looks like this is roughly calculated as:

(lightning_day(now) - lightning_day(now-1hr)) * 2

Logically, this doesn't make much sense to me. It seems like an arbitrary doubling of the number of strikes that have happened in the last hour. What does make sense to me, however is the following:

lightning_day(now) - lightning_day(now-1hr)

That deduces the number of strikes that happened in the last hour, which is what I think the sensor value is trying to communicate. For now, the latter equation is what I'll use to deduce the number of strikes for lightning_hour in my integration. Hopefully, Ambient Weather will chime in and let us know what's really happening.

@owise1
Copy link
Member

owise1 commented Apr 11, 2023

you may have found a bug! we'll look into it

@owise1
Copy link
Member

owise1 commented Apr 14, 2023

@themoosman would you mind providing your stations mac address so we can look into this further?

@tlskinneriv to answer your original question, lightning_hour is calculated on the server and should use the general logic you suggested. we ran some internal tests and the lightning_hour calculations appear to be working correctly. are you seeing the same strange "doubling" phenomena as well? if so would you mind providing your mac address?

@tlskinneriv
Copy link
Author

@owise1 Unfortunately, I do not have a lightning sensor yet, so even if I was sending data, I wouldn't have any lightning data.

@themoosman
Copy link

@themoosman would you mind providing your stations mac address so we can look into this further?

@tlskinneriv to answer your original question, lightning_hour is calculated on the server and should use the general logic you suggested. we ran some internal tests and the lightning_hour calculations appear to be working correctly. are you seeing the same strange "doubling" phenomena as well? if so would you mind providing your mac address?

I can, but I'd need a secure way to transmit the MAC.

@owise1
Copy link
Member

owise1 commented Apr 18, 2023

@themoosman you can send it to dev@ambientweather.net

@themoosman
Copy link

@themoosman you can send it to dev@ambientweather.net

Sent.

@themoosman
Copy link

@owise1 Did you find anything in your investigation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants