GithubHelp home page GithubHelp logo

Comments (13)

bropat avatar bropat commented on May 26, 2024 3

Job still taking most of my time

Yeah, I know what you mean πŸ˜…

Currently working on tests for the initial cut of eufy-security-ws-python, then can start working on the Home Assistant integration.

Awesome πŸ‘

from eufy-security-ws.

bachya avatar bachya commented on May 26, 2024 2

@bropat Great! Will check it out shortly.

Making good progress on eufy-security-ws-python – haven't had much time these days due to work, but overall, looking good. Having the enumerated values and the type property should help me wrap that library up soon!

from eufy-security-ws.

bachya avatar bachya commented on May 26, 2024 1

@bropat Awesome! Looking forward to checking it out.

All good here! Job still taking most of my time, but I'm chipping away. Currently working on tests for the initial cut of eufy-security-ws-python, then can start working on the Home Assistant integration.οΏΌ

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024 1

@bachya

While I'm here, confirming that the stream does have to be explicitly activated before viewing?

Yes, with device.start_livestream.

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

You are right. I would say we are working our way up step by step. Of course, I can pass on the device type "translated" to you.
Which functionality the respective device offers could also be useful, even if this part is already indirectly communicated by the properties.
Can you think of anything else? So I can include it directly in the next release ;)

PS: Today and tomorrow I'm at a conference, so I won't get to it before tomorrow evening.

from eufy-security-ws.

bachya avatar bachya commented on May 26, 2024

