Water level river Waal
Moderators: leecollings, remb0
-
- Posts: 229
- Joined: Wednesday 30 April 2014 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Water level river Waal
The various water levels in the Netherlands can be viewed on the basis of this link (https://waterinfo.rws.nl/#!/kaart/waterhoog/). Is it possible to display the water level of the Nijmegen haven measuring point in Domoticz?
Thanks in advance!
Jan
Thanks in advance!
Jan
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Hello @Jan Jansen,
Good afternoon Jan,
If you inspect the map, displayed at: https://waterinfo.rws.nl/#!/kaart/waterhoogte/ and click on the desired measuring point, you will move on to the details. As an example we will use the measuring point "Nijmegen haven". (click on it and go to More details)
By default you will get all data from 2 days back to 2 days ahead. You can change that to 6 hours back to 3 hours ahead. Also 2 other time windows are possible, but not interesting for now.
If you use the following URL: https://waterinfo.rws.nl/api/chart?mapT ... alues=-6,3,
you will get a JSON response with the required data for that location.
Keep in mind that the time is noted in UTC (Zulu time zone) and that the data is updated every 10 minutes.
You have used Node Red before and if you insert that URL in a http request node, you will get the following:
The last data measured is always in the last object of the array. Currently, as you can see, the water height is 961 cm, measured at 16:00 h CET.
After that array you will get the predictions.
If you need some support in pushing it to a Domoticz virtual sensor, let me know.
Best regards
Good afternoon Jan,
Yes, that is possible.Is it possible to display the water level of the Nijmegen haven measuring point in Domoticz?
If you inspect the map, displayed at: https://waterinfo.rws.nl/#!/kaart/waterhoogte/ and click on the desired measuring point, you will move on to the details. As an example we will use the measuring point "Nijmegen haven". (click on it and go to More details)
By default you will get all data from 2 days back to 2 days ahead. You can change that to 6 hours back to 3 hours ahead. Also 2 other time windows are possible, but not interesting for now.
If you use the following URL: https://waterinfo.rws.nl/api/chart?mapT ... alues=-6,3,
you will get a JSON response with the required data for that location.
Keep in mind that the time is noted in UTC (Zulu time zone) and that the data is updated every 10 minutes.
You have used Node Red before and if you insert that URL in a http request node, you will get the following:
The last data measured is always in the last object of the array. Currently, as you can see, the water height is 961 cm, measured at 16:00 h CET.
After that array you will get the predictions.
If you need some support in pushing it to a Domoticz virtual sensor, let me know.
Best regards
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
For some reason I only get an XML result when I use this URL in chrome.FireWizard wrote: ↑Sunday 31 January 2021 16:42 If you use the following URL: https://waterinfo.rws.nl/api/chart?mapT ... alues=-6,3,
you will get a JSON response with the required data for that location.
- Spoiler: show
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Hello @waaren
I have to confess, that I have seen that as well, if I use Chrome.
You can normally browse with Chrome to that page, but if you try to inspect that page, you will see an error.
I inserted the URL in the http request node of Node Red and it works fine. See the picture.
I'm sure that there is something in the webpage, but I do not see, what it is.
Regards
I have to confess, that I have seen that as well, if I use Chrome.
You can normally browse with Chrome to that page, but if you try to inspect that page, you will see an error.
and alsoDevTools failed to load SourceMap: Could not load content for https://waterinfo.rws.nl/scripts/ol.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
I found the URL with the Inspector of Firefox. In Firefox it functions. However if I open in Firefox another tab and I copy the URL to that tab I also see XML code. No idea why.Error: Unexpected end of JSON input
I inserted the URL in the http request node of Node Red and it works fine. See the picture.
I'm sure that there is something in the webpage, but I do not see, what it is.
Regards
-
- Posts: 229
- Joined: Wednesday 30 April 2014 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Water level river Waal
@ FireWizard; @Waaren,
I found some more information:
https://github.com/Rijkswaterstaat/wm-ws-dl
https://github.com/tomkr/waterstanden
http://www.weerstation-nijmegen-lent.nl ... -Rijn-Waal
I can't handle it myself, far beyond my own skills.
Regards,
Jan
I found some more information:
https://github.com/Rijkswaterstaat/wm-ws-dl
https://github.com/tomkr/waterstanden
http://www.weerstation-nijmegen-lent.nl ... -Rijn-Waal
I can't handle it myself, far beyond my own skills.
Regards,
Jan
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
It is up to you if you want this to be handled completely internal in domoticz with dzVents or if you prefer nodered.
For dzvents:
The loglines of below dzVents script shows what the link @fireWizard shared does return to domoticz.
To what type of device you would like to see which of below result(s)?
Code: Select all
scriptvar = 'waterpeilNijmegen'
return
{
on =
{
timer =
{
'every 1 minutes' -- just an example to trigger the request
},
httpResponses =
{
scriptVar, -- must match with the callback passed to the openURL command
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'waterstand',
},
execute = function(dz, item)
if item.isTimer or item.isDevice then
dz.openURL(
{
url = 'https://waterinfo.rws.nl/api/chart?mapType=waterhoogte&locationCode=Nijmegen-haven%28NIJM%29&values=-6,3',
callback = scriptVar, -- see httpResponses above.
})
elseif item.isHTTPResponse and item.ok then
dz.utils.dumpTable(item.json)
else
dz.log(item, domoticz.LOG_DEBUG)
end
end
}
- Spoiler: show
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Hello @Jan Jansen,
As @waaren already said, it is up to you whether you choose the solution with dzVents, which is quite compact, or if you choose to implement the solution with Node Red.
As @waaren already presented his solution, I cannot stay behind.
Please find below the Node Red solution.
Flow:
As I have chosen to put the data in a "Text" sensor, you will see the following result:
If you want another sensor, I can adapt the flow, quite easily.
Do not forget to change the IDX number (currently 11).
Best regards
As @waaren already said, it is up to you whether you choose the solution with dzVents, which is quite compact, or if you choose to implement the solution with Node Red.
As @waaren already presented his solution, I cannot stay behind.
Please find below the Node Red solution.
Flow:
Code: Select all
[{"id":"f1324d44.f6688","type":"tab","label":"Waterstanden","disabled":false,"info":""},{"id":"c0e85807.57038","type":"http request","z":"f1324d44.f6688","name":"Waterstand Nijmegen haven","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://waterinfo.rws.nl/api/chart?mapType=waterhoogte&locationCode=Nijmegen-haven(NIJM)&values=-6,3","tls":"","persist":false,"proxy":"","authType":"","x":460,"y":140,"wires":[["85ee7f6b.fcb8e"]]},{"id":"bb820068.b3cc58","type":"inject","z":"f1324d44.f6688","name":"10 Minute Inject","props":[{"p":"payload"}],"repeat":"600","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":140,"wires":[["c0e85807.57038"]]},{"id":"a54daffb.02255","type":"function","z":"f1324d44.f6688","name":"","func":"var time = msg.payload.t0;\nvar height = msg.payload.series[0].data[msg.payload.series[0].data.length - 1].value;\nmsg.payload = {\"command\":\"udevice\", \"idx\":11, \"svalue\":\"Meettijdstip: \" + time +\"\\n\" + \"Waterstand: \" + height + \" cm\"};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":960,"y":140,"wires":[["995c142.98c27e8","90315b4d.41f05"]]},{"id":"995c142.98c27e8","type":"debug","z":"f1324d44.f6688","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1150,"y":200,"wires":[]},{"id":"85ee7f6b.fcb8e","type":"moment","z":"f1324d44.f6688","name":"","topic":"","input":"payload.t0","inputType":"msg","inTz":"ETC/UTC","adjAmount":0,"adjType":"days","adjDir":"add","format":"DD-MM-YYYY/HH:mm:ss","locale":"nl-NL","output":"payload.t0","outputType":"msg","outTz":"Europe/Amsterdam","x":740,"y":140,"wires":[["a54daffb.02255"]]},{"id":"90315b4d.41f05","type":"mqtt out","z":"f1324d44.f6688","name":"To Domoticz","topic":"domoticz/in","qos":"","retain":"","broker":"f9f13036.e28b58","x":1150,"y":140,"wires":[]},{"id":"f9f13036.e28b58","type":"mqtt-broker","name":"localhost","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
As I have chosen to put the data in a "Text" sensor, you will see the following result:
If you want another sensor, I can adapt the flow, quite easily.
Do not forget to change the IDX number (currently 11).
Best regards
-
- Posts: 229
- Joined: Wednesday 30 April 2014 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Water level river Waal
@Waaren and @FireWizard,
First of all, thank you both for your time and attention!
@Waaren,
Hopefully you will find some time to show me how to fill the text sensor from DZVents.
Regards,
Jan
First of all, thank you both for your time and attention!
I use NodeRed and DZVents interchangeably so I don't really have a preference. My choice is determined by the available or provided examples. I can't judge which of the 2 takes the most system load. The NodeRed flow is ready and working. The content of the text sensor used meets my wishes.
@Waaren,
Hopefully you will find some time to show me how to fill the text sensor from DZVents.
Regards,
Jan
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
the method is updateTextJan Jansen wrote: ↑Monday 01 February 2021 14:23 Hopefully you will find some time to show me how to fill the text sensor from DZVents.
Some extra functions are included to extract latest available value and to convert utc to local time.
See below:
Code: Select all
scriptVar = 'waterpeilNijmegen'
return
{
on =
{
timer =
{
'every 10 minutes',
},
httpResponses =
{
scriptVar,
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'waterstand',
},
execute = function(dz, item)
local waterpeil = dz.devices('Waterpeil Nijmegen haven')
local function utcToLocal( tStr )
local utcDelta = os.difftime(os.time(), os.time(os.date("!*t" )) )
return (dz.time.makeTime(tStr:gsub('T',' ')).addSeconds(utcDelta)).raw
end
local function makeText(t)
for _, st in ipairs(t) do
if st.name == 'Waterhoogte Oppervlaktewater t.o.v. Normaal Amsterdams Peil in cm' then
local text = 'Meettijdstip: ' .. utcToLocal(st.data[#st.data].dateTime) .. '\n'
text = text .. 'Waterstand: ' .. dz.utils.round(st.data[#st.data].value) .. ' cm'
return text
end
end
end
if item.isTimer or item.isDevice then
dz.openURL(
{
url = 'https://waterinfo.rws.nl/api/chart?mapType=waterhoogte&locationCode=Nijmegen-haven%28NIJM%29&values=-6,3',
callback = scriptVar, -- see httpResponses above.
})
elseif item.isHTTPResponse and item.ok then
waterpeil.updateText(makeText( item.json.series ))
else
dz.log('Problem with httpResponse status: ' .. item.statusCode, domoticz.LOG_ERROR)
dz.log(item, domoticz.LOG_DEBUG)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Hi all,
I published (a part of) the available data to a "Text" sensor. As users may want to see a little bit more, I extended the flow with some extra (dynamic) information, which is published to an "Alert" sensor.
See the example below and compared with the previous sensor:
The limits (in this example for "Verhoogd" (1300 -1500)) depends on the measuring location.
The modified "Function" node looks as follow:
What ever you may prefer, a "Text" sensor or an "Alert" sensor, that goes from "Low water" (grey) to "Extreme high water" (red).
Best regards
I published (a part of) the available data to a "Text" sensor. As users may want to see a little bit more, I extended the flow with some extra (dynamic) information, which is published to an "Alert" sensor.
See the example below and compared with the previous sensor:
The limits (in this example for "Verhoogd" (1300 -1500)) depends on the measuring location.
The modified "Function" node looks as follow:
Code: Select all
var label = {};
var level;
var time = msg.payload.t0;
var height = msg.payload.series[0].data[msg.payload.series[0].data.length - 1].value;
if (height > msg.payload.limits[5].from) {
level = 4;
label = msg.payload.limits[5].label
} else if (height > msg.payload.limits[4].from) {
level = 3;
label = msg.payload.limits[4].label
} else if (height > msg.payload.limits[3].from) {
level = 2;
label = msg.payload.limits[3].label
} else if (height > msg.payload.limits[1].from) {
level = 1;
label = msg.payload.limits[1].label
} else {
level = 0;
label = msg.payload.limits[0].label
}
msg.payload = {"command":"udevice", "idx":17, "nvalue":level, "svalue":"Meettijdstip: " + time + "\n" + "Waterstand: " + height + " cm" + "\n" + label};
return msg;
Best regards
Re: Water level river Waal
Nice scripts. Maybe an idea to use a device as distance just to get the water height and have a history.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
My choice would be a custom sensor and use the internal domoticz notification system in the device notification tab to receive notifications at the various levels.
Code: Select all
scriptVar = 'waterpeilNijmegen'
return
{
on =
{
timer =
{
'every 10 minutes',
},
httpResponses =
{
scriptVar,
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'waterstand',
},
execute = function(dz, item)
local waterpeilText = dz.devices(834) -- change to ID or 'name' of your text device
local waterpeilCustom = dz.devices(835) -- change to ID or 'name' of your custom sensor
local function utcToLocal( tStr )
local utcDelta = os.difftime(os.time(), os.time(os.date("!*t" )) )
return (dz.time.makeTime(tStr:gsub('T',' ')).addSeconds(utcDelta)).raw
end
local function makeValues(t)
for _, st in ipairs(t) do
if st.name == 'Waterhoogte verwacht Oppervlaktewater t.o.v. Normaal Amsterdams Peil in cm' then
local dateString = utcToLocal(st.data[#st.data].dateTime)
local height = dz.utils.round(st.data[#st.data].value)
local text = 'Verwacht om: ' .. dateString .. '\n' .. 'Waterstand: ' .. height .. ' cm'
-- dz.utils.dumpTable(st.data) -- When debugging
return text, height
end
end
end
if item.isTimer or item.isDevice then
dz.openURL(
{
url = 'https://waterinfo.rws.nl/api/chart?mapType=waterhoogte&locationCode=Nijmegen-haven%28NIJM%29&values=-6,3',
callback = scriptVar,
})
elseif item.isHTTPResponse and item.ok then
local text, level = makeValues( item.json.series )
waterpeilText.updateText(text)
waterpeilCustom.updateCustomSensor(level)
else
dz.log('Problem with httpResponse status: ' .. item.statusCode, dz.LOG_ERROR)
dz.log(item, dz.LOG_DEBUG)
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Water level river Waal
Why do you prefer the Custom sensor?
B.t.w. small typo in the script. You mix "domoticz" and "dz"
B.t.w. small typo in the script. You mix "domoticz" and "dz"
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Hi all,
I started this small project, because of the question from Jan Jansen.
Although the scripts are functioning quite right, I noticed some inaccuracy of the data provided by Rijkswaterstaat.
For example the water height at Lobith went even negative and dropped from over 13 m to approx 1.5 m. I'm sure that this was not correct.
See the graph below.
I do not notice that in the graph of 2 days back and 2 days forward.
To check, I have updated my URL from -6,3 to -48,48 at the end. (I will report back)
Another discussion is of course, what type of sensor to choose.
1. I started with a "Text" sensor. Beside the actual water height, you can also insert the time of measurement. Mostly you will see the value that is approx. 20-30 minutes behind the time of the sensor. And you can change the icon.
2. I used also an "Alert"sensor. Advantage is that I can play with some levels and colors, although the scale of Rijkswaterstaat is different from the Alert level scale (6 colors compared to 5). So I merged the dark green with the light green ("Normaal (720 - 1200cm)" and "Licht verhoogd (>1200cm)").
In today's modification the text has been corrected and is now also indicating "Licht verhoogd (>1200cm)".
3. "Distance" sensor has the advantage that you can log the historical values. The disadvantage is that you can not change the x-axis, with is always cm.
In this case it is not a problem as Rijkswaterstaat provides the data in cm. Strange is, however that I see sensors who indicate km (visibility).
4. "Custom" sensor is more flexible and you can insert your own x-axis and also the custom icon.
The good thing is that every user can select the solution he likes most and can even combine multiple sensors.
As said I modified (again) the "Function" node, to correct the additional text. See below.
Best regards
I started this small project, because of the question from Jan Jansen.
Although the scripts are functioning quite right, I noticed some inaccuracy of the data provided by Rijkswaterstaat.
For example the water height at Lobith went even negative and dropped from over 13 m to approx 1.5 m. I'm sure that this was not correct.
See the graph below.
I do not notice that in the graph of 2 days back and 2 days forward.
To check, I have updated my URL from -6,3 to -48,48 at the end. (I will report back)
Another discussion is of course, what type of sensor to choose.
1. I started with a "Text" sensor. Beside the actual water height, you can also insert the time of measurement. Mostly you will see the value that is approx. 20-30 minutes behind the time of the sensor. And you can change the icon.
2. I used also an "Alert"sensor. Advantage is that I can play with some levels and colors, although the scale of Rijkswaterstaat is different from the Alert level scale (6 colors compared to 5). So I merged the dark green with the light green ("Normaal (720 - 1200cm)" and "Licht verhoogd (>1200cm)").
In today's modification the text has been corrected and is now also indicating "Licht verhoogd (>1200cm)".
3. "Distance" sensor has the advantage that you can log the historical values. The disadvantage is that you can not change the x-axis, with is always cm.
In this case it is not a problem as Rijkswaterstaat provides the data in cm. Strange is, however that I see sensors who indicate km (visibility).
4. "Custom" sensor is more flexible and you can insert your own x-axis and also the custom icon.
The good thing is that every user can select the solution he likes most and can even combine multiple sensors.
As said I modified (again) the "Function" node, to correct the additional text. See below.
Code: Select all
var label = {};
var level;
var time = msg.payload.t0;
var height = msg.payload.series[0].data[msg.payload.series[0].data.length - 1].value;
switch (true) {
case (height >= msg.payload.limits[5].from):
level = 4;
label = msg.payload.limits[5].label
break;
case (height >= msg.payload.limits[4].from):
level = 3;
label = msg.payload.limits[4].label
break;
case (height >= msg.payload.limits[3].from):
level = 2;
label = msg.payload.limits[3].label
break;
case (height >= msg.payload.limits[2].from):
level = 1;
label = msg.payload.limits[2].label
break;
case (height >= msg.payload.limits[1].from):
level = 1;
label = msg.payload.limits[1].label
break;
case (height < msg.payload.limits[0].to):
level = 0;
label = msg.payload.limits[0].label
break;
}
msg.payload = {"command":"udevice", "idx":17, "nvalue":level, "svalue":"Meettijdstip: " + time + "\n" + "Waterstand: " + height + " cm" + "\n" + label};
return msg;
Last edited by FireWizard on Tuesday 02 February 2021 18:35, edited 1 time in total.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
No functional reason. It's not distance but level.
btw. found a small issue with the distance sensor. The edit window does not come up when clicking the edit button on the device in the utility tab.
Fixed in next build (12902) but also need to clear browser cache.
Thx. I updated the post.B.t.w. small typo in the script. You mix "domoticz" and "dz"
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
Distance sensor can be changed to display the value in inches but because of a bug preventing to access the edit window you need build >= 12902 to edit the device from the GUIFireWizard wrote: ↑Tuesday 02 February 2021 15:10 3. "Distance" sensor has the advantage that you can log the historical values. The disadvantage is that you can not change the x-axis, with is always cm.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
Thanks @waaren for fixing this. I saw in the Wiki, that it should be possible, but I was not interested in having that option, and I think, except the UK, that not many people will use inches. I never used that type of sensor, as it is limited to cm (and inches).
I saw with a visibility sensor (Darksky) that km is used. This was possible to change to miles.
I think for the continent more units, like mm, m, km would be nice, for the UK we can use inches, feet, yards, miles.
Your thoughts?
Regards
I saw with a visibility sensor (Darksky) that km is used. This was possible to change to miles.
I think for the continent more units, like mm, m, km would be nice, for the UK we can use inches, feet, yards, miles.
Your thoughts?
Regards
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Water level river Waal
Indeed would be nice but it has to be implemented in many different places in the code. I see these quantities and units in various xml, cpp, js, html and header files.FireWizard wrote: ↑Tuesday 02 February 2021 18:03 I think for the continent more units, like mm, m, km would be nice, for the UK we can use inches, feet, yards, miles.
Your thoughts?
So quite a ambitious project to tackle.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Water level river Waal
The URL has been changed since January 2023.
With thanks to @Jan Jansen a new URL has been provided.
Change the URL to: https://waterinfo.rws.nl/api/chart/Get? ... alues=-6,3
Regards
With thanks to @Jan Jansen a new URL has been provided.
Change the URL to: https://waterinfo.rws.nl/api/chart/Get? ... alues=-6,3
Regards
-
- Posts: 229
- Joined: Wednesday 30 April 2014 20:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Water level river Waal
Things have changed again. The response is now in csv format instead of the previous JSON format. After some experimentation, I think I can get useful values with the following flow. However, I am unable to get the last measured value with corresponding time in Domoticz.
Thanks in advance for any help
Code: Select all
[
{
"id": "f1324d44.f6688",
"type": "tab",
"label": "Waterstand Nijmegen haven",
"disabled": false,
"info": ""
},
{
"id": "c0e85807.57038",
"type": "http request",
"z": "f1324d44.f6688",
"name": "Waterstand Nijmegen haven",
"method": "GET",
"ret": "txt",
"paytoqs": "body",
"url": "https://waterinfo.rws.nl/api/chart/Get?mapType=waterhoogte&locationCode=Nijmegen-haven(NIJM)&values=-6,3",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 260,
"y": 140,
"wires": [
[
"8559f35430d62e66"
]
]
},
{
"id": "bb820068.b3cc58",
"type": "inject",
"z": "f1324d44.f6688",
"name": "1 hour inject",
"props": [
{
"p": "payload"
}
],
"repeat": "3600",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 240,
"wires": [
[
"c0e85807.57038"
]
]
},
{
"id": "90315b4d.41f05",
"type": "mqtt out",
"z": "f1324d44.f6688",
"name": "To Domoticz",
"topic": "domoticz/in",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "fbb02111.25ba88",
"x": 930,
"y": 140,
"wires": []
},
{
"id": "20627e81d052eb33",
"type": "debug",
"z": "f1324d44.f6688",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 760,
"y": 240,
"wires": []
},
{
"id": "8559f35430d62e66",
"type": "csv",
"z": "f1324d44.f6688",
"name": "",
"sep": ",",
"hdrin": "",
"hdrout": "all",
"multi": "one",
"ret": "\\n",
"temp": "",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 510,
"y": 160,
"wires": [
[
"20627e81d052eb33"
]
]
},
{
"id": "fbb02111.25ba88",
"type": "mqtt-broker",
"name": "MQTT",
"broker": "127.0.0.1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": 4,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]
Who is online
Users browsing this forum: No registered users and 0 guests