Platform 2.1.1.114 and mimolite

latest update worked great for my Schlage locks but killed my mimolite garage door controllers had to roll back to 2.1.0.123

That's really not enough detail for us to be helpfull with...

2 Likes

My Mimolite is working fine with 2.1.1.114.

@aaiyar
are you using a mimolite or mimo2?
which driver are you using?
I tried updating platform again and did a hub reboot still not working.
I am using this driver works fine with old platform

@mike.maxwell
dev:20272019-06-10 06:19:00.047 pm errorjava.lang.NullPointerException: null on line 208 (open)

dev:20272019-06-10 06:19:00.007 pm debugExecuting ACTUATE for garage car door per user request

dev:20272019-06-10 06:19:00.003 pm debugSending ACTUATE event to open door

Mimolite - generic zwave switch. I'm using a zwave contact sensor and wrote RM automations to raise/lower the door.

thanks that opens and closes the door but I get no indication of state since I am using hard wired magnetic contacts to the mimolite.
Just tried Platform 2.1.1.115 and same results.

my garage door was working fine up until yesterday, now I have the same error as noted above, what's the fix?
dev:692019-06-15 03:45:05.698 pm errorjava.lang.NullPointerException: null on line 208 (open)

dev:692019-06-15 03:45:05.694 pm debugExecuting ACTUATE for garage car door per user request

dev:692019-06-15 03:45:05.666 pm debugSending ACTUATE event to open door

I had to roll back to 2.1.0.123
Support has acknowledged the trouble ticket.
But have not gotten an answer to why it stopped working though or an updated firmware fix.

I don't think that Alarm Get ever worked, its just that you are seeing an error message now instead of it being swallowed by the platform. Can you let me know what the output of this is?

log.debug "alarmGet format: ${zwave.alarmV1.alarmGet().format()}"

you can add it around line 202

AlarmGet requires an Alaram Type parameter:

From their documentation it appears that they support an alarm type of 0x08:
image

Which means that line should actually be:
zwave.alarmV1.alarmGet(alarmType: 0x08).format()

But then again, someone should really look into the commands that are being sent, it looks like there are a few commands that are unnecessary:

		zwave.basicV1.basicSet(value: 0xFF).format(),
		zwave.switchBinaryV1.switchBinaryGet().format(),
		zwave.sensorBinaryV1.sensorBinaryGet().format(),
        zwave.basicV1.basicGet().format(),
		zwave.alarmV1.alarmGet().format() 

I don't know why it is doing a basic set and then also getting the status of switchBinary and sensorBinary before doing a basic get and finally an alarm get. All of that seems to be sending a lot of traffic on the network for no reason.

After adding that line on code to line 203 of DH on (working) platform 2.1.0.123
log for open/close

dev:34532019-06-15 03:50:47.531 pm debugalarmGet format: 7104NULL

dev:34532019-06-15 03:50:47.530 pm debugExecuting ACTUATE for garage car door per user request

dev:34532019-06-15 03:50:47.528 pm debugSending ACTUATE event to close door

dev:34532019-06-15 03:50:27.501 pm debugalarmGet format: 7104NULL

dev:34532019-06-15 03:50:27.490 pm debugExecuting ACTUATE for garage car door per user request

dev:34532019-06-15 03:50:27.486 pm debugSending ACTUATE event to open door

before adding your line of code
log for open/close

dev:34532019-06-15 03:48:44.416 pm debugExecuting ACTUATE for garage car door per user request

dev:34532019-06-15 03:48:44.412 pm debugSending ACTUATE event to close door

dev:34532019-06-15 03:47:23.213 pm debugExecuting ACTUATE for garage car door per user request

dev:34532019-06-15 03:47:23.210 pm debugSending ACTUATE event to open door

  • Did you want to get the same logs from the latest (non working) platform?

No, I just wanted you to see that 7104NULL is not a valid zwave command so its broken either way its just previously you did not see the error

1 Like

Well hell I didn't want to mess with anything that was working before and I am no great coder.
I didn't understand why there was line 208 "zwave.alarmV1.alarmGet().format()" in the DH
but I updated my hub to 2.1.1.122 the DH still didn't work
but went and deleted line 208 in the driver
zwave.alarmV1.alarmGet().format()
saved it and the DH is working again.

I am sure there is likely a better way to code this DH but it is working again.

thanks for all the help

1 Like

Applied the same changes and the door works again, thanks for the help.

/**
 *  MIMOlite device type for garage door button, including power failure indicator.  Be sure mimolite has jumper removed before
 *  including the device to your hub, and tap Config to ensure power alarm is subscribed.
 *
 *  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.
 *
 *  Updates:
 *  -------
 *  02-18-2016 : Initial commit
 *  03-05-2016 : Changed date format to MM-dd-yyyy h:mm a
 *  03-11-2016 : Due to ST's v2.1.0 app totally hosing up SECONDARY_CONTROL, implemented a workaround to display that info in a separate tile.
 *  08-27-2016 : Modified the device handler for my liking, primarly for looks and feel.
 *  01-08/2017 : Added code for Health Check capabilities/functions.
 *  02-11-2017 : Cleaned up code, and used secondary_control again for messages.
 *  03-11-2017 : Cleaned up code.
 *  03-24-2017 : Changed color schema to match ST's new format.
 *  04-08-2017 : Updated the updated() section to call configuration().
 *  05-19-2017 : Added additional attributeStates to match ST's DTH which should make this work with ActionTiles, and to use contact as the main tile instead of switch due to personal preference.
 *  05-20-2017 : Redefined tiles/names to be similar to the Linear-type opener DTH's, which should make this work with ActionTiles.
 *  05-23-2017 : Made the delay longer for retreiving device info (gets) after the main tile or the refresh tile is tapped.
 *  09-22-2019 : converted DH to Hubitat and added refresh before each action
 *  10-07-2019 : removed extra refresh from open/close it caused to much delay
 */
