Missing image when forecast_aeris_use_metar = 0

125 views
Skip to first unread message

didier....@gmail.com

unread,
Jan 25, 2021, 5:30:05 PM1/25/21
to weewx-user
Hi
Just a question:
Why the weather condition image is not displayed when forecast_aeris_use_metar = 0 ?
(I use Belchertown skin)

Many thanks

missing.jpg

vince

unread,
Jan 25, 2021, 6:39:16 PM1/25/21
to weewx-user
We would have to see your entire [[Belchertown]] stanza without usernames/passwords/keys to debug this.

didier....@gmail.com

unread,
Jan 26, 2021, 10:34:30 AM1/26/21
to weewx-user
I think it's not a bug, I have found in belchertown.py
_______________________________________________________________________
           if (
                len(data["current"][0]["response"]) > 0
                and self.generator.skin_dict["Extras"]["forecast_aeris_use_metar"]
                == "0"
            ):
                # Non-metar responses do not contain these values. Set them to empty.
                current_obs_summary = ""
                current_obs_icon = ""
                visibility = "N/A"
                visibility_unit = ""
            elif (
                len(data["current"][0]["response"]) > 0
                and self.generator.skin_dict["Extras"]["forecast_aeris_use_metar"]
                == "1"
            ):
                current_obs_summary = aeris_coded_weather(
                    data["current"][0]["response"]["ob"]["weatherPrimaryCoded"]
                )
                current_obs_icon = (
                    aeris_icon(data["current"][0]["response"]["ob"]["icon"]) + ".png"
                )
_______________________________________________________________________

If aeris_use_metar =0 then no icon displayed, right, but my question is:
What does mean "metar" and why we cannot display an icon without metar?
It is for a best understanding of this information

many thanks

vince

unread,
Jan 26, 2021, 12:07:09 PM1/26/21
to weewx-user
On Tuesday, January 26, 2021 at 7:34:30 AM UTC-8 didier....@gmail.com wrote:
If aeris_use_metar =0 then no icon displayed, right, but my question is:
What does mean "metar" and why we cannot display an icon without metar?
It is for a best understanding of this information


The Belchertown forecast options are documented at https://github.com/poblabs/weewx-belchertown#forecast-options

If you set forecast_aeris_use_metar = 0 there is no icon.
If you set forecast_aeris_use_metar = 1 there 'is' an icon.



Didier Decoodt

unread,
Jan 26, 2021, 12:22:32 PM1/26/21
to weewx...@googlegroups.com
Thank you Vince

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3b94266a-a3e7-433d-8b77-db87a3261c10n%40googlegroups.com.


--

ln77

unread,
Feb 13, 2021, 5:05:37 PM2/13/21
to weewx-user
I have aeris_use_metar=0 (because there's no METAR that's reasonably accurate for my location).  A textual current summary is displayed, but not the corresponding icon.  It looks like Aeris is supplying the current sky conditions from the nearest METAR even without the "filter=metar" field, and even though neither current_obs_summary nor current_obs_icon are set in belchertown.py, the summary does get filled in on the browser side.  I *think* the discrepancy is in index.html.tmpl which conditionally includes the element for the icon based on whether $current_obs_icon is set at compile time, but unconditionally includes the element for the textual summary.

The icon field is correctly processed in belchertown.js to correspond to the textual summary (and the correct icon appears when I put the line to set current_obs_icon in the forecast_aeris_use_metar==0 branch in belchertown.py,).  It seems like either both should be displayed, or neither.  "Neither" is probably the better answer if aeris_use_metar==0 since presumably the METARs are not accurate enough.  

The question then is, without the icon and textual summary, what to do about that big empty space?  Maybe I'll stick a webcam image in there, as an alternative report of current sky conditions. 

  -Les
Reply all
Reply to author
Forward
0 new messages