Homebridge Plug-in

When I try to close the curtains using Home I get the following log with the Curtains device in HE

errorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] (setPosition)

The curtains do not close.

However, curtains Open works just fine.

Did you update the hubitat app code? That's the most important part of the fix

Yes.

I decided to start using the modes in uubitat, and I wanted to be able to control them via HomeKit. I enabled the feature in the homebridge plugin that creates switches for the various hubitat modes, but it doesn’t seem to actually be creating any switches. After I make the changes, and restart homebridge, there are no new additional devices.

I will see if i can duplicate this on my end.

Thanks!

Really like how the plug-in is working with my switches and lights. I was wondering if anyone has had luck adding virtual contact sensors to the list of devices? I have several virtual sensors created by the recently released DSC Integration app. But none of them show up as available devices in any of the devices categories in the Homebridge plug-in setup. I do see my z-wave sensors and HomeKit is showing those thru home bridge. Thanks in advance for any feedback.,

[Edit] Oops, I was working from a simulated water sensor I have and mislabelled the "Simulated Contact Sensor" RM rule! :crazy_face:

Virtual contact sensors don't work. Maybe @tonesto7 could make a modification or you could perhaps modify the DSC app. If you don't have too many, you can just create a simulated contact sensor driver with this code below and it will show up under sensors in the Hubitat Homebridge app.

Next, create custom commands for CLOSED and OPEN in Rule Machine for the Simulated Contact Sensor. Then create a rule like the following example so when your virtual contact sensor opens or closes, it will send the command for open or closed to the simulated contact sensor.

/**
 *  Copyright 2015 SmartThings
 *
 *  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.
 *
 */
metadata {
	definition (name: "Simulated Contact Sensor", namespace: "Contact Sensor", author: "SmartThings") {
		capability "Contact Sensor"
        capability "Sensor"
        
        command "closed"
        command "open"
	}

	tiles {
		standardTile("contact", "device.contact", width: 2, height: 2) {
			state("closed", label:'${name}', icon:"st.contact.contact.closed", backgroundColor:"#00A0DC")
			state("open", label:'${name}', icon:"st.contact.contact.open", backgroundColor:"#e86d13")
		}
		main "contact"
		details(["contact","closed","open"])
	}
}

def parse(String description) {
	def pair = description.split(":")
	createEvent(name: pair[0].trim(), value: pair[1].trim())
}

def closed() {
	log.trace "closed()"
	sendEvent(name: "contact", value: "closed")
}

def open() {
	log.trace "open()"
	sendEvent(name: "contact", value: "open")
}

Any luck with this?

I have an issue (I think). Homebridge does not show as an installed app in the App list in Hubitat. It is running fine from the Homebridge side.

So, any time I want to make a change to the accessories I have to install the app again in Hubitat. That generates new url and tokens. I've tried rebooting between installations and the situation stays the same.

Is this correct behavior? If not, how do I fix it. I've installed the app 3 times. Thanks

Not normal. Any other apps responding this way?

Perhaps try deleting the app and the app code from Hubitat, copy the raw from the repo again and add back to HE.

Yes, that worked. I had to delete the entire Homebridge App Code entry. I had previously delete and replaced the code, which did not work. Thanks

2 Likes

@tonesto7, First off, thank you so much for your plugin. My system depends on Homekit/Homebridge for remote control/access. Thank you for making this possible. I absolutely love what you have done. Without your plugin I would not have moved over from Vera.

I was wondering if you are planning on keeping this build updated in parallel with your Smartthings plugins? I would love to get your latest update " v1.2.0 - Added in capability exclusion feature to match @pdlove plugin" as I have some devices with capabilities I would like to exclude.

Also, I have several energy monitoring z-wave and zigbee plugs and noticed some code relating to power/energy capabilities in your plugin. Is it possible to view a devices current power consumption in Homekit using your plugin? I haven't figured out how to make it work yet.

Thanks again for all your work on this!

3 Likes

I'm unable to get 'Create Mode Devices' to work. When I run homebridge (on RPi), the terminal prints "[Hubitat] Device Skipped - Group unknown" for each of the four modes. Other than the absence of mode switches, Hubitat & homebridge are working great. Any suggestions?

