Samfox2 / homebridge-videodoorbell

Video-Doorbell plugin based on homebridge-camera-ffmpeg for Homebridge.
Apache License 2.0
97 stars 17 forks source link

notification does not working #33

Closed sevatrofimov closed 5 years ago

sevatrofimov commented 5 years ago

I've added plugin to home bridge, accessory (camera) added to iOS and Mac. camera, associated with this plugin working, but when I call script using nothing occur in iPhone and Mac

script: curl -X POST -d 'ding=dong&dong=ding' http://192.....30:5005 return {"ding":"dong","dong":"ding"}

in homebridge.log: Ding Dong! [2019-3-25 18:22:30] Video-doorbell domofon rang!

Samfox2 commented 5 years ago

Is the switch working? Sometimes a (re-)login to the icloud account helps.

sevatrofimov commented 5 years ago

switch is this button: "button": true ? When I press it - it switch on for about 1 second, and then turn off back. In homebridge.log occur the same message as when I call it using curl: Ding Dong! [2019-3-26 08:12:41] Video-doorbell domofon rang!

I've re-login to iCloud with no result.

toshibochan commented 5 years ago

This button is just for take picture and send notifications

sevatrofimov commented 5 years ago

I understand. But when I press it notification does not occur.

toshibochan commented 5 years ago

You can see the picture in the HomeKit app?

sevatrofimov commented 5 years ago

yes. video from camera working well

toshibochan commented 5 years ago

Show you config.json

sevatrofimov commented 5 years ago

