GroveStreams SmartApp

for the past 7-10 days, my original (copied) GS app stopped updating GroveStreams 3-6 times a day - very annoying but

Today it has run all day without interruption. So thanks!

Doooohhh back to normal unscheduled interruptions in trending today…

My GS app stopped updating on the 4th, and it has not updated since.
Nothing I have done has fixed it.

Updating stops often for me, 3-6 times per day. When GroveStreams notifies me that it hasn’t received a power update in X minutes, then I open ST/My-apps/ GroveStreams-app, and add or delete a junk pointstream/sensor/device to monitor. That restarts logging for me.

I suspect @ehaseltine modification above will workaround this issue but I have not tried it yet.

Thanks for the tip.
I had removed and re-added the smartapp and it never fixed it.
It wasn’t until I removed a device from it that it started working again.

How did you set up notifications for Grovestreams?

GroveSTreams/click your Org/Components

pick the stream/sensor that should update regularly, right click/ Events/Add/ Event

fill event details - my example:

make new “event response package” and fill notification details - my SMS example:

so with this setup, if 5400 seconds/1.5hr go by without an update from the power meter, then GS will send me a text. I THINK it will re-notify me in 20000 seconds (appx 6hr) - not sure if re-notification works.

1 Like

I’m using the code that @ehaseltine posted in post # 59 (thanks @JasonBSteele, @minollo, and @ehaseltine for all the heavy lifting!) with one minor modification that I can’t to get to work. I added this line to the preferences:

input “humidities”, “capability.humidityMeasurement”, title: “Humidities”, required:false, multiple: true

But none of the physical devices that I have that report humidity are showing up. I’ve got a Nest and a couple of Aeon Multisensors. The Multisensors show up in Temperatures, but not Humidities.

Anyone have any ideas?

Thanks!

Try this instead:
input “humidities”, “capability.relativeHumidityMeasurement”, title: “Humidities”, required:false, multiple: true

1 Like

Yep that worked for me. I assume it can log now. THanks.

Anyone else seeing this error ?

error java.lang.SecurityException: Endpoint https://grovestreams.com/api/feed?api_key=dc7de955-bacd-364a-9e4a-dfeb87e2a59f&compId=House+Energy+Usage&energy=220.71
kWh is blacklisted. @ line 134

NVM… I think i figured it out. It does not like the kWh at the end of the 220.71. I modified the device type to remove the kWh and now it’s sending the data to grovestream correctly. :smile:

cuboy – I’m getting the same blacklisted error with grovestreams. How did you modify your device type code to drop the kWh at the end?

Thanks much!
Derek

Here is the device type i am using now.

 /**
     *  Aeon Home Energy Meter
     *
     *  Author: SmartThings
     *  Modified by: Joshua Seidel
     *  Date: 2014-12-28
     */
    metadata {
    	// Automatically generated. Make future change here.
    	definition (name: "Aeon Home Energy Meter w/Cost", namespace: "Blueharford", author: "BlueHarford") {
    		capability "Energy Meter"
    		capability "Power Meter"
    		capability "Configuration"
    		capability "Sensor"
    
            attribute "energyCost", "string"       
            attribute "power", "string"
    
            
    		command "reset"
    
    		fingerprint deviceId: "0x2101", inClusters: " 0x70,0x31,0x72,0x86,0x32,0x80,0x85,0x60"
    	}
    
    	// simulator metadata
    	simulator {
    		for (int i = 0; i <= 10000; i += 1000) {
    			status "power  ${i} W": new physicalgraph.zwave.Zwave().meterV1.meterReport(
    				scaledMeterValue: i, precision: 3, meterType: 4, scale: 2, size: 4).incomingMessage()
    		}
    		for (int i = 0; i <= 100; i += 10) {
    			status "energy  ${i} kWh": new physicalgraph.zwave.Zwave().meterV1.meterReport(
    				scaledMeterValue: i, precision: 3, meterType: 0, scale: 0, size: 4).incomingMessage()
    		}
    	}
    
    	// tile definitions
    	tiles { 
    
            valueTile("power", "device.power", inactiveLabel: false) {
                state ("default", label:'${currentValue} W', backgroundColor: "#79b821")
            }
            
            valueTile("energy", "device.energy", inactiveLabel: false) {
                state("default", label:'${currentValue} kWh', backgroundColor: "#79b821")
            }
            
            valueTile("energyCost", "device.energyCost", inactiveLabel: false) {
                state("default", label:'${currentValue}', backgroundColor: "#cd5c5c")
            }
            
    		standardTile("reset", "device.energy", inactiveLabel: false, ) {
    			state "default", label:'reset kWh', action:"reset", backgroundColor: "#ff8000", icon:"st.secondary.dark"
    		}
    		standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat") {
    			state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
    		}
            standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat") {
                state "configure", label:'', action:"configure", icon:"st.secondary.configure"
            }
            
            
    		main (["energyCost", "energy", "power"])
    		details(["energy", "energyCost","power","reset","refresh", "configure"])
    	    }
                    preferences {
                         input "kWhCost", "string", title: "\$/kWh (0.16)", defaultValue: "0.16" as String
                    }
    }
    
    def parse(String description) {
    	def result = null
    	def cmd = zwave.parse(description, [0x31: 1, 0x32: 1, 0x60: 3])
    	if (cmd) {
    		result = createEvent(zwaveEvent(cmd))
    	}
    	log.debug "Parse returned ${result?.descriptionText}"
    	return result
    }
    
    def zwaveEvent(physicalgraph.zwave.commands.meterv1.MeterReport cmd) {
    
        def dispValue
        def newValue
        
    	if (cmd.scale == 0) {	
            newValue = cmd.scaledMeterValue
            [name: "energy", value: cmd.scaledMeterValue, unit: ""]
            dispValue = String.format("%5.2f",newValue)
            sendEvent(name: "energy", value: dispValue as String, unit: "kWh")
            state.energyValue = newValue
            BigDecimal costDecimal = newValue * ( kWhCost as BigDecimal)
            def costDisplay = String.format("%5.2f",costDecimal)
            sendEvent(name: "energyCost", value: "Cost\n\$${costDisplay}", unit: "")
        }
        else if (cmd.scale == 1) {
            [name: "energy", value: cmd.scaledMeterValue, unit: ""]
        }
        else {
            [name: "power", value: Math.round(cmd.scaledMeterValue), unit: ""]
        }
    }
    
    def zwaveEvent(physicalgraph.zwave.Command cmd) {
    	// Handles all Z-Wave commands we aren't interested in
    	[:]
    }
    
    def refresh() {
    	delayBetween([
    		zwave.meterV2.meterGet(scale: 0).format(),
    		zwave.meterV2.meterGet(scale: 2).format()
    	])
    }
    
    def reset() {
    	sendEvent(name: "energyCost", value: "Cost\n--", unit: "")
        return [
                zwave.meterV2.meterReset().format(),
                zwave.meterV2.meterGet(scale: 0).format()
       ]
    }
    
    
    def configure() {
    	def cmd = delayBetween([
    		zwave.configurationV1.configurationSet(parameterNumber: 101, size: 4, scaledConfigurationValue: 4).format(),   // combined power in watts
    		zwave.configurationV1.configurationSet(parameterNumber: 111, size: 4, scaledConfigurationValue: 20).format(), // every 5 min
    		zwave.configurationV1.configurationSet(parameterNumber: 102, size: 4, scaledConfigurationValue: 8).format(),   // combined energy in kWh
    		zwave.configurationV1.configurationSet(parameterNumber: 112, size: 4, scaledConfigurationValue: 20).format(), // every 5 min
    		zwave.configurationV1.configurationSet(parameterNumber: 103, size: 4, scaledConfigurationValue: 0).format(),    // no third report
    		zwave.configurationV1.configurationSet(parameterNumber: 113, size: 4, scaledConfigurationValue: 300).format() // every 5 min
    	])
    	log.debug cmd
    	cmd
    }

Thanks much… still seeing the blacklist error. I’ll contact GroveStreams and see if it’s something on their end.

Thanks again-
Derek

I’ve implemented the code as described above but still get the Thermostat Op state being updated.

I have the following:
input “thermostats”, “capability.thermostat”, title: “Thermostats Op State”, required: false, multiple: true

subscribe(thermostats, “thermostatOperatingState”, handleThermostatOperatingStateEvent)

def handleThermostatOperatingStateEvent(evt) {
sendValue(evt) { it == “idle” ? “false” : “true” }


Nothing is observed in my Observation Studio when I change the state of the thermostat from heat to cool or off or change states in any way. The Observation Studio is setup like this:

Any help would be greatly appreciated.

@ehansen2580, Try changing the Data Type of the thermostatOperatingState to boolean - since it appears you’re passing true or false.

Changed to boolean last night and was hoping there would be an update this morning but still no information is showing up in observation studio. Any other ideas? Seems like I’ve used the same code as other people, frustrating.

OK. We need to determine if the calls are making it to GS.

Are there any System notifications related to those calls in your GS Notifications (the little envelope in the toolbar within observation studio)?

Engage API tracing for a while and see if any calls are arriving: Click Admin - Api Keys - Select the API key you’re using within the Smart Things and a time, set a time and engage.

Wait a while. Anything? If not, then it appears no calls are making it to our servers.

I’m getting API calls. I just received four, two each the same one reporting humidity and the other temperature. Here is a copy of one:
URL:
https://grovestreams.com/api/feed?api_key=xxxxxxxx-xxxx-xxxx-xxxx-67abbde729dc&compId=Man+Cave+Thermostat&humidity=56
Method: PUT
Process Time: .048 seconds
Client Address: 23.22.180.246
Client Attributes: {org.restlet.http.version=1.1, org.restlet.http.headers=[[accept: /], [singularityheader: appId=33ctrlguid=1443498446acctguid=e41b38de-defe-4d32-a5a5-6fdaa1f70acdts=1444328155628btid=1005guid=3634e6b2-4de5-42df-83d8-5a239985692aexitguid=11|22|8unresolvedexitid=2476cidfrom=84,{[UNRESOLVED][5411]},155,{[UNRESOLVED][5433]},115etypeorder=JMS,JMS,JMS,JMS,HTTPesubtype=JMS,JMS,JMS,JMS,HTTP*cidto={[UNRESOLVED][5411]},155,{[UNRESOLVED][5433]},115,{[UNRESOLVED][2476]}], [content-length: 0], [host: grovestreams.com], [connection: Keep-Alive]], org.restlet.startTime=1444328156203}

So humidity and temperature metrics are arriving and are fine, but ST isn’t reporting thermostatOperatingState that to GS?

Yeah that’s right. I think I’ve setup my Smartthings SmartApp incorrectly. I’m going to delete everything and start over.