Errpr Event System Lua Script did not return a commandArray

Moderator: leecollings

Post Reply
ironrider
Posts: 11
Joined: Saturday 13 February 2016 15:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Errpr Event System Lua Script did not return a commandArray

Post by ironrider »

Hi,
like mentioned above, this lua script is ending with a 'commandArray'
so I am not sure where the problem is.
The Internet search was unsuccesful, am I the only with this issue.
Any ideas
Thanks

Code: Select all

--The following need updated for your environment get the 'Idx' or 'Name' off the Device tab. By default only the Temp is 'uncommented or enabled' in this script.
local sensorwu = 'ChangeME' --name of the sensor that gets created when you add the WU device (and that contains multiple values like temperature, humidity, barometer etc)
local idxt = 999 --idx of the virtual temperature sensor you need to change this to your own Device IDx
local idxh = 999 --idx of the virtual humidity sensor you need to change this to your own Device IDx
local idxp = 999 --idx of the virtual pressure sensor you need to change this to your own Device IDx
--
 
commandArray = {}
 
if devicechanged[sensorwu] then
        sWeatherTemp, sWeatherHumidity, sHumFeelsLike, sWeatherPressure = otherdevices_svalues[sensorwu]:match("([^;]+);([^;]+);([^;]+);([^;]+);([^;]+)")
        sWeatherTemp = tonumber(sWeatherTemp)
        sWeatherHumidity = tonumber(sWeatherHumidity)
        sWeatherPressure = tonumber(sWeatherPressure)
        --parseDebug = ('WU Script Parsed Temp=' .. sWeatherTemp .. ' Humidity=' .. sWeatherHumidity .. ' Pressure=' .. sWeatherPressure)
        --print(parseDebug)
 
        commandArray[1] = {['UpdateDevice'] = idxt .. '|0|' .. sWeatherTemp}
        --commandArray[2] = {['UpdateDevice'] = idxh .. '|' .. tostring(sWeatherHumidity) .. '|' .. tostring(sHumFeelsLike)}
        --commandArray[3] = {['UpdateDevice'] = idxp .. '|0|' .. tostring(sWeatherPressure) .. ';' .. tostring(sWeatherPressForcast)}
end
 
return commandArray
ironrider
Posts: 11
Joined: Saturday 13 February 2016 15:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Errpr Event System Lua Script did not return a commandArray

Post by ironrider »

Fixed !

There was an empty test.lua in the scripts.
It works fine after deleting this file.

Bye
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest