updateWeatherSensors (yet another buienradar script)  [SOLVED]

Moderator: leecollings

schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by schulpr »

Hi waaren,

This is the result:
2019-08-07 10:48:00.558 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-07 10:48:00.559 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-07 10:48:00.559 Status: dzVents: Debug: WUS:
2019-08-07 10:48:00.559
2019-08-07 10:48:00.559 Zou ik http://127.0.0.1:8080/json.htm?type=settings moeten uitvoeren ?
2019-08-07 10:48:00.559 Zou ik https://maps.googleapis.com/maps/api/ge ... key=apiKey moeten uitvoeren ?
2019-08-07 10:48:00.559 var.useDomoticzLocation: true
2019-08-07 10:48:00.559 dz.data.domoticzLatitude: 52.xxxx
2019-08-07 10:48:00.559 dz.data.domoticzLongitude: 5.xxxx
2019-08-07 10:48:00.559 now.hour: 10
2019-08-07 10:48:00.559 now.minutes: 48
2019-08-07 10:48:00.559
2019-08-07 10:48:00.559
2019-08-07 10:48:00.559 Status: dzVents: Debug: WUS: Nog geen apiKey. Lees hoe op https://cloud.google.com/maps-platform/ ... t-changes/
2019-08-07 10:48:00.560 Status: dzVents: Debug: WUS: OpenURL: url = https://api.buienradar.nl/data/public/1.1/jsonfeed
2019-08-07 10:48:00.560 Status: dzVents: Debug: WUS: OpenURL: method = GET
2019-08-07 10:48:00.560 Status: dzVents: Debug: WUS: OpenURL: post data = nil
2019-08-07 10:48:00.560 Status: dzVents: Debug: WUS: OpenURL: headers = nil
2019-08-07 10:48:00.560 Status: dzVents: Debug: WUS: OpenURL: callback = WUS_buienradarResponse
2019-08-07 10:48:00.560 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
2019-08-07 10:48:00.561 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-08-07 10:48:01.067 Status: dzVents: Info: Handling httpResponse-events for: "WUS_buienradarResponse
2019-08-07 10:48:01.094 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-07 10:48:01.095 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-07 10:48:01.095 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
2019-08-07 10:48:01.095 Error: dzVents: Error: (2.4.26) WUS: An error occurred when calling event handler updateWeatherSensors
2019-08-07 10:48:01.095 Error: dzVents: Error: (2.4.26) WUS: ...omoticz/scripts/dzVents/scripts/modules/wusFunctions.lua:428: attempt to index field '?' (a nil value)
Thanks for your help!

Rob
Last edited by schulpr on Wednesday 07 August 2019 14:01, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren »

schulpr wrote: Wednesday 07 August 2019 10:49 This is the result:

Code: Select all

2019-08-07 10:48:01.095 Error: dzVents: Error: (2.4.26) WUS: ...omoticz/scripts/dzVents/scripts/modules/wusFunctions.lua:428: attempt to index field '?' (a nil value)[/quote]
Need to setup something to test so can take some time.
Can you share your settings via PM (blank out sensitive stuff) and your line 428 of your wusFunctions.lua (line 428 is an end statement in my version)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by schulpr »

Hi waaren,

This is line 428:
return stationIndexNumber, weatherStations[stationIndexNumber].stationnaam["#text"]
Do you need a screenshot of the Domoticz system settings?

Kind regards, Rob
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren »

schulpr wrote:Hi waaren,

This is line 428:
return stationIndexNumber, weatherStations[stationIndexNumber].stationnaam["#text"]
Do you need a screenshot of the Domoticz system settings
No, just a copy of your wus settings file




Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren »

schulpr wrote: Wednesday 07 August 2019 8:29 I started with a fresh installation but getting this error now:
2019-08-07 08:24:01.075 Error: dzVents: Error: (2.4.26) WUS: ...omoticz/scripts/dzVents/scripts/updateWeatherSensors.lua:516: attempt to index field '?' (a nil value)
Any ideas, tips?
Found a potential cause for the Error. Can you please replace these lines in the main script (around line 490)

