okay figured out why i could not mount it here a copy of the mqtt.lua
just copy it to here
nano /usr/lib/lua/luci/statistics/rrdtool/definitions/mqtt.lua
it only seams to work if you use ssl mosquitto
module("luci.statistics.rrdtool.definitions.mqtt", package.seeall)
function rrdargs(graph, plugin, plugin_instance)
-- For $HOSTNAME/exec-foo-bar/temperature_baz-quux.rrd, plugin will be
-- "exec" and plugin_instance will be "foo-bar". I guess graph will be
-- "baz-quux"? We may also be ignoring a fourth argument, dtype.
if "Energy" == plugin_instance then
--
-- Energy diagram
--
local energy = {
-- draw this diagram for each plugin instance
per_instance = true, -- enable or disable for different graphing
title = "%H: Energy Production and Consumption--%di",
vlabel = "watts",
number_format = "%6.2lf%%",
-- diagram data description
data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional)
sources = {
power = { "value"}
},
-- special options for single data lines
options = {
-- power_wind_value = {
-- title = "wind power",
-- color = "00e000" -- green
power__value = {
total = true, -- report total amount
-- color = "0000ff", -- rx is blue
-- noarea = true,
overlay = true,
title = "%di"
--transform_rpn = "3600,/"
}
}
}
}
return { energy }
end
if "Temp" == plugin_instance then
--
-- Temperature diagram
--
local temp = {
-- draw this diagram for each plugin instance
-- per_instance = true, -- enable or disable for different graphing
title = "%H: Temperature %di",
vlabel = "celsius",
-- diagram data description
data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional)
sources = {
temperature = { "value" }
},
-- special options for single data lines
options = {
temperature__value = {
-- total = true, -- report total amount
-- color = "0000ff", -- rx is blue
noarea = true,
overlay = true,
title = "%di"
}
}
}
}
return { temp }
end
if "Flow" == plugin_instance then
--
-- Flow diagram
--
local flow = {
-- draw this diagram for each plugin instance
per_instance = true, -- enable or disable for different graphing
title = "%H: Flow - %di",
vlabel = "litre",
-- diagram data description
data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional)
sources = {
flow = { "value" }
},
-- special options for single data lines
options = {
flow__value = {
-- total = true, -- report total amount
color = "ff00ff",
area = "00ff00", -- rx is blue
-- noarea = true,
overlay = true,
title = "%di"
}
}
}
}
return { flow }
end
if "Humidity" == plugin_instance then
--
-- Temperature diagram
--
local humid = {
-- draw this diagram for each plugin instance
-- per_instance = true, -- enable or disable for different graphing
title = "%H: Humidity - %di",
vlabel = "percent",
-- diagram data description
data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional)
sources = {
humidity = { "value" }
},
-- special options for single data lines
options = {
humidity__value = {
-- total = true, -- report total amount
color = "1100ff", -- rx is blue
-- noarea = true,
overlay = true,
title = "%di"
-- title = "Humidity"
}
}
}
}
return { humid }
end
if "Pressure" == plugin_instance then
--
-- Temperature diagram
--
local press = {
-- draw this diagram for each plugin instance
-- per_instance = true, -- enable or disable for different graphing
title = "%H: Pressure - %di",
vlabel = "kPa",
-- diagram data description
data = {
-- defined sources for data types, if ommitted assume a single DS named "value" (optional)
sources = {
pressure = { "value" }
},
-- special options for single data lines
options = {
pressure__value = {
-- total = true, -- report total amount
-- color = "0000ff", -- rx is blue
noarea = true,
overlay = true,
title = "%di"
}
}
}
}
return { press }
end
end