Samfox2 / homebridge-doorbell

Apache License 2.0
4 stars 4 forks source link

Push notification and doorbell incompatible #1

Closed albertodig closed 8 years ago

albertodig commented 8 years ago

hi all, i have the following 2 problems.. someone can help me? -I'm using doorbell plugin but seems that doorbell notification arrives only to my smartphone and not to the other people that are sharing my home. it is a common problem?

-Doorbell seems be incompatible accessory with IOS10 (ITALY). Possible? Anyway i'm able to receive notification on my iphone and open live view cam.

img_1185 img_1186

Very intresting project, thank you!!

Samfox2 commented 8 years ago

Hi, at this time this is just a basic demo of a homrkit doorbell. Although home app is reporting "not compatible" messages are still send to icloud connected devices if there is a camera in the same room.

michaeljanich commented 7 years ago

I've put the doorbell onto a switch (with wiringpi-node) and I also get "Unsupported" in "Home" and I get no message, that someone rang the doorbell. Will I only get a (photo) message with a camera?

What is supposed to happen? Should I not get a message saying "someone is at the door"???

I'm running iOS11.1

Here some code fragments:

function ProgrammableSwitch(accesory, log, config) {
    this.log = log;
    this.pin = config.pin;
    this.inverted = config.inverted || false;

    this.service = new Service.Doorbell(config.name);
    this.service
        .getCharacteristic(Characteristic.ProgrammableSwitchEvent)
        .on('get', this.getState.bind(this));

    wpi.pinMode(this.pin, wpi.INPUT);
    //wpi.pullUpDnControl(this.pin, wpi.PUD_DOWN);
    wpi.wiringPiISR(this.pin, wpi.INT_EDGE_BOTH, this.stateChange.bind(this));

    accesory.addService(this.service);
}

ProgrammableSwitch.prototype = {    
    stateChange: function(delta) {
    var state = wpi.digitalRead(this.pin);
    if (this.inverted)
        state = !state;
        if (state) {
        this.service.setCharacteristic(Characteristic.ProgrammableSwitchEvent, Characteristic.ProgrammableSwitchEvent.SINGLE_PRESS);
    }
    }
}
Samfox2 commented 7 years ago

API was changed so that doorbell service is not working as single service anymore. You have to change the doorbell service to motionsensor or use my video doorbell plugin (based on ffmpeg plugin): https://github.com/Samfox2/homebridge-videodoorbell