first of all, thanks again for the quick update and the nice work on the unifi binding. I found it being the only reliable presence detection for iPhones, which works for me.
Since Iām on 2.3.0-SNAPSHOT, the communication to the controller seems to be cut for a short period of time, which is causing the below errors being reported in my logs:
==> /var/log/openhab2/openhab.log <==
2018-04-03 17:18:50.058 [WARN ] [unifi.handler.UniFiControllerHandler] - Error refreshing the UniFi Controller unifi:controller:home - Could not communicate with the UniFi Controller
==> /var/log/openhab2/events.log <==
2018-04-03 17:18:50.075 [hingStatusInfoChangedEvent] - 'unifi:controller:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Could not communicate with the UniFi Controller
2018-04-03 17:19:01.497 [hingStatusInfoChangedEvent] - 'unifi:controller:home' changed from OFFLINE (COMMUNICATION_ERROR): Could not communicate with the UniFi Controller to ONLINE
Clients connected to the bridge also go offline and come back online when communication to the controller is established again.
mgbowmanā¦
Nice to hear youĀ“re house construction is going forward ā¦ Wondering if weĀ“re able to follow the constrution, which I assume will include lots of automation as well?
Of course thereās a lot of automation. The core of the house will be based on KNX but there are a lot of other technologies in play. Once everything is complete, Iāll share some pictures of my wiring closets.
Yeah, I feel your pain. I just went through that on a major house renovation project.
Thatās why almost everything still can be controlled manually. The only thing I didnāt bother to do was wire the controllers for the zoned audio. The zoned audio can be controlled only through the UI.
I opted against hardwired controls as the audio systems / technologies are bound to change - I found the most important thing was running the speaker wire. Iām implementing a Sonos Connect based system and deploy iPort xPESSS keypads where needed.
Just updated to this, 2 minutes to search/replace all the changes from contact to switch and all is well!
Works as expected - thank you!
I did notice though that the AP, site etc items went from āxxxā to UNDEF when my phone dropped off the network. Not sure if this was like this before?
Maybe allow a default in the config? Not the end of the world though as it can be mapped.
works great! Thanks .
what I have noticed is that in the PaperUI the clientās online channel still shows ācontactā. also after clear OH cache and reboot.
Hey guysā¦ back again with (hopefully) one of the last updates before we get this binding merged.
Talking with @martinvw there was some wonky code (that I wrote a very long time ago) that needed to be refactored for the sake of maintainability moving forward (whether by myself or someone else). Therefore Iāve pushed a new build (from a different branch) that Iād like you guys to test before I merge it into the active PR.
Not only is the code much cleaner, itās much more robust in dealing with controller errors (invalid credentials, expired sessions, communication errors, etcā¦)
Please help us out in testing this before it gets merged - let us know either way how it works out.
rule "Format Joe's Phone Uptime"
when
Item JoesPhoneUptime changed
then
var int days = ((JoesPhoneUptime.state as DecimalType).intValue / (86400))
var int hours = (((JoesPhoneUptime.state as DecimalType).intValue / 3600) - (24 * days))
var int minutes = (((JoesPhoneUptime.state as DecimalType).intValue / 60) - ((1440 * days) + (60 * hours)))
var int seconds = (((JoesPhoneUptime.state as DecimalType).intValue) - ((86400 * days) + (3600 * hours) + (60 * minutes)))
var String result = ""
// days
if (days > 0) {
result = result + days + " Day / "
}
// hours
if (hours > 0) {
result = result + hours + " Hours / "
}
// minutes
if (minutes > 0) {
result = result + minutes + " Min / "
}
// seconds
if (seconds > 0) {
result = result + seconds + " Sec "
}
JoesPhoneUptimeFormatted.postUpdate(result)
logInfo("system.rules", "Uptime updated to " + JoesPhoneUptimeFormatted.state)
end
I updated to 2.3.0 a coupple of days ago. And I have had a hell with my Openhab2 system ever sinceā¦
IĀ“m not sure if I did something wrong, but I DL the 2.3.0 snapshot, placed it in my /usr/share/openhab2/addons folder. Renamed the old 2.2.0 to .old
And the problems felt all over me.
OpenHab2 would no load 2.3.0. and kept telling me, it could parse 2.2.0 file, (ofcuse cause I renamed it).
Read somewere to clear the cache and tmp folders. So I did. Made some changes, as I now run the 2.3.0 Unif binding.
If I try to install something (another binding, service etc) the āoldā problem returns where Openhab says it canĀ“t run the 2.2.0 binding.
For a few minutes ago, I try to update some files from the openhabian-config console. After that I rebooted the systemā¦ And now I get this when i reboots:
2018-05-06 23:16:02.809 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document '/ESH-INF/binding/binding.xml' in module 'org.openhab.binding.unifi' could not be parsed: The XmlConfigDescriptionProvider must not be null!
java.lang.IllegalArgumentException: The XmlConfigDescriptionProvider must not be null!
at org.eclipse.smarthome.core.binding.xml.internal.BindingInfoXmlProvider.<init>(BindingInfoXmlProvider.java:60) [117:org.eclipse.smarthome.core.binding.xml:0.10.0.b1]
at org.eclipse.smarthome.core.binding.xml.internal.XmlBindingInfoProvider.createDocumentProvider(XmlBindingInfoProvider.java:141) [117:org.eclipse.smarthome.core.binding.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.acquireXmlDocumentProvider(XmlDocumentBundleTracker.java:181) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.addingObject(XmlDocumentBundleTracker.java:206) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.parseDocuments(XmlDocumentBundleTracker.java:350) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:336) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.access$3(XmlDocumentBundleTracker.java:331) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:307) [113:org.eclipse.smarthome.config.xml:0.10.0.b1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
And this one:
2018-05-06 23:16:39.391 [ERROR] [org.openhab.binding.unifi ] - FrameworkEvent ERROR - org.openhab.binding.unifi
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.unifi [239]
Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.3.0.201804221805"; osgi.identity="org.openhab.binding.unifi"; singleton:="true"
at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1600) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514) [?:?]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
Funny thing isā¦ It does work and run using the 2.3.0 shapshot.