Read the statement by Michael Teeuw here.
MMM-MyWeather not working with Southern Hemisphere co-ordinates
-
@sdetweil 🤷♂️ that’s how they built the module and i’m not familiar enough with JS to go through and fix it. Thanks for trying anyways.
for what it’s worth, I ended up learning to use the console more and figured out something in the moon direction logic was broken because it was looking for there was a condition for lat >= 0. I’ve just gone through and deleted all references to moon phases in the MMM-MyWeather.js file and it’s working fine now.
probably not the most elegant of solutions, but at least it gives me way more information than “loading…”
-
@jolt02 said in MMM-MyWeather not working with Southern Hemisphere co-ordinates:
a condition for lat >= 0
so, to add to the prior discussion
if the user had coded lat:“-16” in config.js
the comparison would always be true comparing a string to a 0 (all ‘string’ objects would be non-zero, regardless of their content)
-
try taking out the Lon And Lat and use a PWS like for me would be… Perth (IPERTH921). This usually happens when the site can’t match a co-ordinate to a location.
I have tried various modules that require Lon and Lat or area and found this happens a lot ‘down under’ as there seems to be less active locations than in the northern hemisphere.
for my mirror I used default weatherforecast and MMM-OpenmapWeather . Both of these use Open Weather map that has locations rather than co-ordinates.
MMM-MyWeather also uses locations (PWS)
-
@harney hello from Perth as well! how are you finding the accuracy of the OpenWeather data? I was using that initially, but found that it was telling me something different to the results from Google.
i used lat long in OpenWeather though and didnt try using the PWS so that might be the difference
-
@sdetweil from my very basic understanding of how it was developed, i think it was stored it as a string so that it could be concatenated? again, this is based on 5 minutes of Google-fu and no understanding of JS here
-
@jolt02 js will convert in either direction automatically, except if u ask, is this a number or a string
temp: 1234 is a number
temp ‘1234’ is a string
temp: ‘null’ is string
temp: null is undefinedprint temp from above will do 1234, or 1234, or null, or undefined
-
@jolt02 All these weather sites use data from private weather enthusiasts that have varying equipment so the accuracy will never be 100% spot on. Im using data from a Bassendean site which is in the proximity of my place. It is “close” but as there is no official BOM reading for the area, who is to say its wrong. BOM get there Temps for ‘Perth’ from their site at the airport and in the city,
I find a lot of the “Pro” sites like weather channel, Google etc are using data from sites in the northern Hemisphere. This can make it very hard to know what is the correct temp. I have an API from BOM but haven’t figured out the coding as they don;t use Json.
I would like to get data from Windy.com for cloud and wave data but that is expensive
-
@harney thats a pitty the BOM doesnt have close data for your site.
I have found that all the regular weather providers (Open weather, darksky etc) forecasts and observations are less than adequate for Oz.So I have been reworking the Weather Module from WallberryTheme to use Aus govs BOM data. getting observations was easier enough as they provide that in JSON format which makes it some what easy but they only provide XML data for forecasts and the format is different for every site :( so my plans to “release” my module have stalled. because it has to be customised for each site.
-
@saabman yep. I have found the xml to be a problem and out of my range of knowledge. OpenWeather is close to accurate for my location for current conditions,. the particular site location uses excellent monitoring equipment, just a few degrees out, but for forecasting its not that accurate.
-
@harney use a lib to convert to json…
google search
nodejs xml to json
there are a few…
some let you target a specific section of the xml