craigjmidwinter / total-connect-client

Python Client for TotalConnect based alarm systems
MIT License
13 stars 14 forks source link

Investigate adding VX1 doorbell #216

Open austinmroczek opened 10 months ago

austinmroczek commented 10 months ago

In response to https://github.com/home-assistant/core/issues/99293

@crypticsong @sfgabe @briodan

If you'd like to help try to add support for your VX1 doorbells or other currently unsupported devices, please run the below script and post here. This script runs a bunch of API calls that may (or may not) be helpful in understanding how to interact with your device(s).

Unfortunately there is no way to call this script from within the Total Connect integration in Home Assistant. You can do it from any computer that has Python 3.7+ using a command line.

pip install total_connect_client
python -m total_connect_client.live.experimental username password
crypticsong commented 10 months ago

Will post the output in few hours

austinmroczek commented 10 months ago

The output will be long.

If you do

python -m total_connect_client.live.experimental username password > info.txt

It will go into a file you can attach here

crypticsong commented 10 months ago

Looping through locations to try random API calls Loop through devices for location 2897693 (Home) and try random API calls

GetAllRSIDeviceStatus: 2897693 ('unknown result code -15003', OrderedDict([('ResultCode', -15003), ('ResultData', 'RSI : No Device Available'), ('RSIDeviceStatus', None)]))

GetLocationAllCameraList: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SessionID', ‘XXXXXXXXXXXXXXXXX’), ('AccountAllCameraList', OrderedDict([('CameraList', None), ('RSICameraList', None), ('PartnerCameraList', OrderedDict([('NotificationFlag', 0), ('PartnerCamerasList', None)])), ('WiFiDoorbellList', None), ('MotionViewerList', None), ('DoorBellList', None), ('UnicornList', OrderedDict([('UnicornList', OrderedDict([('UnicornInfo', [OrderedDict([('DeviceID', 6485914), ('DeviceName', 'FRONT ' 'DOOR'), ('Identifier', ‘xxxxxxxxxxx’), ('DeviceType', 'home.dt.unicorn'), ('DeviceVariant', 'home.dv.doorbell'), ('ParentDeviceId', 6485747), ('LocationId', 2897693), ('Status', 'REGISTERED'), ('FirmwareVersion', None), ('PartitionId', 1), ('LockId', 222896), ('PrivacyOnDisarm', False), ('DeviceSerialNumber', ‘XXXXXXXXXX’), ('VopStatus', 'LINKED')])])]))])), ('VideoPirList', None)]))])

GetLocationAllCameraListEx: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SessionID', ‘XXXXXXXX’), ('AccountAllCameraList', OrderedDict([('CameraList', None), ('RSICameraList', None), ('PartnerCameraList', OrderedDict([('NotificationFlag', 0), ('PartnerCamerasList', None)])), ('WiFiDoorbellList', None), ('MotionViewerList', None), ('DoorBellList', None), ('UnicornList', OrderedDict([('UnicornList', OrderedDict([('UnicornInfo', [OrderedDict([('DeviceID', 6485914), ('DeviceName', 'FRONT ' 'DOOR'), ('Identifier', ‘XXXXXXX’), ('DeviceType', 'home.dt.unicorn'), ('DeviceVariant', 'home.dv.doorbell'), ('ParentDeviceId', 6485747), ('LocationId', 2897693), ('Status', 'REGISTERED'), ('FirmwareVersion', None), ('PartitionId', 1), ('LockId', 222896), ('PrivacyOnDisarm', False), ('DeviceSerialNumber', ‘XXXXXX’X), ('VopStatus', 'LINKED')])])]))])), ('VideoPirList', None)]))])

GetLocationCameraList: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SessionID', ‘XXXXXXXXXX’), ('AccountCameraList', None)])

GetPartnerCameraStatus: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('CameraStatus', OrderedDict([('rsiStatusInfo', None), ('lyricCameraStatusInfo', None), ('wifidoorbellinfo', None), ('motionViewerStatusInfo', None)]))])

GetVideoPIRLocationDeviceList: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SessionID', None), ('VideoPIRList', OrderedDict([('VideoPIRInfo', [OrderedDict([('DeviceID', 6485749), ('DeviceClassID', 6), ('MAC', ‘XXXXXXXX’), ('DeviceName', 'Built-In Camera'), ('BatteryStatus', -1), ('FirmwareAvailablity', 0), ('FirmwareDownLoad', 0), ('WifiStatus', 0), ('VideoPIREventInfo', OrderedDict([('EventID', xxxxxxxxxxx), ('ImageURL', 'https://files.alarmnet.com/videotc2/getpirimage.aspx?RequestID='), ('EventImageCount', 2), ('ImageDateTime', datetime.datetime(2023, 11, 10, 15, 30, 10)), ('ImageDateTimeUTC', datetime.datetime(2023, 11, 10, 20, 30, 10)), ('CaptureTypeID', 60003), ('ImageRequestID', ‘XXXXXXXXXXXXXXXX’), ('TMSMediaID', ‘xxxxxxxxxxxxxxx’)]))])])]))])

GetWiFiDoorBellDeviceDetails: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('getWiFiDoorBellResult', OrderedDict([('DeviceID', 0), ('DeviceModel', 0), ('TimeZoneID', 0), ('State', None), ('SetupStateID', 0), ('WiFiName', None), ('LEDColorInDevice', None), ('IsExistingDoorBellUser', 0), ('LockID', 0), ('IsMotionEnabled', 0), ('SetupErrorID', 0), ('PartnerDeviceID', None), ('PartnerDeviceName', None), ('PartitionId', 0), ('AssociationStatus', 0), ('DeviceSerialText', None), ('WiFiStrength', 0), ('PushNotificationFlag', 0), ('IsOffline', 0), ('CreatedAt', datetime.datetime(1, 1, 1, 0, 0)), ('UpdatedAt', datetime.datetime(1, 1, 1, 0, 0)), ('Avatar', None), ('FirmwareVersion', None), ('DeviceSerialNumber', None), ('IsSRTPEnabled', False), ('NeedToGetStatus', True)]))])

GetWiFiDoorBellDeviceDiagnosticDetails: 2897693 ('unknown result code -16000', OrderedDict([('ResultCode', -16000), ('ResultData', 'InvalidDeviceID'), ('wiFiDoorBellDiagnosticInfoResult', None)]))

GetWiFiDoorBellSettings: 2897693 ('unknown result code -7606', OrderedDict([('ResultCode', -7606), ('ResultData', 'Input Failure'), ('wiFiDoorBellSettings', None)]))

GetWiFiThermostatLocations: 2897693 ('unknown result code -7625', OrderedDict([('ResultCode', -7625), ('ResultData', 'Your email address or password is invalid. Please try again'), ('WiFiLocations', None)]))

GetWiFiLockLocations: 2897693 ('unknown result code -999', OrderedDict([('ResultCode', -999), ('ResultData', 'Unknown Error'), ('WiFiLocations', None)]))

GetSmartActionConfiguration: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('Configuration', OrderedDict([('MaximumSmartActions', 100), ('MaximumNameLength', 15), ('MaximumDevicesPerSmartAction', 100), ('CurrentSmartActionCount', 0), ('UnicodeNameSupport', True)]))])

GetSmartSceneConfiguration: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('Configuration', OrderedDict([('MaximumSmartScenes', 20), ('MaximumDevicesPerScene', 0), ('CurrentSmartSceneCount', 0)]))])

GetSmartSceneList: 2897693 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SmartScenes', None), ('CurrentSmartSceneCount', 0)])

GetSmartActionList: 2897693 with no array OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SmartActions', None)])

GetSmartActionList: 2897693 with empty array OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SmartActions', None)]) Device 6485747 (Security System)

GetAutomationDeviceStatus: 6485747 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 6485747 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 6485747 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetSceneList: 6485747 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SceneData', None)])

GetDeviceStatus: 6485747 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)]) Device 6485748 (Automation)

GetAutomationDeviceStatus: 6485748 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 6485748 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 6485748 ('unknown result code -12104', OrderedDict([('ResultCode', -12104), ('ResultData', 'Automation - We are unable to load your automation devices, please try again or contact your security dealer for support'), ('AutomationData', None)]))

GetSceneList: 6485748 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SceneData', None)])

GetDeviceStatus: 6485748 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)]) Device 222896 (Front Lock)

GetAutomationDeviceStatus: 222896 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 222896 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 222896 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetSceneList: 222896 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('SceneData', None)]))

GetDeviceStatus: 222896 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)]) Device 452185 (Garage Door)

GetAutomationDeviceStatus: 452185 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 452185 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 452185 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('AutomationData', None)]))

GetSceneList: 452185 ('unknown result code -4002', OrderedDict([('ResultCode', -4002), ('ResultData', 'The specified location is not valid'), ('SceneData', None)]))

GetDeviceStatus: 452185 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)]) Device 6485749 (Built-In Camera)

GetAutomationDeviceStatus: 6485749 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 6485749 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 6485749 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetSceneList: 6485749 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SceneData', None)])

GetDeviceStatus: 6485749 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)]) Device 6485914 (FRONT DOOR)

GetAutomationDeviceStatus: 6485914 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetAutomationDeviceStatusExV1: 6485914 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetAllAutomationDeviceStatusExV1: 6485914 ('unknown result code -4004', OrderedDict([('ResultCode', -4004), ('ResultData', 'The specified device id is invalid for the current context'), ('AutomationData', None)]))

GetSceneList: 6485914 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('SceneData', None)])

GetDeviceStatus: 6485914 OrderedDict([('ResultCode', 0), ('ResultData', 'Success'), ('deviceInfo', None)])

austinmroczek commented 10 months ago

Thanks. Sorry I should have put this in the code, but can you please tell me the device types for each of your devices?

"Security System" - ProA7plus ? "Automation" - ProA7plus z-wave ? "Built-In Camera" - ProA7plus camera ? "Front Lock" ? "Garage Door" ? "FRONT DOOR" VX1 ?

We can see the Front Door as a camera. However I think I'm not doing the GetDoorbell* requests quite right. I'll have to play around with that. May ask you to run this again after some updates.

crypticsong commented 10 months ago

VX1 is front door bell with Camera. Sure please let me know and will run when needed.

austinmroczek commented 10 months ago

@crypticsong please try again. You'll need to update the package first.

pip install --upgrade total_connect_client
python -m total_connect_client.live.experimental username password
austinmroczek commented 10 months ago

And please continue to provide the full response like you did before. In another thread I'm working on Garage Door functions and it appears you have one, so your data may be useful.

austinmroczek commented 5 months ago

@crypticsong please let me know if we should keep working on this, or close it out.