Decoding Open weather map data into Loxone directly

5,489 views
Skip to first unread message

Techdoctor

unread,
Apr 27, 2020, 5:54:16 PM4/27/20
to Loxone English
s we are in lockdown I have been doing some playing with my miniserver.
My apartment has a Miniserver Go.
I have been experimenting with getting weather information into the system. I know Loxone have their own weather service and there is a Loxberry plugin. But I wanted a solution that didn't require extra bits of kit or a paid subscription.
So I decided to use openweathermap.org and sign up for a free account.
Once you have signed up you are given an API key which you need when creating API's you can have more than one key if you want.

So you enter this into your web browser

This gives you something like this
{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"base":"stations","main":{"temp":18.68,"feels_lik e":16.05,"temp_min":17.22,"temp_max":20,"pressure" :1006,"humidity":45},"visibility":10000,"wind":{"s peed":2.6,"deg":210},"clouds":{"all":80},"dt":1588 001847,"sys":{"type":1,"id":1414,"country":"GB","s unrise":1587962349,"sunset":1588015007},"timezone" :3600,"id":2643743,"name":"London","cod":200}

The annoying thing is that the time is in Linux UTC format, if you add &mode=xml to the end of the API you get normal time and date for sunrise etc, but I can't get it to work in Loxone at the moment. But Loxone calculates these any way if I need them so no big deal.

To get for example today's temperature
1. You set up a virtual HTTP input in Loxone config. In the URL field put http://api.openweathermap.org/data/2...ndon,uk&APPID=YOUR_API_KEY&units=metric
2. Then for each bit of weather info you then need to define a virtual HTTP input command
3. In the command recognition field just enter "temp":\v
4. Then for the units field you enter <v.1>ºC

For wind direction its a little more complex
1. Under the same virtual HTTP input then follow step 2 above
2. In the command recognition field enter "wind"\s21\v . This finds the characters "wind" then jumps 21 characters forward to get wind direction. I tried using the command "deg"\v but it didn't work.
4. In the units enter <v>º

And now the tricky bit
To get Wind direction as Southerly etc you need to use a Status block and have the Wind direction as an input.
Then set up a few rules to get the compass directions.
AI1 >= 0 AI1 < 35 then in Status Text just enter Northerly
And so on

Temp Warning Warns if its too cold or too hot and this uses another Status block

I have also started adding Sky state which is the "id":803 There is a useful table in https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2 as to what they all mean . So using a Virtual HTTP input and then a status block I have created a look up table for Sky condition so AI1 == 803  Status Text is Broken Clouds
Here is what I have so far 

Weather 2.png


mbee

unread,
May 1, 2020, 7:27:36 AM5/1/20
to Loxone English
Thanks, it was really useful!
I'm now in the process of using those new parameters to feed my blinds... (autoshaping when it's hot but only when there's sun for instance)
Message has been deleted

Pippo74

unread,
May 1, 2020, 10:59:01 AM5/1/20
to Loxone English

Ciao Techdoctor,


thanks a lot for this useful info!


I'm in Italy and already have Loxone weather station & weather services, but I'd like to have a back-up service so that now I can compare the data too. J


Here enclosed you can check my Virtual Input template I created until now. As Polling cycle I've set 600s because OpenWeatherMap suggests to call the API every 10 minutes. Do u have better experience here?


Thanks a lot for your help!

VI_OpenWeatherMap.xml

Techdoctor

unread,
May 1, 2020, 1:05:48 PM5/1/20
to Loxone English
@Pippo74 I will check out your xml template.
I use a polling of every minute at the moment for checking purposes, but will probably change it to 600 seconds once I am happy with it.

Francisco Reche

unread,
May 1, 2020, 1:25:11 PM5/1/20
to Techdoctor, Loxone English
I'm using new schematic. enclosed the one i'm working on

image.png

--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/250dc1a4-b515-47d7-a7ff-5ee06e9119ef%40googlegroups.com.

Fabrizio Falca

unread,
May 1, 2020, 1:44:18 PM5/1/20
to Techdoctor, Loxone English

It's ok!

I'm now trying to use the newer API, which is called "onecall" API, https://openweathermap.org/api/one-call-api#how, in which there are 3 sections, Current, 48 Hour forecast, 7 day forecast, and 5 days history. Max. calls in a day are 1000.

I'm currently reading just the Actual data, since I still need to know how to filter out the hour-by-hour or day-by-day data.

mbee

unread,
May 2, 2020, 10:24:56 AM5/2/20
to Loxone English
Thanks again! I used your method to use OneCall just for the "current" part, and it seems more accurate than the base API here in France...
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-...@googlegroups.com.

Pavel

unread,
May 3, 2020, 7:36:33 AM5/3/20
to Loxone English
Can someone share the file with Loxon config part. I would need just the actual weather. Thank you in advance. Pavel

Dne sobota 2. května 2020 16:24:56 UTC+2 mbee napsal(a):

Pippo74

unread,
May 3, 2020, 11:24:39 AM5/3/20
to loxone-...@googlegroups.com

@techdoctor

I now moved to OneCallAPI. Quite satisfied with it, but I'm becoming crazy to nail down the info under "weather" section of the data frame:

"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}]

If I call the the "id" it's straight forward and replies with the correct value, 800 in the actual case.

I've then tried to read "main", which in this case is "Clear", also tried with your suggested trick ("id"\s6\v)

but it always replies 0; is the Virtual Input capable to deliver String type data or I'm doing something wrong ?


@Pavel

Here enclosed you've the XML template file for the OneCallAPI I've done until now. Please note 

VI_OpenWeatherMap-OneCallAPI.xml

Techdoctor

unread,
May 3, 2020, 3:00:40 PM5/3/20
to Loxone English
As far as I am aware virtual inputs only like numbers. I used a status table to make my own lookup table so 800= Clear 801 = Few Clouds etc. There is a page on the open weather map site that explains the id codes. https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2 
I am also using the max and min block to give me max and min temps for the day. I am turning into a real weather nerd now. Think it comes from when I used to work on Scientific research ships.


On Monday, 27 April 2020 23:54:16 UTC+2, Techdoctor wrote:

Fabrizio Falca

unread,
May 3, 2020, 4:38:36 PM5/3/20
to Techdoctor, Loxone English

@Techdoctor

Wow di u worked on research ships? But on navigation?

- Yep, limitation of Virtual inputs maybe the reason why. Yes I've made a quite big status table containing all the described cases: 2xx, 3xx, 5xx, 6xx, 7xx, 8xx

- Since I'm not an expert about weather & navigation I also made a Status table for the wind directon (South-west wind, mainly North wind, etc.)

Also, I converted the UTC Unix time (in s) adding 1230768000 (s from 2009, which is the internal UTC for the miniserver) + GMT+1 I'm located, what about also considering the daylight saving option? Do u know if Loxone has a Merker "daylight saving time" wich tells us Yes or Not so that we can also add this to the formula?

Otherwise it's now: UTC time + 1230768000 + 3600 + 3600 (GMT+1 + 1h saving time)

Last but not the least: we should go to the interesting point now, using the OneCallAPI, what about getting the forecast data which are given at hourly rate for the next 48h ?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/7892c218-7c37-483d-8110-126108697b02%40googlegroups.com.

Techdoctor

unread,
May 3, 2020, 5:40:45 PM5/3/20
to Loxone English
Not navigation, basically chucked the gear in the water collected the data and fixed all the gear when it went wrong, oh and sometimes did the navigation. On the smaller ships my department became the ships electrical engineers as well.
Glad you have sorted out the UNIX time it was driving me nuts. I had it working for a couple of days but then it stopped working.
I did a look up table for the wind direction as well. So I have Northerly or South Westerly for example. 
I am going to have a look at the onecall api and see if its suitable for me. At the moment I am quite happy with what I have got. I am currently working on max min temps for the day and also for the week.I have done the daily max min and will probably do the weekly tomorrow.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-...@googlegroups.com.

Techdoctor

unread,
May 4, 2020, 11:26:41 AM5/4/20
to loxone-...@googlegroups.com
Here is an update of what I have done so far. I created two rooms one called Weather and another called Forecast.
And have attached them to this post.
One thing I did do to get the number of character jumps is to copy and then paste into notepad the data as displayed in a web browser. Just make a note of your stating point col number then move the cursor to your the position just before the data you need look at your col number and subtract the two. Then take another one off that number.

Weather V2.1.png

forecast V1.2.png





Fabrizio Falca

unread,
May 4, 2020, 1:32:20 PM5/4/20
to Techdoctor, Loxone English

Good!

- Which data are u quering to get forecast ? I mean I see you get the forecast for Sky, Humidirty, Temp, UV. But forecast 12h ? 24h ? I don't see those into the json data frame. That's why I moved to OneCallAPI.

- Are u also considering to extrapolate the sunshine threshold, which is very important to control the blinds ?

On Monday, 27 April 2020 23:54:16 UTC+2, Techdoctor wrote:
--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/ef950724-7ca0-4b7f-a803-447862c878a9%40googlegroups.com.

Techdoctor

unread,
May 4, 2020, 8:01:53 PM5/4/20
to Loxone English
Just come across a problem with the forecast if the cloud type changes so does the number of steps needed to get some of the  data, so sometimes my values go to zero . Has taken most of the day to work out why sometimes it worked and then sometimes it didn't.
I was using the onecall API for the forecasted data, and using the first set of data after the second sunrise and sunset times, but may have to re-think how I do it to get it working consistently.
I am off to bed now.



Techdoctor

unread,
May 5, 2020, 11:22:51 AM5/5/20
to loxone-...@googlegroups.com
I think I have worked it out now by using jump to text command i\,"uvi":\ii\,"uvi":\ii\,"uvi":\i\v So this would jump three uvi positions and read the data after the third uvi.
I have done this for all the forecast data using this text jump command rather than character jump.
Using the xml version is easier to use as the time is in 24hr format.I then cut and pasted the output into notepad and using the find function to count the number of words to jump to.
For the UVI I used the  onecall version of the api. Reason for using two different api's apart from UVI is only available on the onecall is to see if either drop out. 

Fabrizio Falca

unread,
May 5, 2020, 5:35:48 PM5/5/20
to Techdoctor, Loxone English

Not sure I've got the clue of it.

I've tried but it always replies 0

May you please share the Loxone XML template file of the OneCallAPI you've created? Thanks!

Il 05/05/2020 17:22, Techdoctor ha scritto:
I think I have worked it out now by using jump to text command i\,"uvi":\ii\,"uvi":\ii\,"uvi":\i\v So this would jump three uvi positions and read the data after the third uvi.
I have done this for all the forecast data using this text jump command rather than character jump.
I then cut and pasted the output into notepad and using the find function counted the number of words to jump to.
For the UVI I used the  onecall version of the api. Reason for using two different api's apart from UVI is only available on the onecall is to see if either drop out. 

--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.

Techdoctor

unread,
May 6, 2020, 7:12:03 AM5/6/20
to Loxone English
Ok have attached the xml file for the UVI forecast hopefully this makes sense to you. I have taken out my app id and location. Location is done as lat and lon. 
I have also added the day of the week, both for current and for forecast data.  Going to see if I can do more than just the next day for the forecast. I am also adding my own icons for various weather conditions. I am using the openweathermap icons on https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2 



VI_UVI forcast.xml

Techdoctor

unread,
May 6, 2020, 12:46:39 PM5/6/20
to Loxone English
Here is my current weather screen almost finished, might tweak some of the icons
Weather V2.2.png

mbee

unread,
May 7, 2020, 11:25:25 AM5/7/20
to Loxone English
I can see that there is the same problem I have on your screenshot : minimal temperature is not the minimal for the day but it seems to be the minimal of the last hour. 
I'm searching for the daily minimal but can't find it easily. The maximum seems correct: maximal forecast for the day.

Techdoctor

unread,
May 7, 2020, 11:32:40 AM5/7/20
to Loxone English
The photo was taken after I uploaded the new program into the miniserver. And I have been adding other icons and various tweaks here and there. It seems every time you upload to the miniserver it resets the data from the virtual inputs and memory flags. I also reset the min and max temp at dawn So once I have finished tweaking the system I should see a better min and max temp.

mbee

unread,
May 8, 2020, 10:12:38 AM5/8/20
to Loxone English
I'm not sure about that : I have to search for the documentation of the api but I cannot get the max for the day in the morning and the min for the day can ony be correct during the night (it seems to be min and max for a short period of time), so once the api call is refreshed, you get wrong data...

Techdoctor

unread,
May 9, 2020, 6:49:38 AM5/9/20
to Loxone English

My min was 18.1 at 0930 this morning and is still showing 18.1 at 12:40, max temp is 21.4 and current temp is 21.4. Which Max Min block are you using, I am using the normal Max Min block and not the Max Min since reset.
I also reset the max min temp at dawn every day.


Maxmin.png

Steven Van Gysel

unread,
May 9, 2020, 6:20:17 PM5/9/20
to Techdoctor, Loxone English
Why have I even started to read this blog  ;-) spend a couple of nights on getting the api's properly working.
Thanks to all the participants, learned a lot and it helps in improving automatic shading and other future automations I want to achieve and just the additional information you have.

About the min - max debate, I see two approaches here. 
What techdoctor is doing, getting the min/max from the observed temperature of that day with the min/max block. Your min temperature is probably at dawn and your max temperature is somewhere in the afternoon.
But for the forecast, I was more looking like Mbee's approach, getting the min/max with the API but it is only available in the daily part of the api and it does have little changes during the day.

For me it is part of the forecast, therefor I just used the min/max value of the api.
I'm not using it in any automation and can't think of any use case for myself at the moment.

Kind regards
Steven

Op za 9 mei 2020 om 12:49 schreef Techdoctor <casa.do...@gmail.com>:

My min was 18.1 at 0930 this morning and is still showing 18.1 at 12:40, max temp is 21.4 and current temp is 21.4. Which Max Min block are you using, I am using the normal Max Min block and not the Max Min since reset.
I also reset the max min temp at dawn every day.


--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.

mbee

unread,
May 10, 2020, 7:35:55 AM5/10/20
to Loxone English
That's my point : I'm interested to get the min and max forecast for the day, and can't find them in the API.
The max forecast will tell me if it's worthwhile to activate automatic blinding.
The min forecast will tell me to let the blinds open at dawn (I usually close them at down) if there is a heatwave (min>20°C), so that I close them later for maximum ventilation.
Also if min <0 I would stop the movement of my pergola (closed if openweathermap says it's raining).


Le dimanche 10 mai 2020 00:20:17 UTC+2, Steven Van Gysel a écrit :
Why have I even started to read this blog  ;-) spend a couple of nights on getting the api's properly working.
Thanks to all the participants, learned a lot and it helps in improving automatic shading and other future automations I want to achieve and just the additional information you have.

About the min - max debate, I see two approaches here. 
What techdoctor is doing, getting the min/max from the observed temperature of that day with the min/max block. Your min temperature is probably at dawn and your max temperature is somewhere in the afternoon.
But for the forecast, I was more looking like Mbee's approach, getting the min/max with the API but it is only available in the daily part of the api and it does have little changes during the day.

For me it is part of the forecast, therefor I just used the min/max value of the api.
I'm not using it in any automation and can't think of any use case for myself at the moment.

Kind regards
Steven

Op za 9 mei 2020 om 12:49 schreef Techdoctor <casa.d...@gmail.com>:

My min was 18.1 at 0930 this morning and is still showing 18.1 at 12:40, max temp is 21.4 and current temp is 21.4. Which Max Min block are you using, I am using the normal Max Min block and not the Max Min since reset.
I also reset the max min temp at dawn every day.


--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-...@googlegroups.com.

Techdoctor

unread,
May 10, 2020, 8:49:25 AM5/10/20
to loxone-...@googlegroups.com
If you use the forecast api you will get something like this and you do get a max min temp

<time from="2020-05-12T00:00:00" to="2020-05-12T03:00:00">
<symbol number="804" name="overcast clouds" var="04n"/>
<precipitation/>
<windDirection deg="285" code="WNW" name="West-northwest"/>
<windSpeed mps="3.92" unit="m/s" name="Gentle Breeze"/>
<temperature unit="celsius" value="19.01" min="19.01" max="19.01"/>
<feels_like value="16.61" unit="celsius"/>
<pressure unit="hPa" value="1009"/>
<humidity value="60" unit="%"/>
<clouds value="overcast clouds" all="100" unit="%"/>
</time>

Steven Van Gysel

unread,
May 10, 2020, 4:15:48 PM5/10/20
to mbee, Loxone English
If you take the daily api

You get the min and max predicted temperature for the following days and the current day, 
The strange part of it, is that the DT time is voor 11am UTC for each day or 1pm CEST.
In my opinion and I did not check it in depth, which I could do if I combine the two methods of getting the min/max and log it for a couple of days, the min/max temps are correct.
The current day forecast output changes, it is just the min/max temperature for the rest of that day.
{"lat":xx,"lon":x.xx,"timezone":"Europe/xx","daily":[{"dt":1589108400,"sunrise":1589083040,"sunset":1589138136,"temp":{"day":11.41,"min":8.21,"max":11.41,"night":8.21,"eve":11.41,"morn":11.41},"feels_like":{"day":5.54,"night":1.02,"eve":5.54,"morn":5.54},"pressure":1008,"humidity":76,"dew_point":7.34,"wind_speed":7.5,"wind_deg":25,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":100,"uvi":5.74},{"dt":1589194800,"sunrise":1589169346,"sunset":1589224628,"temp":{"day":12.03,"min":2.34,"max":12.03,"night":2.34,"eve":9.19,"morn":6.12},"feels_like":{"day":3.8,"night":-1.53,"eve":2.37,"morn":-2.48},"pressure":1012,"humidity":46,"dew_point":0.84,"wind_speed":9.08,"wind_deg":22,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":100,"uvi":5.38},{"dt":1589281200,"sunrise":1589255653,"sunset":1589311120,"temp":{"day":10.07,"min":3.07,"max":11.25,"night":3.07,"eve":9.45,"morn":5.44},"feels_like":{"day":6.09,"night":-0.2,"eve":4.97,"morn":2.86},"pressure":1019,"humidity":55,"dew_point":1.5,"wind_speed":3.16,"wind_deg":339,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":61,"uvi":5.67},{"dt":1589367600,"sunrise":1589341963,"sunset":1589397611,"temp":{"day":11.49,"min":3.1,"max":12.76,"night":3.1,"eve":9.69,"morn":5.82},"feels_like":{"day":5.93,"night":-2.03,"eve":3.77,"morn":2.44},"pressure":1019,"humidity":54,"dew_point":2.62,"wind_speed":5.67,"wind_deg":29,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":26,"uvi":5.89},{"dt":1589454000,"sunrise":1589428274,"sunset":1589484101,"temp":{"day":12.75,"min":4.35,"max":13.33,"night":4.35,"eve":10.87,"morn":4.84},"feels_like":{"day":6.63,"night":-0.94,"eve":6.06,"morn":-1.03},"pressure":1020,"humidity":44,"dew_point":0.82,"wind_speed":6.08,"wind_deg":55,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":0,"uvi":5.9},{"dt":1589540400,"sunrise":1589514588,"sunset":1589570591,"temp":{"day":13.96,"min":5.17,"max":14.15,"night":5.17,"eve":12.26,"morn":5.75},"feels_like":{"day":8.97,"night":2.27,"eve":8.32,"morn":0.62},"pressure":1018,"humidity":51,"dew_point":4.26,"wind_speed":5.24,"wind_deg":25,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":9,"uvi":6.21},{"dt":1589626800,"sunrise":1589600903,"sunset":1589657079,"temp":{"day":14.42,"min":3.75,"max":14.42,"night":3.75,"eve":12.45,"morn":8.25},"feels_like":{"day":11.57,"night":0.52,"eve":9.43,"morn":5.9},"pressure":1021,"humidity":59,"dew_point":6.64,"wind_speed":2.92,"wind_deg":305,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":74,"rain":0.69,"uvi":6.3},{"dt":1589713200,"sunrise":1589687221,"sunset":1589743566,"temp":{"day":11.95,"min":2.95,"max":11.95,"night":2.95,"eve":10.14,"morn":7.27},"feels_like":{"day":5.8,"night":-0.55,"eve":5.2,"morn":4.48},"pressure":1024,"humidity":54,"dew_point":3.07,"wind_speed":6.62,"wind_deg":333,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":53,"rain":0.44,"uvi":6.54}]}
I use the clouds for the automation but did not yet got a satisfying point where it should be activated and when not.
I've only shading for the glass in the south direction, different use-case than the pergola
I've got it now when clouds lower than 75% that the shading gets activated and deactivated when it goes above 75% in the cooling period which is set from half april until end of october.

https://api.openweathermap.org/data/2.5/onecall?lat=<your latitude>&lon=<your longitude>&exclude=hourly,current&appid=<your pai code>&units=metric
{"lat":xx.xx,"lon":x.xx,"timezone":"Europe/xx","current":{"dt":1589141446,"sunrise":1589083040,"sunset":1589138136,"temp":11.28,"feels_like":4.89,"pressure":1008,"humidity":76,"dew_point":7.21,"uvi":5.74,"clouds":100,"visibility":10000,"wind_speed":8.2,"wind_deg":10,"wind_gust":13.9,"weather":[{"id":300,"main":"Drizzle","description":"light intensity drizzle","icon":"09n"}],"rain":{}}}


Op zo 10 mei 2020 om 13:35 schreef mbee <marc.be...@gmail.com>:
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/f3694129-9f14-48bc-a3f0-f954d77c0e63%40googlegroups.com.

Fabrizio Falca

unread,
May 10, 2020, 5:00:25 PM5/10/20
to Steven Van Gysel, mbee, Loxone English
This is what I also get from OneCallAPI.

I've tried to get the UVI and it's correct.

The first DT I get is also 11am UTC as you say, but the following DTs are replying 0... ?!? (I'm finding them in the same way I obtain the UVI according to Techdoctor template, jumping via /i)

I'll now keep trying with finding next days min/max forecast in the same way jumping with /i.

Min/Max for the current day I have them available at midnight of that day, when the Min/Max block will be reset.

Pavel

unread,
May 14, 2020, 10:44:21 AM5/14/20
to Loxone English
Can someone share the Loxone config? Print screens or lox file how to set up the inputs. I'm beginner. Thank you. Pavel

Dne neděle 10. května 2020 22:15:48 UTC+2 Steven Van Gysel napsal(a):

Techdoctor

unread,
Jan 25, 2021, 5:23:40 AM1/25/21
to Loxone English

I have written a tutorial on how to do use openweather map in Loxone if anyone is interested.
I will upload it later today.

mbee

unread,
Jan 27, 2021, 8:56:18 AM1/27/21
to Loxone English
I'm in! Thank you!

Techdoctor

unread,
Jan 28, 2021, 4:07:39 PM1/28/21
to Loxone English
Message has been deleted

L P

unread,
Jan 29, 2021, 5:47:48 AM1/29/21
to Loxone English

I approached this a bit differently, as I wanted to do the least work possible within Loxone. 

1. I modified a (python) script that fetches OWM data and writes it out in the same format as the Loxone Weather service. The original script ran as a daemon and I didn't want that for on request per hour.
2. I configured my local DNS server (pinhole) to serve a local address for weather.loxon.com
3. The reformatted OWM data (a static file updated once per hour) is served to the mini server by a web server on the local network. (this is all on a single raspberrypi)

If anyone wants it, I can share the very rough script I'm using. 

Chris Pitman

unread,
Jan 29, 2021, 6:09:48 AM1/29/21
to Loxone English
Got most of it working just have problem with the temp reading tried your location too google returns below  

{"coord":{"lon":-0.1257,"lat":51.5085},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"base":"stations","main":{"temp":281.55,"feels_like":278.41,"temp_min":280.93,"temp_max":282.04,"pressure":996,"humidity":93},"visibility":5000,"wind":{"speed":3.6,"deg":250},"rain":{"1h":1.83},"clouds":{"all":75},"dt":1611918064,"sys":{"type":1,"id":1414,"country":"GB","sunrise":1611906189,"sunset":1611938637},"timezone":0,"id":2643743,"name":"London","cod":200}

Any idea why the temp is coming back at 281.55 ?

L P

unread,
Jan 29, 2021, 6:14:59 AM1/29/21
to Loxone English
The temperatures are in degrees Kelvin. Subtract 273.15 to get degrees Celsius.

Chris Pitman

unread,
Jan 29, 2021, 7:13:18 AM1/29/21
to Loxone English
Thanks
Message has been deleted

Deac99

unread,
Jan 30, 2021, 8:28:40 PM1/30/21
to Loxone English
@ Techdoctor - thanks for putting that together - it works great!

@ All

So I have been messing with this for an idea that I've had for a long time.  I currently have a (dumb) geothermal heat pump that is used for frost protection in a building that frequently sits empty in the winter and spring months.  I got relay installed to switch between all off and frost protection.  I prefer to monitor the outside forecast for the week and make the call manually to turn the frost protection on in the winter and off in the spring so I don't have a huge tank of hot water sitting there just in case.  

I was thinking that to be able to suck in the daily predicted min/max temps, I could set up a routine to look ahead for 7 days and when there is no threat of freezing weather I could automatically shut the system off, and the other way around if the future is posing a risk.

So I was messing with the Open Weather and using this URL:  https://api.openweathermap.org/data/2.5/onecall?lat=47.4128&lon=13.6357&units=metric&exclude=hourly,minutely,precipitation,clouds,rain,alerts,snow&appid=XXXX.  I was able to get a forecast of today and 7 days ahead.  

The return field looks like this:

{"lat":47.4128,"lon":13.6357,"timezone":"Europe/Vienna","timezone_offset":3600,"current":{"dt":1612044446,"sunrise":1611988442,"sunset":1612022600,"temp":-0.93,"feels_like":-3.93,"pressure":895,"humidity":99,"dew_point":-1.05,"uvi":0,"clouds":100,"visibility":10000,"wind_speed":1.24,"wind_deg":161,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},"daily":[{"dt":1612004400,"sunrise":1611988442,"sunset":1612022600,"temp":{"day":1.6,"min":-0.96,"max":2.3,"night":-0.93,"eve":-0.42,"morn":0.31},"feels_like":{"day":-1.55,"night":-3.93,"eve":-3.03,"morn":-3.7},"pressure":1001,"humidity":87,"dew_point":-0.75,"wind_speed":1.6,"wind_deg":244,"weather":[{"id":601,"main":"Snow","description":"snow","icon":"13d"}],"clouds":92,"pop":0.83,"snow":9.18,"uvi":1.47},{"dt":1612090800,"sunrise":1612074768,"sunset":1612109093,"temp":{"day":1.3,"min":-3.36,"max":1.56,"night":-3.36,"eve":-0.3,"morn":-1.51},"feels_like":{"day":-1.73,"night":-6.55,"eve":-3.33,"morn":-4.15},"pressure":1002,"humidity":90,"dew_point":-0.18,"wind_speed":1.46,"wind_deg":346,"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":99,"pop":1,"snow":1.57,"uvi":0.79},{"dt":1612177200,"sunrise":1612161093,"sunset":1612195587,"temp":{"day":1.89,"min":-4.55,"max":2.63,"night":-1.6,"eve":-0.78,"morn":-4.5},"feels_like":{"day":-1.29,"night":-4.84,"eve":-3.58,"morn":-8.43},"pressure":999,"humidity":86,"dew_point":-0.62,"wind_speed":1.66,"wind_deg":166,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":64,"pop":0.15,"uvi":1.19},{"dt":1612263600,"sunrise":1612247415,"sunset":1612282081,"temp":{"day":3.08,"min":-2.13,"max":3.08,"night":-0.03,"eve":0.33,"morn":-0.72},"feels_like":{"day":0.25,"night":-3.58,"eve":-3.54,"morn":-4.02},"pressure":1011,"humidity":89,"dew_point":1.55,"wind_speed":1.52,"wind_deg":169,"weather":[{"id":601,"main":"Snow","description":"snow","icon":"13d"}],"clouds":85,"pop":0.53,"snow":2.52,"uvi":1.05},{"dt":1612350000,"sunrise":1612333736,"sunset":1612368576,"temp":{"day":3.79,"min":-1.01,"max":3.79,"night":-1.01,"eve":-0.83,"morn":0.97},"feels_like":{"day":0.34,"night":-5.04,"eve":-4.87,"morn":-1.91},"pressure":1011,"humidity":89,"dew_point":2.16,"wind_speed":2.58,"wind_deg":162,"weather":[{"id":616,"main":"Snow","description":"rain and snow","icon":"13d"}],"clouds":43,"pop":0.53,"rain":0.48,"snow":0.16,"uvi":1.46},{"dt":1612436400,"sunrise":1612420055,"sunset":1612455070,"temp":{"day":2.46,"min":-1.57,"max":2.46,"night":-0.01,"eve":0.04,"morn":-0.95},"feels_like":{"day":-0.29,"night":-3.64,"eve":-3.15,"morn":-4.02},"pressure":1016,"humidity":89,"dew_point":0.9,"wind_speed":1.27,"wind_deg":300,"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13d"}],"clouds":85,"pop":0.4,"snow":0.3,"uvi":1.36},{"dt":1612522800,"sunrise":1612506372,"sunset":1612541565,"temp":{"day":4.39,"min":-0.12,"max":4.39,"night":3.16,"eve":2.92,"morn":-0.12},"feels_like":{"day":1.6,"night":-0.97,"eve":-1.19,"morn":-3.15},"pressure":1017,"humidity":86,"dew_point":2.26,"wind_speed":1.65,"wind_deg":151,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":100,"pop":0,"uvi":2},{"dt":1612609200,"sunrise":1612592687,"sunset":1612628060,"temp":{"day":5.41,"min":2.52,"max":5.41,"night":2.78,"eve":2.85,"morn":2.52},"feels_like":{"day":1.52,"night":-1.95,"eve":-1.8,"morn":-1.48},"pressure":1008,"humidity":87,"dew_point":3.48,"wind_speed":3.52,"wind_deg":172,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":76,"pop":0,"uvi":2}],"alerts":[{"sender_name":"ZAMG Zentralanstalt für Meteorologie und Geodynamik","event":"Snow-Icewarning","start":1612047600,"end":1612087200,"description":" \n\t\t\tFresh snow up to 15 cm is possible.\n\t\t"}]}

 

I made Virtual HTTP Input Commands, one for "min":\v and one for "max":\v for the min and max temperatures of each day.  They pick up the first ones for the current day perfectly, but I have not been able to figure out how to pick up the next 7 of each.  I was thinking that the J command to jump X spaces may work but with a multi day forecast the spacing is different for each day depending on what is being reported for that day.

Has anyone messed with a weather service that can bring data like that in?


Techdoctor

unread,
Jan 31, 2021, 6:51:58 AM1/31/21
to Loxone English

Have a look at the 5 day forecast  api.openweathermap.org/data/2.5/forecast?id={city ID}&appid={API key} &units=metric&mode=xml   
Then use the \i Text\i command which jumps to Text. 
I used this to give me next days temp and various other weather conditions  
So the command I use is 
\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\i<temperature unit="celsius" value="\i\v
It took a few days to get it right but getting the api to display it as an xml page makes it easy to then cut and past the result into notepad and then count the data field you need. By going to Edit-Find and enter the data field you need you can count the number of times you need to jump quite easily.
Hope this makes sense.

Deac99

unread,
Feb 1, 2021, 10:05:46 PM2/1/21
to Loxone English
Hi, yes it it making sense, I can definitely see where working with the XML is easier but now have another question for working within XML.   I've been messing around and am getting closer, but have another question now.

I get an output like this:
<weatherdata>
<location>
...
</location>
<credit/>
<meta>
...
</meta>
<sun rise="2021-02-02T06:30:00" set="2021-02-02T16:07:52"/>
<forecast>
<time from="2021-02-02T00:00:00" to="2021-02-02T03:00:00">
<symbol number="803" name="broken clouds" var="04n"/>
<precipitation probability="0.27"/>
<windDirection deg="262" code="W" name="West"/>
<windSpeed mps="1.36" unit="m/s" name="Calm"/>
<temperature unit="celsius" value="0.56" min="0.56" max="1.15"/>
<feels_like value="-2.44" unit="celsius"/>
<pressure unit="hPa" value="954"/>
<humidity value="93" unit="%"/>
<clouds value="broken clouds" all="77" unit="%"/>
<visibility value="10000"/>
</time>
<time from="2021-02-02T03:00:00" to="2021-02-02T06:00:00">
<symbol number="600" name="light snow" var="13n"/>
<precipitation probability="0.3" unit="3h" value="0.15" type="snow"/>
<windDirection deg="277" code="W" name="West"/>
<windSpeed mps="1.24" unit="m/s" name="Calm"/>
<temperature unit="celsius" value="0.79" min="0.79" max="1.01"/>

I can get temp by putting: <temperature unit="celsius" value="\v in the command recognition, and it properly displays the 0.56

But what do I enter to get the min & max for temp when I am in the XML mode?

Thanks again!

Harry Phelps

unread,
Feb 2, 2021, 9:31:02 AM2/2/21
to Loxone English
I am trying to follow the guide but am getting no information back from Open Weather in Loxone, I just get 0.0 in every field.
However if I paste the URL I am using in the virtual input into a browser all the info is there. I have virtual http input commands for humidity, wind speed, and local temp.
Any ideas as to what I am doing wrong?

Mark Deacon

unread,
Feb 2, 2021, 9:52:40 AM2/2/21
to Harry Phelps, Loxone English
When you put the link in the browser (depending on which link) are you getting something like this?

{"cod":"200","message":0,"cnt":40,"list":[{"dt":1612234800,"main":{"temp":0.56,"feels_like":-2.44,"temp_min":0.56,"temp_max":1.15,"pressure":954,"sea_level":954,"grnd_level":920,"humidity":93,"temp_kf":-0.59},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":77},"wind":{"speed":1.36,"deg":262},"visibility":10000,"pop":0.27,"sys":{"pod":"n"},"dt_txt":"2021-02-02 03:00:00"},{"dt":1612245600,"main":{"temp":0.79,"feels_like":-2.18,"temp_min":0.79,"temp_max":1.01,"pressure":986,"sea_level":986,"grnd_level":921,"humidity":89,"temp_kf":-0.22},"weather":[{"id":600,"main":"Snow","description":"light snow","icon":"13n"}],"clouds":{"all":68},"wind":{"speed":1.24,"deg":277},"visibility":10000,"pop":0.3,"snow":{"3h":0.15},"sys":{"pod":"n"},"dt_txt":"2021-02-02 06:00:00"},{"dt":1612256400,"main":

Assuming it looks more or less like this, if you want the current temp you would type the "temp":\v in the  command recognition box on the virtual http input command script.  The \v is the loxone command to display the value following the text that was typed prior to it.  (Hopefully that makes sense)

You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/kqVJg4lSLWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/fb56ef01-b74d-4984-b0e6-9ef34572cdbcn%40googlegroups.com.

Harry Phelps

unread,
Feb 2, 2021, 10:00:58 AM2/2/21
to Loxone English
That was a quick reply!

This is what I can see in the browser:

{"temp":286,"feels_like":281.51,"temp_min":285.37,"temp_max":286.48,"pressure":995,"humidity":71},"visibility":10000,"wind":{"speed":5.66,"deg":230},"clouds":

 This is the command recognition text I am using for temp and humidity

“temp”:\v

“humidity”:\V

Mark Deacon

unread,
Feb 2, 2021, 10:13:27 AM2/2/21
to Harry Phelps, Loxone English
That is odd.  Try disconnecting the VI from the Status function block.  To display something simple like Temp or Humidity you don't actually need the status block.  

The only other thing I can think of is to try creating a new V HTTP Input and command and see if the new one works (I've had a switch that simply would not work for me, I deleted it and created a new one and all worked fine).  Maybe someone else will have some other ideas.

Harry Phelps

unread,
Feb 2, 2021, 10:37:43 AM2/2/21
to Loxone English
I'll give that a go, thanks for your help!

Harry Phelps

unread,
Feb 2, 2021, 11:11:29 AM2/2/21
to Loxone English

I made a new VI but instead of copying the whole command recognition from the guide (I have a temp work computer and don't know where the back slash key is yet!) I typed it out only pasting in the \v I now have a temperature reading. I think this is something to do with the quotation marks, I had a problem like this a few years back when using some (I think) JSON.
I now have current temperature and humidity working!

Harry Phelps

unread,
Feb 2, 2021, 1:40:05 PM2/2/21
to Loxone English
I can get all 5 working apart from Skies/Weather, I always get a 0.0 returned from that.
I used "deg":\v for wind direction

Mark Deacon

unread,
Feb 2, 2021, 2:42:50 PM2/2/21
to Harry Phelps, Loxone English
That is the correct command.  I just added another to verify I can get it in degrees as well.  Did you check the URL to see if the wind happens to be coming from 0 degrees?  If it is not I can't think of anything else other than deleting it and typing it in again - but I'm a far cry from being an expert here, I've just been hacking away myself. 

Harry Phelps

unread,
Feb 2, 2021, 3:03:27 PM2/2/21
to Loxone English
Everything seems to be matching what I get when entering the URL. I may well try to make it again.
How do you get the temp in degrees? It's no big deal running the kelvin value through a subtract but it would be nice to know.
I thought that the wind speed had got stuck but it seems that 5.66m/s is the favourite speed of the wind round here...

Mark Deacon

unread,
Feb 2, 2021, 4:04:52 PM2/2/21
to Harry Phelps, Loxone English
It's a little finicky - some url's allow you to put in the command  &mode=metric (inserting that right into the url or at the end) and it will give deg C directly.  But other URL's come back with an error (indicating that the free version cannot handle that command).  I have not figured out any pattern on that.

Techdoctor

unread,
Feb 3, 2021, 3:54:51 AM2/3/21
to Loxone English
To get max and min I actually used the current temp going into a min max block, then used a pulse at dawn for the reset.
As regards to getting 0.0 as a value, when testing set the polling rate in the Virtual HTTP input quite low, maybe 20 seconds, too low and openweather doesn't like it, and you may get blocked due to the number of polls you are making. Once I know everything is working I change this to 7200 which is 2 hours. 
One thing that can catch you out is the unit field, so for Humidity I have mine set as <v.1>%  .this means the value is set to 1 d.p and will display the percent sign after the number.

Harry Phelps

unread,
Feb 3, 2021, 1:14:04 PM2/3/21
to Loxone English
Techdoctor, I'd just like to say thanks for the guide. It was very handy and messing around with this has been a laugh.
It seems to me that the more you mess around and recreate the various settings the more goes right, I have all five working now.
I also noticed that it is possible to copy and paste values from a status block in an Excel spreadsheet. There is a good chance that I will do all the weather ones tonight and post them here for people to use - if you can paste the values back into an empty block of course. 

Mark Deacon

unread,
Feb 3, 2021, 2:41:33 PM2/3/21
to Techdoctor, Loxone English
@ Techdoctor 

OK I see what you are saying, if I'm understanding correctly you are keeping track of the daily min / max from the current weather.  I was trying to figure out a way to capture the forecasted min/max for the next 4 days to be used to turn the frost protection on and off.   Haven't quite figured that one out yet but I'll keep messing as well.



Stickytricks

unread,
Feb 5, 2021, 7:31:45 AM2/5/21
to Loxone English

Hello, 

I have managed to get some values working: temperature, humidity. ie temperature value="\v", humidity="\v"


But I am struggling to get a value for wind speed, I have created a status block which outputs text using the Beaufort scale, but always get a zero value

I think its because its under a sub heading < wind> . Any one know what i should enter for speed value?  Thanks.

<wind>
<speed value="2.57" unit="m/s" name="Light breeze"/>
<gusts/>
<direction value="110" code="ESE" name="East-southeast"/>
</wind>
<clouds value="75" name="broken clouds"/>
<visibility value="10000"/>
<precipitation value="0.15" mode="rain" unit="1h"/>

Techdoctor

unread,
Feb 5, 2021, 10:33:21 AM2/5/21
to Loxone English
@Stickytricks using your data  <speed value="2.57" unit="m/s" name="Light breeze"/> 
  try speed value":\v

On my version a web browser displays this for wind speed "wind":{"speed":3.13,"deg":324,"gust":6.71}
So I used speed":\v 



Message has been deleted

Tico

unread,
Feb 6, 2021, 4:51:46 AM2/6/21
to Loxone English
There are some versions of Loxone Config that have trouble with the word 'value'. As an alternative, try -

\ispeed valu\i\i="\i\v

Stickytricks

unread,
Feb 7, 2021, 7:24:35 AM2/7/21
to Loxone English
@Techdoctor, @Tico Thanks very much for the suggestions but neither version works.

Tico

unread,
Feb 7, 2021, 8:00:14 AM2/7/21
to Loxone English
Have you tried right-mouse-clicking the page and select 'View page source' (that's an option that presents with Chrome browser). 'View page source' will often display a different version of text prefacing your desired value. This is the text that is required for the command recognition to work.

Stickytricks

unread,
Feb 7, 2021, 9:12:21 AM2/7/21
to Loxone English
@Tico , thanks again.

This is what  i get when i view the source 
</temperature><feels_like value="279.96" unit="kelvin"></feels_like><humidity value="71" unit="%"></humidity><pressure value="1010" unit="hPa"></pressure><wind><speed value="1.54" unit="m/s" name="Calm"></speed><gusts></gusts><direction></direction></wind><clouds value="40" 
Its strange as the 'feels like value' works when i enter  -  feels_like value="\v" but not the speed value?

Stickytricks

unread,
Feb 7, 2021, 9:28:50 AM2/7/21
to Loxone English
Bizarrely am now getting a value for wind speed  - speed value="\v"
Thanks again!

Message has been deleted

Techdoctor

unread,
Feb 7, 2021, 2:30:03 PM2/7/21
to Loxone English
I do find sometimes you do get zero values. I find it best to wait 5 minutes between doing something and seeing what Loxone comes back with.  I normally make a cup of tea or coffee then come back.

Uwe Herrmann

unread,
Jun 6, 2021, 1:05:29 PM6/6/21
to Loxone English
Hi, one question... to get from "<temperature value="18.94" min="18.01" max="21.39" unit="celsius"/>"  the  value, i have to set in loxone at the VI    <temperature value="\v     But what must i set in loxone to get the max
value ...?

Techdoctor

unread,
Jun 7, 2021, 6:18:04 AM6/7/21
to Loxone English
As I said I use a Max min block and pass the  temperature value through this to give me the days Max and Min rather than an estimated daily max and min.
If you want to use the openweather map data using an example of
"temperature value="18.94" min="18.01" max="21.39" unit="celsius"
The virtual input command would look like this for Min
"temperature value="\s13\v
Then in the unit field in the Display property you need to put
  <v.1>ºC
So this all means when it sees the word temperature value= it will then step ahead or jump ahead 13 characters (includes spaces) and the value it then reads will be the Min temp. So Loxone should display 18.0 ºC. The <v.1>ºC   means a numerical value with 1d.p and then followed by ºC.
The only problem I found using this method was if the temperature value changes to 1.dp it will display the wrong result as you will be one step out.
What you could use is this 
Then use the command "temp_max":\v in your virtual input.
Just tested this and it works.  The weather ID in the above example  is for London
When testing I change the polling rate to about 15 to 30 seconds. For some reason I often find that I get zero values when adding a new parameter. So its worth waiting a good 5 to 10 minutes, sometimes longer if you are getting zero values. Don't know if this is a Loxone problem or an openweather problem.
I normally have my polling on about 3600s which is 1 hour. I did have it on 7200s but changed it a while back.
Hope this helps

Andrzej Gbur

unread,
Dec 15, 2022, 11:17:38 AM12/15/22
to Loxone English
hey guys,

I was trying to set up virtual http inputs like you described in your guide, @techdoctor. 

No luck, because the call to the API fails with the message:
"Failed to retrieve data from http://api.openweathermap.org/data/2.5/weather?id=2643743&appid=KEY (Status code: 401)"
Of course this URL is valid and it correctly returns a valid json outside Loxone.

Same thing with a few other weather APIs, which I tried. 
The always fail when called by Loxone miniserver.

So - do you know if Loxone disabled this feature in newer versions?

Cheers,
AG
--
Loxone firmware 13.1.11.17

Techdoctor

unread,
Dec 16, 2022, 8:20:55 AM12/16/22
to Loxone English
Make sure you have a valid api key. Which I assume you do have. Check that the API key is correct, this is usually a mixture of numbers and letters and is 32 digits long. 

Everything works fine for me, at the moment with firmware version 12.2.12.01. Will be updating to the new firmware tonight so will let you know if this causes problems.

Sergio

unread,
Dec 23, 2022, 11:17:09 AM12/23/22
to Loxone English
I'm also getting error 401 with firmware version 13.1.11.17, so curious if it still works for you after update.

Peter

unread,
Dec 23, 2022, 11:40:11 AM12/23/22
to Loxone English
Same error msg. Key works outside Loxone

Techdoctor

unread,
Dec 24, 2022, 7:11:20 AM12/24/22
to Loxone English
I have updated to the new Firmware 13.1.11.17 and everything is decoded as it should be. As seen from the attached photo of my current weather.
The only difference is that I have &units=metric at the end of my http. I did try your http://api.openweathermap.org/data/2.5/weather?id=2643743&appid=KEY&units=metric (notice I added the metric units at the end) with my appid and it works fine in Loxone. 
What have you set the polling cycle to mine is set to 30s. If its too many, your api calls will get ignored and the weather in Loxone will not get updated. The limit is 60 calls per minute for the free api, up to a max per month of 1000000.

Nick Everard

unread,
Jan 4, 2023, 6:14:36 PM1/4/23
to Loxone English
Hi All, 

Wanted to share my experience I have managed to get this working on  Firmware 13.1.11.17 this evening. At first like many others I was getting a download error status code: 401 in the 'edit command recognition' test window, also all values returned as 0.0

I copied the URL pasted into Notepad++ and then pasted back into Loxone config, I also manually typed "humidity":\v into the command recognition field. 

Still got an error in the 'edit command recognition' test window but the values do display in live view on in config. 

I suspect the test window has an compatibility issue. 

@Techdoctor thanks for the guide it was very useful, if you get time and are happy to could you post a config file with your status blocks for wind direction and sky?

Scott F

unread,
Jan 4, 2023, 7:15:35 PM1/4/23
to Loxone English
I recently came across this post as well as i was looking for ways to show weather. While i have not got as far as integrating the forecast yet i have done the primary weather functions i wanted and while the descriptions that Techdoctor gave of what to do were basic there is enough information there to point me in the right direction and force me to learn something new and understand how the function blocks work better.

@nicke

You can see my status blocks below of the setup for compass directions where i went with a 32 point compass. For the weather descriptions i used the tables provided by OpenWeather for their weather codes and put them in the status table.

status 1.png

status 2.png

You can see here also how i set up the function blocks and also how my current layout looks with this

weather 1.pngweather 2.png
app view.png

I have some average readings being calculated and displayed as i am looking at the feasibility of using a wind turbine and the local annual average wind speed is an important factor to know fo that and the temperature average is important to me for planning what fruits etc i want to plant in the future.

I know for implementing the forecasting i will need to use the function of skipping to a certain iterationof a value like Techdoctor described but have not quite decided if i want to display things as just a "next few hours" forecast or if i want to have it displaying the forcast for specific times of day. I think the free openweather forcasting only does every 3 hours.

Peter

unread,
May 16, 2023, 6:26:06 AM5/16/23
to Loxone English
Slowly working my way through integrating the data into Loxone, , however, I've noticed that the temperature is now (perhaps it always was?) reported as in the hundreds (of something). Today the temperature in my location is 285.7. I've sent a support request to Open Weather but was curious to know if anyone else is having the same issue?

L P

unread,
May 16, 2023, 6:28:01 AM5/16/23
to Loxone English, Peter
285.7 is degrees Kelvin. Subtract 273.15 to get degrees C.


--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/kqVJg4lSLWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.

Peter

unread,
May 16, 2023, 7:00:33 AM5/16/23
to Loxone English
Thanks LP, so obvious now!!
Message has been deleted

mbee

unread,
Oct 28, 2024, 5:24:48 AM10/28/24
to Loxone English
Just received a mail that OWM API 2.5 that we were using for this hack will be depreciated, we'll have to move to API 3.0 (the 1000 free calls/day should be sufficient)

Rob_in

unread,
Oct 28, 2024, 4:29:29 PM10/28/24
to Loxone English
On Monday 28 October 2024 at 10:24:48 UTC+1 mbee wrote:
Just received a mail that OWM API 2.5 that we were using for this hack will be depreciated, we'll have to move to API 3.0 (the 1000 free calls/day should be sufficient)

FWIW, https://open-meteo.com/ looks like an awesome resource for free wether. 

Techdoctor

unread,
Nov 3, 2024, 9:02:58 AM11/3/24
to Loxone English
I have just updated my weather info to openweathermap 3.0 It was quite easy and in most cases just needed to change the url. In some ways it has simplified the polling from Loxone as it needs to only poll one url rather than two to get the main info. Unless you want things like max min temps etc then it will be two urls. 
If there is interest I can update my tutorial to 3.0. Let me know and I will be quite happy to do it.
 

mbee

unread,
Nov 3, 2024, 3:31:11 PM11/3/24
to Loxone English
Hi Techdoctor, thanks, I’m in for the update, it will spare me a lot of time !

Nick Barton-Wells

unread,
Nov 4, 2024, 8:44:34 AM11/4/24
to Loxone English
Yes please.  That would be really helpful!

Nick Barton-Wells

unread,
Nov 5, 2024, 6:35:07 AM11/5/24
to Loxone English
Hi all
Thanks for everyone who has contributed to this thread.
I am now pulling together some details in my system.  Once i would like is to have "sun rise" and "sun set" times.
There is a free API to call for this information:
https://sunrisesunset.io/gb/england/

This returns:
{"results":{"date":"2024-11-05","sunrise":"7:01:12 AM","sunset":"4:25:30 PM","first_light":"5:06:28 AM","last_light":"6:20:14 PM","dawn":"6:25:24 AM","dusk":"5:01:19 PM","solar_noon":"11:43:21 AM","golden_hour":"3:34:36 PM","day_length":"9:24:17","timezone":"Europe/London","utc_offset":0},"status":"OK"}

I am struggling to get my virtual command interface command to recognise the dates correctly.  At the point of the ":" the command believes it has all the string required

Can anyone help?  I would like the complete time. "6:20:14"

Image 05-11-2024 at 11.33.jpeg

Nick Barton-Wells

unread,
Nov 5, 2024, 6:51:24 AM11/5/24
to Loxone English
Sonits the "Unit" which is failing to scrape the time from the command now
Image 05-11-2024 at 11.48.jpeg
Image 05-11-2024 at 11.50.jpeg

Rob

unread,
Nov 5, 2024, 11:42:32 AM11/5/24
to Loxone English
Loxone already has times like sunset, sunrise, dusk etc  built in and listed under "Time Functions" so you don't need to scrape it from an external source.

mbee

unread,
Nov 6, 2024, 1:39:14 PM11/6/24
to Loxone English
I did the update to OWM 3.0 : all I had to do was to create an account, get my API key, and change the URL with 3.0 instead of 2.5 and new API key. 
Reply all
Reply to author
Forward
0 new messages