[2018-9-11 18:29:15] [Hubitat] Device Skipped - Group unknown, Name Away, ID 4, JSON: {"name":"Away","basename":"Away","deviceid":"4","status":"Online","manufacturerName":"Hubitat","modelName":"modeList Device","serialNumber":"modeList","firmwareVersion":"1.0.0","lastTime":1536715755818,"capabilities":{"modeList":1},"commands":{"on":[]},"attributes":{"switch":"off"}}

[2018-9-11 18:29:15] [Hubitat] Device Skipped - Group unknown, Name Day, ID 1, JSON: {"name":"Day","basename":"Day","deviceid":"1","status":"Online","manufacturerName":"Hubitat","modelName":"modeList Device","serialNumber":"modeList","firmwareVersion":"1.0.0","lastTime":1536715755818,"capabilities":{"modeList":1},"commands":{"on":[]},"attributes":{"switch":"on"}}

[2018-9-11 18:29:15] [Hubitat] Device Skipped - Group unknown, Name Evening, ID 2, JSON: {"name":"Evening","basename":"Evening","deviceid":"2","status":"Online","manufacturerName":"Hubitat","modelName":"modeList Device","serialNumber":"modeList","firmwareVersion":"1.0.0","lastTime":1536715755819,"capabilities":{"modeList":1},"commands":{"on":[]},"attributes":{"switch":"off"}}

[2018-9-11 18:29:15] [Hubitat] Device Skipped - Group unknown, Name Night, ID 3, JSON: {"name":"Night","basename":"Night","deviceid":"3","status":"Online","manufacturerName":"Hubitat","modelName":"modeList Device","serialNumber":"modeList","firmwareVersion":"1.0.0","lastTime":1536715755819,"capabilities":{"modeList":1},"commands":{"on":[]},"attributes":{"switch":"off"}}

[2018-9-11 18:29:15] [Hubitat] Unknown Capabilities: ["modeList"]

[2018-9-11 18:29:15] [Hubitat] Initializing platform accessory 'Hubitat Safety Monitor Alarm'...

I think that's still not working. Don't know if @tonesto7 was able to get to it. Sounds similar to what was posted previously by @murray.sean.d.

As a workaround, you could create virtual switches and create a rule that links each switch to a mode change. Publish the virtual switches in Homebridge and then link them to a HomeKit scene for easy access.

[Edit] Just to clarify, these should be RM triggers and each virtual switch should be set to disable 1 second after push.

1 Like

Hi Guys,

Was wondering if anybody can give me some tips on how to fix this.

I previously was able to get homebridge up and running and all was working fine. I then removed home bridge from HE as i thought it was causing my automations to slow down (which it didn't). I am trying to reinstall home bridge again and for some reason the "Home" app on iOS is not able to connect after i enter the code.

On my Rpi, homebridge ran and detected all the devices i wanted to add. Not too sure if there is a step i missed to get this to work.

Also of note, and not sure how important it is, i recently changed my Apple TV. Again....not sure if this plays a part - but just putting that out there.

Thanks.

AppleTV can become the Apple Hub if needed. It is not needed for the simplest situations. You need it to have Homekit Automations. So... start with discarding the AppleTV part (or at least ignoring it.)

I had a similar situation and I got it to work by editing ~/.homebridge/config.json and altering the username & pin.

It's as if the Apple side has memorized that old (discarded) instance. So... make a new instance. :slight_smile:

This is a must. I did the homebridge port on ST a while back, then migrated over to HE and thought homebridge slowed HE down (it did not).

Anyway, the second time I installed HE, I had to change the PIN and username in the config.json file as it appears homebridge will not connect to a bridge that has previously connected to home kit.

On a side note, @tonesto7 was working on this app and left it with one item not fully functioning and that was window shades.

Specifically, I am unable to natively say "Hey Siri, close the curtains" without creating a scene called "Close the Curtains" NB I experience the same behavior on Alexa.

Anyone else have this issue because I have 0 knowledge of what @tonesto7 did and would love to get this one kink out of the system.

1 Like

@tonesto7 left a "farewell message" a couple days ago, so it will fall onto the Community to find a new maintainer.

Uh oh... that's my primary interface...