DataYours: a prototype next-generation dataMine

[quote=“Freddan101, post:20, topic:179386”]I would like to create a flexible energy consumption report based on accumulated data per day/week/month/year and device/room/whole house in combination with category (lighting, heating, appliance etc.). Is this something I can already or will be able to do with DataYours or with the help of?

It would be really nice to be able to embed these kind of reports into a customized dashboard/interface. I realize I might be on my own here though… :)[/quote]

There’s an Energy Calculator plugin which does some of this, I believe. Accumulated day/week/month/year totals can be got for ‘free’ through configuring a Whisper file with the right archive retentions. The Graphite webapp (crudely mimicked by DataGraph at this time) could do grouping of results into categories.

Bear in mind that DataYours is, very definitely, a prototype. I just wanted to put something concrete out there to support my initial suggestions of where we might go beyond dataMine (which I’m still using in ‘production’ mode at the moment, although running in parallel with Whisper.) Whilst I’m trying to do a good job, much of the code might be throw-away and many of the features are not yet fully implemented or tested. I’m actually chasing a problem with archive aggregation incorrectly accumulating over null values at the moment. However, I am definitely committed to the Whisper database and the external interfaces, and I’m doing some rigorous unit testing to qualify these to a release level. The idea is that there are lots of dashboard tools out there which do already interface to Graphite / Whisper. I’m not very good at writing user interfaces, so someone else will have to use what’s there or write their own.

Well, I see that it is just about one month since I gave an update on this prototype, so it’s time for another.

The Whisper database is now fully stress-tested, and I found a couple of problems: some from the translation to Lua; some in the original Python code. But all is sorted now and it has been running flawlessly for over a month logging data from three (un-bridged) systems.

What has been taking the time is the user interface (as ever.) I am not a GUI developer, or, for that matter, an HTML one, or a JavaScript one… so progress has been slow.

However, nearly there now in terms of another iteration of the prototype. I attached a snapshot of the database browser showing multiple Vera channels and a plot of one of them. As before, it retrieves data from both dataMine and the Whisper database, but time is moving on so the need to access the dataMine database diminishes for plotting recent data.

I’ve modified the code below to only accept SysLog and not create the local directory/whisper files. I’m LUA naive…so not sure of the next steps.

  1. Upload L_DataDaemon.lus
  2. Run the code below in test LUA code window. It should not store any data locally (all forwarded to Syslog)
------
--
-- DataYours - a prototype next-generation datamine
-- version = 2014.02.08  @akbooer
--
--

-- load and start the three component daemons

require "L_DataWatcher"

local IP   = "127.0.0.1"            -- this machine
local PORT = "1392"                 -- unassigned port

local SYSLOG = "xxx.xx.xx.xxx:yyy"  -- set syslog 

local function DWconfig (x) luup.inet.wget ("http://"..IP..":3480/data_request?id=lr_DataWatcher&"..x, 1) end

-- configure DataWatcher to watch all Termperature, Security, Power and Batteries and send to specific port

DWconfig ("send="..IP..":"..PORT)
DWconfig ("syslog="..SYSLOG)

DWconfig "watch=*.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature"
DWconfig "watch=*.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped"
DWconfig "watch=*.urn:micasaverde-com:serviceId:EnergyMetering1.Watts"
DWconfig "watch=*.urn:micasaverde-com:serviceId:HaDevice1.BatteryLevel"

DWconfig "watch=*.urn:micasaverde-com:serviceId:Volume1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:SwitchPower1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:InputSelection1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:MediaNavigation1.*"
DWconfig "watch=*.urn:upnp-org:serviceId:RenderingControl.*"
DWconfig "watch=*.urn:dcineco-com:serviceId:MSwitch1.*"
DWconfig "watch=*.urn:upnp-org:serviceId:VSwitch1.*"
DWconfig "watch=*.urn:upnp-org:serviceId:HVAC_UserOperatingMode1.*"
DWconfig "watch=*.urn:upnp-org:serviceId:TemperatureSetpoint1_Heat.*"
DWconfig "watch=*.urn:upnp-org:serviceId:TemperatureSetpoint1_Cool.*"
DWconfig "watch=*.urn:upnp-org:serviceId:HouseStatus1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:DoorLock1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:GenericSensor1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:SceneController1.*"
DWconfig "watch=*.urn:upnp-org:serviceId:SwitchPower1.*"
DWconfig "watch=*.urn:micasaverde-com:serviceId:LightSensor1.*"


-- configure DataCache to listen and store the results

DCconfig ("listen="..PORT)
DCconfig ("syslog="..SYSLOG)

--
-- Congratulations! You should now be logging specified device data
--
-- to plot, visit, for example, the URL 
-- <yourVeraIP>:3480/data_request?id=lr_render&target=Vera-12345678.321.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
--
--

Question on above, will the code work above with the “.*” at the end of the service ID (without the variable). I was hoping to catch all variables and filter it down later.

Lastly, is there any problem running DataYours in parallel to Event Watcher (which is great for debugging)?

[quote=“AgileHumor, post:23, topic:179386”]I’ve modified the code below to only accept SysLog and not create the local directory/whisper files. I’m LUA naive…so not sure of the next steps.
[…]
Question on above, will the code work above with the “.*” at the end of the service ID (without the variable). I was hoping to catch all variables and filter it down later.

Lastly, is there any problem running DataYours in parallel to Event Watcher (which is great for debugging)?[/quote]

[ul][li]ignore the [tt]DataYours[/tt] script entirely. Just do manual configuration for a couple of variables to begin with. All you need to do is use a browser to access the URL request.[/li]
[li]No, wildcard variable names will not work, only device numbers - it’s actually very unusual to want to do that. Many devices have tens of variables which are mostly useless for data gathering.[/li]
[li]Should be no conflict at all between [tt]EventWatcher[/tt] and [tt]DataYours[/tt]. In fact, I plan to merge aspects of them ([tt]DataYours[/tt] for data logging, [tt]EventWatcher[/tt] for events, strangely enough.)[/li][/ul]

Just remember to include the [tt]require[/tt] statement for the [tt]DataWatcher[/tt] module (it loads the [tt]DataDaemon[/tt] one itself.)

Thanks!

One last thing…how do I uninstall this from running/consuming resources in case I give it too much?

I figure deleting the file via SSH, but I don’t know how/where it will run from since I’m assuming no device is created.

The two files are tiny - ignore those resources.
If you remove the [tt]require[/tt] statement from startup Lua, neither of them will be loaded into memory.
You will have difficulty detecting any use of resources - memory or cpu - they are incredibly lightweight and do not create a stand-alone device.

Actually, while you are doing this, you might as well have the latest versions (the config files are not compatible, sorry)

Ok, I think I missed how to have it run :frowning: I feel like an idiot.

Do I load it from the Startup LUA?

require L_DataDaemon.lua
require L_DataWatcher.lua

I’m assuming I make an HTTP request to set the syslog based on the code below. But will that really only echo the syslog? Is it being stored elsewhere in a log file or database? I’m assuming since I’m not running the other code those files/whisper databases won’t be used.

http://VeraIP:3480/data_request?id=lr_DataWatcher&syslog=xxx.xx.xx.xxx:yyy

Just the require statement for L_DataWatcher in startup, then restart.
Yes, set syslog like that, and &watch=… for the variables.
Sorry, have another appointment this evening, so can’t help until much later!
Good luck.

Thanks so much!

  1. Uploaded latest files to Vera

  2. Added following line to Startup LUA

require L_DataWatcher
  1. Reloaded, get the error ERROR : Error in lua for scenes and events at startup and no other code ran from Startup LUA.

  2. Ran this command, received “No data received” from browser
    http://VeraIP:3480/data_request?id=lr_DataWatcher&syslog=xxx.xx.xx.xxx:yyy

  3. Reloaded, get the error ERROR : Error in lua for scenes and events at startup and no other code ran from Startup LUA.

Sorry again If I’m doing something stupid.

Working steps (Lua for dummies):

  1. Go to Startup LUA and add
require "L_DataWatcher"

Thank you so much for all your help thus far. Sample data attached for others
03-13-2014 13:30:13 Mar 13 13:30:14 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 65 1394742614
03-13-2014 13:30:08 Mar 13 13:30:09 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 68 1394742609
03-13-2014 13:29:56 Mar 13 13:29:57 Vera-30010408 DataWatcher: Vera-30010408.477.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 660 1394742597
03-13-2014 13:29:43 Mar 13 13:29:44 Vera-30010408 DataWatcher: Vera-30010408.486.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 12 1394742584
03-13-2014 13:29:43 Mar 13 13:29:44 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 63 1394742584
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.486.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 9 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.483.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.482.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.481.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.480.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 68 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.448.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 43 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.441.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570
03-13-2014 13:29:30 Mar 13 13:29:30 Vera-30010408 DataWatcher: Vera-30010408.432.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped 0 1394742570

Can you expose in the data stream the:

  • Display Name (in addition to number)
  • Room Number or Name
  • Device Category

[quote=“AgileHumor, post:33, topic:179386”]Can you expose in the data stream the:

  • Display Name (in addition to number)
  • Room Number or Name
  • Device Category[/quote]

Not directly. This is part of the system which complies with an industry-standard format, the Carbon Whisper plaintext protocol, see: [url=http://graphite.readthedocs.org/en/latest/feeding-carbon.html#the-plaintext-protocol]Feeding In Your Data — Graphite 1.2.0 documentation.

However, you see encoded in it the vera id, device number, serviceId, and variable name - unique coordinates to all the metadata you could wish for, easily extracted from the Luup request for device status information (viz. room, device name, category, …) It would be straightforward to pipe this through another daemon which recovers it and sends it along in a different format (perhaps along the lines of EventWatcher.) Presumably, also, it’s easy to enable your back-end system do the Luup request itself.

I have all the code for this up and running in the [tt]DataDash[/tt] module, a prototype replacement for the dataMine front-end GUI. Just a bit more work before releasing the next version of that, but I fear you will not be interested in it.

Thanks sir, I can easily have this written in the SQL stored procedure to do a lookup table for the devices/room numbers. I can use the EventWatcher devices report and manually populate the SQL lookup table…

My current experience with the different services ID’s below to help save you and others time.

BTW, For the ones that don’t work, do I need to “unregister” them so they don’t consume resources?

Sample supplied @akbooer by (Edited from Default):
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:EnergyMetering1.Watts
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HaDevice1.BatteryLevel

Works
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:VSwitch1.Status
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:SwitchPower1.Status
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:EnergyMetering1.KWH
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:HVAC_UserOperatingMode1.ModeStatus
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSetpoint1_Heat.CurrentSetpoint
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSetpoint1_Cool.CurrentSetpoint
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:HouseStatus1.OccupancyState
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.Status
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:Dimming1.LoadLevelStatus
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:GenericSensor1.CurrentLevel
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneController1.sl_SceneActivated
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneController1.sl_SceneDeactivated
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HumiditySensor1.CurrentLevel
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:LightSensor1.CurrentLevel
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_UserCode
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.Health
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveNetwork1.LastHeal
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneController1.LastSceneID
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SecuritySensor1.Armed
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveNetwork1.NetStatusText
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneControllerLED1.LightSettings

Update #1: Working:
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicEG.ConditionSatisfied
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicEG.ConditionMap
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicC.ObjectStatusMap
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicC.Triggers
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicC.Actions
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicC.ConditionRepeat
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:ProgramLogicC.Schedules

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:HVAC_FanOperatingMode1.Mode
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:HVAC_FanOperatingMode1.FanStatus
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SwitchPower1.Status

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.Condition
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.ConditionGroup
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.WindCondition
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.WindDirection
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.WindSpeed
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-micasaverde-com:serviceId:Weather1.Location

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SecuritySensor1.ArmedTripped

Update #2
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:intvelt-com:serviceId:HueColors1.CurrentPreset
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:intvelt-com:serviceId:HueColors1.ColorTemperature
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:intvelt-com:serviceId:HueColors1.Hue
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:intvelt-com:serviceId:HueColors1.Saturation

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.LastReboot
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.LuupRestart
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.CpuLoad05
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.MemFree
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.MemAvail
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:akbooer-com:serviceId:EventWatcher1.AppMemoryUsed

Update #3:

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HaDevice1.sl_BatteryAlarm
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_VeryLowBattery
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.PollNoReply
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.PollTxFail

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.AllRoutesFailed
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.Neighbors
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.PollOk
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.AutoRoute
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:ZWaveDevice1.AllRoutesFailed
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HaDevice1.sl_Alarm
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HaDevice1.CommFailure

Device.ServiceID:Variable Value
529.urn:micasaverde-com:serviceId:HaDevice1.sl_Alarm WATER_LEAK

Update 4:
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-empuk-net:serviceId:SimpleAlarm1.StatusLabel
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-empuk-net:serviceId:SimpleAlarm1.TimerAction
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-empuk-net:serviceId:SimpleAlarm1.TimerAction

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:DayTime.Status
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:rts-services-com:serviceId:DayTime.Target

http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:BatteryMonitor1.Status
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:BatteryMonitor1.LastError

Do not work:
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:Misc1.Status
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:Volume1.CurrentLevel
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:Scene1.RunScene
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:RNETZones.Status
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:SwitchPower1
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:WindowCovering1
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunScene
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_PinFailed
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_LockFailure
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_LockButton
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_LockFailure
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_UnauthUser
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:DoorLock1.sl_UserCode
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:WindowCovering1.Up
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneControllerLED1.SetLight
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneControllerLED1.SetLight.Indicator
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HomeAutomationGateway1.Reload
http://192.168.0.3:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HomeAutomationGateway1.Restart

I would be fairly sure that ‘does not work’ is due to the devices in question not having the correct json or xml files to enable those services to be watched/triggered. There is absolutely nothing device specific in the DataWatcher code, so little that can be done from my end.

You could ‘nowatch’ those devices, but it really doesn’t matter. If you do, the ‘nowatch’ doesn’t take effect until the next reboot, because there is, simply, no [tt]luup.unwatch_variable[/tt] command. (I could have coded around this, but I didn’t, to keep it short.)

…but delighted that, on the whole, it delivers what you needed.

[quote=“AgileHumor, post:35, topic:179386”]Default:
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:upnp-org:serviceId:TemperatureSensor1.CurrentTemperature
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SecuritySensor1.Tripped
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:EnergyMetering1.Watts
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:HaDevice1.BatteryLevel[/quote]

…just to be clear: there is no ‘default’ list for [tt]DataWatcher[/tt]. These just happen to be the ones I put into the [tt]DataYours[/tt] prototype script. Out of the box, it watches nothing.

Do you know how to capture the scene name (or number) when it is run. I assumed this would do it (registered on the Vera 1 device), but nothing shows:
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneController1.LastSceneID

I’m able to capture PLEG items, which I’m sure is more advanced than the native MCV scene functionality:
03-14-2014 08:54:25 Mar 14 08:54:25 Vera-30010408 DataWatcher: Vera-30010408.329.urn:micasaverde-com:serviceId:LightSensor1.CurrentLevel 22 1394812465
03-14-2014 08:54:17 Mar 14 08:54:17 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 64 1394812457
03-14-2014 08:54:12 Mar 14 08:54:12 Vera-30010408 DataWatcher: Vera-30010408.449.urn:micasaverde-com:serviceId:EnergyMetering1.Watts 68 1394812452
03-14-2014 08:54:09 Mar 14 08:54:09 Vera-30010408 DataWatcher: Vera-30010408.422.urn:micasaverde-com:serviceId:SecuritySensor1.ArmedTripped 1 1394812449
03-14-2014 08:54:09 Mar 14 08:54:09 Vera-30010408 DataWatcher: Vera-30010408.436.urn:rts-services-com:serviceId:ProgramLogicEG.ConditionSatisfied BY_Top_Alley_Motion_On 1394812449
03-14-2014 08:54:08 Mar 14 08:54:08 Vera-30010408 DataWatcher: Vera-30010408.436.urn:rts-services-com:serviceId:ProgramLogicEG.ConditionSatisfied BY_Top_Alley_Motion_Alert 1394812448

03-14-2014 08:54:08 Mar 14 08:54:08 Vera-30010408 DataWatcher: Vera-30010408.423.urn:upnp-org:serviceId:SwitchPower1.Status 1 1394812448

[quote=“AgileHumor, post:38, topic:179386”]Do you know how to capture the scene name (or number) when it is run. I assumed this would do it (registered on the Vera 1 device), but nothing shows:
http://VeraIP:3480/data_request?id=lr_DataWatcher&watch=*.urn:micasaverde-com:serviceId:SceneController1.LastSceneID[/quote]

EventWatcher uses: [tt]urn:micasaverde-com:serviceId:SceneController1[/tt] and variable [tt]sl_SceneActivated[/tt] to watch scene controllers, so it should work for DataWatcher too. This certainly works for secondary controllers… it may be, though, that Vera scenes are not triggered in this way. I just don’t know.

I do get these sl_SceneActivated…but that is only when a scene runs when manually pressed on a keypad. Another example I would love to see is scenes running from schedules or triggers…like knowing what scene ran when motion tripped a light.The PLEG example shows every time action/condition becomes true.

PS Up to about 1400 MPH…Lots of fun data that a future, smarter me will be able to analyze :slight_smile: