forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,024 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,17 +33,15 @@ To find the `lockId`, add the bridge and let it discover your locks | |
* `phone` = Mobile number used in the mobile app. Use full number with country code, ie `+4712345678` | ||
* `password` = Same as you use in the mobile app | ||
* `refreshInterval` = number of seconds between refresh calls to the server. This applies to the bridge itself, not the | ||
locks. They can be configured individually. | ||
locks. Defaults to once every hour | ||
* `validationCode` = one time code requested from the service after authenticating with email + phone + password. | ||
|
||
### Lock | ||
|
||
* `lockId` = id of lock, typically a long string of numbers and letters | ||
* `refreshInterval` = number of seconds between refresh calls to the server | ||
|
||
## TODO | ||
|
||
* Support for push messages via PubSub. | ||
* Support 2-factor code via SMS | ||
|
||
## Tested devices | ||
|
@@ -73,7 +71,7 @@ status. This may take 10-20 seconds to complete, but you get the latest and most | |
august.things: | ||
|
||
``` | ||
Bridge august:account:accountName "Yale Access account" [ email="[email protected]", phone="+4712345678", password="XXXXXXX", refreshInterval="120", validationCode="REPLACE" ] { | ||
Bridge august:account:accountName "Yale Access account" [ email="[email protected]", phone="+4712345678", password="XXXXXXX", refreshInterval="3600", validationCode="REPLACE" ] { | ||
Thing lock frontdoor "Front door" [ lockId="344KJLK32KJ234LKJ234JLKJK34" ] | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
2023-01-10 05:42:50.022 [WARN ] [t.internal.handler.AugustLockHandler] - 92968A1940BEEC48B9F99C6FA898A6B9 Error | ||
contacting lock | ||
org.openhab.binding.august.internal.RestCommunicationException: Error sending request to server. Server responded with | ||
531 | ||
and payload {"code":31,"message":"Mechanical Position"} | ||
at org.openhab.binding.august.internal.ApiBridge.sendRequestInternal(ApiBridge.java:132) ~[bundleFile:?] | ||
at org.openhab.binding.august.internal.ApiBridge.sendRequest(ApiBridge.java:97) ~[bundleFile:?] | ||
at org.openhab.binding.august.internal.handler.AugustLockHandler.handleLockStateCommand(AugustLockHandler.java: | ||
|
||
196) [bundleFile:?] | ||
at org.openhab.binding.august.internal.handler.AugustLockHandler.handleCommandInternal(AugustLockHandler.java: | ||
167) [bundleFile:?] | ||
at org.openhab.binding.august.internal.handler.AugustLockHandler.handleCommand(AugustLockHandler.java: | ||
158) [bundleFile:?] | ||
at jdk.internal.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) ~[?:?] | ||
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] | ||
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] | ||
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java: | ||
154) [bundleFile:?] | ||
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?] | ||
at com.sun.proxy.$Proxy8590.handleCommand(Unknown Source) [?:?] | ||
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java: | ||
80) [bundleFile:?] | ||
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java: | ||
48) [bundleFile:?] | ||
at jdk.internal.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) ~[?:?] | ||
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] | ||
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] | ||
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java: | ||
154) [bundleFile:?] | ||
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?] | ||
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?] | ||
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...binding.august/src/main/java/org/openhab/binding/august/internal/comm/PubNubListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.august.internal.comm; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
import com.google.gson.JsonElement; | ||
|
||
/** | ||
* The {@link PubNubListener} interface is for handling connects and disconects from PubNub | ||
* | ||
* @author Arne Seime - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public interface PubNubListener { | ||
|
||
void onPushMessage(String channelName, JsonElement message); | ||
|
||
void onDisconnect(String channelName); | ||
|
||
void onConnect(String channelName); | ||
} |
27 changes: 27 additions & 0 deletions
27
...august/src/main/java/org/openhab/binding/august/internal/comm/PubNubMessageException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.august.internal.comm; | ||
|
||
import org.openhab.binding.august.internal.AugustException; | ||
|
||
/** | ||
* The {@link PubNubMessageException} class wraps exceptions raised when communicating with the PubNub async | ||
* message api | ||
* | ||
* @author Arne Seime - Initial contribution | ||
*/ | ||
public class PubNubMessageException extends AugustException { | ||
public PubNubMessageException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
Oops, something went wrong.