Code: Select all

            -- Convert the json to a LUA table
            if trigger.json ~= nil then
                if trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations ~= nil then                     -- this sometimes happens around midnight
                    if trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations.weerstation ~= nil then
                        rt  = trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations.weerstation
                        dz.log("Number of entries in weatherstation array: " .. #rt, dz.LOG_DEBUG)
                    end
                else
                    dz.log(INF.NOWEATHERSTATIONS,dz.LOG_INFO)
                    return
                end
            end
with these

Code: Select all

           -- Convert the json to a LUA table
            if trigger.json == nil then
                trigger.json = dz.utils.fromJSON(trigger.data) -- Problem with header info preventing dzVents to implicit convert
            end
            if trigger.json ~= nil then
                if trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations ~= nil then -- this sometimes happens around midnight
                    if trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations.weerstation ~= nil then
                        rt  = trigger.json.buienradarnl.weergegevens.actueel_weer.weerstations.weerstation
                        dz.log("Number of entries in weatherstation array: " .. #rt, dz.LOG_DEBUG)
                    else
                        dz.utils.dumpTable(trigger.headers)
                        return
                    end
                else
                    dz.log(INF.NOWEATHERSTATIONS,dz.LOG_INFO)
                    return
                end
            else
                var.statusCode = TRIGGERERROR[trigger.statusCode] or trigger.statusCode
                dz.log(ERR.TRIGGERERROR .. " in:" .. const.TRIGGERNAME .. ", Error: "  .. var.statusCode , dz.LOG_ERROR)
                return
            end
and check again ? It looks like that on some systems the information in the header file has a minor lay-out change (Content-Type changed to content-type) and therefore dzVents does not auto convert the httpResponse data into a JSON table.

I will update dzVents to handle this internally but for now the above proposed script modification should also do the job.

BTW. What is your domoticz version and what is your OS ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
schulpr
Posts: 137
Joined: Thursday 01 January 2015 9:10
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by schulpr »

Hi waaren,

Your adjustments works ;-). Some minutes of the logging:
Spoiler: show
2019-08-08 07:12:00.915 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-08 07:12:00.916 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-08 07:12:01.002 Status: dzVents: Debug: WUS: Number of entries in weatherstation array: 52
2019-08-08 07:12:01.003 Status: dzVents: Debug: WUS: myWeatherStation.stationnaam in main: Meetstation Lelystad
2019-08-08 07:12:01.003 Status: dzVents: Debug: WUS: Function findNearbyWeatherStations, stationName (passed to function): Meetstation Lelystad
2019-08-08 07:12:01.004 Status: dzVents: Debug: WUS: Distance: 123.74676628432
2019-08-08 07:12:01.048 Status: dzVents: Debug: WUS: self.dump2File: ./scripts/dzVents/data/BuienradarResponse.json_DEBUG
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: Meetstation Lelystad gevonden
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[01], Index[27] Meetstation Lelystad Distance to domoticz location ==>> 8.6 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[02], Index[20] Meetstation Houtribdijk Distance to domoticz location ==>> 15.4 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[03], Index[48] Meetstation Wijdenes Distance to domoticz location ==>> 23.8 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[04], Index[30] Meetstation Marknesse Distance to domoticz location ==>> 34.2 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[05], Index[03] Meetstation Berkhout Distance to domoticz location ==>> 36.3 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[06], Index[38] Meetstation Stavoren Distance to domoticz location ==>> 40.7 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[07], Index[05] Meetstation De Bilt Distance to domoticz location ==>> 50.6 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[08], Index[36] Meetstation Schiphol Distance to domoticz location ==>> 53.4 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[09], Index[15] Meetstation Heino Distance to domoticz location ==>> 55.0 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[10], Index[02] Meetstation Arnhem Distance to domoticz location ==>> 57.1 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[11], Index[49] Meetstation Wijk aan Zee Distance to domoticz location ==>> 59.0 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[12], Index[23] Meetstation IJmuiden Distance to domoticz location ==>> 61.3 Km.
2019-08-08 07:12:01.049 Status: dzVents: Debug: WUS: rank[13], Index[06] Meetstation Den Helder Distance to domoticz location ==>> 64.5 Km.
2019-08-08 07:12:01.050 Status: dzVents: Debug: WUS: rank[14], Index[22] Meetstation IJmond Distance to domoticz location ==>> 64.6 Km.
2019-08-08 07:12:01.050 Status: dzVents: Debug: WUS: rank[15], Index[28] Meetstation Lopik-Cabauw Distance to domoticz location ==>> 71.3 Km.
2019-08-08 07:12:01.050 Status: dzVents: Debug: WUS: rank[16], Index[39] Meetstation Texelhors Distance to domoticz location ==>> 72.3 Km.
2019-08-08 07:12:01.050 Status: dzVents: Debug: WUS: rank[17], Index[18] Meetstation Hoogeveen Distance to domoticz location ==>> 74.6 Km.
2019-08-08 07:12:01.050 Status: dzVents: Debug: WUS: Max 17 Alternative weatherStation will considered on absent value
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS:
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Home: Nederland. Basis-station: Meetstation Lelystad
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Luchtdruk ===>> 1008 HPa, Voorspelling: wisselvallig ===>> apparaat 26 (Barometer) ==>> (sub)Type: Barometer
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Wind ===>> 211 graden (ZZW), Temperatuur: 15.4�C
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Wind ===>> Kracht: 3 Bf, Windstoten: 6.6 m/s (4 Bf) ===>> apparaat 27 (Wind) ==>> (sub)Type: Wind
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Zichtmeters ===>> 14.6 km ===>> geen apparaat
2019-08-08 07:12:01.050 Status: dzVents: Info: WUS: Zonkracht ===>> 42 Watt/m2 ===>> geen apparaat
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: Weer omschrijving / Weer factor: Zwaar bewolkt / 3.6
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Berekende lux ===>> 12096 Lumen ===>> geen apparaat
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Regen nu/totaal ===>> 0 mm/u, Hoeveelheid vandaag: 0 mm ===>> geen apparaat
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Temperatuur: ===>> 15.4 �C, Vochtigheid: 92% (nat)
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Temperatuur: ===>> Dauwpunt: -9.2�C ===>> apparaat 28 (Temp+Hum) ==>> (sub)Type: Temp + Humidity
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Weersvoorspelling ===>> Kort: Zwaar bewolkt ===>> geen apparaat
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Weersvoorspelling ===>> Samengevat: ===>> geen apparaat
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS:
2019-08-08 07:12:01.051 Het weer ziet er de komende dagen dagelijks anders uit. Vandaag schijnt de zon, morgen staan stevige onweersbuien op het programma en op zaterdag zorgt een depressie voor veel wind.
2019-08-08 07:12:01.051 -----------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Weersvoorspelling komende 5 dagen ===>> geen apparaat
2019-08-08 07:12:01.051 --- vrijdag 9 augustus 2019 tot dinsdag 13 augustus 2019 ---
2019-08-08 07:12:01.051 Zaterdag veel wind met kans op zware windstoten, desondanks vrij warm, geregeld zon en kleine kans op een bui. Zondag rustiger en zonnige perioden. Na het weekeinde lagere temperaturen met maxima van 18 tot 20°C. Verder is het wisselvallig met af en toe buien en soms veel wind.
2019-08-08 07:12:01.051 ------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: Weersvoorspelling volgende 6 tot 10 dagen ===>> geen apparaat
2019-08-08 07:12:01.051 --- woensdag 14 augustus 2019 tot zondag 18 augustus 2019 ---
2019-08-08 07:12:01.051 Grote kans (ca. 80%) op een wisselvallig weertype met maximumtemperaturen beneden het langjarig gemiddelde.
2019-08-08 07:12:01.051 ------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: const.RAINURL: https://gadgets.buienradar.nl/data/rain ... 2&lon=5.47
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: OpenURL: url = https://gadgets.buienradar.nl/data/rain ... 2&lon=5.47
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: OpenURL: method = GET
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: OpenURL: post data = nil
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: OpenURL: headers = nil
2019-08-08 07:12:01.051 Status: dzVents: Debug: WUS: OpenURL: callback = WUS_rainForecastResponse
2019-08-08 07:12:01.051 Status: dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.052 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
2019-08-08 07:12:01.052 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2019-08-08 07:12:01.425 Status: dzVents: Info: Handling httpResponse-events for: "WUS_rainForecastResponse
2019-08-08 07:12:01.450 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.451 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Debug: WUS: 000
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS:
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS: Voorspelling regen ===>> volgende 60 minuten ===>> 0 mm/u ===>> geen apparaat
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS: Voorspelling regen ===>> volgende 2 uur ===>> 0 mm/u ===>> geen apparaat
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2019-08-08 07:12:01.452 Status: dzVents: Info: WUS: Nog geen apparaten in domoticz voor dit script is dat OK ?
2019-08-08 07:12:01.453 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
2019-08-08 07:13:00.413 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-08 07:13:00.414 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-08 07:13:00.414 Status: dzVents: Debug: WUS:
2019-08-08 07:13:00.414
2019-08-08 07:13:00.414 Zou ik http://127.0.0.1:8080/json.htm?type=settings moeten uitvoeren ?
2019-08-08 07:13:00.414 Zou ik https://maps.googleapis.com/maps/api/ge ... key=apiKey moeten uitvoeren ?
2019-08-08 07:13:00.414 var.useDomoticzLocation: true
2019-08-08 07:13:00.414 dz.data.domoticzLatitude: 52.xxx
2019-08-08 07:13:00.414 dz.data.domoticzLongitude: 5.xxx
2019-08-08 07:13:00.414 now.hour: 7
2019-08-08 07:13:00.414 now.minutes: 13
2019-08-08 07:13:00.414
2019-08-08 07:13:00.414
2019-08-08 07:13:00.414 Status: dzVents: Debug: WUS: Nog geen apiKey. Lees hoe op https://cloud.google.com/maps-platform/ ... t-changes/
2019-08-08 07:13:00.414 Status: dzVents: Debug: WUS: dz.data.minutesPastExecution: 2 minuten na laatste uitvoering. Wordt nu niet uitgevoerd.
2019-08-08 07:13:00.415 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
2019-08-08 07:14:00.425 Status: dzVents: Debug: WUS: getFunctions loaded
2019-08-08 07:14:00.426 Status: dzVents: Debug: WUS: Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen
2019-08-08 07:14:00.426 Status: dzVents: Debug: WUS:
2019-08-08 07:14:00.426
2019-08-08 07:14:00.426 Zou ik http://127.0.0.1:8080/json.htm?type=settings moeten uitvoeren ?
2019-08-08 07:14:00.426 Zou ik https://maps.googleapis.com/maps/api/ge ... key=apiKey moeten uitvoeren ?
2019-08-08 07:14:00.426 var.useDomoticzLocation: true
2019-08-08 07:14:00.426 dz.data.domoticzLatitude: 52.xxx
2019-08-08 07:14:00.426 dz.data.domoticzLongitude: 5.xxx
2019-08-08 07:14:00.426 now.hour: 7
2019-08-08 07:14:00.426 now.minutes: 14
2019-08-08 07:14:00.426
2019-08-08 07:14:00.426
2019-08-08 07:14:00.426 Status: dzVents: Debug: WUS: Nog geen apiKey. Lees hoe op https://cloud.google.com/maps-platform/ ... t-changes/
2019-08-08 07:14:00.426 Status: dzVents: Debug: WUS: dz.data.minutesPastExecution: 3 minuten na laatste uitvoering. Wordt nu niet uitgevoerd.
2019-08-08 07:14:00.427 Status: dzVents: Info: WUS: ------ Finished updateWeatherSensors.lua
I'm on the Pi 3B with Buster and the latest Domoticz beta.

Thanks again for your help!

Kind regards, Rob
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)  [SOLVED]