I don't think we need to be too exuberant early on – the primary things I would value at this point:

  • The device type (Indoor Camera, Doorbell, etc.)
  • Enums for any int values (e.g., rather than me maintaining my own mapping of GuardModes, it'd be great if the socket could just pass me a string value [Home, etc.])

I recommend we start there and see how far that gets us.

No rush – enjoy your conference!

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

The device type (Indoor Camera, Doorbell, etc.)

I will add

Enums for any int values (e.g., rather than me maintaining my own mapping of GuardModes, it'd be great if the socket could just pass me a string value [Home, etc.])

Have you seen the method station.get_properties_metadata (or device.get_properties_metadata)? It already provides you with this information:

Example output station.get_properties_metadata (T8010):

{
  type: 'result',
  success: true,
  messageId: 'get_properties_metadata',
  result: {
    properties: {
      name: {
        key: 'station_name',
        name: 'name',
        label: 'Name',
        readable: true,
        writeable: false,
        type: 'string'
      },
      model: {
        key: 'station_model',
        name: 'model',
        label: 'Model',
        readable: true,
        writeable: false,
        type: 'string'
      },
      serialNumber: {
        key: 'station_sn',
        name: 'serialNumber',
        label: 'Serial number',
        readable: true,
        writeable: false,
        type: 'string'
      },
      hardwareVersion: {
        key: 'main_hw_version',
        name: 'hardwareVersion',
        label: 'Hardware version',
        readable: true,
        writeable: false,
        type: 'string'
      },
      softwareVersion: {
        key: 'main_sw_version',
        name: 'softwareVersion',
        label: 'Software version',
        readable: true,
        writeable: false,
        type: 'string'
      },
      lanIpAddress: {
        key: 1176,
        name: 'lanIpAddress',
        label: 'LAN IP Address',
        readable: true,
        writeable: false,
        type: 'string'
      },
      macAddress: {
        key: 'wifi_mac',
        name: 'macAddress',
        label: 'MAC Address',
        readable: true,
        writeable: false,
        type: 'string'
      },
      guardMode: {
        key: 1224,
        name: 'guardMode',
        label: 'Guard Mode',
        readable: true,
        writeable: true,
        type: 'number',
        states: {
          '0': 'AWAY',
          '1': 'HOME',
          '2': 'SCHEDULE',
          '3': 'CUSTOM1',
          '4': 'CUSTOM2',
          '5': 'CUSTOM3',
          '6': 'OFF',
          '47': 'GEO',
          '63': 'DISARMED'
        }
      },
      currentMode: {
        key: 1151,
        name: 'currentMode',
        label: 'Current Mode',
        readable: true,
        writeable: false,
        type: 'number',
        states: {
          '0': 'AWAY',
          '1': 'HOME',
          '63': 'DISARMED'
        }
      }
    }
  }
}

Example output device.get_properties_metadata (T8114):

{
  type: 'result',
  success: true,
  messageId: 'get_properties_metadata',
  result: {
    properties: {
      name: {
        key: 'device_name',
        name: 'name',
        label: 'Name',
        readable: true,
        writeable: false,
        type: 'string'
      },
      model: {
        key: 'device_model',
        name: 'model',
        label: 'Model',
        readable: true,
        writeable: false,
        type: 'string'
      },
      serialNumber: {
        key: 'device_sn',
        name: 'serialNumber',
        label: 'Serial number',
        readable: true,
        writeable: false,
        type: 'string'
      },
      hardwareVersion: {
        key: 'main_hw_version',
        name: 'hardwareVersion',
        label: 'Hardware version',
        readable: true,
        writeable: false,
        type: 'string'
      },
      softwareVersion: {
        key: 'main_sw_version',
        name: 'softwareVersion',
        label: 'Software version',
        readable: true,
        writeable: false,
        type: 'string'
      },
      stationSerialNumber: {
        key: 'station_sn',
        name: 'stationSerialNumber',
        label: 'Station serial number',
        readable: true,
        writeable: false,
        type: 'string'
      },
      battery: {
        key: 1101,
        name: 'battery',
        label: 'Battery percentage',
        readable: true,
        writeable: false,
        type: 'number',
        unit: '%',
        min: 0,
        max: 100
      },
      batteryTemperature: {
        key: 1138,
        name: 'batteryTemperature',
        label: 'Battery Temperature',
        readable: true,
        writeable: false,
        type: 'number',
        unit: 'Β°C'
      },
      wifiRSSI: {
        key: 1142,
        name: 'wifiRSSI',
        label: 'Wifi RSSI',
        readable: true,
        writeable: false,
        type: 'number',
        unit: 'dBm'
      },
      enabled: {
        key: 99904,
        name: 'enabled',
        label: 'Camera enabled',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      antitheftDetection: {
        key: 1015,
        name: 'antitheftDetection',
        label: 'Antitheft Detection',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      autoNightvision: {
        key: 1013,
        name: 'autoNightvision',
        label: 'Auto Nightvision',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      statusLed: {
        key: 1045,
        name: 'statusLed',
        label: 'Status LED',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      motionDetection: {
        key: 1011,
        name: 'motionDetection',
        label: 'Motion Detection',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      rtspStream: {
        key: 1145,
        name: 'rtspStream',
        label: 'RTSP Stream',
        readable: true,
        writeable: true,
        type: 'boolean'
      },
      watermark: {
        key: 1214,
        name: 'watermark',
        label: 'Watermark',
        readable: true,
        writeable: true,
        type: 'number',
        states: {
          '0': 'OFF',
          '1': 'TIMESTAMP',
          '2': 'TIMESTAMP_AND_LOGO'
        }
      },
      state: {
        key: 1131,
        name: 'state',
        label: 'State',
        readable: true,
        writeable: false,
        type: 'number',
        states: {
          '0': 'OFFLINE',
          '1': 'ONLINE',
          '2': 'MANUALLY_DISABLED',
          '3': 'OFFLINE_LOWBAT',
          '4': 'REMOVE_AND_READD',
          '5': 'RESET_AND_READD'
        }
      },
      lastChargingDays: {
        key: 'charging_days',
        name: 'lastChargingDays',
        label: 'Days since last charging',
        readable: true,
        writeable: false,
        type: 'number'
      },
      lastChargingFalseEvents: {
        key: 'charging_missing',
        name: 'lastChargingFalseEvents',
        label: 'False Events since last charging',
        readable: true,
        writeable: false,
        type: 'number'
      },
      lastChargingRecordedEvents: {
        key: 'charging_reserve',
        name: 'lastChargingRecordedEvents',
        label: 'Total Events since last charging',
        readable: true,
        writeable: false,
        type: 'number'
      },
      lastChargingTotalEvents: {
        key: 'charing_total',
        name: 'lastChargingTotalEvents',
        label: 'Total Events since last charging',
        readable: true,
        writeable: false,
        type: 'number'
      },
      batteryUsageLastWeek: {
        key: 'battery_usage_last_week',
        name: 'batteryUsageLastWeek',
        label: 'False Events since last charging',
        readable: true,
        writeable: false,
        type: 'number',
        unit: '%',
        min: 0,
        max: 100
      },
      motionDetected: {
        key: 'custom_motionDetected',
        name: 'motionDetected',
        label: 'Motion detected',
        readable: true,
        writeable: false,
        type: 'boolean'
      },
      personDetected: {
        key: 'custom_personDetected',
        name: 'personDetected',
        label: 'Person detected',
        readable: true,
        writeable: false,
        type: 'boolean'
      },
      pictureUrl: {
        key: 'cover_path',
        name: 'pictureUrl',
        label: 'Last Camera Picture URL',
        readable: true,
        writeable: false,
        type: 'string'
      }
    }
  }
}

Let me know if this will do. ;)

from eufy-security-ws.

bachya avatar bachya commented on May 26, 2024

@bropat Didn't know that device.get_properties_metadata has those enumerated values! Is there a way to expand these using client.ts? I see this:

eufy-security> station.get_properties <SERIAL>
eufy-security> {
  type: 'result',
  success: true,
  messageId: 'get_properties',
  result: {
    properties: {
      name: [Object],
      model: [Object],
      serialNumber: [Object],
      hardwareVersion: [Object],
      softwareVersion: [Object],
      macAddress: [Object],
      lanIpAddress: [Object],
      guardMode: [Object],
      currentMode: [Object]
    }
  }
}

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

@bachya Yes, of course. Start client.ts with the option -v or --verbose.

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

@bachya

Released the new version 0.1.2 which includes the new type property for device and station.

How far along are you? :)

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

@bachya

Good news, I have now added livestream support via P2P ;)
Let me know if something is not clear.

Everything ok on your side? :)

from eufy-security-ws.

bropat avatar bropat commented on May 26, 2024

@bachya

Before I forget, I implemented another gimmick:

A live stream can be viewed by multiple clients at the same time (the 1st client starts the stream, every other one that starts the stream of the same device registers only to receive the already running stream; when one client stops the stream, it is stopped for all of them).

from eufy-security-ws.

bachya avatar bachya commented on May 26, 2024

@bropat Got it! Makes sense. While I'm here, confirming that the stream does have to be explicitly activated before viewing?

from eufy-security-ws.

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.