ioBroker.doorbird
ioBroker.doorbird copied to clipboard
Support relais events
Hi,
by using the old / simple LAN API Doorbird can notify iobroker by issuing a get request. This is installed like this:
http://doorbird/bha-api/notification.cgi?url=http://iobroker:8087/set/javascript.0.States.DoorBirdDoorOpen?value=true&event=dooropen&subscribe=1
Where doorbird is the doorbird hostname or ip and the URL is the URL which will be called if the user switches the relais (for example from the Doorbird App or a DECT Telephone).
I do understand that the current API you use does not support push messages for relais switching. But I think it would be possible to run a simple webserver in the adapter and register with Doorbird using the old / simple LAN API. This could be done automatically in the background and the user would not have to set it up manually (like I did with simpleApi adapter and javascript adapter) and all events from Doorbird are in the same Channel / Device which I would prefer.
Hi,
thank you! I will implement it as soon as possible! :+1: :relaxed:
I would be also very happy to have the relais events in the ioBroker objects. That would save 268 EUR for the equivalent doorbird hardware for secure opening the door.
You can get it working currently using the Simple-Api Adapter. You can even have both relais doing something different. :-)
- Add two HTTP calls like this in Doorbird (Administration -> HTTP(s) Calls): http://IP:8087/set/javascript.0.States.DoorBirdRelais1?value=true (adjust IP, ggf. Port = simple Api Port and state to your liking. Add a second one with a different datapoint, for example DoorBirdRelais2). Name them "Relais1"/"Relais2".
- Configure Doorbird to do the HTTP call when Relais is pressed (Further down -> "Expert settings" -> Relais -> "Zeitplan für Folgeaktionen" = "Timetable for secondary actions" or something in english? -> select HTTP(s) calls on the top left -> select "Relais1" (or "Relais2" for the second one) in the middle and select all timeslots (or not, if you don't want it to always happen)
- in ioBroker create the objects (for example javascript.0.States.DoorBirdRelais1 and javascript.0.States.DoorBirdRelais2)
Then you can use a script like that (or anything else -> but I'd recommend using a script to set the relais to false after a short time):
//Doorbird Relais1
on({id:"javascript.0.States.DoorBirdRelais1", val: true}, function (obj) {
log("Relais1 opened");
//do something here, for example open Door & Save pictures.
//reset after some seconds
setStateDelayed("javascript.0.States.DoorBirdRelais1", false, true, 10000);
});
//Doorbird Relais2
on({id:"javascript.0.States.DoorBirdRelais2", val: true}, function (obj) {
log("Relais2 opened");
//do something here, for example open another Door & Save pictures.
//reset after some seconds
setStateDelayed("javascript.0.States.DoorBirdRelais2", false, true, 10000);
}
});
Of course it would still be nice to have that in the adapter to make setup easier. But you can still today avoid buying additional hardware. :-) Feel free to ask, if you need more help.
BTW: This is not using the legacy api anymore and a different approach from what I posted above. Can you configure these URLs using the API? -> should be straight forward then, not?
Thanks! Works fine. What cost me an hour and makes me crazy: If the favorites for the simple-api adapter in the doorbird app stands in alphabetical order above the doorbird adapter favorites. The doorbird adapter try's zu "repair" the favorites (changes the port and other parts of the http call. So everyone who will implement this solution make sure that the new favorites are below the doorbird favs.
Thanks for this solution! It works!
My http call: http://192.168.167.3:8087/set/0_userdata.0.DoorBirdRelais1?value=true
This works only in the local network.
Is it possible with Homekit to control a variable via url?
Thanks for this solution! It works!
My http call: http://192.168.167.3:8087/set/0_userdata.0.DoorBirdRelais1?value=true
This works only in the local network.
Is it possible with Homekit to control a variable via url?
Wenn du den Schalter in Homekit (via Yakha) anlegst, kein Problem. Allerdings musst du soweiso Homekit von extern (via VPN) erreichbar machen. Das geht meines Wissens nur mit einem Homepod oder AppleTV.