Post by waaren »

schulpr wrote: Thursday 08 August 2019 7:20 Your adjustments works ;-). I'm on the Pi 3B with Buster and the latest Domoticz beta.
Thanks for the feedback. On Buster the keys in the header from an HTTP(S) response are all lowercase in domoticz. I prepared a PR to have dzVents handle this internally. Will be in next Beta.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren »

New version is posted here Latest version 0.20190808

This update is required when script is used with Debian Buster in combination with domoticz versions < V4.11076

Please find detailed information / explanation in files and leesmij.txt

settings in wusSettings.lua
functions in wusFunctions.lua
URL errorMessages in wusErrors.lua


History since last posting
======================
20190808 Made script more resilient if dzVents does not recognize HTTP response as JSON ( forum post )
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
PeterCelica
Posts: 21
Joined: Monday 13 March 2017 20:20
Target OS: NAS (Synology & others)
Domoticz version: 3.0.7602
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by PeterCelica »

Hi waaren,

I'm new here and been reading through all the posts to figure out if this nice script is working within Domoticz stored on a Synology NAS but I didn't see someone is mentioned it.
So my question is can I just put the script straight into my Domoticz events in Lua or dzVents ??

Thanks and
Best regards,
Peter.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren »

PeterCelica wrote: Friday 22 November 2019 17:55 So my question is can I just put the script straight into my Domoticz events in Lua or dzVents ??
Hi Peter,

The script is dzVents and will not work when saved as Lua.

In the zip file you will find detailed information on how to setup this dzVents script. You can also find where to place the function and settings files and howto configure.
But the script was created long before @gizmocuz added the major part of this script's functionality into a native hardware module of the current domoticz beta branch. I will therefore no longer maintain this script. Currently it it will still work with latest stable and latest Beta but it might stop working when updating to a future domoticz version.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
PeterCelica
Posts: 21
Joined: Monday 13 March 2017 20:20
Target OS: NAS (Synology & others)
Domoticz version: 3.0.7602
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by PeterCelica »

Hi thank you very much for your quick reply.

I surely gonna try this and what a pity to here that you stopped to maintain this awesome script.

But before I start to put some effort into it is there already something else like this amazing script in Lua script then..

Very nice to hear from you,
Best regards,
Peter.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by EdwinK »

Too bad this script is no longer maintained :(

Since now I'm getting '2020-04-05 16:00:05.432 Error: dzVents: Error: (3.0.2) WUS: [0002] Er is een probleem ontstaan bij het omzetten van de gegevens naar een tabel; graag controleren.

What hardware module are you reffering to
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest