Giter Club home page Giter Club logo

Comments (11)

Kane610 avatar Kane610 commented on June 24, 2024 1

Just an FYI Im gonna implement PTZ support shortly

from axis.

Kane610 avatar Kane610 commented on June 24, 2024

Sorry, no documentation. Closest is to look at the tests or the home assistant implementation right now.

Everything that is needed is referenced here https://github.com/home-assistant/home-assistant/blob/eb912be47a2c9d032dbf9a84751c77d4896fa8b3/homeassistant/components/axis/device.py#L68

Abbreviated you can do it with

device = axis.AxisDevice(
        loop=hass.loop, host=config[CONF_HOST],
        username=config[CONF_USERNAME],
        password=config[CONF_PASSWORD],
        port=config[CONF_PORT], web_proto='http')

and

device.start()

from axis.

dturton avatar dturton commented on June 24, 2024

from axis.

Kane610 avatar Kane610 commented on June 24, 2024

Hey!

Updated the main function so you can get quite far with that now 👍

https://github.com/Kane610/axis/blob/master/axis/__main__.py

from axis.

dturton avatar dturton commented on June 24, 2024

Thank you!

from axis.

dturton avatar dturton commented on June 24, 2024

Hi, I am getting an error -- Bad Request any idea what I am doing wrong?

Received data ['RTSP/1.0 400 Bad Request', 'CSeq: 1', 'Server: GStreamer RTSP server', 'Date: Tue, 04 Jun 2019 12:09:48 GMT', ''] from 192.168.1.102 192.168.1.102 RTSP 400 Bad RTSP session (192.168.1.102) state starting DESCRIBE rtsp://192.168.1.102/axis-media/media.amp?video=0&audio=0&event=off RTSP/1.0 CSeq: 1 User-Agent: HASS Axis Accept: application/sdp

from axis.

Kane610 avatar Kane610 commented on June 24, 2024

Hmm. Could be that you do a rtsp request that doesn't want any content

from axis.

dturton avatar dturton commented on June 24, 2024

this is my code. I am not a Python dev so I might have an error?

import asyncio
import axis
import logging

from axis import AxisDevice


async def main():
    loop = asyncio.get_event_loop()
    device = AxisDevice(
        loop=loop, host="192.168.1.102", username="user",
        password="pass", port=80)

    device.start()

    try:
        while True:
            await asyncio.sleep(1)

    except KeyboardInterrupt:
        pass

    finally:
        device.stop()


logging.basicConfig(format='%(message)s', level=logging.DEBUG)
asyncio.run(main())

from axis.

Kane610 avatar Kane610 commented on June 24, 2024

Sorry, I had removed one line for some reason... It is fixed now

from axis.

wiseman avatar wiseman commented on June 24, 2024

Do you have any examples of moving (panning or tilting) the camera?

from axis.

Kane610 avatar Kane610 commented on June 24, 2024

No. There is no ptz support in this library yet

from axis.

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.