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

"Listen to Broadcasts" odd behaviour #13

Open
cambmint opened this issue Jun 18, 2021 · 9 comments
Open

"Listen to Broadcasts" odd behaviour #13

cambmint opened this issue Jun 18, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@cambmint
Copy link

v0.5.1 : I've enabled "Listen to Broadcasts", the "Update Interval" is currently set to 30s, and I've restarted the server between tests. Each Entity's "Secondary Info" is set to "Last Updated" to illustrate how often updates are occurring.

Rain Today is being updated every few seconds - what looks like the correct value of reading '14.4 mm' flickers up very briefly, but the 'held' value is being displayed as '0 mm' [sic, no decimal place]. Rain Rate is also flickering with updates but otherwise '0 mm/h'.

Wind, Wind Direction, Wind Max, Temperature, Solar, UV etc seem to update at irregular intervals of 10s of seconds to minutes.

I don't know if it is expected but the "Last Updated" values of each Entity remain static e.g. "4 seconds ago" unless a browser refresh is forced.

@siku2 siku2 added the bug Something isn't working label Jun 18, 2021
@siku2
Copy link
Owner

siku2 commented Jun 18, 2021

Rain Today is being updated every few seconds - what looks like the correct value of reading '14.4 mm' flickers up very briefly, but the 'held' value is being displayed as '0 mm' [sic, no decimal place].

Most likely this happens because the WeatherLink device, for some reason, only sends the valid value every so often and in between it explicitly sends 0. I do want to point out that the device doesn't have to, and in fact, shouldn't broadcast 0 for these measurements, but for some reason it does.
From what I can tell this only affects the rain measurements, which is why I didn't notice during testing as it simply wasn't raining at the time.

Could you send me a screenshot of the graph for these values so I can get a feel for how the 0s are distributed amongst the real values?

Wind, Wind Direction, Wind Max, Temperature, Solar, UV etc seem to update at irregular intervals of 10s of seconds to minutes.

It's important to note that state.last_updated reflects the time the value was last changed, even though there's state.last_changed which only adds to the confusion. The difference between the two is that the latter only updates if the actual state.value changes, not if any of the state.attributes do.

@cambmint
Copy link
Author

Thanks for the explanation.
I attach the graph of sensor.weatherlink_rainfall aka "Rain today". The solid red bits are where the zero bug is at work.
(I shutdown my RPi for an hour where there's no data - and sorry, I don't know enough about HA to change the x-axis scale and limits from the defaults!)

cambmint rain today screen capture 2021-06-18

@siku2
Copy link
Owner

siku2 commented Jun 20, 2021

Unfortunately I haven't been able to reproduce this yet. I suspect this issue might be caused by a split setup. All ISS transmitters will regularly broadcast a value for rainfall and rain rate, but those that don't actually measure the rain will (thanks to questionable design decisions) always send 0.
If this is indeed the case, then this issue will be resolved by implementing #10.

@cambmint
Copy link
Author

I think I could test your hypothesis by temporarily disabling the other sensors. I’ll get back to you!

@cambmint
Copy link
Author

Unsurprisingly, I've determined removing sensors will leave just the ISS data - JSON attached - but no rain is forecast for a couple of days to observe the "live" behaviour (and I'm not intending to pour water into the gauge!). Until then...
cambmint current conditions 2021-06-22 (ISS only, not raining).txt

@cambmint
Copy link
Author

Some rain at last! I have determined the following:

  1. ISS + Wind (on station 6) : display OK
  2. ISS + Wind (6) + Greenhouse (2) : display OK
  3. ISS + Wind (6) + Greenhouse (2) + Cellar (3) : broken
  4. ISS + Wind (6) + Cellar (3) : display OK again
    I attach the JSONs and screenshots for (2) and (3) (grabbed after a short while).
    Hope this helps!
    cambmint current conditions 2021-06-28 (ISS+6+2).txt
    cambmint current conditions 2021-06-28 (ISS+6+2+3).txt
    cambmint current conditions 2021-06-28 (ISS+6+2)
    cambmint current conditions 2021-06-28 (ISS+6+2+3)

@siku2
Copy link
Owner

siku2 commented Jun 28, 2021

Hmm, that doesn't really make sense to me...
In your case channel 1, 2, 3, and 6 ALL use the "data_structure_type" 1 (ISS), which is the one I assumed to be problematic.
Because of that, I expected that any combination of these four would lead to issues, but that's not at all what happened in your case. Worse even, it's only when all 4 of them are active that it starts showing? Unfortunately I can't make sense of that.
Is it really only the rain that does this, or is the wind also affected?

Taking a look at the live broadcasts might shine some light on this, but the integration currently doesn't expose a way to do that (not even visible in the logs).

@cambmint
Copy link
Author

When it next rains (weekend?) I'll check out the behaviour with channels 1, 2 (or 3), 6 but add in 4 (Leaf/Soil: Temp on Port 1; Leaf Soil on Port 1) as I note that has data_structure_type 2.
I've not noticed a problem with the wind, but will double-check.
Probably irrelevant and a coincidence but on my (slow) iPad I got the impression lots of screen redraws were happening. I'll pay more attention next time, e.g. by switching tab in HA.

@cambmint
Copy link
Author

cambmint commented Jul 3, 2021

0.4mm rain today. I have added in station 4 (Leaf/Soil: Temp on Port 1; Leaf Soil on Port 1). All ok. (See attached files.)
Adding in the second Temp/Hum breaks display of Rain today and Rain Rate but interestingly not Rainstorm. Wind speed is still ok.
Let me know if you wish me to test out anything else!
cambmint current conditions 2021-07-03 (ISS+6+3+4).txt
cambmint current conditions 2021-07-03 (ISS+6+3+4)

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