Hi Mark,
I dont see an off event, is the binding meant to send the off?
Ill look into the history, thank you!
Hi Mark,
I dont see an off event, is the binding meant to send the off?
Ill look into the history, thank you!
I forget which version of the binding youâre running. During the review process, we made a number of changes to the way the doorbell channel works.
The doorbell channel currently is defined as a trigger channel. The binding sends a PRESSED event when the doorbell button is pressed. If you have a âDoorbell OFF delayâ defined in the thing config, the binding will send a RELEASED event N seconds after the doorbell is pressed (which reminds me that I need to change that text to Doorbell RELEASED delay).
If youâre running a current snapshot, or the latest milestone, you can add the profile rawbutton-on-off-switch to the item definition and it will turn the switch ON when the PRESSED event occurs and OFF when the RELEASED event occurs. See the documentation for how to do this.
Also reference the first post in this thread to learn about other changes made during the review process.
Thanks Mark. Ill update to the latest and give it a go!
@oeiber I posted a new version that includes the two new thing actions:
getRingTimeLimit()
getLastErrorCode()
@papaPhiL This version also includes support for the A1081 controller.
This version has been lightly tested, so let me know if you run into any issues.
HI Mark
trying to install the new version, i put the addons into the folder before the Doorbird JAR but get alot of errors.
Any suggestions?
11:56:58.328 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/com.goterl.lazycode.lazysodium-java-4.0.1.jar
org.osgi.framework.BundleException: Could not resolve module: com.goterl.lazycode.lazysodium-java [273]
Unresolved requirement: Import-Package: com.sun.jna.ptr
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
11:56:58.330 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/com.goterl.lazycode.lazysodium-java-4.0.1.jar
org.osgi.framework.BundleException: Could not resolve module: com.goterl.lazycode.lazysodium-java [273]
Unresolved requirement: Import-Package: com.sun.jna.ptr
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
11:56:58.335 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.doorbird-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.doorbird [274]
Unresolved requirement: Import-Package: org.openhab.core.automation.annotation; resolution:="optional"
Unresolved requirement: Import-Package: com.goterl.lazycode.lazysodium; version="[4.0.0,5.0.0)"
-> Export-Package: com.goterl.lazycode.lazysodium; bundle-symbolic-name="com.goterl.lazycode.lazysodium-java"; bundle-version="4.0.1"; version="4.0.1"; uses:="com.goterl.lazycode.lazysodium.exceptions,com.goterl.lazycode.lazysodium.interfaces,com.goterl.lazycode.lazysodium.utils,com.sun.jna"
com.goterl.lazycode.lazysodium-java [273]
Unresolved requirement: Import-Package: com.sun.jna.ptr
Unresolved requirement: Import-Package: com.goterl.lazycode.lazysodium.exceptions; version="[4.0.0,5.0.0)"
-> Export-Package: com.goterl.lazycode.lazysodium.exceptions; bundle-symbolic-name="com.goterl.lazycode.lazysodium-java"; bundle-version="4.0.1"; version="4.0.1"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
Which jars did you put in addons? It should be:
com.goterl.lazycode.lazysodium-java-4.0.1.jar
org.openhab.binding.doorbird-2.5.0-SNAPSHOT.jar
And possibly this one if itâs not already loaded by some other binding.
jna-5.4.0.jar
Yes, I put the 3 jars in from your github page.
-rw-rw-r-- 1 kris kris 1975271 Nov 5 12:06 com.goterl.lazycode.lazysodium-java-4.0.1.jar
-rw-rw-r-- 1 kris kris 241622 Aug 11 04:46 gson-2.8.5.jar
-rw-rw-r-- 1 kris kris 1506245 Nov 5 12:06 jna-5.4.0.jar
-rw-r--r-- 1 root root 548391 May 6 2019 org.apache.servicemix.bundles.xstream-1.4.7_1.jar
-rw-r--r-- 1 root root 172671 Apr 26 2019 org.openhab.binding.amazonechocontrol-2.5.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 63847 Sep 18 16:57 org.openhab.binding.broadlink-2.4.0-BETA-17.jar
-rw-rw-r-- 1 kris kris 19811 Jul 1 23:56 org.openhab.binding.habpanelfilter-2.5.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 4742312 Apr 25 2019 org.openhab.binding.ipcamera-2.5.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 39315 Apr 25 2019 org.openhab.binding.unifi-2.3.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 55150 Oct 4 18:31 org.openhab.binding.upnpcontrol-2.4.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 3015675 Oct 8 16:56 org.openhab.binding.zwave-2.5.0-SNAPSHOT.jar
-rw-rw-r-- 1 kris kris 2975125 Jul 2 00:09 org.openhab.ui.habpanel-2.4.0.jar
-rw-r--r-- 1 openhab openhab 70 Dec 17 2018 README
What do you see in the console when you run:
list -s | grep doorbird
list -s | grep lazysodium
list -s | grep jna
openhab> list -s | grep doorbird
list -s | grep lazysodium
list -s | grep jna
277 x Active x 80 x 2.5.0.201911042200 x org.openhab.binding.doorbird
275 x Active x 80 x 4.0.1 x com.goterl.lazycode.lazysodium-java
276 x Starting x 80 x 5.4.0 x com.sun.jna
openhab>
Are you still getting errors?
Looks like the thing has gone to online⊠but the jna bundle is starting? should it not be active?
README link is not working it seems, I wanted to look into the siphangup etcâŠ
Not sure. It may not become active until something in the library is referenced.
Hmm. Iâll need to look into that.
In the meantime, this is how you call sipHangup in a rule (replacing âdoorbird:d101:doorbellâ with your thing UID).
val actions = getActions("doorbird","doorbird:d101:doorbell")
if(actions === null) {
logInfo("actions", "Actions not found, check thing UID")
return
}
actions.sipHangup()
Thanks. So the binding can now call a SIP call using http im assuming when the doorbell is pressed and this is the hangup action?
Yes, this action replaces the sipHangup
channel in earlier versions of the binding.
The link to the README should be fixed now.
Thanks. Ive updated the binding and im still not getting reliable Doorbell_Pressed events.
2019-11-05 09:39:36.265 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 54420 bytes to raw type (image/jpeg): 46991 bytes
2019-11-05 09:40:19.833 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 46991 bytes to raw type (image/jpeg): 50550 bytes
2019-11-05 09:40:23.144 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 50550 bytes to raw type (image/jpeg): 50625 bytes
2019-11-05 12:24:48.005 [vent.ItemStateChangedEvent] - Doorbell_Pressed changed from ON to OFF
2019-11-05 12:48:02.956 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 50625 bytes to raw type (image/jpeg): 57290 bytes
2019-11-05 13:17:17.009 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 57290 bytes to raw type (image/jpeg): 56965 bytes
2019-11-05 14:16:24.288 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 56965 bytes to raw type (image/jpeg): 55103 bytes
2019-11-05 14:17:17.503 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 55103 bytes to raw type (image/jpeg): 49658 bytes
2019-11-05 14:17:20.309 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 49658 bytes to raw type (image/jpeg): 49854 bytes
2019-11-05 14:18:32.109 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 49854 bytes to raw type (image/jpeg): 54065 bytes
kris@ihp:/etc/openhab2/items$
Had a visitor just then and you can see, around the 2:18 timeframe, no ON/OFF event, But earlier in the day it worked.
Takes visitor photos just fine, but no event for the Switch (Doorbird_Pressed) being turned on therefore no notifications I have visitors.
Does the released delay, send the OFF Command as per this screenshot:
After the delay, itâs supposed to send the RELEASED trigger event. If you defined the item like this, you also should get the OFF command.
Switch Doorbell_Pressed
"Doorbell Pressed [%s]"
<switch>
{ channel="doorbird:d101:doorbell:doorbell" [profile="rawbutton-on-off-switch"] }
You could try changing your rule to look for the trigger event rather than the ON command.
when
Channel "doorbird:d101:doorbell:doorbell" triggered PRESSED
then
Edit: You also could try reducing the Doorbell Released Delay from 30 to something smaller, like 2 or 3 seconds.
Thanks Mark, ill do those suggestions. Iâm on 2.4.0 stable so I guess no issues with what youve suggested?
Updated, i see these events now:
15:28:22.746 [INFO ] [smarthome.event.ChannelTriggeredEvent] - doorbird:d210x:c56c3dc0:doorbell triggered PRESSED
15:28:22.747 [INFO ] [lipse.smarthome.model.script.DoorBird] - DoorBell pressed by Visitor
15:28:22.748 [INFO ] [smarthome.event.ItemStateChangedEvent] - Doorbell_PressedImage changed from raw type (image/jpeg): 53672 bytes to raw type (image/jpeg): 54783 bytes
15:28:22.748 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Echo_LivingRoom_TTS' received command Theres someone at your Front Gate
15:28:22.749 [INFO ] [arthome.event.ItemStatePredictedEvent] - Echo_LivingRoom_TTS predicted to become Theres someone at your Front Gate
15:28:22.750 [INFO ] [smarthome.event.ItemStateChangedEvent] - Echo_LivingRoom_TTS changed from to Theres someone at your Front Gate
15:28:24.320 [INFO ] [smarthome.event.ItemStateChangedEvent] - Echo_LivingRoom_TTS changed from Theres someone at your Front Gate to
15:28:24.745 [INFO ] [smarthome.event.ChannelTriggeredEvent] - doorbird:d210x:c56c3dc0:doorbell triggered RELEASED
Ill do a little more testingâŠ
Thank you Mark!
Will test it in the evening.
Oliver
FYI; tomorrow is my Maintenance Day where I can give this newest version I try. Firewall is also in place to analyse the traffic between VLANs