Playing around with tables

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Playing around with tables

Post by Sarcas »

Playing around with dzVents. Working on a script that looks at hourly temperatuur predictions from OpenWeathermaps. Learning about tables etc. I got things working, but it was a lot of repetitive lines and not very flexible. So now I am experimenting with making things easier :) Which always makes things more complex. Anyway, I pull a table from OWM and I can get all info from it for the next hours.

OWMMain is a table containing all OpenWeathermap info
OWMDevices is a table donating all my dummy devices which need info from the table (temperatures, cloud coverage, etc)

I loop through OWMDevices and construct a string with the right command to update the dummy device. I.e. "OWMMain.hourly[3].temp" - This gets the temperature for three hours from now. So I have a local variable (theTemp) containing "OWMMain.hourly[3].temp" (without the quotes). But the command

Code: Select all

domoticz.devices(theDevice).updateTemperature(theTemp)
returns zero degrees. While the line

Code: Select all

domoticz.devices(theDevice).updateTemperature(OWMMain.hourly[3].temp)
works as intended.

So I guess this is not the way to do this...? Or at least a way to do this...
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Playing around with tables

Post by waaren »

Sarcas wrote: Tuesday 16 June 2020 16:48 So I guess this is not the way to do this...? Or at least a way to do this...
Best to share the script. Based on your information you provide in your post it should work but maybe you overlook something.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Re: Playing around with tables

Post by Sarcas »

OK,

I am a bit self-conscious about my messy autodidact coding skills :/ I taught myself some coding almost 40 years ago and picked things up when I got interested in Domoticz & dvVents. Things have changed :D Be gentle :)

It is based on a script I found in the forum, I believe it was for getting data from WeatherUnderground. Eventually I want to use my script to have my central heating system take the predicted weather into account. I.e. don't bother heating the place in the morning if it is going to be a warm enough day. Things like that.

Since the first posting I learned about the "load" command an am experiencing with that. The current error is:

Code: Select all

2020-06-16 19:10:01.118 Error: dzVents: Error: (3.0.9) OWM: An error occurred when calling event handler test OWM
2020-06-16 19:10:01.118 Error: dzVents: Error: (3.0.9) OWM: .../domoticz/scripts/dzVents/generated_scripts/test OWM.lua:110: attempt to concatenate a function value (global 'theTempAgain')


Line 110 is

Code: Select all

domoticz.log('*** theTempAgain: ' .. theTempAgain, domoticz.LOG_DEBUG) -- OWMMain.hourly[3].temp


The full script:

Code: Select all

	    
	    local API_id = "<api removed>"
	    
	    -- ids of dummy sensors

       -- Clouds (Percentage)
        local idx_clouds                = 2289  -- Clouds % now
        local idx_forecast_clouds_3h    = 2277  -- Clouds forcast
        local idx_forecast_clouds_6h    = 2278
        local idx_forecast_clouds_9h    = 2279

        -- Text
        local idx_weather               = 2290  -- weather this day : like clouds, rainy, clear...
        local idx_forecast_weather_3h   = 2280
        local idx_forecast_weather_6h   = 2281
        local idx_forecast_weather_9h   = 2282
        local idx_wind                  = 2283  -- wind speed 

        -- Temperature (Degrees ˚C)
        local idx_min_temp              = 2284  -- min temperature today    √
        local idx_max_temp              = 2285  -- max temperature today    √
        local idx_forecast_temp_3h      = 2286  -- temperature in 3 hours   √
        local idx_forecast_temp_6h      = 2287  -- 6                        √
        local idx_forecast_temp_9h      = 2288  -- 9                        √                      

        -- 'Feels like' Temperature (Degrees ˚C)
        local idx_forecast_tempFeels_3h = 2304  -- in 3 hours               √
        local idx_forecast_tempFeels_6h = 2305  -- 6                        √
        local idx_forecast_tempFeels_9h = 2306  -- 9                        √                      


        
        local forecast_temp_3h_deviceName       --                          √
        local forecast_temp_6h_deviceName       --                          √
        local forecast_temp_9h_deviceName       --                          √
        local forecast_tempFeels_3h_deviceName  --                          √
        local forecast_tempFeels_6h_deviceName  --                          √
        local forecast_tempFeels_9h_deviceName  --                          √
        
        local OWMMain
        
        local OWMDevices = {}
        
        local OWMDevices = {
            [idx_forecast_temp_3h]      = { 'forecast_temp_3h_deviceName', 'temp', 'Temperatuur om ', 'OWMMain.hourly[3]' },
            [idx_forecast_temp_6h]      = { 'forecast_temp_6h_deviceName', 'temp', 'Temperatuur om ', 'OWMMain.hourly[6]' },
            [idx_forecast_temp_9h]      = { 'forecast_temp_9h_deviceName', 'temp', 'Temperatuur om ', 'OWMMain.hourly[9]' },
            [idx_forecast_tempFeels_3h] = { 'forecast_tempFeels_3h_deviceName', 'feels_like', 'Gevoelstemperatuur om ', 'OWMMain.hourly[3]' },
            [idx_forecast_tempFeels_6h] = { 'forecast_tempFeels_6h_deviceName', 'feels_like', 'Gevoelstemperatuur om ', 'OWMMain.hourly[6]' },
            [idx_forecast_tempFeels_9h] = { 'forecast_tempFeels_9h_deviceName', 'feels_like', 'Gevoelstemperatuur om ', 'OWMMain.hourly[9]' }
        }
        

        

return {
	on = {
		timer = {
			'every 10 minutes' -- just an example to trigger the request
		},
		httpResponses = {
			'OWMForecast'   -- must match with the callback passed to the openURL command
		},
		devices = {
		    'CheckOWM'
	    }
	},
	
	logging = {
	    level   = domoticz.LOG_DEBUG,
	    marker  = "OWM"
    },
	
	execute = function(domoticz, item)
	    
        local latitude  = domoticz.settings.location.latitude
        local longitude = domoticz.settings.location.longitude
        

		if (item.isTimer) or (item.isDevice) then
			domoticz.openURL({
				url = 'http://api.openweathermap.org/data/2.5/onecall?lat=' .. latitude .. '&' .. 'lon=' .. longitude ..'&APPID=' .. API_id .. '&units=metric',
				method = 'GET',
				callback = 'OWMForecast', -- see httpResponses above.
			})
			-- domoticz.log('url=' .. url, domoticz.LOG_DEBUG)
		end

		if (item.isHTTPResponse) then
			if (item.ok) then
				if (item.isJSON) and (item.trigger == 'OWMForecast') then
					OWMMain = item.json  -- current is huidig weer basisdata : temp, feels_like, temp_min, temp_max, pressure, humidity

					-- update dummys
					-- [1] is actually table 0 etc
					
					domoticz.devices(idx_min_temp).updateTemperature(OWMMain.daily[1].temp.min)
					domoticz.devices(idx_max_temp).updateTemperature(OWMMain.daily[1].temp.max)
					

				for k, v in pairs(OWMDevices) do
				    domoticz.log('k='.. k .. ' v[1]=' .. v[1] .. ' v[2]=' .. v[2] .. ' v[3]=' .. v[3] .. ' v[4]=' ..v[4], domoticz.LOG_DEBUG)
				    
				    if v[2] == "temp" or v[2] == "feels_like" then
				        deel1 = tostring(v[4])
				        deel2 = tostring(v[2])
				        theTemp = (deel1 .. '.' .. deel2)  -- theTemp: OWMMain.hourly[3].temp
				        theTempAgain = assert(load("return " .. theTemp))
				        domoticz.log('*** theTemp: ' .. theTemp .. '     ' .. OWMMain.hourly[3].temp, domoticz.LOG_DEBUG) -- OWMMain.hourly[3].temp
				        domoticz.log('*** theTempAgain: ' .. theTempAgain, domoticz.LOG_DEBUG) -- OWMMain.hourly[3].temp

				        domoticz.devices(k).updateTemperature(theTemp2)
				        domoticz.log('updating temps: k=' .. k .. '  v[4]=' .. v[4] .. '  v[2]=' .. v[2], domoticz.LOG_DEBUG)
			        end
		        end
		        
			        

                    -- 3 hours
                    -- ["idx_forecast_temp_3h"]      = { 'forecast_temp_3h_deviceName', 'temp', 'Temperatuur om ' },


                    
                  
--					domoticz.devices(idx_forecast_temp_3h).updateTemperature(OWMMain.hourly[3].temp)
--					domoticz.devices(idx_forecast_tempFeels_3h).updateTemperature(OWMMain.hourly[3].feels_like)
--					domoticz.devices(idx_forecast_clouds_3h).updatePercentage(OWMMain.hourly[3].clouds)
					
					forecast_temp_3h_deviceName = 'Temperatuur om ' .. os.date("%H", OWMMain.hourly[3].dt) .. ':' .. os.date("%M", OWMMain.hourly[3].dt) .. ' uur:'
                    newName = domoticz.utils.urlEncode(forecast_temp_3h_deviceName)
                    url = domoticz.settings.url .. "/json.htm?type=command&param=renamedevice&idx=" .. idx_forecast_temp_3h .. "&name="  .. newName
                    domoticz.openURL(url)
                    
 					forecast_tempFeels_3h_deviceName = 'Gevoelstemperatuur om ' .. os.date("%H", OWMMain.hourly[3].dt) .. ':' .. os.date("%M", OWMMain.hourly[3].dt) .. ' uur:'
                    newName = domoticz.utils.urlEncode(forecast_tempFeels_3h_deviceName)
                    url = domoticz.settings.url .. "/json.htm?type=command&param=renamedevice&idx=" .. idx_forecast_tempFeels_3h .. "&name="  .. newName
                    domoticz.openURL(url)
                   

					-- 6 hours
--					domoticz.devices(idx_forecast_temp_6h).updateTemperature(OWMMain.hourly[6].temp)
--					domoticz.devices(idx_forecast_tempFeels_6h).updateTemperature(OWMMain.hourly[6].feels_like)
--					domoticz.devices(idx_forecast_clouds_6h).updatePercentage(OWMMain.hourly[6].clouds)
					
					forecast_temp_6h_deviceName = 'Voorspelling voor ' .. os.date("%H", OWMMain.hourly[6].dt) .. ':' .. os.date("%M", OWMMain.hourly[6].dt) .. ' uur.'
--					domoticz.log('na tostring = ' .. forecast_temp_6h_deviceName, domoticz.LOG_DEBUG)

                    -- 9 hours
--					domoticz.devices(idx_forecast_temp_9h).updateTemperature(OWMMain.hourly[9].temp)
--					domoticz.devices(idx_forecast_tempFeels_9h).updateTemperature(OWMMain.hourly[9].feels_like)
--					domoticz.devices(idx_forecast_clouds_9h).updatePercentage(OWMMain.hourly[9].clouds)
					
					forecast_temp_9h_deviceName = 'Voorspelling voor ' .. os.date("%H", OWMMain.hourly[9].dt) .. ':' .. os.date("%M", OWMMain.hourly[9].dt) .. ' uur.'
--					domoticz.log('na tostring = ' .. forecast_temp_9h_deviceName, domoticz.LOG_DEBUG)
				end
			else
				domoticz.log('There was a problem handling the request', domoticz.LOG_ERROR)
				domoticz.log(item, domoticz.LOG_ERROR)
			end
		end
	end
}
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Playing around with tables

Post by waaren »

Sarcas wrote: Tuesday 16 June 2020 19:18

Code: Select all

2020-06-16 19:10:01.118 Error: dzVents: Error: (3.0.9) OWM: An error occurred when calling event handler test OWM
2020-06-16 19:10:01.118 Error: dzVents: Error: (3.0.9) OWM: .../domoticz/scripts/dzVents/generated_scripts/test OWM.lua:110: attempt to concatenate a function value (global 'theTempAgain')
Not sure what you try to do with theTempAgain

if it is just the same as theTemp then you can replace lines

Code: Select all

				        theTemp = (deel1 .. '.' .. deel2)  -- theTemp: OWMMain.hourly[3].temp
				        theTempAgain = assert(load("return " .. theTemp))
with

Code: Select all

				        theTemp = deel1 .. '.' .. deel2   -- theTemp: OWMMain.hourly[3].temp
				        theTempAgain = theTemp
If have other questions /errors then please add

Code: Select all

domoticz.log(item)
between line 89 and 90 and include the log of that command in your post.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Sarcas
Posts: 86
Joined: Wednesday 11 October 2017 8:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1ß
Location: Friesland
Contact:

Re: Playing around with tables

Post by Sarcas »

Thanks for helping.

theTemp & theTempAgain (like deel1 & deel2) were just efforts to break my lines into smaller parts, trying to find the problem.

