Wind speed shown in m/s at page load and switches to knots when MQTT connects
Please don't delete these questions! They are asked almost with every issue - answering them as below saves us time from asking them!
First step Checked settings following the docs about using metric
Describe the bug Wind metric set to knot, website shows live speed in m/s and immediately when mqtt connects, switches to knots (measurement divided by abut 2)
Link to your website (http://www.iparassiti.com)
Version of the skin you're using
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Device Information (please complete the following information):
- Device: [e.g. desktop, iPhone6]
- OS: [e.g. Windows, Android, iOS]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here. Maybe a potential fix?
HELP WANTED If you have a fix for this, please submit a pull request against the development branch!
Can you post your weewx.conf file? I used to have this issue too and it was due a setting in the MQTT stanza.
The problem in not in the MQTT stanza. Measure is in m/s when page loads. When the MQTT web socket connects and receives the first update, data are correctly shown in knots.
It seems the HTML is faulty and conversion is done when data are updated from MQTT.
The effect is a rapid change in SPEED and GUST value: when MQTT goes online, value is changed immediately. For example: SPEED 5 / GUST 7 --> SPEED 2 / GUST 3 (m/s to knots rounded to integer)
Right — I used to have the exact same problem (for me it was mph being changed), but it wasn’t a bug, it was a configuration issue. Somewhere in your weewx.conf settings, weewx is being told to report in one unit, but MQTT is reporting in another, so the values are getting overwritten. I eventually tracked it down and fixed it. Could you post your weeewx.conf file for review? Also, which unit does your “regular” weewx page display?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.