Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access additional properties not defined the SDK? #42

Open
KHouse75 opened this issue Jan 5, 2023 · 2 comments
Open

Access additional properties not defined the SDK? #42

KHouse75 opened this issue Jan 5, 2023 · 2 comments

Comments

@KHouse75
Copy link

KHouse75 commented Jan 5, 2023

I recently purchased an "AI Ultra 2-in-1 Robot Self-Empty XL" model RV2610WA. It has a mop attachment as well as the self emptying bin. There are several properties I'd like to be able to access, specifically through Home Assistant but I haven't been able to do so without modifying the SharkIQ SDK to include them. I modified the SDK to expose the properties but these get lost when installing HA upgrades.

Is it possible to access these additional properties without modifying the HA Integrated SharkIQ SDK? For example, I'd like to include WaterTankInstalled, Water_Tank_Empty, Charging_Status, CleanComplete, Evacuate_Resume and possibly others.

Here's a full is of what's returned from the cloud when I dump the full properties:

[
  "Ack_Response",
  "AreasToClean_V2",
  "Areas_To_Clean",
  "Battery_Capacity",
  "Battery_Serial_Num",
  "Build_Factory",
  "CRCount",
  "CRVote",
  "Charging_Status",
  "CleanComplete",
  "CleanRoomCommand",
  "Cleaning_Statistics",
  "ContinueClean",
  "DND_Time_Control",
  "DND_Time_Setting",
  "Default_Floor",
  "Default_Flow_Mode",
  "Default_Power_Mode",
  "Default_Wet_Power_Mode",
  "DeleteMaps",
  "DeviceTopicKey",
  "Device_Model_Number",
  "Device_Serial_Num",
  "DockedStatus",
  "EnableViperTunnel",
  "Enable_JSON_Data_Log",
  "Enable_RT_Log",
  "Enable_RT_Map",
  "Error_Code",
  "Evacuate_Resume",
  "Evacuating",
  "Exec_Command",
  "Exec_Response",
  "ExploreStatus",
  "Extended_Error_Code",
  "FanJetControl",
  "FanJetSetting",
  "Find_Device",
  "Flow_Mode",
  "HardwareConfigNav",
  "HardwareConfigSCM",
  "JSON_Data_Log",
  "LocalizationStatus",
  "LowLightMission",
  "Main_PCB_BL_Version",
  "Main_PCB_FW_Version",
  "Main_PCB_HW_Version",
  "MapReviewStatus",
  "MissionComplete",
  "Mobile_App_Room_Definition",
  "Module_Debug",
  "Module_debug",
  "Nav_Module_App_Version",
  "Nav_Module_BL_Version",
  "Nav_Module_FW_Version",
  "Nav_Module_HW_Version",
  "OTA_FW_VERSION",
  "OTA_Progress",
  "Operating_Mode",
  "Operational_Error_Log",
  "PMLock",
  "PMLocked",
  "PMVote",
  "PbFloor_Confidence",
  "Persistent_Floor_1",
  "Persistent_Floor_2",
  "Persistent_Floor_3",
  "Power_Mode",
  "Quiet_Time",
  "RSSI",
  "RTMapPeriod",
  "RTMapSendUntil",
  "Recharge_Resume",
  "Recharge_Resume_V2",
  "RechargingToResume",
  "RecommendRandR",
  "ReplaceBattery",
  "ReportPeriodDock",
  "ReportPeriodUndocked",
  "ResetRunTimeCumulative",
  "Reset_Factory_Defaults",
  "Reset_WiFi",
  "Robot_Firmware_Version",
  "Robot_Language_Control",
  "Robot_Language_Setting",
  "Robot_Room_List",
  "Robot_Volume_Control",
  "Robot_Volume_Setting",
  "Room_Definition",
  "RunTimeCumulative",
  "RunTimeCycle",
  "SCM_Error_Log",
  "SCM_FW_Version",
  "Send_Error_Logs",
  "Send_Map_Data",
  "SpecialCleanMode",
  "System_Error_Log",
  "Template_Version",
  "UBD_Version",
  "User_Information",
  "Visual_Floor_1",
  "Visual_Floor_2",
  "Visual_Floor_3",
  "VoiceVersion",
  "WaterTankInstalled",
  "Water_Tank_Empty",
  "WiFiModuleSerialNumber",
  "WiFi_FW_Version",
  "WiFi_HW_Version",
  "Zones"
]
@funkybunch
Copy link
Collaborator

@KHouse75 were you modifying the code in this repo? Or the code for the Shark Integration in HA?

Reason I ask is we have a few pending PRs on the HA repo. One of them is bumping the version of this repo. So if the changes were on the code in this repo we could roll this into that PR in HA for the next release.

If you could make your changes and submit a PR (to whichever repo it affects) that would be more straight forward than us trying to reverse engineer and get it working with a robot we don't have.

I'll expedite reviews for any PRs you submit.

@KHouse75
Copy link
Author

KHouse75 commented Jan 6, 2023

My python skill are lacking. I'm really only doing basic changes to expose properties as attributes for HA entities so I can create automations to take action based on those. I tested with the code in this repo and also sharkiq.py from the python package in HA. In both, I just added the additional properties that my robot has under the following

@enum.unique
class Properties(enum.Enum):

I then created a custom component using the HA sharkiq repo code and modified it to add the additional properties as attributes for my vacuum under extra_state_attributes. I then just pulled the modified SharkIQ SDK under the custom component and modified the code to point to it instead of the python package in HA.

I'm not familiar enough with python or the inner working of HA to know how to do much more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants