We have moved at community.getvera.com

Author Topic: Free graphs for your temp/power sensors  (Read 2531 times)

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: Free graphs for your temp/power sensors
« Reply #30 on: March 18, 2019, 08:14:38 am »
My graph is still working as expected.
- Tomas

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Free graphs for your temp/power sensors
« Reply #31 on: March 18, 2019, 08:46:31 am »
:( I can't get it to work.




Been playing a bit with it , it seems it has something to do with the names I gave it.
Code: [Select]
{ key='Bathroom Down Humidity', deviceId=79, serviceId="urn:micasaverde-com:serviceId:HumiditySensor1", serviceVar="CurrentLevel"},I changed this to
Code: [Select]
{ 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

Offline akbooer

  • Beta Testers
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +291/-70
  • "Less is more"
Re: Free graphs for your temp/power sensors
« Reply #32 on: March 18, 2019, 09:17:22 am »
...it seems it has something to do with the names I gave it.

So far as I can see from the code, the parameters are not URL-encoded, so spaces and other characters may indeed cause problems.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Talisker

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: Free graphs for your temp/power sensors
« Reply #33 on: March 18, 2019, 03:03:56 pm »
For some reason I seem to be able to set up linear graphs, but not gauges? 

https://www.hundredgraphs.com/dashboard/Talisker

Any suggestions?  I've check the variable names.

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Free graphs for your temp/power sensors
« Reply #34 on: March 18, 2019, 03:30:01 pm »
@ 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
« Last Edit: March 18, 2019, 03:39:17 pm by Cor »

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: Free graphs for your temp/power sensors
« Reply #35 on: March 18, 2019, 06:32:59 pm »
...it seems it has something to do with the names I gave it.

So far as I can see from the code, the parameters are not URL-encoded, so spaces and other characters may indeed cause problems.
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


Offline ipstas

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Free graphs for your temp/power sensors
« Reply #36 on: March 19, 2019, 01:45:12 am »
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 https://www.hundredgraphs.com/files/Moniton.lua
Don't forget to change your Startup lua. And now you could change your collection period to like 600 secs in startup
monitcode = require("Moniton")
monitcode.HGTimer(600)


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! :) 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 ;) 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):
monitcode = require("Moniton")
monitcode.HGTimer(600)

That will restart the timer again

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Free graphs for your temp/power sensors
« Reply #37 on: March 19, 2019, 11:13:09 am »
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:
Code: [Select]
{ 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

Offline ipstas

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Free graphs for your temp/power sensors
« Reply #38 on: March 19, 2019, 02:36:53 pm »
Do you see something like that in Lua log?

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>


If you do, Vera sends it, if you don't the timer has not started
then try this in Test Lua Code
monitcode = require("Moniton")
monitcode.HGTimer(600)


it starts timer

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Free graphs for your temp/power sensors
« Reply #39 on: March 19, 2019, 04:22:50 pm »
@ Ipstas: I am getting data through  from the temperature sensors. The 3 memory are just reporting "0".,

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

Code: [Select]
{ 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?
Quote
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




Offline ipstas

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Free graphs for your temp/power sensors
« Reply #40 on: March 19, 2019, 05:13:54 pm »
try to run that on AltUI Test Lua Code

local mem = luup.variable_get('urn:schemas-cd-jackson-com:serviceId:SystemMonitor:1', "memoryAvailable", 16)
print(mem)


If should give you something. Otherwise you might have wrong device id or maybe wrong service id

Offline dgb

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
Re: Free graphs for your temp/power sensors
« Reply #41 on: March 19, 2019, 07:39:25 pm »
@ Ipstas: I am getting data through  from the temperature sensors. The 3 memory are just reporting "0".,

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

Code: [Select]
{ 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?


You have taken the device urn "urn:schemas-cd-jackson-com:device:SystemMonitor:1" , and tried to modify it to be a service id... and you have gotten it wrong.

The correct service id for System Monitor should be "urn:cd-jackson-com:serviceId:SystemMonitor".

The easiest way to get the correct urn for a device variable is to go to the device setup page and select "advanced", then select the "variables" tab, then hover your mouse over the variable you want to use... It will display the correct urn for that variable...

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: Free graphs for your temp/power sensors
« Reply #42 on: March 19, 2019, 07:57:00 pm »
We talked about spaces in between the key name as that is single quote. How about a variable that has a space in it's name where it is double quotes? I get 0 for value.

{ key='HeatSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", serviceVar="CurrentSetpoint Heat"},
{ key='CoolSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", serviceVar="CurrentSetpoint Cool"}

Offline ipstas

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Free graphs for your temp/power sensors
« Reply #43 on: March 19, 2019, 11:37:36 pm »
Variable name is not pushed to HG, which means if Vera can read it, then sure you can push the value from it.

It is only 2 things are pushed: the key and the value, the rest is required only to read internally

Offline dgb

  • Newbie
  • *
  • Posts: 7
  • Karma: +4/-0
Re: Free graphs for your temp/power sensors
« Reply #44 on: March 19, 2019, 11:46:51 pm »
We talked about spaces in between the key name as that is single quote. How about a variable that has a space in it's name where it is double quotes? I get 0 for value.

{ key='HeatSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", serviceVar="CurrentSetpoint Heat"},
{ key='CoolSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", serviceVar="CurrentSetpoint Cool"}


Spaces are not valid characters in a variable name... The current setpoint variables for all three (general, heat and cool) are all "CurrentSetpoint"... They are differentiated by the service ID, either "urn:upnp-org:serviceId:TemperatureSetpoint1", "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat" or "urn:upnp-org:serviceId:TemperatureSetpoint1_Cool"... The variable names displayed in the device settings uses the space delimited name because the vera code cheats when generating the html for the thermostat devices.

Code: [Select]
{ key='HeatSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Heat", serviceVar="CurrentSetpoint"},
{ key='CoolSetpoint', deviceId=116, serviceId="urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", serviceVar="CurrentSetpoint"}