Possible bug with simulation of energyMeter device


(James Yong) #1

Have this in your preferences:

input “dev_energy”, “capability.energyMeter”, title: “Energy Devices”, multiple: true

Then run the simulator with the default device. Compilation error about the line with “def () {” appears. This happens with a basic skeleton project.


(Todd Wackford) #2

try capability.energy or capability.power

Hope that helps,
Twack


(James Yong) #3

Oh there is?
They ought to update https://graph.api.smartthings.com/ide/doc/capabilities

Edit: nope, still giving error with simulated energy device

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
script1388541284233442285179.groovy: 38: unexpected token: ) @ line 38, column 6.
def () {


(Todd Wackford) #4

I apologize, as I did not look up the documentation. I guess I was mistaken. If you post your code, I’ll see if I can help. Or you can post it in an Email to support@smartthings.com and they can help you out.

Twack


(James Yong) #5

Yes, I had also forwarded it to support@smartthings.com. I feel its better for the community if such problems could be clarified here, should anyone else ever run into it.

Heres the test code:

preferences {
	section("Title") {
		input "dev_energy", "capability.energyMeter", title: "Energy Devices", multiple: true
	}
}

def installed() {
	log.debug "Installed with settings: ${settings}"

	initialize()
}

def updated() {
	log.debug "Updated with settings: ${settings}"

	unsubscribe()
	initialize()
}

def initialize() {
	// TODO: subscribe to attributes, devices, locations, etc.
}

// TODO: implement event handlers

(Todd Wackford) #6

Yep, I can reproduce the error and looks to be in the IDE runtime code itself. It works when you choose a real device though. Do you have a real device you can use for testing your App?

Twack


(James Yong) #7

yeah no problem with real device, just wanted to raise/document the bug :slight_smile:


(Glenn Franxman) #8

What device are you using? My intent was to use the energyMeter capability of the metering smart plug ( 1050q ).
But I see neither energy events from the device, nor documentation on what the units will be ( watts? watt/hr? amps? ).
Is there another device with this capability?


(Jeff DeWolfe) #9

What device are you using this with? I would like to connect my Eyedro monitor up, but I’m not sure how I would do so. Thanks!


(James Yong) #10

I’m using these:

SmartSwitch

Have half a dozen of these so far. The hardware works great, but software support is minimal. On the phone app, a very prone to accidental activating on off button, point in time snapshot of data values. No graphing and online energy management dashboard. Was planning to write one.


(Darryl) #11

@chevyman142000 : Hey Jeff, that evedro looks pretty awesome. It working well for you?

I was eyeing : http://www.amazon.com/Aeon-Labs-Aeotec-Z-Wave-Monitor/dp/B007C8UBU2/ref=sr_1_1?ie=UTF8&qid=1389015376&sr=8-1&keywords=z-wave+energy

But wondering how much longer it would be before SmartThings supported it…

I would love it to eventually see energy usage at the socket, and at the main breakers, and then be able to see the differences, and graph draw on certain devices…


(Todd Wackford) #12

They support it now. I installed one last week.

twack


(Darryl) #13

Sweet! Does it work well? What’s your opinions on the benefit of it?

I understand you just open your box up, clamp around the main line, and around any particular item you wish. Correct?
I would imagine wanting:

1 on water heater
1 on A/C #1
1 on A/C #2
1 on Main Line.


(Jeff DeWolfe) #14

The Eyedro works ok. They were originally a Indiegogo project that didn’t meet their full goal, so software dev has been very slow if at all. I recently funded a new one on Kickstarter: http://www.kickstarter.com/projects/energyaware/neurio-home-intelligence They plan to have full SmartThings support out of the box, so I’m really looking forward to it!


(Glenn Franxman) #15

Picked up one of those Casa Verde SmartSwitches today. Worked pretty good right out of the box. The downside, at least for me, is that the .power events are emitted once every 5 minutes. I was hoping for something a little more event driven than waiting 5 minutes to find out that the load had changed.


(James Yong) #16

Do you get it regularly every 5 min? Mine reports sporadically, not sure if its due to a relay zwave device its going through.

I was considering to use a scheduled poll() call on it every minute for graphing, not sure if that’ll cause it to report more reliably.