Platform Update - Release Notes - 10/20/2015

Sorry if I wasn’t clear, but that was exactly my point. It was working for people before the platform update, then the exact same process started failing with errors after the platform update.

You did yours before yesterday’s update, right?

After update followed by a router/ST hub reboot. My MyQ internet gateway was acting funny. So rebooted the router as well.

Ok, so maybe the hub reboot is needed. edited to add members having the problem tried reboot and it didn’t help. :disappointed_relieved: back to the poltergeist theory.

A slightly modified version of the stock ST device for the iris motion sensor
The only mod being the fingerprint.

@workmonk, any update on the enrollResponse problem?

are you still seeing enrollResponse problems? The errors that you were seeing were related to the endpoint of the device failing to register itself. What is the endpoint that the motion sensor has HA 1.2 implemented?

@workmonk
Yes it’s still happening, the end point is 01.
Device not registering or not, I paired 3 of these over the weekend, and now I have two that will not pair.
Including one that paired just fine last week.

I’m also seeing null pointer exceptions in other devices that have not thrown them before…
Wud up guys?

Can you post your working SmartApp? I still have an issue with mine even with this snippet.

Sure… Here’s the full source below… Hope this helps… It’s been working without fail since for me since I made the update… I modified an example bigpunk6 had posted a while back…

/**
 *  PlottWatt Connector
 *
 *  Copyright 2015 Michael Kurtz
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 */
definition(
    name: "PlottWatt Connector",
    namespace: "bigpunk6",
    author: "Michael Kurtz",
    description: "Upload Power Meter data to PlottWatt",
    category: "My Apps",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
    iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")

preferences {
    section("Power Meter") {
        input "power", "capability.powerMeter", title: "Power Meter", required: false, multiple: true
    }
    section ("PlotWatt API") {
        input "apiKey", "text", title: "PlotWatt API Key", required:true
        input "meterId", "text", title: "Meter ID", required:true
        input "uploadCount", "number", title: "Upload after this many events", required:true
    }
}

def installed() {
    initialize()
}

def updated() {
    unsubscribe()
    initialize()
}

def initialize() {
    state.body = []
    subscribe(power, "power", powerEvent)
}

def powerEvent(evt) {
    sendEvent(evt)
}

private sendEvent(evt) {
	def kwatts = evt.value.toDouble()/1000
    def timeStamp = now().toString() [0..9]
    state.body << "${meterId},${kwatts},${timeStamp}"
    log.info "${evt.displayName} ${evt.name} is ${evt.value}W"
    log.info state.body.size()
    if (state.body.size()  >= uploadCount) {
        def body = state.body.collect { it }.join(',')
        def headers = [:] 
		def userpassascii = "${apiKey}:"
    	def userpass = "Basic " + userpassascii.encodeAsBase64().toString()
		headers.put("Authorization", userpass)
		def uri = "http://plotwatt.com/api/v2/push_readings"
            def params = [
                uri: uri,
                headers: headers,
                body: body                
            ] 
        log.debug "Posting last ${uploadCount} events to ${uri}"
        state.body = []
        httpPost(params) { response ->
            log.info "httpPost responce:${response.status}"
	    }
    }
}

Would love to know when this is coming. ‘This feature is coming soon’ is relative.

2 Likes