Page 1 of 1

Weather forecast

Posted: Saturday 19 October 2024 19:37
by Dave47
How can we setup KNMI weather in Dashticz
We have a API -key

I made in Dasthicz this block

Code: Select all

 blocks['weather'] = {
  type: 'weather',
  apikey: 'our key', //Your API key
  city: 'Amsterdam',
}  
Nothing shows in Dashticz.
What is wrong?

Must we setup KNMI in Domoticz first?
If yes, there is nothning for KNMI in the hardware setup

Re: Weather forecast

Posted: Saturday 19 October 2024 20:16
by HansieNL
Can you add the following code to your block and see if that works for you

Code: Select all

  provider: 'knmi',

Re: Weather forecast

Posted: Saturday 19 October 2024 22:18
by Dave47

Code: Select all

    provider: 'knmi',   

It doesnt work.

I have no setup in Domoticz for knmi
Do i need that also?

Re: Weather forecast

Posted: Saturday 19 October 2024 23:06
by HansieNL
KNMI block will work without Domoticz settings.
I just tried with my API and got a weather forecast, so there must still be something wrong.
I would suggest to create a minimal CONFIG.js to test.

Re: Weather forecast

Posted: Saturday 19 October 2024 23:49
by Dave47
Ok. I will try that

Re: Weather forecast

Posted: Sunday 20 October 2024 16:55
by HansieNL
Before you can use the weather module, you must request an API key at: https://weerlive.nl/api/toegang/index.php

Like I told before I tried with minimal CONFIG.js:

Code: Select all

var config = {}
config['domoticz_ip'] = 'http://192.168.1.123:8123'; // change to your own IP-address and port
config['app_title'] = 'Dashticz V3';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';

var blocks = {}

blocks['weather'] = {
  type: 'weather',
  provider: 'knmi',
  apikey: 'apikey1234', // change to your own Weerlive API-key
  city: 'Amsterdam',
  count: 3
}

var columns = {}
columns['bar'] = {}
columns['bar']['blocks'] = ['logo','miniclock','settings']

columns[1] = {}
columns[1]['blocks'] = ['weather']
columns[1]['width'] = 5;

var screens = {}
screens[1] = {}
screens[1]['background'] = 'bg2.jpg';
screens[1]['columns'] = [1]

Re: Weather forecast

Posted: Sunday 20 October 2024 17:31
by Dave47
I tried that but is not working.

When i do the url in the browser it works with that API

Re: Weather forecast

Posted: Tuesday 22 October 2024 11:25
by Dave47
We have a beta dashticz version.
Is that the problem?

Re: Weather forecast

Posted: Tuesday 22 October 2024 15:11
by HansieNL
Should be no problem. You have latest beta? If not, can you try with latest beta and see if it then works.
You can copy my minimal CONFIG.js and just change IP and Key and that should normally work.
Be sure there is no custom.js or custom.css, because that may affect the working of CONFIG.js