{ "bridge": { "name": "HB", "username": "CC:22:3D:E3:CE:3A", "port": 51827, "pin": "031-45-154" }, "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.", "accessories":[ { "accessory": "HTTP-SWITCH", "name": "свет для растений", "switchHandling": "realtime", "http_method": "GET", "onUrl": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B4%D0%BB%D1%8F%D1%80%D0%B0%D1%81%D1%82%D0%B5%D0%BD%D0%B8%D0%B9&op=m&m=turnOn", "offUrl": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B4%D0%BB%D1%8F%D1%80%D0%B0%D1%81%D1%82%D0%B5%D0%BD%D0%B8%D0%B9&op=m&m=turnOff", "statusUrl": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B4%D0%BB%D1%8F%D1%80%D0%B0%D1%81%D1%82%D0%B5%D0%BD%D0%B8%D0%B9&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "общий свет", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=%D0%BE%D0%B1%D1%89%D0%B8%D0%B9%D1%81%D0%B2%D0%B5%D1%82&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=%D0%BE%D0%B1%D1%89%D0%B8%D0%B9%D1%81%D0%B2%D0%B5%D1%82&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=%D0%BE%D0%B1%D1%89%D0%B8%D0%B9%D1%81%D0%B2%D0%B5%D1%82&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "шарик, розетка 2", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B02&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B02&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B02&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "уф лампа", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=miioRelay01&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=miioRelay01&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=miioRelay01&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "шарик, розетка 3", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B03&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B03&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B03&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "свет в аквариуме, розетка 4", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B04&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B04&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=%D1%80%D0%BE%D0%B7%D0%B5%D1%82%D0%BA%D0%B04&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" }, { "accessory": "Http", "name": "насос для полива", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://192.168.0.26:80/objects/?object=%D0%BD%D0%B0%D1%81%D0%BE%D1%81%D0%B4%D0%BB%D1%8F%D0%BF%D0%BE%D0%BB%D0%B8%D0%B2%D0%B0&op=m&m=turnOn", "off_url": "http://192.168.0.26:80/objects/?object=%D0%BD%D0%B0%D1%81%D0%BE%D1%81%D0%B4%D0%BB%D1%8F%D0%BF%D0%BE%D0%BB%D0%B8%D0%B2%D0%B0&op=m&m=turnOff", "status_url": "http://192.168.0.26:80/objects/?object=%D0%BD%D0%B0%D1%81%D0%BE%D1%81%D0%B4%D0%BB%D1%8F%D0%BF%D0%BE%D0%BB%D0%B8%D0%B2%D0%B0&op=get&p=status", "service": "Light", "sendimmediately": "", "username": "", "password": "" },

{
  "accessory": "Http",
  "name": "лазерный проектор",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D0%BB%D0%B0%D0%B7%D0%B5%D1%80%D0%BD%D1%8B%D0%B9%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D0%BB%D0%B0%D0%B7%D0%B5%D1%80%D0%BD%D1%8B%D0%B9%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D0%BB%D0%B0%D0%B7%D0%B5%D1%80%D0%BD%D1%8B%D0%B9%D0%BF%D1%80%D0%BE%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=get&p=status",
  "service": "Light",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "софит 2",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D0%BF%D1%80%D0%BE%D0%B6%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D0%BF%D1%80%D0%BE%D0%B6%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D0%BF%D1%80%D0%BE%D0%B6%D0%B5%D0%BA%D1%82%D0%BE%D1%80&op=get&p=status",
  "service": "Light",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "стробоскоп",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%81%D1%82%D1%80%D0%BE%D0%B1%D0%BE%D1%81%D0%BA%D0%BE%D0%BF&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%81%D1%82%D1%80%D0%BE%D0%B1%D0%BE%D1%81%D0%BA%D0%BE%D0%BF&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%81%D1%82%D1%80%D0%BE%D0%B1%D0%BE%D1%81%D0%BA%D0%BE%D0%BF&op=get&p=status",
  "service": "Light",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "уф",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%83%D1%84%D1%81%D0%B2%D0%B5%D1%82&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%83%D1%84%D1%81%D0%B2%D0%B5%D1%82&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%83%D1%84%D1%81%D0%B2%D0%B5%D1%82&op=get&p=status",
  "service": "Light",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "рабочая поверхность",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B9%D0%BF%D0%BE%D0%B2%D0%B5%D1%80%D1%85%D0%BD%D0%BE%D1%81%D1%82%D1%8C%D1%8E%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B9%D0%BF%D0%BE%D0%B2%D0%B5%D1%80%D1%85%D0%BD%D0%BE%D1%81%D1%82%D1%8C%D1%8E%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%80%D0%B0%D0%B1%D0%BE%D1%87%D0%B5%D0%B9%D0%BF%D0%BE%D0%B2%D0%B5%D1%80%D1%85%D0%BD%D0%BE%D1%81%D1%82%D1%8C%D1%8E%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=get&p=status",
  "service": "Light",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "свет в коридоре",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BA%D0%BE%D1%80%D0%B8%D0%B4%D0%BE%D1%80%D0%B5&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BA%D0%BE%D1%80%D0%B8%D0%B4%D0%BE%D1%80%D0%B5&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BA%D0%BE%D1%80%D0%B8%D0%B4%D0%BE%D1%80%D0%B5&op=get&p=status",
  "service": "Light",
  "brightnessHandling": "yes",
  "brightness_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BA%D0%BE%D1%80%D0%B8%D0%B4%D0%BE%D1%80%D0%B5&op=set&p=levelpercent&value=%b",
  "brightnesslvl_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BA%D0%BE%D1%80%D0%B8%D0%B4%D0%BE%D1%80%D0%B5&op=get&p=levelpercent",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "свет в прихожей",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BF%D1%80%D0%B8%D1%85%D0%BE%D0%B6%D0%B5%D0%B9&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BF%D1%80%D0%B8%D1%85%D0%BE%D0%B6%D0%B5%D0%B9&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BF%D1%80%D0%B8%D1%85%D0%BE%D0%B6%D0%B5%D0%B9&op=get&p=status",
  "service": "Light",
  "brightnessHandling": "yes",
  "brightness_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BF%D1%80%D0%B8%D1%85%D0%BE%D0%B6%D0%B5%D0%B9&op=set&p=levelpercent&value=%b",
  "brightnesslvl_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%B2%D0%BF%D1%80%D0%B8%D1%85%D0%BE%D0%B6%D0%B5%D0%B9&op=get&p=levelpercent",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
  "accessory": "Http",
  "name": "свет над столом",
  "switchHandling": "realtime",
  "http_method": "GET",
  "on_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%81%D1%82%D0%BE%D0%BB%D0%BE%D0%BC%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=m&m=turnOn&",
  "off_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%81%D1%82%D0%BE%D0%BB%D0%BE%D0%BC%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=m&m=turnOff&",
  "status_url": "http://192.168.0.26:80/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%81%D1%82%D0%BE%D0%BB%D0%BE%D0%BC%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=get&p=status",
  "service": "Light",
  "brightnessHandling": "yes",
  "brightness_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%81%D1%82%D0%BE%D0%BB%D0%BE%D0%BC%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=set&p=levelpercent&value=%b",
  "brightnesslvl_url": "http://192.168.0.26/objects/?object=%D1%81%D0%B2%D0%B5%D1%82%D0%BD%D0%B0%D0%B4%D1%81%D1%82%D0%BE%D0%BB%D0%BE%D0%BC%D0%BD%D0%B0%D0%BA%D1%83%D1%85%D0%BD%D0%B5&op=get&p=levelpercent",
  "sendimmediately": "",
  "username": "",
  "password": ""
},
{
    "accessory": "HttpTemperature",
    "name": "температура",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%91%D0%B0%D0%BB%D0%BA%D0%BE%D0%BD&op=get&p=Temperature",
    "http_method": "GET"
},
{
    "accessory": "HttpHumidity",
    "name": "влажность",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%91%D0%B0%D0%BB%D0%BA%D0%BE%D0%BD&op=get&p=Humidity",
    "http_method": "GET"
},
{
    "accessory": "HttpTemperature",
    "name": "температура спальня",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%A1%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8F&op=get&p=Temperature",
    "http_method": "GET"
},
{
    "accessory": "HttpHumidity",
    "name": "влажность спальня",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%A1%D0%BF%D0%B0%D0%BB%D1%8C%D0%BD%D1%8F&op=get&p=Humidity",
    "http_method": "GET"
},
{
    "accessory": "HttpTemperature",
    "name": "температура ванная",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%92%D0%B0%D0%BD%D0%BD%D0%B0%D1%8F&op=get&p=Temperature",
    "http_method": "GET"
},
{
    "accessory": "HttpHumidity",
    "name": "влажность ванная",
    "url": "http://192.168.0.26/objects/json.php?object=%D0%92%D0%B0%D0%BD%D0%BD%D0%B0%D1%8F&op=get&p=Humidity",
    "http_method": "GET"
}

], "platforms": [ { "platform": "Camera-ffmpeg", "cameras": [ { "name": "балкон", "videoConfig": { "source": "-re -i http://192.168.0.40/videostream.cgi?user=admin&password=XXX -vf hflip", "stillImageSource": "-i http://192.168.0.40/videostream.cgi?user=admin&password=XXX -vf hflip", "maxStreams": 2, "maxWidth": 640, "maxHeight": 480, "maxFPS": 15 } }, { "name": "прихожая", "videoConfig": { "source": "-re -i http://192.168.0.28/videostream.cgi?user=admin&password=XXX -vf hflip", "stillImageSource": "-i http://192.168.0.28/videostream.cgi?user=admin&password=XXX -vf hflip", "maxStreams": 2, "maxWidth": 640, "maxHeight": 480, "maxFPS": 15 } }, { "name": "парковка задний двор", "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://192.168.0.116:554/user=admin&password=XXX&channel=4&stream=0.sdp?real_stream", "maxStreams": 2, "maxWidth": 640, "maxHeight": 480, "maxFPS": 15 } },

{
  "name": "лестница",
  "videoConfig": {
    "source": "-rtsp_transport tcp -re -i rtsp://192.168.0.116:554/user=admin&password=XXX&channel=6&stream=0.sdp?real_stream",
    "maxStreams": 2,
    "maxWidth": 640,
    "maxHeight": 480,
    "maxFPS": 15
  }
},

{
  "name": "парковка",
  "videoConfig": {
    "source": "-rtsp_transport tcp -re -i rtsp://192.168.0.116:554/user=admin&password=XXX&channel=9&stream=0.sdp?real_stream",
    "maxStreams": 2,
    "maxWidth": 640,
    "maxHeight": 480,
    "maxFPS": 15
  }
}

] },

  {"platform": "Video-doorbell",

"cameras": [ { "name": "domofon", "port": 5005, "button": true, "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://192.168.0.116:554/user=admin&password=XXX&channel=7&stream=0.sdp?real_stream", "stillImageSource": "", "maxWidth": 1280, "maxHeight": 720, "maxFPS": 30 } } ] }

]

}

toshibochan commented 5 years ago

You need configure "stillImageSource"

sevatrofimov commented 5 years ago

I already did it without results. Configured jpeg showing sometime instead of video. Part of config with stillImageSource is below:

{"platform": "Video-doorbell", "cameras": [ { "name": "domofon", "port": 5005, "button": true, "videoConfig": { "source": "-rtsp_transport tcp -re -i rtsp://192.168.0.116:554/user=admin&password=XXX&channel=7&stream=0.sdp?real_stream", "stillImageSource": "-i http://192.168.0.25/fotocoll/s_741758.jpg", "maxWidth": 1280, "maxHeight": 720, "maxFPS": 30 } } ] }

roe1974 commented 5 years ago

Same here ..... i have : [Videodoorbel] Video-doorbell Eingangster rang !

but no notification in iOS ?!?!?! ... but that has worked before !??!?!

something changed in the plug-in ?

Richard

Samfox2 commented 5 years ago

Could you please update your version to 0.2.0 and check again?

roe1974 commented 5 years ago

works now again ... thx !!!!! richard

Samfox2 commented 5 years ago

Good to hear...