i am playing with the prediction strings
from the wiki these should be the existing/working levels
Barometer forecast can be one of:
0 = Stable
1 = Sunny
2 = Cloudy
3 = Unstable
4 = Thunderstorm
5 = Unknown
6 = Cloudy/Rain
they all seem to work however
level 4 shows this, if we add animated lightning would be a great change
level 6 shows this, if we add animated rain would be a great change
dynamic dashboard barometer widget levels
Moderator: leecollings
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: dynamic dashboard barometer widget levels
second question.
is the domoticz widget responsible for the prediction(in this case cloudy)
and is so is the prediction a 1:1 base on the pressure level or is there a script running in the background which analyzes the history and displays the prediction based on this.
i need to know if the prediction is build in or that i need to write my own code and send the prediction level to the barometer myself
thanks
is the domoticz widget responsible for the prediction(in this case cloudy)
and is so is the prediction a 1:1 base on the pressure level or is there a script running in the background which analyzes the history and displays the prediction based on this.
i need to know if the prediction is build in or that i need to write my own code and send the prediction level to the barometer myself
thanks
- gizmocuz
- Posts: 3026
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: dynamic dashboard barometer widget levels
Good suggestion! I've just committed this to development, so it will be in the next beta:
- The Thunderstorm forecast (level 4) now has its own scene: a darker storm cloud with falling rain and an animated flashing lightning bolt.
- While implementing this I also found why the rain/snow animations never showed in the barometer widget: the raindrops, snowflakes and moon were positioned outside the visible widget area and got clipped away, so you only ever saw the clouds. That's fixed too — all forecast levels now animate properly (sun rays, falling rain, falling snow, storm with lightning). Level 6 (Cloudy/Rain) shows animated rain as well.
One thing to be aware of: when a "Sunny" forecast is shown between sunset and sunrise, the widget displays a clear night sky (moon + stars) instead of a sun. That's intentional , same behavior as the Weather widget.
About your prediction question — it depends on where the barometer device comes from:
- For hardware that reports raw pressure (BMP085/BMP280 on I2C, MySensors, RFLink, Z-Wave, etc.), Domoticz calculates the forecast itself. It's not a 1:1 mapping of the current pressure: it samples the pressure every minute and looks at the pressure trend over a rolling ~4 hour window (based on the NXP AN3914 application note). Quickly falling pressure → Thunderstorm, slowly rising → Sunny, and so on. That's also why a barometer shows "Unknown" for the first ~35 minutes after a restart — it hasn't collected enough history yet (the history is kept in memory only).
- Some integrations (for example MQTT Auto Discovery) do use a simple 1:1 mapping of the absolute pressure: <=980 Thunderstorm, <=995 Rain, >=1029 Sunny, otherwise Cloudy.
- For a virtual/dummy sensor that you update through the JSON API, the forecast level is whatever you send in the svalue — Domoticz does not recalculate it. So there you'd have to supply the level yourself (or calculate it in a script).
- The Thunderstorm forecast (level 4) now has its own scene: a darker storm cloud with falling rain and an animated flashing lightning bolt.
- While implementing this I also found why the rain/snow animations never showed in the barometer widget: the raindrops, snowflakes and moon were positioned outside the visible widget area and got clipped away, so you only ever saw the clouds. That's fixed too — all forecast levels now animate properly (sun rays, falling rain, falling snow, storm with lightning). Level 6 (Cloudy/Rain) shows animated rain as well.
One thing to be aware of: when a "Sunny" forecast is shown between sunset and sunrise, the widget displays a clear night sky (moon + stars) instead of a sun. That's intentional , same behavior as the Weather widget.
About your prediction question — it depends on where the barometer device comes from:
- For hardware that reports raw pressure (BMP085/BMP280 on I2C, MySensors, RFLink, Z-Wave, etc.), Domoticz calculates the forecast itself. It's not a 1:1 mapping of the current pressure: it samples the pressure every minute and looks at the pressure trend over a rolling ~4 hour window (based on the NXP AN3914 application note). Quickly falling pressure → Thunderstorm, slowly rising → Sunny, and so on. That's also why a barometer shows "Unknown" for the first ~35 minutes after a restart — it hasn't collected enough history yet (the history is kept in memory only).
- Some integrations (for example MQTT Auto Discovery) do use a simple 1:1 mapping of the absolute pressure: <=980 Thunderstorm, <=995 Rain, >=1029 Sunny, otherwise Cloudy.
- For a virtual/dummy sensor that you update through the JSON API, the forecast level is whatever you send in the svalue — Domoticz does not recalculate it. So there you'd have to supply the level yourself (or calculate it in a script).
Quality outlives Quantity!
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: dynamic dashboard barometer widget levels
thanks, great job
it is like domoticz gets reinvented all over again (in a good way)
can not wait to try it out.
my barometer is a BME680 in esphome which sends out everything through MQTT autodiscovery.
That is probably the reason it always showed cloudy.
i now included some prediction code in the esphome device so it has the levels stable, sunny, cloudy,cloudy/rain, unstable, thunderstorm.
this is send out every 5 minutes to domoticz/in
last question.
are all these changes also commited to the weather widget because i noticed the trendline is visible in the barometer widget but it is not visible in the weather widget.
it is like domoticz gets reinvented all over again (in a good way)
can not wait to try it out.
my barometer is a BME680 in esphome which sends out everything through MQTT autodiscovery.
That is probably the reason it always showed cloudy.
i now included some prediction code in the esphome device so it has the levels stable, sunny, cloudy,cloudy/rain, unstable, thunderstorm.
this is send out every 5 minutes to domoticz/in
Code: Select all
{"idx":351,"nvalue":0,"svalue":"1019.7;2"}last question.
are all these changes also commited to the weather widget because i noticed the trendline is visible in the barometer widget but it is not visible in the weather widget.
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: dynamic dashboard barometer widget levels
confirme working on the barometer widget
cloudy/rain thunderstorm
also checked the weather widget
Thunderstorm animation working in style 1 and 2
cloudy/rain animation ONLY WORKING IN STYLE 1
trendline for barometer missing
cloudy/rain thunderstorm
also checked the weather widget
Thunderstorm animation working in style 1 and 2
cloudy/rain animation ONLY WORKING IN STYLE 1
trendline for barometer missing
- gizmocuz
- Posts: 3026
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: dynamic dashboard barometer widget levels
Thank you for also testing.
Should now be fixed in the latest beta version.
No trendline in the weather widget. reason: it contains the temperature, barometer, rain, wind...
Should now be fixed in the latest beta version.
No trendline in the weather widget. reason: it contains the temperature, barometer, rain, wind...
Quality outlives Quantity!
-
Gravityz
- Posts: 755
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2026.3
- Location: Netherlands
- Contact:
Re: dynamic dashboard barometer widget levels
working sweet