Yale/August smart locks with WiFi support

At least the events indicate there is separate states for door and lock, so we could probably have both separately.

Another thing is that the binding seems to stop seeing events after a day or two. After removing and adding the item rows (in file based config), it again starts working but suddenly just stops. Is there anything I could try or provide more data? Then again, I’m seeing similar issues with other bindings (e.g. Unifi Protect) so could be related to this latest v3 openhab version.

I’m also setting up a dev environment in order to try to assist with the development, but gotta admit that the dev experience with openhab bindings takes a while to get up and running so it will take while to get up to the point where I could really debug through the code and solve possible issues.

Seems like the documentation isn’t correct - or the framework isn’t enforcing the category names very hard.

The thing category is in the next release FrontDoor while the channels are

doorState = FrontDoor
lockState = Lock
unlockedByUser = Motion

You might need to re-add the thing in order for openHAB to catch the changes.

Could you enable debug logging and send to me after this has happened again?

Posted a new version, read changelog as there is a breaking change.

Cheers

1 Like

Hmm, the problem is that it is not logging anything. Enabled DEBUG, then opened, locked, unlocked door with keycode, but there is nothing. Will test with the new version you just provieded.

openhab> log:set DEBUG org.openhab.binding.august
openhab> log:tail org.openhab.binding.august
13:21:20.376 [INFO ] [st.internal.handler.AugustLockHandler] - 4C16624D1D7440A1929F7CE9BB8AB5BA Polling for updated lock status
13:21:20.514 [INFO ] [st.internal.handler.AugustLockHandler] - 4C16624D1D7440A1929F7CE9BB8AB5BA Updating door state channel with cloud state
13:21:20.516 [INFO ] [st.internal.handler.AugustLockHandler] - 4C16624D1D7440A1929F7CE9BB8AB5BA Updating lock state channel with cloud state

With regards to the lock type, mine says 1002. It is Yale Doorman V2N.

I’m usually configuring logging directly in the log4j.xml file (often with separate log files for each binding I need to analyse), and this seems to confuse Karaf when also setting log level in the console. Have not investigated why.

Can you try to change logging in log4j.xml instead?

I’m using:

                <RollingFile fileName="${sys:openhab.logdir}/august.log" filePattern="${sys:openhab.logdir}/august.log.%i" name="AUGUST">
                        <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
                        <Policies>
                                <SizeBasedTriggeringPolicy size="32 MB"/>
                        </Policies>
                </RollingFile>

… in the Appenders section and

                <Logger additivity="false" level="TRACE" name="org.openhab.binding.august">
                        <AppenderRef ref="AUGUST"/>
                </Logger>

… in the Loggers section.

Regards

2 Likes

Beautiful! Thank you!
image

Tonight I could see log filled with this every 5 secs, and thing was offline on UI.

2023-03-08 23:22:36.374 [WARN ] [t.internal.handler.AugustLockHandler] - 4C16624D1D7440A1929F7CE9BB8AB5BA Not polling lock since bridge isn't online yet. Bridge reported status OFFLINE

After commenting out and uncommenting the august bridge (and thing) from the things file, it immediately went back online.

Do you have the logs before this? It indicates that the bridge isnt online while the framework still decided to initialize the locks.

Regard æs

I might have had, but haven’t seen this issue since so I’ll get back if I run into this issue again.

Added the sections to log4j.xml, and even restarted openhab service, but it only creates august.log file, but doesn’t log anything in it.

Heads up everyone: Do NOT install the new Yale Home app yet. Logging in there will transfer your account to a new system which the binding currently is unable to communicate with. This renders your locks inoperable from openHAB.

Edit: After updating to latest version of binding; depending on whether you have migrated or not the ecoSystem configuration value for account thing must now be set to either

  • AUGUST for users that have not migrated to Yale Home App
  • or YALE_HOME for migrated users.

Edit 2: Fixed push messages for YALE_HOME users

1 Like

thanks for the binding!! i got the Yale Unity security screen door lock. with the wifi bridge.
been runing for 7hrs with no issues so far.
Locktype comes up as 12

Thanks for the feedback. I’ll add locktype 12 name decoding in the next release :slight_smile:

Arne

there is an issue with the binding that i have found.
the other day i did a reboot of my network (powered it down for a 5mins) the log exploded from this binding.
~9380 calls in 1 second.
[INFO ] [t.internal.handler.AugustLockHandler] - EB45BFD516DCF745ACBEB2C09181BD5C PubNub disconnected
other than that so far it has been working great for me

Hi nick, could you state which version of the binding you are using via openhab-cli?

Regards Arne

bundle:list
gives this as the result for Augest

306 │ Active  │  80 │ 3.4.4.202306011027     │ Seime Add-ons :: Bundles :: August Binding

Hi all,
had a quick look here but couldnt find it.
noticed my bridge had gone offline. and i couldnt get it to come online. so i deleted and tried to readd. but i hit an issue.
i am not reciving the validation code.
i have tried removing the binding. shut down openhab. found all mension of yale/august and removed.
started up openhab. reinstalled binding from community marketplace. still get stuck in same spot. also did all of that again but with the jar in the addon folder. still no go. is there someing im missing?

thanks,
Nick

Trying to get things working on OpenHab 4.0.1 and no.seime.openhab.binding.august-4.1.0-SNAPSHOT.jar, but getting the following error and no validation code in email.

2023-08-11 10:30:59.206 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:account:accountName' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab/openhab.log <==

2023-08-11 10:30:59.212 [DEBUG] [nternal.handler.AugustAccountHandler] - Initializing bridge

==> /var/log/openhab/events.log <==

2023-08-11 10:30:59.216 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:account:accountName' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab/openhab.log <==

2023-08-11 10:30:59.315 [DEBUG] [ugust.internal.logging.RequestLogger] - Request accountName-0

accountName-0 > POST https://api.aaecosystem.com/session

accountName-0 > Accept-Encoding: gzip

accountName-0 > User-Agent: August/2019.12.16.4708 CFNetwork/1121.2.2 Darwin/19.3.0

accountName-0 > Accept: application/json

accountName-0 > Content-Type: application/json

accountName-0 > Accept-Version: 0.0.1

accountName-0 > x-kease-api-key: 79fd0eb6-381d-4adf-95a0-47721289d1d9

accountName-0 > x-august-api-key: 79fd0eb6-381d-4adf-95a0-47721289d1d9

accountName-0 > x-august-access-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpbnN0YWxsSWQiOiJvcGVuSEFCLTZjODVhYTg1LWM5YmItNDIxMS05Yzc1LTFjZjgwMTgzODMzNSIsInJlZ2lvbiI6IiIsImFwcGxpY2F0aW9uSWQiOiIiLCJ1c2VySWQiOiI2MzREMOVED

accountName-0 > Content-Type: application/json

accountName-0 > Host: api.aaecosystem.com

accountName-0 > Content-Length: 148

{

  "identifier": "email:jussi@REMOVED.com",

  "password": "REMOVED",

  "installId": "openHAB-6c85aa85-c9bb-4211-9c75-1cf801838335"

}

2023-08-11 10:30:59.335 [DEBUG] [ugust.internal.logging.RequestLogger] - Could not reformat malformed JSON due to 'com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $'

2023-08-11 10:30:59.338 [DEBUG] [ugust.internal.logging.RequestLogger] - Response accountName-0

accountName-0 < HTTP/1.1 403 Forbidden

accountName-0 < Date: Fri, 11 Aug 2023 07:30:59 GMT

accountName-0 < Content-Type: text/html; charset=UTF-8

accountName-0 < Transfer-Encoding: chunked

accountName-0 < Connection: keep-alive

accountName-0 < Cache-Control: max-age=15

accountName-0 < Expires: Fri, 11 Aug 2023 07:31:14 GMT

accountName-0 < X-Frame-Options: SAMEORIGIN

accountName-0 < Set-Cookie: __cf_bm=yDYHJQX02coFhzNZ9DqOIFlrTpBncfpkxLn4MqXdIoE-1691739059-0-AcopEZ2cVeftNA0R/nIREMOVEDabzG16Xb+558rZmdgpW4BmT/kuaII1TUqXzpiuq4WV+Tl0cKJSX9GuA=; path=/; expires=Fri, 11-Aug-23 08:00:59 GMT; domain=.aaecosystem.com; HttpOnly; Secure; SameSite=None

accountName-0 < Vary: Accept-Encoding

accountName-0 < Server: cloudflare

accountName-0 < CF-RAY: 7f4ec6c0ba7ad906-HEL

accountName-0 < Content-Encoding: gzip

<!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->

<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->

<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->

<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->

<head>

<title>Attention Required! | Cloudflare</title>

<meta charset="UTF-8" />

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

<meta name="robots" content="noindex, nofollow" />

<meta name="viewport" content="width=device-width,initial-scale=1" />

<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />

<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->

<style>body{margin:0;padding:0}</style>

<!--[if gte IE 10]><!-->

<script>

  if (!navigator.cookieEnabled) {

    window.addEventListener('DOMContentLoaded', function () {

      var cookieEl = document.getElementById('cookie-alert');

      cookieEl.style.display = 'block';

    })

  }

</script>

<!--<![endif]-->

</head>

<body>

  <div id="cf-wrapper">

    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>

    <div id="cf-error-details" class="cf-error-details-wrapper">

      <div class="cf-wrapper cf-header cf-error-overview">

        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>

        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> aaecosystem.com</h2>

      </div><!-- /.header -->

      <div class="cf-section cf-highlight">

        <div class="cf-wrapper">

          <div class="cf-screenshot-container cf-screenshot-full">

            

              <span class="cf-no-screenshot error"></span>

            

          </div>

        </div>

      </div><!-- /.captcha-container -->

      <div class="cf-section cf-wrapper">

        <div class="cf-columns two">

          <div class="cf-column">

            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>

          </div>

          <div class="cf-column">

            <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>

            <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>

          </div>

        </div>

      </div><!-- /.section -->

      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

  <p class="text-13">

    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">7f4ec6c0ba7ad906</strong></span>

    <span class="cf-footer-separator sm:hidden">&bull;</span>

    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block sm:mb-1">

      Your IP:

      <button type="button" id="cf-footer-ip-reveal" class="cf-footer-ip-reveal-btn">Click to reveal</button>

      <span class="hidden" id="cf-footer-ip">80.220.161.47</span>

      <span class="cf-footer-separator sm:hidden">&bull;</span>

    </span>

    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>

    

  </p>

  <script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>

</div><!-- /.error-footer -->

    </div><!-- /#cf-error-details -->

  </div><!-- /#cf-wrapper -->

  <script>

  window._cf_translation = null;

  

  

</script>

</body>

</html>

==> /var/log/openhab/events.log <==

2023-08-11 10:30:59.344 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:account:accountName' changed from UNKNOWN to OFFLINE (CONFIGURATION_ERROR): Exception caught trying to communicate with API: Invalid credentials

==> /var/log/openhab/openhab.log <==

2023-08-11 10:30:59.346 [WARN ] [nternal.handler.AugustAccountHandler] - Error communicating with API. Will retry in 2 minutes

no.seime.openhab.binding.august.internal.comm.RestCommunicationException: Exception caught trying to communicate with API: Invalid credentials

	at no.seime.openhab.binding.august.internal.comm.RestApiClient.sendRequestInternal(RestApiClient.java:168) ~[?:?]

	at no.seime.openhab.binding.august.internal.comm.RestApiClient.sendRequest(RestApiClient.java:114) ~[?:?]

	at no.seime.openhab.binding.august.internal.handler.AugustAccountHandler.obtainNewSession(AugustAccountHandler.java:254) ~[?:?]

	at no.seime.openhab.binding.august.internal.handler.AugustAccountHandler.loginComplete(AugustAccountHandler.java:235) ~[?:?]

	at no.seime.openhab.binding.august.internal.handler.AugustAccountHandler.initialize(AugustAccountHandler.java:158) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor68.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]

	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Caused by: no.seime.openhab.binding.august.internal.ConfigurationException: Invalid credentials

	at no.seime.openhab.binding.august.internal.comm.RestApiClient.sendRequestInternal(RestApiClient.java:153) ~[?:?]

	... 13 more

==> /var/log/openhab/events.log <==

2023-08-11 10:30:59.381 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:lock:accountName:frontdoorlock' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab/openhab.log <==

2023-08-11 10:30:59.388 [INFO ] [t.internal.handler.AugustLockHandler] - 30D90670DEEC93499D8BF8C974567673 Initializing lock

==> /var/log/openhab/events.log <==

2023-08-11 10:30:59.389 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:lock:accountName:frontdoorlock' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab/openhab.log <==

2023-08-11 10:30:59.392 [INFO ] [t.internal.handler.AugustLockHandler] - 30D90670DEEC93499D8BF8C974567673 Lock init successful

2023-08-11 10:31:00.393 [WARN ] [t.internal.handler.AugustLockHandler] - 30D90670DEEC93499D8BF8C974567673 Not polling lock since bridge isn't online yet. Bridge reported status OFFLINE

==> /var/log/openhab/events.log <==

2023-08-11 10:31:00.397 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'august:lock:accountName:frontdoorlock' changed from UNKNOWN to OFFLINE (BRIDGE_OFFLINE)

==> /var/log/openhab/openhab.log <==

2023-08-11 10:31:05.397 [WARN ] [t.internal.handler.AugustLockHandler] - 30D90670DEEC93499D8BF8C974567673 Not polling lock since bridge isn't online yet. Bridge reported status OFFLINE

Basically when the binding (version 4.1.0.202307310852 for me) tries to post to API (not a full example HTTP POST, just a quick test):

curl --location --request POST 'https://api.aaecosystem.com/session' \
--header 'x-august-api-key: 79fd0eb6-381d-4adf-95a0-47721289d1d9' \
--header 'Cookie: __cf_bm=AArWwKKwo0MK49g8Nr_F6Y6fb2HjfpPQTphZfz7byQ4-1691740879-0-AbIkSPEzrLoK3d6QHTmviixHJqG10pNw239131DvM/GiOZwqKUpGZdSGcuVqOYjz3X9Sz83B8fYqR2sqlxj69FA='

it is blocked by cloudflare:

This website is using a security service to protect
itself from online attacks. The action you just performed triggered the security solution.
There are several actions that could trigger this block including submitting a certain word
or phrase, a SQL command or malformed data.

@jpalo @nick_woodforth Something has changed on the August/Yale side lately. I see the same problem myself now. Appears to start on the morning of 9th of August.

I’m kinda busy for the time being, so please help out with some research of what has changed (changed/new header value maybe?)

Regards