@sdetweil
In the console - sources it says:
Uncaught SyntaxError: Unexpected token 'if'
@sdetweil
In the console - sources it says:
Uncaught SyntaxError: Unexpected token 'if'
// Default values
defaults: {
P1_IP: null, // IP Address P1 Meter
WM_IP: null, // IP Address Water Meter
maxWidth: "500px", // Max width wrapper
extraInfo: false, // Show extra information
showFooter: false, // Show footer (name Power Meter)
currentPower: true, // Show current power usage
initialLoadDelay: 1000,
updateInterval: 10000 // Every 10 seconds
},
In the script it will assume you have 2 different IP addresses to query an URL.
1 IP for the HomeWizard P1 meter
1 IP for the HomeWizard Water Meter
This is because I like to show the information of both in 1 script. Everything works fine if both are used, but when someone only has the P1 meter, the IP for the Water Meter is not used and results in a console fetch error (normal behavior)
[ERROR] Error: TypeError: fetch failed
at node:internal/deps/undici/undici:13178:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[cause]: Error: getaddrinfo ENOTFOUND null
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'null'
}
}
Is there a way to switch URL in case one of both URL are NULL? I’ve tried, but it doesn’t work with if-else
start: function () {
Log.info("Starting module: " + this.name);
requiresVersion: "2.9.0",
// Set locales
if (this.config.P1_IP != null) {
this.urlP1 = "http://" + this.config.P1_IP + "/api/v1/data/";
} else {
this.urlP1 = "https://dummyjson.com/c/7e24-36ab-48e0-a96d";
}
if (this.config.WM_IP != null) {
this.urlWM = "http://" + this.config.WM_IP + "/api/v1/data/";
} else {
this.urlWM = "https://dummyjson.com/c/704a-9a96-4845-bc72";
}
this.MHW_P1 = []; // <-- Create empty MHW_P1 array
this.MHW_WM = []; // <-- Create empty MHW_WM array
this.scheduleUpdate(); // <-- When the module updates (see below)
},
@sdetweil Thnx, you helped me a lot!!
@sdetweil Wow, it works!
Just checking, it has to be done in node_helper and the MMM-Module?
@sdetweil I’ve changed it into this, but still only result from the WaterMeter and not the P1 meter
socketNotificationReceived: function(notification, payload) {
if (notification === "MHWP1_RESULT") {
// this notification doesn't come back on error..
this.processMHW_P1(payload);
this.updateDom(this.config.initialLoadDelay);
}
else if (notification === "MHWWM_RESULT") {
// this notification doesn't come back on error..
this.processMHW_WM(payload);
this.updateDom(this.config.initialLoadDelay);
}
},
I hope I describe it correct and you understand what I mean.
I’m writing a new module which has to display the information from 2 different URL’s.
When I query them seperate than everythink works OK.
But I want to do query from URL-1 to JSON (MHW-P1) and URL-2 to JSON (MHW-WM).
Is this possible and how?
This is what I’ve came up with, but it doesn’t work.
node_helper.js
// P1 Meter section
//
getMHW_P1: function(urlP1) {
// Make a GET request using the Fetch API for the P1 Meter
fetch(urlP1)
.then(response_P1 => {
if (!response_P1.ok) {
console.error('MMM-MyHomeWizard: Network response was not ok');
}
return response_P1.json();
})
.then(result_P1 => {
// Process the retrieved user data
console.log(result_P1); // Remove trailing slashes to display data in Console for testing
this.sendSocketNotification('MHWP1_RESULT', result_P1);
})
.catch(error => {
console.error('Error:', error);
});
},
socketNotificationReceived: function(notification, payload_P1) {
if (notification === 'GET_MHWP1') {
this.getMHW_P1(payload_P1);
}
},
// Water Meter Section
//
getMHW_WM: function(urlWM) {
// Make a GET request using the Fetch API for the Water Meter
fetch(urlWM)
.then(response_WM => {
if (!response_WM.ok) {
console.error('MMM-MyHomeWizard: Network response was not ok');
}
return response_WM.json();
})
.then(result_WM => {
// Process the retrieved user data
console.log(result_WM); // Remove trailing slashes to display data in Console for testing
this.sendSocketNotification('MHWWM_RESULT', result_WM);
})
.catch(error => {
console.error('Error:', error);
});
},
socketNotificationReceived: function(notification, payload_WM) {
if (notification === 'GET_MHWWM') {
this.getMHW_WM(payload_WM);
}
},
MMM-MyModules.js
// <-- P1 Meter Section -->
// This processes your data P1 Meter
processMHW_P1: function(data_P1) {
this.MHW_P1 = data_P1;
console.log(JSON.stringify(this.MHW_P1)); // uncomment to see if you're getting data (in dev console)
this.loaded = true;
},
// this tells module when to update
scheduleUpdate: function() {
setInterval(() => {
this.getMHW_P1();
this.getMHW_WM();
}, this.config.updateInterval);
this.getMHW_P1();
this.getMHW_WM();
var self = this;
},
// this asks node_helper for data
getMHW_P1: function() {
this.sendSocketNotification('GET_MHWP1', this.urlP1);
},
// this gets data from node_helper
socketNotificationReceived: function(notification_P1, payload_P1) {
if (notification_P1 === "MHWP1_RESULT") {
// this notification doesn't come back on error..
this.processMHW_P1(payload_P1);
this.updateDom(this.config.initialLoadDelay);
}
},
//<-- Water Meter Section -->
// This processes your data Water Meter
processMHW_WM: function(data_WM) {
this.MHW_WM = data_WM;
console.log(JSON.stringify(this.MHW_WM)); // uncomment to see if you're getting data (in dev console)
this.loaded = true;
},
/* // this tells module when to update
scheduleUpdate: function() {
setInterval(() => {
this.getMHW_WM();
}, this.config.updateInterval);
this.getMHW_WM();
var self = this;
},
*/
// this asks node_helper for data
getMHW_WM: function() {
this.sendSocketNotification('GET_MHWWM', this.urlWM);
},
// this gets data from node_helper
socketNotificationReceived: function(notification_WM, payload_WM) {
if (notification_WM === "MHWWM_RESULT") {
// this notification doesn't come back on error..
this.processMHW_WM(payload_WM);
this.updateDom(this.config.initialLoadDelay);
}
},
I hope somebody can help me with this.
I'm not a programmer, but I try to do my best ;-)
@htilburgs
Currently I’ve installed it with a work-around.
I try to install with
git pull https://github.com/Hoaxr/MMM-HomeWizard.git
This failes. i got errors
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 24 (delta 6), reused 12 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (24/24), 7.95 KiB | 232.00 KiB/s, done.
From https://github.com/Hoaxr/MMM-HomeWizard
* branch HEAD -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
@sdetweil Thanks, that works!
Now I can really see what I’m doing.
@sdetweil said in Get the correct JSON data:
let foovar = payload.liveweer[0]
Is there a simple way to check what is in foovar?
@sdetweil said in Get the correct JSON data:
coverts directly into js with the same structure
I will try tonight. I’m at work (yeh right ;-) right now.
@sdetweil
As I told you I have to figure out how. I always have problems with understanding how JSON works. But no problem, it keeps me of the streets.
I haven’t been active for the last 3 years, but now I’ve found time and trying to complete / change some modules.
But thanks for you help.
@sdetweil
One calll, here you can see (demo data)
https://weerlive.nl/api/weerlive_api_v2.php?key=demo&locatie=Amsterdam
@sdetweil
First of all, thank you for looking it to it (again).
The thing is, with the API 1.0 everything was returned in 1 “array”.
Now with the API 2.0 they have split everyting and returned multiple “arrays”.
object {4}
liveweer [1]
0 {29}
plaats : Amsterdam
timestamp : 1731476283
time : 13-11-2024 06:38:03
temp : 5.4
gtemp : 5.4
samenv : Zwaar bewolkt
lv : 98
windr : NNW
windrgr : 327.7
windms : 0.7
windbft : 1
windknp : 1.4
windkmh : 2.5
luchtd : 1033.49
ldmmhg : 775
dauwp : 5.2
zicht : 3720
gr : 0
verw : Overwegend droog, vanochtend plaatselijk (dichte) mist
sup : 07:57
sunder : 16:52
image : wolkennacht
alarm : 0
lkop : In het oosten vanochtend plaatselijk dichte mist
ltekst : In de provincies Overijssel en Gelderland komt plaatselijk dichte mist voor. In de loop van de ochtend lost de mist op.Hiervan kunnen verkeer en buitenactiviteiten hinder ondervinden.Wat kan ik verwachten en wat kan ik doen?Meer detailsIn de mist komen plaatselijk zichten voor van minder dan 200 meter. De kans op dichte mist kan zich de komende uren uitbreiden naar het zuiden. In de tweede helft van de ochtend lost de mist op.
wrschklr : groen
wrsch_g : -
wrsch_gts : 0
wrsch_gc : -
wk_verw [5]
0 {12}
dag : 13-11-2024
image : bewolkt
max_temp : 12
min_temp : 7
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 294
windr : W
neersl_perc_dag : 0
zond_perc_dag : 12
1 {12}
dag : 14-11-2024
image : halfbewolkt
max_temp : 12
min_temp : 10
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 317
windr : NW
neersl_perc_dag : 0
zond_perc_dag : 28
2 {12}
dag : 15-11-2024
image : halfbewolkt
max_temp : 13
min_temp : 8
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 306
windr : NW
neersl_perc_dag : 0
zond_perc_dag : 24
3 {12}
dag : 16-11-2024
image : halfbewolkt
max_temp : 12
min_temp : 7
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 287
windr : W
neersl_perc_dag : 0
zond_perc_dag : 24
4 {12}
dag : 17-11-2024
image : bewolkt
max_temp : 9
min_temp : 8
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 269
windr : W
neersl_perc_dag : 0
zond_perc_dag : 7
uur_verw [24]
0 {12}
uur : 13-11-2024 07:00
timestamp : 1731477600
image : bewolkt
temp : 8
windbft : 2
windkmh : 7
windknp : 4
windms : 2
windrgr : 312
windr : NW
neersl : 0
gr : 0
1 {12}
uur : 13-11-2024 08:00
timestamp : 1731481200
image : halfbewolkt
temp : 9
windbft : 2
windkmh : 7
windknp : 4
windms : 2
windrgr : 289
windr : W
neersl : 0
gr : 11
2 {12}
uur : 13-11-2024 09:00
timestamp : 1731484800
image : halfbewolkt
temp : 10
windbft : 2
windkmh : 7
windknp : 4
windms : 2
windrgr : 268
windr : W
neersl : 0
gr : 64
3 {12}
uur : 13-11-2024 10:00
timestamp : 1731488400
image : bewolkt
temp : 11
windbft : 2
windkmh : 7
windknp : 4
windms : 2
windrgr : 276
windr : W
neersl : 0
gr : 64
4 {12}
uur : 13-11-2024 11:00
timestamp : 1731492000
image : halfbewolkt
temp : 12
windbft : 2
windkmh : 7
windknp : 4
windms : 2
windrgr : 318
windr : NW
neersl : 0
gr : 125
5 {12}
uur : 13-11-2024 12:00
timestamp : 1731495600
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 340
windr : NW
neersl : 0
gr : 227
6 {12}
uur : 13-11-2024 13:00
timestamp : 1731499200
image : halfbewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 339
windr : NW
neersl : 0
gr : 86
7 {12}
uur : 13-11-2024 14:00
timestamp : 1731502800
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 336
windr : NW
neersl : 0
gr : 28
8 {12}
uur : 13-11-2024 15:00
timestamp : 1731506400
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 335
windr : NW
neersl : 0
gr : 14
9 {12}
uur : 13-11-2024 16:00
timestamp : 1731510000
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 327
windr : NW
neersl : 0
gr : 3
10 {12}
uur : 13-11-2024 17:00
timestamp : 1731513600
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 324
windr : NW
neersl : 0
gr : 0
11 {12}
uur : 13-11-2024 18:00
timestamp : 1731517200
image : bewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 331
windr : NW
neersl : 0
gr : 0
12 {12}
uur : 13-11-2024 19:00
timestamp : 1731520800
image : bewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 320
windr : NW
neersl : 0
gr : 0
13 {12}
uur : 13-11-2024 20:00
timestamp : 1731524400
image : bewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 316
windr : NW
neersl : 0
gr : 0
14 {12}
uur : 13-11-2024 21:00
timestamp : 1731528000
image : bewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 319
windr : NW
neersl : 0
gr : 0
15 {12}
uur : 13-11-2024 22:00
timestamp : 1731531600
image : bewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 319
windr : NW
neersl : 0
gr : 0
16 {12}
uur : 13-11-2024 23:00
timestamp : 1731535200
image : nachtbewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 318
windr : NW
neersl : 0.1
gr : 0
17 {12}
uur : 14-11-2024 00:00
timestamp : 1731538800
image : nachtbewolkt
temp : 12
windbft : 2
windkmh : 10
windknp : 6
windms : 3
windrgr : 318
windr : NW
neersl : 0
gr : 0
18 {12}
uur : 14-11-2024 01:00
timestamp : 1731542400
image : regen
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 338
windr : NW
neersl : 0.5
gr : 0
19 {12}
uur : 14-11-2024 02:00
timestamp : 1731546000
image : regen
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 351
windr : N
neersl : 0.2
gr : 0
20 {12}
uur : 14-11-2024 03:00
timestamp : 1731549600
image : bewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 337
windr : NW
neersl : 0
gr : 0
21 {12}
uur : 14-11-2024 04:00
timestamp : 1731553200
image : nachtbewolkt
temp : 12
windbft : 3
windkmh : 18
windknp : 10
windms : 5
windrgr : 350
windr : N
neersl : 0
gr : 0
22 {12}
uur : 14-11-2024 05:00
timestamp : 1731556800
image : nachtbewolkt
temp : 12
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 1
windr : N
neersl : 0
gr : 0
23 {12}
uur : 14-11-2024 06:00
timestamp : 1731560400
image : nachtbewolkt
temp : 11
windbft : 3
windkmh : 14
windknp : 8
windms : 4
windrgr : 349
windr : N
neersl : 0
gr : 0
api [1]
0 {3}
bron : Bron: Weerdata KNMI/NOAA via Weerlive.nl
max_verz : 300
rest_verz : 0
Current weather in “liveweer [0]”, hourly weather in “uur_verw [0-24]” and weekly weather in “wk_verw [0-5]”
So I think I have to make severay arrays and fill this with the data.
From node_helper.js -> MWB and than put everything in three seperates arrays, something like this:
var MWB = this.MWB;
var WL = this.MWB.liveweer;
var WH = this.MWB.uur_verw;
var WW = this.MWB.wk_verw;
var API = this.MWB.api;
This I’ve to figure out in the next days, weeks, … ;-)
@sdetweil
Hi Sam, in the meantime I was looking further than the length of my nose and I saw when I leave the .liveweer[‘0’] from the result than I get everything.
But because I had been changing a lot, it took me a while before I got the correct results.
.then(result => {
// Process the retrieved user data
console.log(result); // Remove trailing slashes to display data in Console for testing
this.sendSocketNotification('MWB_RESULT', result);
})
I didn’t even have to use the JSON.stringify
Next time I play around for 1/2 hour more, before I place my message. But thanks anyway ;-)
In my v1.0 version of MMM-MyDutchWeather there I was using the v1.0 API.
I executed this URL Weerlive API 1.0 and got the next results:
{
"liveweer": [
{
"plaats": "Amsterdam",
"timestamp": "1731422596",
"time": "12-11-2024 15:43",
"temp": "9.7",
"gtemp": "6.8",
"samenv": "Licht bewolkt",
"lv": "76",
"windr": "NO",
"windrgr": "44",
"windms": "6",
"winds": "4",
"windk": "11.7",
"windkmh": "21.6",
"luchtd": "1033.9",
"ldmmhg": "775",
"dauwp": "6",
"zicht": "16",
"verw": "Hier en daar zon en overwegend droog",
"sup": "07:55",
"sunder": "16:54",
"image": "lichtbewolkt",
"d0weer": "bewolkt",
"d0tmax": "11",
"d0tmin": "7",
"d0windk": "2",
"d0windknp": "6",
"d0windms": "3",
"d0windkmh": "11",
"d0windr": "NO",
"d0windrgr": "44",
"d0neerslag": "0",
"d0zon": "10",
"d1weer": "bewolkt",
"d1tmax": "12",
"d1tmin": "4",
"d1windk": "2",
"d1windknp": "4",
"d1windms": "2",
"d1windkmh": "7",
"d1windr": "NW",
"d1windrgr": "315",
"d1neerslag": "30",
"d1zon": "10",
"d2weer": "bewolkt",
"d2tmax": "12",
"d2tmin": "6",
"d2windk": "2",
"d2windknp": "6",
"d2windms": "3",
"d2windkmh": "11",
"d2windr": "N",
"d2windrgr": "0",
"d2neerslag": "20",
"d2zon": "10",
"alarm": "0"
}
]
}
In the node_helper.js I used
getMWB: function(url) {
// Make a GET request using the Fetch API
fetch(url)
.then(response => {
if (!response.ok) {
console.error('MMM-MyDutchWeather: Network response was not ok');
}
return response.json();
})
.then(result => {
// Process the retrieved user data
console.log(result.liveweer['0']); // Remove trailing slashes to display data in Console for testing
// console.log(result.wk_verw['0']);
this.sendSocketNotification('MWB_RESULT', result.liveweer['0']);
})
.catch(error => {
console.error('Error:', error);
});
},
With the new v2.0 API Weerlive API 2.0 I become the next results
{
"liveweer": [
{
"plaats": "Amsterdam",
"timestamp": 1731423484,
"time": "12-11-2024 15:58:04",
"temp": 9.6,
"gtemp": 7.3,
"samenv": "Licht bewolkt",
"lv": 79,
"windr": "ONO",
"windrgr": 44.5,
"windms": 4.33,
"windbft": 3,
"windknp": 8.4,
"windkmh": 15.6,
"luchtd": 1033.89,
"ldmmhg": 775,
"dauwp": 6.2,
"zicht": 19400,
"gr": 97,
"verw": "Hier en daar zon en overwegend droog",
"sup": "07:55",
"sunder": "16:54",
"image": "lichtbewolkt",
"alarm": 0,
"lkop": "Er zijn geen waarschuwingen",
"ltekst": " Er zijn momenteel geen waarschuwingen van kracht.",
"wrschklr": "groen",
"wrsch_g": "-",
"wrsch_gts": 0,
"wrsch_gc": "-"
}
],
"wk_verw": [
{
"dag": "12-11-2024",
"image": "halfbewolkt",
"max_temp": 11,
"min_temp": 7,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 48,
"windr": "NO",
"neersl_perc_dag": 0,
"zond_perc_dag": 27
},
{
"dag": "13-11-2024",
"image": "bewolkt",
"max_temp": 12,
"min_temp": 7,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 205,
"windr": "Z",
"neersl_perc_dag": 0,
"zond_perc_dag": 12
},
{
"dag": "14-11-2024",
"image": "halfbewolkt",
"max_temp": 12,
"min_temp": 10,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 258,
"windr": "W",
"neersl_perc_dag": 0,
"zond_perc_dag": 28
},
{
"dag": "15-11-2024",
"image": "halfbewolkt",
"max_temp": 13,
"min_temp": 8,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 265,
"windr": "W",
"neersl_perc_dag": 0,
"zond_perc_dag": 24
},
{
"dag": "16-11-2024",
"image": "halfbewolkt",
"max_temp": 12,
"min_temp": 7,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 257,
"windr": "ZW",
"neersl_perc_dag": 0,
"zond_perc_dag": 24
}
],
"uur_verw": [
{
"uur": "12-11-2024 16:00",
"timestamp": 1731423600,
"image": "zonnig",
"temp": 10,
"windbft": 3,
"windkmh": 14,
"windknp": 8,
"windms": 4,
"windrgr": 50,
"windr": "NO",
"neersl": 0,
"gr": 28
},
{
"uur": "12-11-2024 17:00",
"timestamp": 1731427200,
"image": "nachtbewolkt",
"temp": 10,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 36,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 18:00",
"timestamp": 1731430800,
"image": "bewolkt",
"temp": 9,
"windbft": 3,
"windkmh": 14,
"windknp": 8,
"windms": 4,
"windrgr": 37,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 19:00",
"timestamp": 1731434400,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 35,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 20:00",
"timestamp": 1731438000,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 33,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 21:00",
"timestamp": 1731441600,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 40,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 22:00",
"timestamp": 1731445200,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 43,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "12-11-2024 23:00",
"timestamp": 1731448800,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 37,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 00:00",
"timestamp": 1731452400,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 355,
"windr": "N",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 01:00",
"timestamp": 1731456000,
"image": "bewolkt",
"temp": 9,
"windbft": 1,
"windkmh": 3,
"windknp": 2,
"windms": 1,
"windrgr": 347,
"windr": "NW",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 02:00",
"timestamp": 1731459600,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 24,
"windr": "NO",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 03:00",
"timestamp": 1731463200,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 354,
"windr": "N",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 04:00",
"timestamp": 1731466800,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 346,
"windr": "NW",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 05:00",
"timestamp": 1731470400,
"image": "bewolkt",
"temp": 9,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 4,
"windr": "N",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 06:00",
"timestamp": 1731474000,
"image": "bewolkt",
"temp": 10,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 349,
"windr": "N",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 07:00",
"timestamp": 1731477600,
"image": "bewolkt",
"temp": 10,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 323,
"windr": "NW",
"neersl": 0,
"gr": 0
},
{
"uur": "13-11-2024 08:00",
"timestamp": 1731481200,
"image": "bewolkt",
"temp": 10,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 294,
"windr": "W",
"neersl": 0,
"gr": 19
},
{
"uur": "13-11-2024 09:00",
"timestamp": 1731484800,
"image": "bewolkt",
"temp": 11,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 311,
"windr": "NW",
"neersl": 0,
"gr": 69
},
{
"uur": "13-11-2024 10:00",
"timestamp": 1731488400,
"image": "bewolkt",
"temp": 11,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 16,
"windr": "NO",
"neersl": 0,
"gr": 61
},
{
"uur": "13-11-2024 11:00",
"timestamp": 1731492000,
"image": "halfbewolkt",
"temp": 12,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 41,
"windr": "NO",
"neersl": 0,
"gr": 208
},
{
"uur": "13-11-2024 12:00",
"timestamp": 1731495600,
"image": "halfbewolkt",
"temp": 13,
"windbft": 2,
"windkmh": 7,
"windknp": 4,
"windms": 2,
"windrgr": 330,
"windr": "NW",
"neersl": 0,
"gr": 299
},
{
"uur": "13-11-2024 13:00",
"timestamp": 1731499200,
"image": "bewolkt",
"temp": 13,
"windbft": 3,
"windkmh": 14,
"windknp": 8,
"windms": 4,
"windrgr": 347,
"windr": "NW",
"neersl": 0,
"gr": 175
},
{
"uur": "13-11-2024 14:00",
"timestamp": 1731502800,
"image": "bewolkt",
"temp": 13,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 343,
"windr": "NW",
"neersl": 0,
"gr": 108
},
{
"uur": "13-11-2024 15:00",
"timestamp": 1731506400,
"image": "bewolkt",
"temp": 13,
"windbft": 2,
"windkmh": 10,
"windknp": 6,
"windms": 3,
"windrgr": 347,
"windr": "NW",
"neersl": 0,
"gr": 25
}
],
"api": [
{
"bron": "Bron: Weerdata KNMI/NOAA via Weerlive.nl",
"max_verz": 300,
"rest_verz": 0
}
]
}
Now I’m wondering how do I get this in my Array to use?
I’ve been trying but I don’t have any results. Can someone help me?
I’m doing this for a hobby ;-)
@gonzonia Are you using X11 or Wayland?
Because now you’re using mode 2 and that’s for X11