My apologies, and thanks for the explanation. I really have no clue what the error can be
In the 'scripts' folder, I have the "Update Weather Sensors.lua" script (I think it will look familiar to you
I cannot upload it here, because my post will contain too much characters, but it is the standard .lua script, from your latest update.
The only changes I made are in the "wusSettings.lua", which I copied here below
Code: Select all
--[[ use in conjunction with updateWeatherSensors.lua Version 0.20180512
this settings file must be saved as/at "domoticz dir"/scripts/dzVents/scripts/modules/wusSettings.lua
Name of Weatherstation is no longer required as the script is able to get the nearest weatherstation based on the location entered in domoticz,
but when used use the weatherstation name and not the city/location as this is not unique
All valid weatherstation names are listed in the main file
First rows are your weather devices as defined in domoticz identified by their device number
(Note: You only have to define the sensors / switches you want to use and can comment the other ones by typing
-- in front of the line )
If you already defined devices for previous versions of this script and you don't need them any longer
you can also comment them with the two -- in front an delete them in domoticz
]]--
settings =
{
-- Start devices
Luchtdruk = 36; -- your weather devices in domoticz
Wind, temperatuur en gevoelstemperatuur = 37; -- can only be entered as numbers (your device ID's)
Wind = 38; -- if you choose to separate windchill temperature device from wind
Zicht = 39; -- visibility
Zonnestraling = 40; -- solar
Lux-waarde = 41; -- lux based on SolarPower.time
Regengegevens = 42; -- rain rate
Temperatuur en lv = 43; -- Temperature + Humidity
Gevoelstemperatuur = 35; -- if you choose to separate windchill temperature device from wind
Weersverwachting (lang) = 44; -- Long weather forecast text
Weersverwachting (kort) = 45; -- Short weather forecast text
Regen in mm/h komend uur = 46; -- x-as in mm/h
Regen in mm/h komende 2 uren = 47; -- x-as in mm/h
Regenalarm als text sensor = 48; -- rain forecastAlarm text
Regenalarm als alert sensor = 49; -- rain forecastAlert device
Voor zonneschermen = 50; -- rain forecast Switch
Weersverwachting (dag 1 t/m 5) = 51; -- weather 5 day forecast text
Weersverwachting (dag 6 t/m 10) = 52; -- weather 14 day forecast text
-- End Devices
-- Start Other settings
useDomoticzLocation = true; -- Use location set in domoticz for nearby weatherStation and rain forecast
myWeatherStation = "Rotterdam"; -- This is NOT used when useDomoticzLocation is set to true !!
googleAPIkey = false; -- Get one at https://cloud.google.com/maps-platform/user-guide/account-changes/
-- and change false to "your API key"
rainAlertTime = 0; -- Check rain in the next rainAlertTime minutes (between 20 and 120)
rainAlertAmount = 0.02; -- mm Rain to take serious
forcedUpdateMinutes = 360; -- Update sensors even when no change after nnn minutes (0 ===> never)
signDecimalsBaroDatabase = 2; -- Use significant decimals in barometer value (in database)
signDecimalsBaroDisplay = 0; -- Use significant decimals in barometer display
displayInfoLogMinutes = 99; -- Show info in domoticz logfile every nnn minutes (0 ===> never, 99 ==> always)
startDaytimeHour = 7; -- After this hour until NighttimeHour, DaytimeFrequency will be used
startNighttimeHour = 22; -- After this hour until DaytimeHour, NighttimeFrequency will be used
daytimeFrequencyMinutes = 12; -- Execute every nn minutes during daytime
nighttimeFrequencyMinutes = 24; -- Execute every nn minutes during nightime
useNearestWeatherStation = true; -- when the initial weatherstation does not provide required data
maxDistanceFromHome = 75; -- Only try weatherStations within this range in Km from home location
displayLanguage = "Nederlands"; -- Choose one of the languages available below
-- displayLanguage = "Deutsch"; -- Choose one of the languages available below
-- displayLanguage = "Yoruba"; -- Choose one of the languages available below
-- displayLanguage = "English"; -- Choose one of the languages available below
-- End Other Settings -- Dutch, UK_English, German, Yoruba
-- For development / problem solving only
testSetDirectory = "./scripts/dzVents/data/"; -- Location of the testSets
forceWrite2Files = false; -- This will write the result of the URL's write to files in scripts/dzVents/data/
useTestSet = false; -- when true this will trigger a dummy URL and get the data from files created by forceWrite2Files
logLevel = dzW.LOG_INFO; -- DEBUG,INFO, ERROR
}
--[[
Below are all relevant strings used in log info (INF_), in Debug mode (DBG_), in updating domoticz devices (DEV_),
in functions (TXT_)or in multiple of these areas (MUL_) listed in Nederlands and in English.
Also a couple of these strings are in for other languages. If a string is missing in any language the main script will
use the default (which is English).
The choice which language to use is set by the displayLanguage variable that can be found a couple of lines above this one.
]]--
languages =
{
Nederlands =
{
DBG_AIRPRESSURE = "luchtdruk",
DBG_CURLEMESSAGESLOADED = "Debug modus geactiveerd en (C)URL(e) meldingen geladen",
DBG_CURLEMESSAGESNOTLOADED = "Debug modus geactiveerd maar (C)URL(e) meldingen werden niet geladen",
DBG_DESCFACTOR = "Weer omschrijving / Weer factor: ",
DBG_FOUND = "gevonden",
DBG_ISTYPE = "van het type:",
DBG_LOCATIONPROBLEM = "Er is een probleem bij het verkrijgen van de locatiewaarden uit de domoticz settings",
DBG_NO_WEATHERSTATION = "Er lijkt iets niet (goed) ingevuld. Ik gebruik daarom weerstation Rotterdam",
DBG_NOAPIKEY = "Nog geen apiKey. Lees hoe op https://cloud.google.com/maps-platform/user-guide/account-changes/",
DBG_NOEXECUTION = "minuten na laatste uitvoering. Wordt nu niet uitgevoerd.",
DBG_NORAINEXPEXTED1HOUR = "Nog steeds geen regen voorspelt voor komend uur",
DBG_NORAINEXPEXTED2HOURS = "Nog steeds geen regen voorspelt voor komende 2 uur",
DBG_NOUSERSETTING = "Gebruikers instellingen bestand is niet aanwezig of kan niet worden gebruikt",
DBG_NOW = "moeten uitvoeren ?",
DBG_RAINRATESAME = "Hoeveelheid regen is niet veranderd: ",
DBG_SHOULDITRIGGER = "Zou ik",
ERR_ADDRESSNOTFOUND = "[0001] Adres nil / 0; Problem bij het ophalen van het adres bij Google",
ERR_CONVERSIONPROBLEM = "[0002] Er is een probleem ontstaan bij het omzetten van de gegevens naar een tabel; graag controleren.",
ERR_LOCATIONNOTFOUND = "[0003] Lokatie nil/0; Probleem bij het ophalen van de locatie gegevens van domoticz",
ERR_LOOKUPFAILED = "[0004] Er is iets mis gegaan bij het opzoeken van het weerstation",
ERR_NOTFOUND = ")[0005] niet gevonden; graag controleren.",
ERR_TRIGGERERROR = "[0006] Er is een probleem met inlezen van de data; controleer wat er fout is gegaan.",
ERR_UNKNOWNEVENT = "[0007] Het dzVents programma is gestart door een onbekende gebeurtenis. Dit zou niet moeten kunnen.",
ERR_WEATHERSTATIONPROBLEM = "[0008] Er is iets mis met uw gekozen weerstation. (",
ERR_WRONGPORTORIP = "[0009] Is er niet werkend poort nummer of IP adres gebruikt ?",
INF_ALERTLEVEL = "waarschuwings niveau",
INF_BAROCLOUDY = "bewolkt",
INF_BAROCLOUDYRAIN = "bewolkt/regen",
INF_BAROFORECAST = "Voorspelling:",
INF_BAROSTABLE = "stabiel",
INF_BAROSUNNY = "zonnig",
INF_BAROTHUNDERSTORM = "onweer",
INF_BAROUNSTABLE = "wisselvallig",
INF_CALCLUX = "Berekende lux",
INF_CANNOTCALCULATE = "Niet kunnen berekenen",
INF_CELSIUS = "°C",
INF_CURRENT = "Huidig weer",
INF_DEGREES = "graden",
INF_DEVICE = "apparaat",
INF_DEWPOINT = "Dauwpunt:",
INF_FIVEDAYS = "komende 5 dagen",
INF_FORECAST = "Weersvoorspelling",
INF_GUST = "Windstoten:",
INF_HUMCOMFORTABLE = "comfortabel",
INF_HUMDRY = "droog",
INF_HUMIDITY = "Vochtigheid:",
INF_HUMNORMAL = "normaal",
INF_HUMWET = "nat",
INF_MMH = "mm/u",
INF_NEXT2HOURS = "volgende 2 uur",
INF_NEXTHOUR = "volgende 60 minuten",
INF_NODEVICE = "geen apparaat",
INF_NODEVICESDEFINED = "Nog geen apparaten in domoticz voor dit script is dat OK ?",
INF_NOMEASUREDVALUE = "Geen waarde ontvangen",
INF_NONE = "Geen",
INF_NOWEATHERSTATIONS = "Er zijn geen weerstations gevonden. Dit gebeurt regelmatig rond middernacht",
INF_PRESSURE = "Luchtdruk",
INF_RAIN = "Regen nu/totaal",
INF_RAINALARM = "Regen alarm",
INF_RAINALERT = "Regen waarschuwing",
INF_RAINFORECAST = "Voorspelling regen",
INF_RAINTOTAL = "Hoeveelheid vandaag:",
INF_SHORT = "Kort:",
INF_SOLARPOWER = "Zonkracht",
INF_SUMMARY = "Samengevat:",
INF_SWITCH = "schakelaar",
INF_TEMPERATURE = "Temperatuur:",
INF_TESTSETWARNING = "WAARSCHUWING: Er wordt Test data gebruikt !!",
INF_TWOWEEKS = "volgende 6 tot 10 dagen",
INF_VISIBILITY = "Zichtmeters",
INF_WEATHERFORECASTPHRASE = "Weersvoorspelling",
INF_WEATHERFORECASTSUMMARY = "Samengevat:",
INF_WIND = "Wind",
INF_WINDCHILL = "Gevoelstemperatuur",
INF_WINDSPEED = "Kracht:",
MUL_MINUTES = ") minuten",
MUL_MMRAIN = "mm regen verwacht (",
MUL_NORAINEXPECTED = "Geen regen verwacht (",
MUL_THEREWILLBE = "Er wordt",
TXT_GREEN = "GROEN",
TXT_GREY = "GRIJS",
TXT_ORANGE = "ORANJE",
TXT_RED = "ROOD",
TXT_WEATHERSTION_PROBLEM = "Er is iets fout met uw gekozen weerstation. (",
TXT_YELLOW = "GEEL",
}, -- End of languageset Nederlands
English =
{
DBG_AIRPRESSURE = "air pressure",
DBG_DESCFACTOR = "weatherDescription / weatherFactor:",
DBG_CURLEMESSAGESLOADED = "Debug mode is on with (C)URL(e) messages loaded",
DBG_CURLEMESSAGESNOTLOADED = "Debug mode is on without (C)URL(e) messages loaded",
DBG_FOUND = "found",
DBG_ISTYPE = "is of type: ",
DBG_LOCATIONPROBLEM = "Problem getting the location from domoticz",
DBG_NO_WEATHERSTATION = "Something wrong with your weather station. (Not entered yet ?); I will set it to Rotterdam",
DBG_NOAPIKEY = "No apiKey set. Get one from https://cloud.google.com/maps-platform/user-guide/account-changes/",
DBG_NOEXECUTION = "minutes past since last execution. No execution now",
DBG_NORAINEXPEXTED1HOUR = "Still no rain expected in the next hour",
DBG_NORAINEXPEXTED2HOURS = "Still no rain expected in the next 2 hours",
DBG_NOUSERSETTING = "User settings file unusable or not present",
DBG_NOW = "now ?",
DBG_RAINRATESAME = "rainRate has not changed: ",
DBG_SHOULDITRIGGER = "Should I trigger ",
ERR_ADDRESSNOTFOUND = "[0001] Address nil / 0; Problem getting the address from Google",
ERR_CONVERSIONPROBLEM = "[0002] Problem with conversion of data to table. Check it out",
ERR_LOCATIONNOTFOUND = "[0003] Location nil / 0; Problem getting the location from domoticz",
ERR_LOOKUPFAILED = "[0004] This should not happen: Something went wrong with lookup of weatherStation based on lon,lat: ",
ERR_NOTFOUND = ")[0005]) is not found. Go Check it ",
ERR_TRIGGERERROR = "[0006] Problem with trigger (not OK). Check it out",
ERR_UNKNOWNEVENT = "[0007] Script triggered by unknown event. This should not happen",
ERR_WEATHERSTATIONPROBLEM = "[0008] Something wrong with your weather station. (",
ERR_WRONGPORTORIP = "[0009] Wrong Port and or IP for domoticz ?",
INF_ARROW = " ===>> ",
INF_ALERTLEVEL = "alert level",
INF_BAROCLOUDY = "cloudy",
INF_BAROCLOUDYRAIN = "cloudy/rain",
INF_BAROFORECAST = "Forecast:",
INF_BAROSTABLE = "stable",
INF_BAROSUNNY = "sunny",
INF_BAROTHUNDERSTORM = "thunderstorm",
INF_BAROUNSTABLE = "unstable",
INF_CALCLUX = "Calculated lux",
INF_CANNOTCALCULATE = "Could not calculate",
INF_CELSIUS = "°C",
INF_CURRENT = "Current weather",
INF_DEGREES = "degrees",
INF_DEVICE = "device",
INF_DEVICE = "device",
INF_DEWPOINT = "Dewpoint:",
INF_FIVEDAYS = "next 5 days",
INF_FORECAST = "Weather forecast",
INF_GUST = "Gust:",
INF_HUMCOMFORTABLE = "comfortable",
INF_HUMDRY = "dry",
INF_HUMIDITY = "Humidity:",
INF_HUMNORMAL = "normal",
INF_HUMWET = "wet",
INF_MMH = "mm/h",
INF_NEXT2HOURS = "next two hours:",
INF_NEXTHOUR = "next hour:",
INF_NODEVICE = "device None",
INF_NODEVICESDEFINED = "No weatherlike devices defined in domoticz (yet) is that OK ?",
INF_NOMEASUREDVALUE = "No value(s) received",
INF_NONE = "None",
INF_NOWEATHERSTATIONS = "No weatherstations found. This happen frequently around midnight",
INF_PRESSURE = "Air pressure",
INF_RAIN = "Rain current/total",
INF_RAINALARM = "Rain alarm",
INF_RAINALERT = "Rain alert",
INF_RAINFORECAST = "Rain forecast",
INF_RAINTOTAL = "Amount today:",
INF_SHORT = "Short:",
INF_SOLARPOWER = "Solar radiation",
INF_SUMMARY = "Summary:",
INF_SWITCH = "switch",
INF_TEMPERATURE = "Temperature:",
INF_TESTSETWARNING = "PLEASE note: Test data is being used !!!",
INF_TWOWEEKS = "next 6-10 days",
INF_VISIBILITY = "Visibility",
INF_WEATHERFORECASTPHRASE = "Weather forecast",
INF_WEATHERFORECASTSUMMARY = "Summarized",
INF_WIND = "Wind:",
INF_WINDCHILL = "Windchill",
INF_WINDSPEED = "speed",
MUL_MINUTES = ") minutes",
MUL_MM_RAIN = "mm rain (",
MUL_NORAINEXPECTED = "No rain (",
MUL_THEREWILLBE = "Expect",
TXT_GREEN = "GREEN",
TXT_GREY = "GREY",
TXT_ORANGE = "ORANGE",
TXT_RED = "RED",
TXT_YELLOW = "YELLOW",
}, -- End of languageset English
Deutsch =
{
INF_CANNOTCALCULATE = "Kann nicht berechnen",
INF_DEVICE = "Gerät",
INF_NEXTHOUR = "Nachstes uhr",
INF_NOMEASUREDVALUE = "Kein Wert erhalten",
INF_UNDSOWEITER_UNDSOWEITER = "Und so Weiter......",
},
Yoruba =
{
INF_NOMEASUREDVALUE = "Ko si iye ti a gba",
INF_CANNOTCALCULATE = "Ko le se isiro",
INF_DEVICE = "ohun-èlò",
},
} -- End of languages