metadata {
	// Automatically generated. Make future change here.
	definition (name: "MIMOlite Garage Door Controller 10/07/2019", namespace: "Hubitat", author: "scgs350") {
        capability "Momentary"
        capability "Relay Switch"
	    capability "Polling"
        capability "Refresh"
        capability "Switch"
        capability "Sensor"
        capability "Contact Sensor"
        capability "Configuration"
	    capability "Actuator"
	    capability "Door Control"
	    capability "Garage Door Control"
        capability "Health Check"
        
	    attribute "powered", "string"
        attribute "contactState", "string"       
        
		command "on"
		command "off"
        command "open"
        command "close"
	}
}

def updated(){
	// Device-Watch simply pings if no device events received for 32min(checkInterval)
	sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
    response(configure())
}

def parse(String description) {
	// log.debug "description is: ${description}"
	def result = null
    def cmd = zwave.parse(description, [0x72: 1, 0x86: 1, 0x71: 1, 0x30: 1, 0x31: 3, 0x35: 1, 0x70: 1, 0x85: 1, 0x25: 1, 0x03: 1, 0x20: 1, 0x84: 1])
    //log.debug "command value is: $cmd.CMD"
    if (cmd.CMD == "7105") {				//Mimo sent a power loss report
    	log.debug "Device lost power"
    	sendEvent(name: "powered", value: "powerOff", descriptionText: "$device.displayName lost power")
    } else {
    	sendEvent(name: "powered", value: "powerOn", descriptionText: "$device.displayName regained power")
    }
	if (cmd) {
		result = createEvent(zwaveEvent(cmd))
	}
	// log.debug "Parse returned ${result?.descriptionText}"
    def statusTextmsg = ""
    def timeString = new Date().format("MM-dd-yy h:mm a", location.timeZone)
    statusTextmsg = "Last updated: "+timeString
    sendEvent("name":"statusText", "value":statusTextmsg)
	return result
}

def sensorValueEvent(Short value) {
	if (value) {
        sendEvent(name: "contact", value: "open")
        sendEvent(name: "door", value: "open")
        sendEvent(name: "switch", value: "on")
        sendEvent(name: "contactState", value: "Door is open, close/off to close")
	} else {
        sendEvent(name: "contact", value: "closed")
        sendEvent(name: "door", value: "closed")
        sendEvent(name: "switch", value: "off")
        sendEvent(name: "contactState", value: "Door is closed, open/on to open")
	}
}

def zwaveEvent(hubitat.zwave.commands.basicv1.BasicReport cmd) {
	[name: "switch", value: cmd.value ? "on" : "off", type: "physical"]
}

def zwaveEvent(hubitat.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
	def doorState = device.currentValue('switch')
    if (doorState == "off")
    	[name: "contactState", value: cmd.value ? "close" : "closing", type: "digital"]
}    
    
def zwaveEvent(hubitat.zwave.commands.basicv1.BasicSet cmd)
{
	sensorValueEvent(cmd.value)
}

def zwaveEvent(hubitat.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
{
	sensorValueEvent(cmd.sensorValue)
}

def zwaveEvent(hubitat.zwave.commands.alarmv1.AlarmReport cmd)
{
    log.debug "We lost power" //we caught this up in the parse method. This method not used.
}

def zwaveEvent(hubitat.zwave.Command cmd) {
	// Handles all Z-Wave commands we aren't interested in
	[:]
}

def on() {
    log.debug "Sending on event to open door"
	open()
}

def off() {
    log.debug "Sending off event to close door"  
	close()
}

def open() {
	if (device.currentValue("door") != "closed") {
		log.debug "not opening door is already open"
	}
	else {
        log.debug "Sending open event to open door"
		push()
	}
}

def close() {
	if (device.currentValue("door") != "open") {
        log.debug "Not closing door since it is already closed"
	}
	else {
		log.debug "Sending close event to close door"
		push()
    }
}

def push() {
	log.debug "Executing push for garage door"
	delayBetween([
        zwave.basicV1.basicGet().format(),
        zwave.basicV1.basicSet(value: 0xFF).format(),
	],1000)
}

def poll() {
	refresh()
}

// PING is used by Device-Watch in attempt to reach the Device
def ping() {
	refresh()
}

def refresh() {
	log.debug "Refreshing"
	delayBetween([
		zwave.switchBinaryV1.switchBinaryGet().format(),
		zwave.sensorBinaryV1.sensorBinaryGet().format(),
        zwave.basicV1.basicGet().format(),
//		zwave.alarmV1.alarmGet(alarmType: 0x08).format()
	],1000)
}

def configure() {
	log.debug "Configuring...." //setting up to monitor power alarm and actuator duration
	delayBetween([
		zwave.associationV1.associationSet(groupingIdentifier:3, nodeId:[zwaveHubNodeId]).format(),
        zwave.configurationV1.configurationSet(parameterNumber: 11, configurationValue: [25], size: 1).format(),
        zwave.configurationV1.configurationGet(parameterNumber: 11).format()
	],100)
}

Updated the DH above

  • @jesse.fetterman found the refresh function was not working I edited it and it is working now.

Will it refresh on its own now, or do I still need hubitat-poll?

You have to make a rule or use hubi poll.
Gives users more control

Just checking, this means if the gate is opened/closed via the remote (i.e. not with a z-wave command) you'll need some kind of periodic polling to validate the status?

Or does it broadcast when it's been opened or closed when the contact state changes?

It broadcasts/reports whenever it is opened or closed.

oh, perfect.

What would you use a scheduled refresh for then? Just curious.

Download the Hubitat app