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

[BUG] Wind Speed Direction and Wind Gust Direction are Equal/Change At Same Time #177

Closed
gary-hammer opened this issue Jun 7, 2023 · 10 comments
Labels
bug Something isn't working
Milestone

Comments

@gary-hammer
Copy link

Describe the bug
I see the wind direction and the gust direction both change at the same time.
This shouldn't be.

To Reproduce
Steps to reproduce the behavior:

  1. View skin with MQTT enabled
  2. Observe the two direction indicators
  3. See error

Expected behavior
Direction of the current wind and the gust should be independent.

@gary-hammer gary-hammer added the bug Something isn't working label Jun 7, 2023
@Daveiano Daveiano added this to the 3.3.0 milestone Jun 8, 2023
@Daveiano
Copy link
Owner

Daveiano commented Jun 8, 2023

You are right, good catch! In MQTT windDir is used for both, windSpeed and windGust. I will have a look at it!

@Daveiano
Copy link
Owner

@gary-hammer I just noticed that my station only sends windDir, but not windGustDir (the hardware simply does not support it). What do you think would be the best approach for this? Using windDir also for the gust, or not updating the gust direction at all?

@gary-hammer
Copy link
Author

I'm attaching the MQTT output from two different loggers of the same Davis PWS.
One the WiFiLogger2 and one the Davis WLL.

Both do have the direction for current and gust.
Perhaps an if would handle it? Else, you'd need to drop the gust direction indicator I'd think. It's not accurate as it stands.
Davis-mqtt-info.txt

@Daveiano
Copy link
Owner

Else, you'd need to drop the gust direction indicator I'd think. It's not accurate as it stands.

Yes, that sounds reasonable! This will be available with the next update. I also fixed a bug when the initial page was rendered with 0 km/h wind speed, in that case the direction would never be shown.

I attached a updated file (live-updates.js). Would be great if you could test this out (just replace the file in your skins directory at weewx/skins/weewx-wdc/dist/live-updates.js)

live-updates.zip

@gary-hammer
Copy link
Author

I have replaced the file and run wee_reports

I did notice this the other day. I run Fully Kiosk Browser on the tablet to display your skin without browser navigation bars.
As today's max does not reset at midnight, I reopen the page when I wake everyday. That time of day is normally calm, so it will be easy to determine it's working with the new file.

I'll update you tomorrow.

@gary-hammer
Copy link
Author

I see the gust and the current directions are now different.

@Daveiano
Copy link
Owner

I did notice this the other day. I run Fully Kiosk Browser on the tablet to display your skin without browser navigation bars.
As today's max does not reset at midnight, I reopen the page when I wake everyday. That time of day is normally calm, so it will be easy to determine it's working with the new file.

Sorry for the fix with the "0 km/h wind speed" You will also have to change the stat-tile template (if you are using the alternative layout - or the conditions-table template if you are using the classic layout). The changes are here: #250b3c3

stat-tile.inc - download file
conditions-table.inc - download file

Btw: you can also set refresh_interval to update the page once a day or something.

@gary-hammer
Copy link
Author

Done. The file opened in my browser vs download, but I pasted all into a text editor, changed to *nix file terminators, and uploaded to my server.

I'll need to reload in the AM to know for certain.

Not a problem to manually reload it in the morning when get coffee. I'm just not a big fan of webpages that reload on a schedule. I guess I can have FKB do this for me though. The free version does an enormous amount of tasks, paid is mostly for business use like a display or some such.

https://www.fully-kiosk.com/en/#features

@gary-hammer
Copy link
Author

Working as intended.
Luckily when I opened the page it was calm.
2 screenshots attached.

If you are happy with the results, feel free to close this ticket.
calm
wind

@Daveiano
Copy link
Owner

Great, looks good! As I said, will be included in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants