KNMI API in Dashticz
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 81
- Joined: Friday 10 July 2020 22:56
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
KNMI API in Dashticz
Hello,
Does anyone know a way to get a KNMI api working in dashticz instead of the Open Weather Map.
I like the layout of the Open Weather Map widget, but the Open Weather Map does give a lot of inaccurate weather forecast. if the sun is shining the widget says cloudy, etc.
and i know from a knmi app on my telefone that KNMI is a lot more accurate.
it's possible to get the API at https://weerlive.nl/delen.php
see the attachment for al the data fields the API gives.
regards Nils
Does anyone know a way to get a KNMI api working in dashticz instead of the Open Weather Map.
I like the layout of the Open Weather Map widget, but the Open Weather Map does give a lot of inaccurate weather forecast. if the sun is shining the widget says cloudy, etc.
and i know from a knmi app on my telefone that KNMI is a lot more accurate.
it's possible to get the API at https://weerlive.nl/delen.php
see the attachment for al the data fields the API gives.
regards Nils
- Attachments
-
- knmi.jpg (192.25 KiB) Viewed 2019 times
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
In latest beta I've added KNMI as weather forecast provider.NilsNijenhuis wrote: ↑Wednesday 19 October 2022 15:25 Hello,
Does anyone know a way to get a KNMI api working in dashticz instead of the Open Weather Map.
I like the layout of the Open Weather Map widget, but the Open Weather Map does give a lot of inaccurate weather forecast. if the sun is shining the widget says cloudy, etc.
and i know from a knmi app on my telefone that KNMI is a lot more accurate.
it's possible to get the API at https://weerlive.nl/delen.php
see the attachment for al the data fields the API gives.
regards Nils
Can you test?
Code: Select all
blocks['knmi4'] = {
type: 'weather',
provider: 'knmi',
city:'amsterdam',
apikey: 'xxx',
layout: 4,
width: 6,
count: 3
}
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: KNMI API in Dashticz
@lokonli , why not build a Domoticz module for KNMI and let Dashticz display it? Then the values can be used for other automation scenario’s as well
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
Good suggestion.kiddigital wrote: ↑Tuesday 15 November 2022 21:35 @lokonli , why not build a Domoticz module for KNMI and let Dashticz display it? Then the values can be used for other automation scenario’s as well
Data collection is the easy part.
Rendering weather information from different sources (OWM, KNMI) in a consistent way while the weather data is not the same is more challenging.
The rendering part had to be made anyway.
Further,
For weather integration in Domoticz I have to create a Domoticz device for every information element. That will create a lot of additional devices. And then I've to find an easy way to transfer all applicable device info from Domoticz to Dashticz. Maybe in the future I'll have a look at this.
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: KNMI API in Dashticz
just added the block
(looks like I need to fix the layout some moreRunning latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
-
- Posts: 81
- Joined: Friday 10 July 2020 22:56
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
Hello Lokonli, sorry for the late reaction. I have tested the block and it gives the following result.
The tekst part below 'Wisselvallig en zacht' is a little crowded but the rest looks nice
The tekst part below 'Wisselvallig en zacht' is a little crowded but the rest looks nice
- Attachments
-
- Schermafbeelding 2022-12-24 151632.jpg (235.23 KiB) Viewed 1832 times
-
- Posts: 81
- Joined: Friday 10 July 2020 22:56
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
with al little styling it looks a little better.
Is it also possible to make a layout with only the 4 days forecast from knmi, like i use below the KNMI4 block?
Is it also possible to make a layout with only the 4 days forecast from knmi, like i use below the KNMI4 block?
- Attachments
-
- knmi.jpg (59.03 KiB) Viewed 1812 times
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
Did you already try with layout:0 as block parameter?
-
- Posts: 81
- Joined: Friday 10 July 2020 22:56
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
I tought that lay-out 0 gave an error, but i will check it again
-
- Posts: 742
- Joined: Saturday 30 May 2015 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: KNMI API in Dashticz
I also tested the knmi. It works fine. I found these differences with OWM, while having taken over all the same parameters:
Only 3 day forcast, including today. The forth day gives 0 numbers and a non existing image
The description is not available
Wind force is visible, but not wind direction.
Only 3 day forcast, including today. The forth day gives 0 numbers and a non existing image
The description is not available
Wind force is visible, but not wind direction.
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Re: KNMI API in Dashticz
I am struggling to get this to work. I have defined the KNMI weather blocks in two different ways. The way I am used to (i.e. create a declaration at the start) and the way which is used in this thread. Unfortunately both types of declaration do not work. I am having problems showing weather forecasts ever since the new Domoticz update. I can'tbelieve it has anything to do with it but there you have it I changed to branch beta so that shouldn't be a problem.
Here is my config.js (in part):
Any tips?
Here is my config.js (in part):
Code: Select all
// --------------------------------------------------------------------------------------------
// Weer
// --------------------------------------------------------------------------------------------
//// Open Weather Maps actueel weer
//blocks['currentweather_big_owm'] = {}
//blocks['currentweather_big_owm']['width'] = 8;
// Open Weather Maps 5 daagse voorspelling
blocks['weather_owm'] = {}
blocks['weather_owm']['width'] = 12;
blocks['KNMI'] = {
type: 'weather',
provider: 'knmi',
apikey: '12345678',
city: 'amsterdam',
layout: 4,
width: 12,
count: 3
}
// Made a declaration of block weer at the beginning of my js file. Looks like this (without the slashes
// var weer = 'weer'
blocks[weer] = {}
blocks[weer]['type'] = 'weather';
blocks[weer]['provider'] = 'knmi';
blocks[weer]['apikey'] = '12345678';
blocks[weer]['city'] = 'Amsterdam';
blocks[weer]['layout'] = 4;
blocks[weer]['width'] = 12;
blocks[weer]['count'] = 3;
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
Can you try with a minimal config.js with just the following block and see if this works:
Code: Select all
blocks['KNMI'] = {
type: 'weather',
provider: 'knmi',
apikey: '12345678',
city: 'amsterdam',
layout: 4,
width: 12,
count: 3
}
Blah blah blah
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Re: KNMI API in Dashticz
Tx for your reply. I created a new config file and only added the weather block(s) to it. Unfortunately I get the same results.
The code I used:
Additional info: using Dashticz latest beta, tested on tablet, desktop and different browsers.
If there is a problem in my config file, I just don't see it
EDIT: And just when you think you can't see it, you see it I disabled in my config file and now all is working as it should. Thanks HansieNL for your support and tip!
The code I used:
Code: Select all
// --------------------------------------------------------------------------------------------
// Algemene configuratie
// --------------------------------------------------------------------------------------------
var config = {}
// Aanpassing om Weather icons op oude tablet te laten zien
config['use_cors'] = 1;
// einde aanpassing
config['domoticz_ip'] = 'http://111.222.333.444:2080'; ,-fake of course ;-)
config['login_timeout'] = '60';
config['user_name'] = '';
config['pass_word'] = '';
config['app_title'] = 'Home Control';
config['room_plan'] = '0';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '1440';
config['dashticz_php_path'] = './vendor/dashticz/';
config['standby_call_url'] = '0';
config['standby_call_url_on_end'] = '0';
config['theme'] = 'default';
config['background_image'] = 'bg14.jpg';
config['standby_after'] = '0';
config['start_page'] = '1';
config['enable_swiper'] = '2';
config['vertical_scroll'] = '2';
config['auto_swipe_back_to'] = '1';
config['auto_swipe_back_after'] = '0';
config['auto_slide_pages'] = '0';
config['slide_effect'] = 'slide';
config['standard_graph'] = 'month';
config['blink_color'] = '255, 255, 255, 1';
config['language'] = 'nl_NL';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = '0';
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = '0';
config['gm_zoomlevel'] = '0';
config['gm_latitude'] = '0';
config['gm_longitude'] = '0';
config['speak_lang'] = 'nl-NL';
config['switch_horizon'] = '0';
config['setpoint_min'] = '5';
config['setpoint_max'] = '40';
config['loginEnabled'] = 0;
config['disable_update_check'] = 0;
config['no_rgb'] = 0;
config['hide_off_button'] = 0;
config['auto_positioning'] = 1;
config['use_favorites'] = 0;
config['disable_googleanalytics'] = 1;
config['last_update'] = 1;
config['hide_topbar'] = 0;
config['security_button_icons'] = 1;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['hide_mediaplayer'] = 0;
// Graph settings
config['graph_zoom'] = 1;
// --------------------------------------------------------------------------------------------
// Scherm configuratie
// --------------------------------------------------------------------------------------------
var max_resolution_desktop = 'default';
var max_resolution_tablet = 'tablet';
var max_resolution_phone = 'phone';
// --------------------------------------------------------------------------------------------
// Apparaat definities
// --------------------------------------------------------------------------------------------
// Weer block
var weer = 'weer'
// --------------------------------------------------------------------------------------------
// Buttons
// --------------------------------------------------------------------------------------------
var buttons = {}
// --------------------------------------------------------------------------------------------
// Blocks
// --------------------------------------------------------------------------------------------
var blocks = {}
// --------------------------------------------------------------------------------------------
// Weer
// --------------------------------------------------------------------------------------------
//// Open Weather Maps actueel weer
//blocks['currentweather_big_owm'] = {}
//blocks['currentweather_big_owm']['width'] = 8;
// Open Weather Maps 5 daagse voorspelling
blocks['weather_owm'] = {}
blocks['weather_owm']['width'] = 12;
blocks['KNMI'] = {
type: 'weather',
provider: 'knmi',
apikey: '12345678',
city: 'amsterdam',
layout: 4,
width: 12,
count: 3
}
// Made a declaration of block weer at the beginning of my js file. Looks like this (without the slashes
// var weer = 'weer'
blocks[weer] = {}
blocks[weer]['type'] = 'weather';
blocks[weer]['provider'] = 'knmi';
blocks[weer]['apikey'] = '04281a95aa';
blocks[weer]['city'] = 'Amsterdam';
blocks[weer]['layout'] = 4;
blocks[weer]['width'] = 12;
blocks[weer]['count'] = 3;
// --------------------------------------------------------------------------------------------
// Columns
// --------------------------------------------------------------------------------------------
var columns = {}
// Aangepaste invulling voor de titelbalk
columns['bar'] = {}
columns['bar']['blocks'] = ['logo','miniclock','sunrise']
// Screen 1 voor tablet
columns[1] = {}
columns[1]['blocks'] = [weer, 'KNMI']
columns[1]['width'] = 8;
// --------------------------------------------------------------------------------------------
// Screens
// --------------------------------------------------------------------------------------------
var screens = {}
// Tablet
screens[max_resolution_tablet] = {}
screens[max_resolution_tablet]['maxwidth'] = 1280;
screens[max_resolution_tablet]['maxheight'] = 800;
screens[max_resolution_tablet][1] = {}
screens[max_resolution_tablet][1]['background'] = 'bg14.jpg';
screens[max_resolution_tablet][1]['columns'] = [1]
If there is a problem in my config file, I just don't see it
EDIT: And just when you think you can't see it, you see it I disabled
Code: Select all
config['use_cors'] = 1;
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: KNMI API in Dashticz
I am from Poland, from the town of Szerzyny, how can I add Poland and such a town to have the weather? Generally the block works and the weather from amsterdam is shown
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: KNMI API in Dashticz
KNMI is the Dutch weatherservice. You can use the OpenWeatherMap (OWM) service which has support for most (larger) cities around the world.Daro1003 wrote:I am from Poland, from the town of Szerzyny, how can I add Poland and such a town to have the weather? Generally the block works and the weather from amsterdam is shown
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
Re: KNMI API in Dashticz
tested KNMI for some months. Pretty bad. Says cloudy on sunny days.
Back to OpenWheatherMap for me
Back to OpenWheatherMap for me
-
- Posts: 81
- Joined: Friday 10 July 2020 22:56
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: KNMI API in Dashticz
Yes unfortunately I also notice that knmi deviates quite a bit, I also have continuous clouds while the sky is clear blue or similar....
But it seems like all weather stations are pretty wrong lately.
But it seems like all weather stations are pretty wrong lately.
Who is online
Users browsing this forum: No registered users and 1 guest