I made the changes and added the log line. I don't get error messages, but I don't get values either... The command in the string is right, i check this with

Code: Select all

domoticz.log('*** theTemp: ' .. theTemp .. '     ' .. OWMMain.hourly[3].temp, domoticz.LOG_DEBUG) -- OWMMain.hourly[3].temp
which shows in the log as

Code: Select all

2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[3].temp 18.54
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[3].temp
It just doesn't get processed a command. Code. Function. Whatever it is :) That is why I started experimenting with load(), trying to execute the string. B ut perhaps I am trying to do this in an insane way, I am open from suggestions :) I like a good bug hunting in my scripts, but it has to make sense at t he end of the day. I just want to make it flexible. Now I take several measurements from 3, 6 and 9 hours, but perhaps I want to use every hour, or more measurements per hour. That is why I thought it would be easy to put stuff in a table. The device index, the units, the name how to get them (like .feels_like) and everything needed to construct the final command (like "domoticz.devices(thedummydevice).updateTemperature(OWMMain.hourly[3].temp) and execute that. Alas.

The log:

Code: Select all

2020-06-17 09:12:39.540 Status: User: Admin initiated a switch command (2308/CheckOWM/On)
2020-06-17 09:12:39.555 Status: Incoming connection from: 192.168.8.155
2020-06-17 09:12:39.716 Status: dzVents: Info: Handling events for: "CheckOWM", value: "On"
2020-06-17 09:12:39.716 Status: dzVents: Info: OWM: ------ Start internal script: test OWM: Device: "CheckOWM (OpenWeatherDummies)", Index: 2308
2020-06-17 09:12:39.717 Status: dzVents: Debug: OWM: OpenURL: url = http://api.openweathermap.org/data/2.5/onecall?<removed>
2020-06-17 09:12:39.717 Status: dzVents: Debug: OWM: OpenURL: method = GET
2020-06-17 09:12:39.717 Status: dzVents: Debug: OWM: OpenURL: post data = nil
2020-06-17 09:12:39.717 Status: dzVents: Debug: OWM: OpenURL: headers = nil
2020-06-17 09:12:39.717 Status: dzVents: Debug: OWM: OpenURL: callback = OWMForecast
2020-06-17 09:12:39.718 Status: dzVents: Info: OWM: ------ Finished test OWM
2020-06-17 09:12:39.718 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> main: Rain
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> icon: 10d
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> pressure: 1013
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> wind_speed: 2.51
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> wind_deg: 275
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> feels_like: 14.35
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> temp: 14.79
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> 47:
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> humidity: 96
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> rain:
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> 1h: 0.36
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> dt: 1592542800
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> dew_point: 14.3
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> clouds: 100
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> weather:
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> 1:
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> description: light rain
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> id: 500
2020-06-17 09:12:40.062 Status: dzVents: HTTPResponse> main: Rain
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> icon: 10d
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> pressure: 1014
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> wind_speed: 2.81
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> wind_deg: 270
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> feels_like: 14.18
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> temp: 14.82
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> 48:
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> humidity: 95
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> rain:
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> 1h: 0.37
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> dt: 1592546400
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> dew_point: 14.48
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> clouds: 100
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> weather:
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> 1:
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> description: light rain
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> id: 500
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> main: Rain
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> icon: 10d
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> pressure: 1014
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> wind_speed: 2
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> wind_deg: 286
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> feels_like: 15.11
2020-06-17 09:12:40.063 Status: dzVents: HTTPResponse> temp: 15.13
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> lon: 6.13
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> timezone_offset: 7200
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> trigger: OWMForecast
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isVariable: false
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isCustomEvent: false
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> statusCode: 200
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isHardware: false
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isTimer: false
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isSystem: false
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> statusText: OK
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> dump()
2020-06-17 09:12:40.064 Status: dzVents: HTTPResponse> isScene: false
2020-06-17 09:12:40.065 Status: dzVents: Info: OWM: {["ok"]=true, ["isXML"]=false, ["headers"]={["Access-Control-Allow-Origin"]="*", ["X-Cache-Key"]="/data/2.5/onecall?,removed>&units=metric", ["Content-Type"]="application/json; charset=utf-8", ["Server"]="openresty", ["Access-Control-Allow-Credentials"]="true", ["Content-Length"]="14698", ["Access-Control-Allow-Methods"]="GET, POST", ["Date"]="Wed, 17 Jun 2020 07:12:39 GMT", ["Connection"]="keep-alive"}, ["isGroup"]=false, ["isJSON"]=true, ["isSecurity"]=false, ["protocol"]="HTTP/1.1", ["isDevice"]=false, ["data"]="{"lat":53.31,"lon":6.13,"timezone":"Europe/Amsterdam","timezone_offset":7200,"current":{"dt":1592377804,"sunrise":1592363220,"sunset":1592424359,"temp":16.51,"feels_like":17.14,"pressure":1012,"humidity":85,"dew_point":13.98,"uvi":7.06,"clouds":25,"wind_speed":0.89,"wind_deg":12,"wind_gust":2.68,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}]},"hourly":[{"dt":1592377200,"temp":16.51,"feels_like":16.49,"pressure":1012,"humidity":85,"dew_point":13.98,"clouds":25,"wind_speed":1.82,"wind_deg":49,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}]},{"dt":1592380800,"temp":17.34,"feels_like":17.21,"pressure":1013,"humidity":81,"dew_point":14.05,"clouds":30,"wind_speed":2.02,"wind_deg":41,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}]},{"dt":1592384400,"temp":18.54,"feels_like":17.87,"pressure":1014,"humidity":76,"dew_point":14.23,"clouds":37,"wind_speed":2.88,"wind_deg":40,"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}]},{"dt":1592388000,"temp":19.27,"feels_like":18.15,"pressure":1014,"humidity":72,"dew_point":14.1,"clouds":53,"wind_speed":3.45,"wind_deg":41,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}]},{"dt":1592391600,"temp":19.74,"feels_like":18.71,"pressure":1014,"humidity":72,"dew_point":14.55,"clouds":64,"wind_speed":3.55,"wind_deg":37,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}]},{"dt":1592395200,"temp":19.88,"feels_like":18.67,"pressure":1014,"humidity":71,"dew_point":14.54,"clouds":70,"wind_speed":3.77,"wind_deg":34,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}]},{"dt":1592398800,"temp":19.42,"feels_like":17.6,"pressure":1013,"humidity":71,"dew_point":14.21,"clouds":100,"wind_speed":4.42,"wind_deg":29,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592402400,"temp":19.12,"feels_like":16.71,"pressure":1013,"humidity":70,"dew_point":13.64,"clouds":100,"wind_speed":5.02,"wind_deg":31,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592406000,"temp":18.93,"feels_like":16.24,"pressure":1012,"humidity":71,"dew_point":13.58,"clouds":97,"wind_speed":5.43,"wind_deg":34,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592409600,"temp":18.48,"feels_like":15.66,"pressure":1012,"humidity":72,"dew_point":13.41,"clouds":98,"wind_speed":5.52,"wind_deg":38,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592413200,"temp":17.7,"feels_like":14.91,"pressure":1012,"humidity":74,"dew_point":13.03,"clouds":98,"wind_speed":5.32,"wind_deg":37,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592416800,"temp":16.81,"feels_like":13.9,"pressure":1012,"humidity":75,"dew_point":12.54,"clouds":99,"wind_speed":5.2,"wind_deg":39,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592420400,"temp":16.28,"feels_like":13.4,"pressure":1012,"humidity":76,"dew_point":12.2,"clouds":100,"wind_speed":5.02,"wind_deg":45,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592424000,"temp":16.04,"feels_like":13.26,"pressure":1013,"humidity":75,"dew_point":11.76,"clouds":100,"wind_speed":4.69,"wind_deg":47,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592427600,"temp":15.76,"feels_like":12.87,"pressure":1013,"humidity":76,"dew_point":11.62,"clouds":100,"wind_speed":4.82,"wind_deg":48,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592431200,"temp":15.58,"feels_like":12.81,"pressure":1012,"humidity":79,"dew_point":11.96,"clouds":100,"wind_speed":4.82,"wind_deg":52,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592434800,"temp":15.13,"feels_like":12.53,"pressure":1012,"humidity":84,"dew_point":12.6,"clouds":94,"wind_speed":4.8,"wind_deg":56,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592438400,"temp":15.2,"feels_like":13.06,"pressure":1012,"humidity":88,"dew_point":13.38,"clouds":94,"wind_speed":4.5,"wind_deg":63,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592442000,"temp":15.28,"feels_like":13.48,"pressure":1012,"humidity":91,"dew_point":13.9,"clouds":100,"wind_speed":4.29,"wind_deg":74,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592445600,"temp":15.16,"feels_like":13.64,"pressure":1012,"humidity":93,"dew_point":14.12,"clouds":99,"wind_speed":4,"wind_deg":87,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}]},{"dt":1592449200,"temp":15.29,"feels_like":13.99,"pressure":1012,"humidity":94,"dew_point":14.36,"clouds":99,"wind_speed":3.82,"wind_deg":89,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"rain":{"1h":0.14}},{"dt":1592452800,"temp":15.68,"feels_like":14.42,"pressure":1011,"humidity":92,"dew_point":14.55,"clouds":99,"wind_speed":3.79,"wind_deg":92,"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}]},{"dt":1592456400,"temp":16.03,"feels_like":14.87,"pressure":1011,"humidity":92,"dew_point":14.81,"clouds":99,"wind_speed":3.82,"wind_deg":99,"weather":[{"id":500,"main":"Rain","description
2020-06-17 09:12:40.085 Status: dzVents: Debug: OWM: Processing device-adapter for Min temp vandaag: Temperature device adapter
2020-06-17 09:12:40.087 Status: dzVents: Debug: OWM: Processing device-adapter for Max temp vandaag: Temperature device adapter
2020-06-17 09:12:40.087 Status: dzVents: Debug: OWM: k=2288 v[1]=forecast_temp_9h_deviceName v[2]=temp v[3]=Temperatuur om v[4]=OWMMain.hourly[9]
2020-06-17 09:12:40.087 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[9].temp 18.54
2020-06-17 09:12:40.087 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[9].temp
2020-06-17 09:12:40.088 Status: dzVents: Debug: OWM: Processing device-adapter for Temperatuur over 9 uur: Temperature device adapter
2020-06-17 09:12:40.088 Status: dzVents: Debug: OWM: updating temps: k=2288 v[4]=OWMMain.hourly[9] v[2]=temp
2020-06-17 09:12:40.088 Status: dzVents: Debug: OWM: k=2305 v[1]=forecast_tempFeels_6h_deviceName v[2]=feels_like v[3]=Gevoelstemperatuur om v[4]=OWMMain.hourly[6]
2020-06-17 09:12:40.089 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[6].feels_like 18.54
2020-06-17 09:12:40.089 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[6].feels_like
2020-06-17 09:12:40.090 Status: dzVents: Debug: OWM: Processing device-adapter for Gevoelstemperatuur over 6 uur: Temperature device adapter
2020-06-17 09:12:40.090 Status: dzVents: Debug: OWM: updating temps: k=2305 v[4]=OWMMain.hourly[6] v[2]=feels_like
2020-06-17 09:12:40.090 Status: dzVents: Debug: OWM: k=2306 v[1]=forecast_tempFeels_9h_deviceName v[2]=feels_like v[3]=Gevoelstemperatuur om v[4]=OWMMain.hourly[9]
2020-06-17 09:12:40.090 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[9].feels_like 18.54
2020-06-17 09:12:40.090 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[9].feels_like
2020-06-17 09:12:40.091 Status: dzVents: Debug: OWM: Processing device-adapter for Gevoelstemperatuur over 9 uur: Temperature device adapter
2020-06-17 09:12:40.091 Status: dzVents: Debug: OWM: updating temps: k=2306 v[4]=OWMMain.hourly[9] v[2]=feels_like
2020-06-17 09:12:40.091 Status: dzVents: Debug: OWM: k=2304 v[1]=forecast_tempFeels_3h_deviceName v[2]=feels_like v[3]=Gevoelstemperatuur om v[4]=OWMMain.hourly[3]
2020-06-17 09:12:40.091 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[3].feels_like 18.54
2020-06-17 09:12:40.092 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[3].feels_like
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: Processing device-adapter for Gevoelstemperatuur om 11:00 uur:: Temperature device adapter
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: updating temps: k=2304 v[4]=OWMMain.hourly[3] v[2]=feels_like
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: k=2286 v[1]=forecast_temp_3h_deviceName v[2]=temp v[3]=Temperatuur om v[4]=OWMMain.hourly[3]
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[3].temp 18.54
2020-06-17 09:12:40.093 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[3].temp
2020-06-17 09:12:40.094 Status: dzVents: Debug: OWM: Processing device-adapter for Temperatuur om 11:00 uur:: Temperature device adapter
2020-06-17 09:12:40.094 Status: dzVents: Debug: OWM: updating temps: k=2286 v[4]=OWMMain.hourly[3] v[2]=temp
2020-06-17 09:12:40.094 Status: dzVents: Debug: OWM: k=2287 v[1]=forecast_temp_6h_deviceName v[2]=temp v[3]=Temperatuur om v[4]=OWMMain.hourly[6]
2020-06-17 09:12:40.095 Status: dzVents: Debug: OWM: *** theTemp: OWMMain.hourly[6].temp 18.54
2020-06-17 09:12:40.095 Status: dzVents: Debug: OWM: *** theTempAgain: OWMMain.hourly[6].temp
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: Processing device-adapter for Temperatuur over 6 uur: Temperature device adapter
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: updating temps: k=2287 v[4]=OWMMain.hourly[6] v[2]=temp
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: url = http://127.0.0.1:18080/json.htm?type=command&param=renamedevice&idx=2286&name=Temperatuur+om+11%3A00+uur%3A
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: method = GET
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: post data = nil
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: headers = nil
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: callback = nil
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: url = http://127.0.0.1:18080/json.htm?type=command&param=renamedevice&idx=2304&name=Gevoelstemperatuur+om+11%3A00+uur%3A
2020-06-17 09:12:40.096 Status: dzVents: Debug: OWM: OpenURL: method = GET
2020-06-17 09:12:40.097 Status: dzVents: Debug: OWM: OpenURL: post data = nil
2020-06-17 09:12:40.097 Status: dzVents: Debug: OWM: OpenURL: headers = nil
2020-06-17 09:12:40.097 Status: dzVents: Debug: OWM: OpenURL: callback = nil
2020-06-17 09:12:40.097 Status: dzVents: Info: OWM: ------ Finished test OWM
--

Domoticz on rPi4 - RFXCOM RFXtrx433 USB - ZW090 Z-Stick Gen5 EU - IKEA Tradfri - Philips HUE - YouLess meter - SolarEdge
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest