Free graphs for your temp/power sensors

I have followed the instructions, checked and double checked that I have followed them line by line, but my vera is not pushing any data. I can do a https push from my web browser and that works fine. Any suggestions of what I could do or check? Thanks.

I think it was a bug in that lua file before. If you manually can do that https://www.hundredgraphs.com/api?key=AAbbCC&node=10&json={House:2111.571,Total:2111.571} with your key of course and your feeds come up, then https://www.hundredgraphs.com accepts data.

Then if your DEBUG = true, you should be able to see in the log lines like

[font=courier]50 03/16/19 2:27:00.100 luup_log:0: [Moniton] Logger: HGTimer 1 60 <0x73576520>
50 03/16/19 2:27:00.103 luup_log:0: [Moniton] Logger: collected vars: 26 <0x73576520>
50 03/16/19 2:27:00.104 luup_log:0: [Moniton] Logger: sending data: &debugtrue&version=3.16.2019&node=1&json={House:2026.537} <0x73576520>
50 03/16/19 2:27:00.297 luup_log:0: [Moniton] Logger: sent data status: 200 <0x73576520>
50 03/16/19 2:27:00.298 luup_log:0: [Moniton] Logger: next in 60 <0x73576520>[/font]

If you don’t see it, it is definitely a problem with lua. Next step would be - just copy and paste the whole file in Test Luup code (Lua) and let me know if it came as Success of Failed

Thanks for the prompt response ipstas.

I don’t actually know where to find the log, but I did paste my Monitcode.lua into Test Luup code (lua) and it came back Success. I have attached my file in case you can see where I have made an error.

You know that API key in the file gives unrestricted write access over api? I would regenerate it now

I ran the code it definitely works (i have changed the key so it would not mess with your data, but I see it is pushing). I forgot to mention when you are running it manually you need to add 1 more line at the end. Like this
[font=courier]HGTimer(600)[/font]
It starts the timer.

Now can you try these 2 in the Test Luup code (Lua)
[font=courier]monitcode = require(“Moniton”)
monitcode.HGTimer(600)[/font]

And it will popup in the log

To see logs. If you have ALTUI go to Misc/OS Command/Tail logs and just run default or use this
grep Monito /var/log/cmh/LuaUPnP.log. Other way is to access that log over ssh on your Vera

Of course make sure you have these 2 in your Startup Lua
[font=courier]monitcode = require(“Moniton”)
monitcode.HGTimer(600)[/font]

This is what starts the loop, otherwise you have just a file sitting there doing nothing

Great stuff. I am now getting my data pushed through. I very much appreciate your help. I will also take your advise and change my API key!

no problem at all

Would somebody need a push/sms about energy/temp spike?

Re-editing post

A graph doesn’t display in the dashboard but does in the graphs tab.

:frowning: I can’t get it to work.

I changed the API key and the local VARIABLES , I think with the last one I did something wrong.
but what?

Attached a screenshot of the startup LUA and the moniton file which I uploaded.

[code]-- API Key
local API_KEY = “BN741D9X” – grab that KEY from your settings on HundredGraphs, visualize and smarten up your IoT data
local NODE_ID = 1
local TOTAL = ‘Total’
local version = ‘3.16.2019’

– Upload Frequency in seconds. We do not accept updates more often than 60 sec
local updateInterval = 600

– Log debug messages
local DEBUG = true
local remotedebug = false

– Setup your devices here. You can use a function to calculate the power as illustrated in the sample.
– For device logging, use: key, deviceId, serviceId, serviceVar
– For function based logging, use: key, calculate, serviceVar
– if you want power to be counted for Total use countTotal=true
local VARIABLES = {
{ key=‘Boiler Temperature’, deviceId=480, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Outside Temperature’, deviceId=268, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Living Room Temperature’, deviceId=37, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Corridor Temperature’, deviceId=40, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Radiator Temperature’, deviceId=481, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Buffer Temperature’, deviceId=478, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Ambient Temperature’, deviceId=479, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Garage Temperature’, deviceId=416, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Hobby Temperature’, deviceId=228, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Hobby Humidity’, deviceId=230, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom UP Humidity’, deviceId=88, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom Down Humidity’, deviceId=79, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom UP Temperature’, deviceId=87, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Bathroom Down Temperature’, deviceId=78, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
– { key=“Energy”, deviceId = 301, serviceId=‘urn:micasaverde-com:serviceId:EnergyMetering1’, serviceVar=“Watts”, countTotal=false },
– { key=“Energy2”, deviceId = 301, serviceId=‘urn:micasaverde-com:serviceId:EnergyMetering1’, serviceVar=“Watts”, countTotal=true },
– { key=‘Lock’, deviceId=437, serviceId=“urn:micasaverde-com:serviceId:HaDevice1”, serviceVar=“BatteryLevel”},
– { key=‘Temperature’, deviceId=355, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
– { key=‘Tripped’, deviceId=331, serviceId=“urn:micasaverde-com:serviceId:MotionSensor1”, serviceVar=“Tripped”},
– { key=‘Humidity’, deviceId=318, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
– { key=‘BedroomHum’, deviceId=385, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
– { key=‘House B’, deviceId=13, serviceId=“urn:upnp-org:serviceId:SwitchPower1”, serviceVar=“Status”}, – Send switch status
– { key=‘Computer’, calculate=function() return (IsComputerPingSensorTripped() and 38 or 1) end, serviceVar=“Watts” }, – Send variable value
– { key=‘Other’, calculate=function() return 15 end, serviceVar=“Watts” } – Send a constant value
}

– You shouldn’t need to change anything below this line --[/code]

Many thanks,
Cor

[quote=“Cor, post:29, topic:205588”]:frowning: I can’t get it to work.

I changed the API key and the local VARIABLES , I think with the last one I did something wrong.
but what?

Attached a screenshot of the startup LUA and the moniton file which I uploaded.

[code]-- API Key
local API_KEY = “BN741D9X” – grab that KEY from your settings on HundredGraphs, visualize and smarten up your IoT data
local NODE_ID = 1
local TOTAL = ‘Total’
local version = ‘3.16.2019’

– Upload Frequency in seconds. We do not accept updates more often than 60 sec
local updateInterval = 600

– Log debug messages
local DEBUG = true
local remotedebug = false

– Setup your devices here. You can use a function to calculate the power as illustrated in the sample.
– For device logging, use: key, deviceId, serviceId, serviceVar
– For function based logging, use: key, calculate, serviceVar
– if you want power to be counted for Total use countTotal=true
local VARIABLES = {
{ key=‘Boiler Temperature’, deviceId=480, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Outside Temperature’, deviceId=268, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Living Room Temperature’, deviceId=37, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Corridor Temperature’, deviceId=40, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Radiator Temperature’, deviceId=481, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Buffer Temperature’, deviceId=478, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Ambient Temperature’, deviceId=479, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Garage Temperature’, deviceId=416, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Hobby Temperature’, deviceId=228, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Hobby Humidity’, deviceId=230, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom UP Humidity’, deviceId=88, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom Down Humidity’, deviceId=79, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
{ key=‘Bathroom UP Temperature’, deviceId=87, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
{ key=‘Bathroom Down Temperature’, deviceId=78, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
– { key=“Energy”, deviceId = 301, serviceId=‘urn:micasaverde-com:serviceId:EnergyMetering1’, serviceVar=“Watts”, countTotal=false },
– { key=“Energy2”, deviceId = 301, serviceId=‘urn:micasaverde-com:serviceId:EnergyMetering1’, serviceVar=“Watts”, countTotal=true },
– { key=‘Lock’, deviceId=437, serviceId=“urn:micasaverde-com:serviceId:HaDevice1”, serviceVar=“BatteryLevel”},
– { key=‘Temperature’, deviceId=355, serviceId=“urn:upnp-org:serviceId:TemperatureSensor1”, serviceVar=“CurrentTemperature”},
– { key=‘Tripped’, deviceId=331, serviceId=“urn:micasaverde-com:serviceId:MotionSensor1”, serviceVar=“Tripped”},
– { key=‘Humidity’, deviceId=318, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
– { key=‘BedroomHum’, deviceId=385, serviceId=“urn:micasaverde-com:serviceId:HumiditySensor1”, serviceVar=“CurrentLevel”},
– { key=‘House B’, deviceId=13, serviceId=“urn:upnp-org:serviceId:SwitchPower1”, serviceVar=“Status”}, – Send switch status
– { key=‘Computer’, calculate=function() return (IsComputerPingSensorTripped() and 38 or 1) end, serviceVar=“Watts” }, – Send variable value
– { key=‘Other’, calculate=function() return 15 end, serviceVar=“Watts” } – Send a constant value
}

– You shouldn’t need to change anything below this line --[/code]

Many thanks,
Cor[/quote]

It looks right to me. Mine stopped working yesterday around 3:45PM EDT I believe. Hasn’t updated since then.

My graph is still working as expected.

Been playing a bit with it , it seems it has something to do with the names I gave it.

{ key='Bathroom Down Humidity', deviceId=79, serviceId="urn:micasaverde-com:serviceId:HumiditySensor1", serviceVar="CurrentLevel"},

I changed this to { key='Bathroom ', deviceId=79, serviceId="urn:micasaverde-com:serviceId:HumiditySensor1", serviceVar="CurrentLevel"},
And inserted that as the only one, now it is working for that one


Cor

So far as I can see from the code, the parameters are not URL-encoded, so spaces and other characters may indeed cause problems.

For some reason I seem to be able to set up linear graphs, but not gauges?

Any suggestions? I’ve check the variable names.

@ Akboer: Thanks; that was indeed the problem , now data is getting through.

A Question for Ipstas: Would it be possible to see a more detailed number when you click or hover on a line? For example the temperature in my heating room is ca 32.62 degrees C. The scales are from 0-35. I would like to now if the Temperature probe is working correctly , so I need to see the detailed number up to at least one decimal.

Outside Temperature is now 0.7 degrees C, scale is from 0-2.2 which is much better. although it would be nice to show a number when you hover over it , or click on a line.

Another question: is it possible to show the memory usage of vera? see attached picture from datamine

Thanks,
Cor

So far as I can see from the code, the parameters are not URL-encoded, so spaces and other characters may indeed cause problems.[/quote]I thought that too but the commented examples in the lua file seemed to indicate otherwise. I’ll change mine back and maybe that’s my issue too.

Sent from my VS995 using Tapatalk

1st. I apologize, it is still in beta version. So sometimes it doesn’t work as expected, sometimes it is slow or just simply doesn’t work at all

That said.

2nd. Gauges had a problem for a couple of last days, mostly due to the fact I was trying to set the max automatically and it takes a bit more from the server that I have expected to. So there is a new sheriff in town. If you had gauges before, you might want to save that graph again with new Max for that gauge manually. Just go to your Graphs, select your Gauge, put your Max and click Save. That’s it.

3rd. If you have a heavy load on a vera, try to load a new version from [url=https://www.hundredgraphs.com/files/Moniton.lua]HundredGraphs, visualize and smarten up your IoT data
Don’t forget to change your Startup lua. And now you could change your collection period to like 600 secs in startup
[font=courier]monitcode = require(“Moniton”)
monitcode.HGTimer(600) [/font]

Again, thanks for your patience, I am working on it to be more stable

Now, for some questions.

  • Can there be spaces in a feed name. Hell if I know! :slight_smile: Never tried, could be another bug. Theoretically yes it can, practically I have to check it.
  • Decimals. I was trying to round it and maybe it was not the best way. So for now if you want to see a decimal you can set a gauge and the last 5 reports with the raw numbers will be pulled together with the gauge. All other places are getting rounded numbers for now. I will think a bit more how to make it nicer.
  • Negative mins. I am in Fahrenheit zone. So -1C is 31F for me :wink: Linear picks the negative mins by itself, but gauge needs a manual input, I will add it later.
  • Memory usage. Whatever Vera can report, you can use for a feed. I just don’t know really what is the serviceId for that.
  • It keeps accepting data even when it is slow (but you might want to change it to 600 secs or so), the best way to see if you have new data incoming is at Feeds
  • But it could be that Vera has stopped sending it. Mine did it for some unknown reason. Easy fix is just run that in the Test Luup code (requires at least 3.16.2019 version of lua file):
    [font=courier]monitcode = require(“Moniton”)
    monitcode.HGTimer(600)[/font]
    That will restart the timer again

I am trying the system memory , but there is no data being pushed out 
 anyone has an idea what I do wrong , or how to do it correctly?

The info I found ( also see attachments):
device type: urn:schemas-cd-jackson-com:device:SystemMonitor:1
variables:
memoryFree
memoryUsed
memoryAvailable

from this I made:

{ key='Veramfree', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryFree"}, { key='Veramused', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryUsed"}, { key='Veramavail', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryAvailable"},

But no 
 it is most likely wrong.

Thanks,
Cor

Do you see something like that in Lua log?

[font=courier]50 03/19/19 12:48:43.100 luup_log:0: [Moniton] Logger: HGTimer 1 60 <0x7358c520>
50 03/19/19 12:48:43.103 luup_log:0: [Moniton] Logger: collected vars: 26 <0x7358c520>
50 03/19/19 12:48:43.103 luup_log:0: [Moniton] Logger: sending data: &debug=false&version=3.16.2019&node=1&json={House:1714.481} <0x7358c520>
50 03/19/19 12:48:43.345 luup_log:0: [Moniton] Logger: sent data status: 200 <0x7358c520>[/font]

If you do, Vera sends it, if you don’t the timer has not started
then try this in Test Lua Code
[font=courier]monitcode = require(“Moniton”)
monitcode.HGTimer(600)[/font]

it starts timer

@ Ipstas: I am getting data through from the temperature sensors. The 3 memory are just reporting “0”.,

3/19/2019, 9:16:00 PM Verau 0

{ key='Veraf', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryFree"}, { key='Verau', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryUsed"}, { key='Veraa', deviceId=16, serviceId="urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1", serviceVar="memoryAvailable"},

Anyone has an idea what I am doing wrong?

The info I found : device type: urn:schemas-cd-jackson-com:device:SystemMonitor:1 variables: memoryFree memoryUsed memoryAvailable

But how to insert it correctly?

Thanks,
Cor