Losing saved graph and stopping watching issues Datayours

Hi

Installed datayours a couple of days ago this went fine - thanks Akbooer

Its running on a rpi3 openLuup vs v16.10.23 datayours vs 16.10.4

For some reason last night at 11:40 it stopped logging the variables. On the devices screen the watches were still in place so I just went into each one and clicked watch and so they started watching again. Any idea what could have stopped all of them at the same time?

I have defined/saved a grapph with the temperatures from my hot/cold tanks and this shows up fine. Periodically it loses this graph(its the only one Ive got atm and so just get a blank screen when i click graphs on the dashboard) and I have to redefine/save it.

Any Idea what I’m doing wrong

regards

Nik

Is this running on Vera? Did Luup reload at around that time?

The variables to watch should be stored when they are defined - it looks like you have lost the configuration files. Did you do anything else to the system? After you re-watch the variables, do the plots have data from previously?

Again, the lost graph seems to be the same issue… I’ve not seen this previously.

Where are you storing your configuration files? It’s not in /tmp/ is it? This would explain.

I was watching american fooball at the time :slight_smile: so I wasnt doing anything to the system at all - when i went in to re-watch the variables the correct devices were highlighted and the previous data was still there and you can see from the week view attached there is just a straight line linking that time to this morning when I noticed. On the dayv file attached you can see when I started the data watching again this mornin.

The data is being saved in a data directory under /home/pi/vera/cmh-ludl

The configuration seemed fine I just had to click the watch again for all of the devices/variables

regards
Nik

Edit : Ive lost the defined graph about 3 times now

Just realised it did it again at 2:15 today just had to restart watching again as you can see from the attached the configuration was still there

Is there a way of seeing what variables its actually watching ?

Looking in the configuration it seems to imply that the daemon was started at 14:19 which is a bit to much of a coincidence given thats about the time it stopped ‘watching’ the variables

DAEMON = { VERSION = "2016.10.10", client = "DataWatcher", destinations = {"127.0.0.1:2003"}, errors = {count = 0}, http = {received = 17}, ip = "192.168.2.222", start_time = "Mon Nov 28 14:19:34 2016", udp = { last_received = {}, last_sent = {["127.0.0.1:2003:inet"] = "Vera-88800000.10047.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 104.8 1480354308"}, received = 0, sent = 1495 }

does this imply that the watch should not survive a openLuup_reload ?

Well having read the documentation through - both the original and the documentation update - the only thing I can find about preserving configuration data is item 2 under The Daemons (page18) if it means preserving the watched variables then mine isnt.

As a work around at the moment I have a scene which runs periodically and makes

luup.inet.wget "http://192.168.2.222:3480/data_request?id=lr_DataWatcher&watch=31.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"

calls to ensure the variables are still being watcher I wonder if I can put a call to a scene in the startup code so its only run after reload - need to investigate this.

after a reload the datawatcher looks like

[code]DAEMON = {
VERSION = “2016.10.10”,
client = “DataWatcher”,
destinations = {“127.0.0.1:2003”},
errors = {count = 0},
http = {received = 3},
ip = “192.168.2.222”,
start_time = “Mon Dec 5 23:05:03 2016”,
udp = {
last_received = {},
last_sent = {},
received = 0,
sent = 0
}
}

DATAWATCHER = {
VERSION = “2016.10.04”,
live_energy_usage = {},
memory_stats = {},
tally = {
HTTP_relayed = {},
UDP_relayed = {},
watched = {}
},
translations = {}
}

[cache] = {
LOCAL_DATA_DIR = “/home/pi/vera/cmh-ludl/data/”,
UDP_RECEIVER_PORT = “2003”
}

[dash] = {
DATAMINE_DIR = “”,
ICON_PATH = “/cmh/skins/default/img/devices/device_states/”,
LOCAL_DATA_DIR = “/home/pi/vera/cmh-ludl/data/”,[/code]

after the scene is run it looks like this

DATAWATCHER = { VERSION = "2016.10.04", live_energy_usage = {}, memory_stats = {}, tally = { HTTP_relayed = {}, UDP_relayed = {}, watched = { ["031.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0, ["033.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0, ["034.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0, ["035.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0, ["036.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0, ["037.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0 } }, translations = {} }

The altui push to datayours does seem to be preserved.

Is it possible to use the HTML Url command line interface to recreated the saved graphs ??

For historical reasons, the default location for DataWatcher and DataDash configuration files is the directory /www/. You should find some .conf files there. I’m guessing that directory doesn’t exist on your system.

[hr]

Edit: the relevant DataYours configuration variable is CONFIG_DIR.

arrrgh - I kept reading that you wanted to keep everything in the cmh-ludl directory (html call using port 3480 goes there) so IU assumed references to /www/ meant there - created a /www/ directory (although seems an odd place) and lo and behold conf files have appeared - what was puzzling me was that it was using the whisper files to store the ‘metrics’ so the whisper variables were there after relaod but they wernt being ‘watched’

Thank - you well see how we get on now :slight_smile:

Right that sorted it - I changed the config directory to a new one in …/cmh-ludl and copied the conf files there - no problem now - the Goal of linking the veraedge,network owl, rpi owserver, eds owserver and mysensors through openLuup RPI is getting nearer - great graphs from my hot tank - attached

Thanks for all you help

Nik

Really interesting to see that… I keep meaning to instrument my hot water tank.

Glad it’s working OK now.

I lost my config after an update to version 1.7.2414
The /www/ directory was no longer containing the *.conf files.

Started to manually rebuild.
Found that I can update the parameter CONFIG_DIR, now pointing to the data dir on my NAS.

I only see that in the config page some watches are on ‘=0’ and did not restart logging.

Checking the DataWatcher.conf file I could not set this.
Where can I (re) enable the logging of the temp’s?[code]

watched = {
  ["005.urn:akbooer-com:serviceId:EventWatcher1.CpuLoad05"] = 4,
  ["005.urn:akbooer-com:serviceId:EventWatcher1.MemAvail"] = 11,
  ["005.urn:akbooer-com:serviceId:EventWatcher1.MemFree"] = 11,
  ["015.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0,
  ["016.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 5,
  ["017.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0,
  ["018.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 0,
  ["019.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 1,
  ["020.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 2,
  ["050.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped"] = 0,
  ["051.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 4,
  ["052.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel"] = 18,
  ["053.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"] = 8
}[/code]

You have done the right thing in moving the location of the configuration file. /www/ seemed like a good place at the time, but in hindsight, it wasn’t.

You can use a single HTTP request direct to DataWatcher to enable logging of ALL temperature devices:

http://openLuupIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature

You should receive acknowledgement (in my way, rather a lot):

watch=004.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=005.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=006.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=308.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=310.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=318.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=324.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=326.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=371.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=372.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=373.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=380.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=382.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=383.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=388.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=389.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=390.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=408.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=412.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=413.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
watch=414.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature

So this saves you from having to set up each one again individually.

I created a datayoursconfig directory in cmh-ludl and set the variable to point there - I have the mount point for the NAS in here as well so everything is within this directory structure

Code: [Select]

http://openLuupIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature

You should receive acknowledgement (in my way, rather a lot):

This works great indeed, much quicker.
Thanks!