Giter Site home page Giter Site logo

Comments (23)

lukeredpath avatar lukeredpath commented on May 30, 2024

Tried this:

case this.swTypeVal == 1:{ //doorbell
  var doorbellService = new Service.Doorbell(this.name);
  doorbellService.getCharacteristic(Characteristic.ProgrammableSwitchEvent).on('set', this.setPowerState.bind(this)).on('get', this.getPowerSt     ate.bind(this));
services.push(doorbellService);
  break;
}

It shows up in HomeKit but the Home app says its not supported and Elgato Eve shows it as an "input event" which sounds right, but there doesn't seem to be anything I can do with it.

Am I misunderstanding the depth of HomeKit's doorbell support?

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on May 30, 2024

The value type provided by set/getPowerswitch handler probably isn't correct for the programmableswitch characteristic. You'd need to add a handler to translate domoticz data into the expected format from the HomeKit spec linked to over on your HAP-nodeJS issue.

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on May 30, 2024

(Ie: you're sending Boolean true/false. The programmableswitch characteristic wants INT 1 or 0)

from homebridge-edomoticz.

lukeredpath avatar lukeredpath commented on May 30, 2024

Thanks, is there already a suitable handled that might return a 1/0 for a chime?

Thinking about this some more, I've realised I probably won't be able to get this to do what I want as things stand anyway. I've just set up a contact sensor one our front door which shows up in homekit via Domoticz and the problem is it's no use for triggering anything as it only refreshes its state when you open the Home app or ask Siri.

Is there any way to get state notifications in real time from Domoticz and republish those changes to HomeKit?

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on May 30, 2024

Use the MQTT-integration branch... then updates are in realtime

from homebridge-edomoticz.

lukeredpath avatar lukeredpath commented on May 30, 2024

Interesting, I will check it out.

from homebridge-edomoticz.

Samfox2 avatar Samfox2 commented on May 30, 2024

Did you make any progress on that? I'm also playing a bit with doorbell-service but as you mentioned before, it is not supported by the home app - really strange...

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on May 30, 2024

Proving trickier than first thought due to domoticz sending value:7 when doorbell is pushed, but then nothing to reset it... this may have to be mapped as a pushOn switch rather than the native homekit doorbell type.

from homebridge-edomoticz.

Samfox2 avatar Samfox2 commented on May 30, 2024

Maybe sth. like this (out of amazondash-plugin) will do:

DashPlatform.prototype.dashEventWithAccessory = function(accessory) {
  var targetChar = accessory
    .getService(Service.StatelessProgrammableSwitch)
    .getCharacteristic(Characteristic.ProgrammableSwitchEvent);

  targetChar.setValue(1);
  setTimeout(function(){targetChar.setValue(0);}, 10000);
}

from homebridge-edomoticz.

ZoneMR avatar ZoneMR commented on May 30, 2024

Works for me...

setTimeout(function() {
        this.log("Ding Dong");
        this.service.getCharacteristic(Characteristic.ProgrammableSwitchEvent).setValue(1);
    }.bind(this), 10000);

Oddly enough I didn't start getting push notifications right away... I almost gave up then tried the next day and notifications were being delivered reliably. Maybe there's some HomeKit sync lag at play.

from homebridge-edomoticz.

sutterline avatar sutterline commented on May 30, 2024

Hi @ZoneMR , Could you show us your complete code, that is to say, DoorBell_accessory.js? Thanks!!

from homebridge-edomoticz.

ZoneMR avatar ZoneMR commented on May 30, 2024

Sure, this is my code.

10 seconds after startup I get a doorbell notification. The notification also contains a snapshot of the driveway camera - for which I'm using a variant of KhaosT/homebridge-camera-ffmpeg

from homebridge-edomoticz.

rswilem avatar rswilem commented on May 30, 2024

I have just tested the same as you already have, @lukeredpath

Upon adding a new Doorbell service, the device shows up as not supported. There isn't any way (yet) to show up a doorbell in the iOS 10 Home app. This is because the Doorbell service just adds a characteristic named Characteristic.ProgrammableSwitchEvent. There isn't any way to know that this is really a doorbell.

I have also tried with the Homekit accessory simulator, no luck though. There isn't any device I can add which emulates a doorbell. Only thing coming close is a door which opens and closes.

I guess we'll have to wait until doorbells are fully supported by Apple (HomeKit).

from homebridge-edomoticz.

michaeljanich avatar michaeljanich commented on May 30, 2024

@ZoneMR Why are you sending "1" to the ProgrammableSwitchEvent? It means "Double Click". Have you tried zero?

I've put that on a GPIO switch: nothing happens except for a log message when the doorbell is fired. Shouldn't it send a message to my iPhone saying "Someone is at the door"?

The Home app (iOS11.1beta5) does not support this accessory.

I like to make a test with homebridge-camera-ffmpeg or homebridge-camera-ffmpeg-omx to make this a video door bell.

PS: Can I somehow attach a "regular" bell as well?

from homebridge-edomoticz.

Samfox2 avatar Samfox2 commented on May 30, 2024

Apple changed the doorbell service, it does not work as standalone doorbell anymore.

I created a (working) video doorbell based on the ffmpeg plugin, you find the code here:
https://github.com/Samfox2/homebridge-videodoorbell

from homebridge-edomoticz.

michaeljanich avatar michaeljanich commented on May 30, 2024

from homebridge-edomoticz.

Samfox2 avatar Samfox2 commented on May 30, 2024

The plugin is running a small webserver which triggers the doorbell. So basically if your physical button connected to gpio can execute a bash script or curl command in any way the plugin sends a pic message to all icloud connected devices.

from homebridge-edomoticz.

michaeljanich avatar michaeljanich commented on May 30, 2024

from homebridge-edomoticz.

Samfox2 avatar Samfox2 commented on May 30, 2024

Yes, esp8266 should be fine. My cam is connected to a separate pi with a additional piface (I`m using this also for other). An input pin calls a curl command that triggers the doorbell.

from homebridge-edomoticz.

simonrb2000 avatar simonrb2000 commented on May 30, 2024

Anymore progress on this? Just got a Doorbell to work with Domoticz :)

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on May 30, 2024

As per Samfox2’s earlier comment:

Apple changed the doorbell service, it does not work as standalone doorbell anymore.

Doorbells must be integrated into Apple’s security system design, ie: with accompanying video camera etc.

Nothing that can be done within eDomoticz.

from homebridge-edomoticz.

NielsLeenheer avatar NielsLeenheer commented on May 30, 2024

I've created PR #175 that adds support for doorbells.

The doorbell service does indeed not function standalone, but you can combine it with every other type of service and it will magically start working. I've combined it with a programmable switch, which has the added benefit that you can use it to trigger scenes.

Notifications work and you even get a video thumbnail in the notification when you have a camera in the same room as the doorbell, making it work like a real video doorbell.

from homebridge-edomoticz.

lukeredpath avatar lukeredpath commented on May 30, 2024

Just thought I'd add my own update. I haven't tried Niels' solution but I did come up with my own. I have my doorbell device in Domoticz. I created a second, virtual dummy device as a motion sensor with an off delay of 1, then used a very simple Blockly automation to trigger the motion sensor whenever the real doorbell device is activated.

This gives me a Homekit compatible sensor that appears in the Home app (as a motion sensor) and which I can use to attach notifications to. The only downside is that the notification says "Doorbell motion detected" but I can live with it. Added bonus - the motion sensor also can be used with Echo devices (using the homebridge-alexa plugin) as a trigger for routines so you can trigger an announcement to all of your Echo devices when the doorbell is pressed.

I did finally get MQTT up and running too - the real time updates makes this seamless. It's replaced my IFTTT push notification for me.

from homebridge-edomoticz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.