Author Topic: Datayours - where's my data?  (Read 786 times)

Offline jswim788

  • Hero Member
  • *****
  • Posts: 789
  • Karma: +57/-2
Datayours - where's my data?
« on: April 16, 2017, 04:38:50 pm »
I'm trying to log the heating/cooling run time data from my thermostat.  I have other variables stored successfully, but for some reason this data doesn't seem to get saved properly.  The .wsp file is getting updated (not sure about the data in it), but the plot is always all zeros.  I can see in the history that the variable is changing between "Heating" and "Idle".  How do I debug this further?  I'm a little suspicious of the xFilesFactor, but I did see an example where it is set to 0.

LuaUPnP.log has:
2017-04-16 13:33:49.736   luup.variable_set:18: 41.urn:micasaverde-com:serviceId:HVAC_OperatingState1.ModeState was: Heating now: Heating #hooks:1

storage-schemas.conf has:
[hvac]
pattern = \.hvac$
retentions = 1m:3d, 24h:1y

storage-aggregation.conf has:
[HVAC]
pattern = \.hvac$
xFilesFactor = 0
aggregationMethod = sum

and DataTranlation.conf has:
[*.urn:micasaverde-com:serviceId:HVAC_OperatingState1.ModeState]
Cooling = -1
Idle = 0
Heating = 1

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6154
  • Karma: +275/-69
  • "Less is more"
Re: Datayours - where's my data?
« Reply #1 on: April 16, 2017, 04:49:20 pm »
Quote
DataTranlation.conf

...that's just a typo, is it?
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 jswim788

  • Hero Member
  • *****
  • Posts: 789
  • Karma: +57/-2
Re: Datayours - where's my data?
« Reply #2 on: April 16, 2017, 05:55:00 pm »
Yes, typo.  It's "DataTranslation.conf" with an 's'.  I cut and pasted the contents, but typed in the filenames.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6154
  • Karma: +275/-69
  • "Less is more"
Re: Datayours - where's my data?
« Reply #3 on: April 17, 2017, 08:20:07 am »
Ah, OK.  It turns out that the data values being pushed by AltUI were not subject to the symbolic translation code.  They are now.

Just update your DataYours install by typing development into the Update box against DataYours on the Plugins page and then click Update and wait for the restart.

Please tell me this fixes the problem! (or not.)
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 jswim788

  • Hero Member
  • *****
  • Posts: 789
  • Karma: +57/-2
Re: Datayours - where's my data?
« Reply #4 on: April 17, 2017, 01:44:54 pm »
Updated code didn't seem to make a change.  I can see below on the stats page.  'translations' doesn't seem correct.  I did restart openLuup, but do I need to do something to make AltUI see this - re-register somehow?  I'll try removing the watch and adding it back to see if anything changes.  Is 'translations' the correct variable to check?

Wait - I think I found the problem - the location of DataTranslation.conf.  Where should it be?  I've added it to /www and the /etc/cmh-ludl and now I see translations is filled in.  Where is the correct location?  It's in /www.  I was used to the storage*.conf files which go in the data directory.  This one is different - should have read the manual more thoroughly.

This works.  Thanks for the help!

Old - when DataTranslation.conf is in the wrong place:

DATAWATCHER = {
  VERSION = "2017.04.17",
  live_energy_usage = {},
  memory_stats = {},
  tally = {
    HTTP_relayed = {
      ["EnergyUsage.e"] = 221,
      ["IndoorTemperature.m"] = 235,
      ["OutdoorTemperature.m"] = 4,
      ["cpu.d"] = 121,
      ["hvacTime.hvac"] = 235,
      ["memory.d"] = 121,
      ["uptime.m"] = 121
    },
    UDP_relayed = {},
    watched = {}
  },
  translations = {}
}
« Last Edit: April 17, 2017, 05:10:32 pm by jswim788 »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6154
  • Karma: +275/-69
  • "Less is more"
Re: Datayours - where's my data?
« Reply #5 on: April 17, 2017, 05:20:26 pm »
Good... glad to read the edit!

Yes, different locations because the database-specific ones belong with the database, whereas the system-specific ones are independent of that.

/www/ seemed like a good choice at the time. In retrospect, for Vera, these tend to get wiped with firmware upgrades, and on openLuup, I'd rather they were in the openLuup directory tree.
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 Chelseagroup

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +2/-0
Re: Datayours - where's my data?
« Reply #6 on: August 11, 2018, 11:50:30 am »
Where are the graph controls stored?
I need to change one and cannot seem to get the change to take when I save it with the same name as the existing one.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6154
  • Karma: +275/-69
  • "Less is more"
Re: Datayours - where's my data?
« Reply #7 on: August 11, 2018, 01:12:35 pm »
CONFIG_DIR/DataDash.conf

Default value for CONFIG_DIR (DataYours device variable) is /www (a bad choice, in hindsight.)
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 Chelseagroup

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +2/-0
Re: Datayours - where's my data?
« Reply #8 on: August 11, 2018, 06:44:39 pm »
Is there some other way to remove a graph other than modifying the conf file?
I had read that saving the graph withthe same name after clearing the selections would delete it(?)
Also saving the graph withthe same name diferent selections should replace the old one(?)
Neither seem to work - are they supposed to?


Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6154
  • Karma: +275/-69
  • "Less is more"
Re: Datayours - where's my data?
« Reply #9 on: August 12, 2018, 05:52:59 am »
Neither seem to work - are they supposed to?

Of course. 

Quote from: DataYours User Guide, p. 9
Clear empties the selection list. Saving a named graph with nothing in the selection list deletes an existing graph of the same name.

Try again?
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 Chelseagroup

  • Sr. Newbie
  • *
  • Posts: 45
  • Karma: +2/-0
Re: Datayours - where's my data?
« Reply #10 on: August 12, 2018, 12:22:00 pm »
Saving with no selections DOES work - it removes the graph.
Saving to the same name with different selections does NOT update the graph.
No problem - it is no big deal to delete and reselet and save.

Thanks again for the prompt response.