kidney wrote:...Also do you need a cloud sub for this to work?
No.
kidney wrote:...Also do you need a cloud sub for this to work?
HTTPd Debug AuthHandler: GET from 10.0.1.6:56758 for /setvar?doorbird=pressed
HTTPd Debug AuthHandler: Request has no Authorization header
kidney wrote:ok because, I'm always getting this error message "Basic Authentication Required" when I try the first instruction and the log show this also
- Code: Select all
HTTPd Debug AuthHandler: GET from 10.0.1.6:56758 for /setvar?doorbird=pressed
HTTPd Debug AuthHandler: Request has no Authorization header
http://192.168.1.2:18009/motionsensor
# by Karl Wachs
# July 16
# modified for DoorBird by NeilK
# Minor changes and edits by Berkinet
##
import os
import indigo # just to supress lint errors
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
PORT = 18009 # port number to be used by DoorBird on IndigoServer to GET url's defined in the API
actionMotion = xxxxx # ID of Action Group to run when DoorBird motion sensor is triggered
actionOpen = xxxxx # ID of Action Group to run when the open button in the app is pressed
actionBell = xxxxx # ID of Action Group to run on the Doorbell rings.
# See DoorBird API at www.doorbird.com/api to set the URL to get based on the action for /motion.html , /doorbell.html , /button.html
# For example: http://192.168.1.10/bha-api/notification.cgi?url=http://192.168.1.2:18009/motionsensor&user=&password=&event=motionsensor&subscribe=1
class S(BaseHTTPRequestHandler):
def _set_headers(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
def do_GET(self):
self._set_headers()
self.wfile.write("<html><body><h1>Indigo DoorBird Forwarding</h1>"+str(self.path)+"</body>")
if self.path == "/motionsensor":
indigo.server.log("DoorBird sent motion command", type="DoorBird")
indigo.actionGroup.execute(actionMotion)
if self.path == "/dooropen":
indigo.server.log("DoorBird sent Button command", type="DoorBird")
indigo.actionGroup.execute(actionOpen)
if self.path == "/doorbell":
indigo.server.log("DoorBird sent doorbell command", type="DoorBird")
indigo.actionGroup.execute(actionBell)
def do_HEAD(self):
self._set_headers()
def do_POST(self):
# Doesn't do anything with posted data
self._set_headers()
self.wfile.write("<html><body><h1>POST!</h1></body></html>")
def run(server_class=HTTPServer, handler_class=S, port=PORT):
server_address = ('', port)
httpd = server_class(server_address, handler_class)
indigo.server.log("Starting DoorBird httpd..."+"Port...."+str(PORT), type="DoorBird")
httpd.serve_forever()
if __name__ == "__main__":
myPID = str(os.getpid())
indigo.server.log("PID of DoorBird server is:" + myPID, type="DoorBird")
run()
tazswe wrote:A nice feature would be that a webpage with livestream would open up on my TV when somebody pressed the button and closed again after a minute or when I opened the door.
To do this I’m in need of a small python script that opened up a webpage with a long livestream. Anybody that can help me with that....
Different Computers wrote:**IF** you've...
actionMotion = xxxxx # ID of Action Group to run when DoorBird motion sensor is triggered
http://192.168.1.100:8000/live?cameraNum=1&viewMethod=0&imageSize=0&windowWidth=1647&windowHeight=1116&42355
mat wrote:OR, you could just answer the door when the bell rings and see who it is
mat wrote:Well, in a single family home, perhaps that might work, and then again maybe not for a number of reasons (ever had an Amazon delivery while you are in the bathroom?). But, in a multi-family dwelling or in case of a remote entry, like a gate, it can be quite useful to have the remote ability even while you are at home.OR, you could just answer the door when the bell rings and see who it is
Users browsing this forum: No registered users and 18 guests