-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from RobertD502/dev
Add support for Pura MAX, set base_url according to account region, add ServerError Exception
- Loading branch information
Showing
8 changed files
with
721 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
#### Event Type 5: clean_over #### | ||
|
||
Result 0: { | ||
start_reason 0: 'Auto cleaning completed.' | ||
start_reason 1: Periodic cleaning completed. | ||
start_reason 2: 'Manual cleaning completed.' | ||
start_reason 3: 'Manual cleaning completed.' | ||
} | ||
|
||
Result 1: { | ||
start_reason 0: Automatic cleaning terminated | ||
start_reason 1: Periodic cleaning terminated | ||
start_reason 2: Manual cleaning terminated | ||
start_reason 3: Manual cleaning terminated | ||
} | ||
|
||
Result 2: { | ||
start_reason 0: { | ||
error = "full": Automatic cleaning failed, waste collection bin is full, please empty promptly. | ||
error = "hallT": Automatic cleaning failure, the litter box's upper cupper cover is not placed properly, please check. | ||
error = "falldown": Automatic cleaning failure, the litter box has been knocked down, please check. | ||
all else = "Automatic cleaning failure, device malfunction, please check." | ||
} | ||
start_reason 1: { | ||
error = "full": Scheduled cleaning failed, waste collection bin is full, please empty promptly. | ||
error = "hallT": Scheduled cleaning failure, the litter box\'s upper cupper cover is not placed properly, please check. | ||
error = "falldown": Scheduled cleaning failure, the litter box has been knocked down, please check. | ||
all else = "Scheduled cleaning failure, device malfunction, please check." | ||
} | ||
start_reason 2/3: { | ||
error = "full": Manual cleaning failed, waste collection bin is full, please empty promptly | ||
error = "hallT": Manual cleaning failure, the litter box\'s upper cupper cover is not placed properly, please check. | ||
error = "falldown": Manual cleaning failure, the litter box has been knocked down, please check. | ||
all else = "Manual cleaning failure, device malfunction, please check." | ||
} | ||
} | ||
|
||
Result 3: { | ||
start_reason 0: Automatic cleaning cancelled, device in operation. | ||
start_reason 1: Periodic cleaning cancelled, device in operation. | ||
start_reason 2: Manual cleaning cancelled, device in operation. | ||
start_reason 3: Manual cleaning cancelled, device in operation. | ||
} | ||
|
||
Result 4: { | ||
start_reason 0: Automatic cleaning failed, waste collection bin is full, please empty promptly. | ||
start_reason 1: Scheduled cleaning failed, waste collection bin is full, please empty promptly. | ||
start_reason 2/3: Manual cleaning failed, waste collection bin is full, please empty promptly. | ||
} | ||
|
||
Result 5: { | ||
start_reason 0: Automatic cleaning failed, the device is in maintenance mode | ||
start_reason 1: Periodically cleaning failed, the device is in maintenance mode | ||
} | ||
|
||
Result 7: { | ||
start_reason 0: Kitten mode is enabled, auto cleaning is canceled | ||
start_reason 1: Kitten mode is enabled, periodically cleaning is canceled | ||
|
||
|
||
|
||
|
||
#### Event Type 6: dumping_over #### | ||
|
||
Result 0: { | ||
Cat litter empty completed | ||
} | ||
|
||
Result 1: { | ||
Cat litter empty terminated | ||
} | ||
|
||
Result 2: { | ||
error = "full": Cat litter empty failed, waste collection bin is full, please empty promptly. | ||
error = "hallT": Cat litter empty failure, the litter box\'s cupper cover is not placed properly, please check. | ||
error = "falldown": Cat litter empty failure, the litter box has been knocked down, please check. | ||
all else = Cat litter empty failure, device malfunction, please check. | ||
} | ||
|
||
|
||
#### Event Type 7: reset_over #### | ||
|
||
Result 0: { | ||
Device reset completed | ||
} | ||
|
||
Result 1: { | ||
Device reset terminated | ||
} | ||
|
||
Result 2: { | ||
error = "full": Device reset failed, waste collection bin is full, please empty promptly. | ||
error = "hallT": Device reset failure, the litter box\'s cupper cover is not placed properly, please check. | ||
error = "falldown": Device reset failure, the litter box has been knocked down, please check. | ||
all else: Device reset failure, device malfunction, please check. | ||
} | ||
|
||
Result 5: { | ||
Maintenance Mode | ||
} | ||
|
||
|
||
#### Event Type 8: spray_over #### | ||
|
||
Result 0: { | ||
reason 0: Deodorant FINISHED | ||
reason 1: Periodic odor removal completed | ||
reason 2/3: Manual odor removal completed | ||
} | ||
|
||
Result 2: { | ||
reason 0: Automatic odor removal failed, odor eliminator error | ||
reason 1: Periodic odor removal failure, odor eliminator malfunction. | ||
reason 2/3: Manual odor removal failure, odor eliminator malfunction. | ||
} | ||
|
||
Result 1: { | ||
reason 0: Automatic odor removal has been terminated. | ||
reason 1: Periodic odor removal terminated. | ||
reason 2/3: Manual odor removal terminated. | ||
} | ||
|
||
Result 4: { | ||
reason 0: Automatic odor removal has been cancelled, the device is running. | ||
reason 1: Periodic odor removal canceled. Litter Box is working. | ||
reason 2/3: Manual odor removal canceled. Litter Box is working. | ||
} | ||
|
||
Result 5: { | ||
reason 0: Automatic odor removal failed, no smart spray is connected. | ||
reason 1: Periodic odor removal failed. Odor Removal Device disconnected. | ||
reason 2/3: Manual odor removal failed. Odor Removal Device disconnected. | ||
} | ||
|
||
Result 6: { | ||
reason 0: Automatic odor removal failed, please confirm that the battery of smart spray is sufficient. | ||
reason 1: Periodic odor removal failed. Please make sure the Odor Removal Device has sufficient battery. | ||
reason 2/3: Manual odor removal failed. Please make sure the Odor Removal Device has sufficient battery. | ||
} | ||
|
||
Result 7: { | ||
reason 0: Automatic odor removal failed, battery is low | ||
reason 1: Periodic odor removal failed. Odor Removal Device battery low. | ||
reason 2/3: Manual odor removal failed. Odor Removal Device battery low. | ||
} | ||
|
||
Result 8: { | ||
reason 0: Deodorant FINISHED | ||
reason 1: Periodic odor removal completed | ||
reason 2/3: Manual odor removal completed | ||
} | ||
|
||
Result 9: { | ||
Your cat is using the litter box, deodorization has been canceled | ||
} | ||
|
||
|
||
#### Event Type 10: pet_out #### | ||
|
||
There are no result and reason for this one....list the pet name and weight instead | ||
|
||
|
||
|
||
#### Event Type 17: light_over | ||
|
||
if content key is None: | ||
"The light is ON" | ||
else: | ||
|
||
Result 0: { | ||
The light is ON | ||
} | ||
|
||
Result 1: { | ||
The light is on. There is no need to turn on again. | ||
} | ||
|
||
Result 2: { | ||
Failing to turn on the light. Device malfunction, please check. | ||
} | ||
|
||
Result 5: { | ||
Failing to turn on the light. Please bind the odor removal device first. | ||
} | ||
|
||
Result 6: { | ||
Failing to turn on the light. Please check the battery capacity of the odor removal device. | ||
} | ||
|
||
Result 7: { | ||
Failing to turn on the light. Low battery capacity of odor removal device. | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
## workMode 9: Maintenance Mode | ||
workProcess of 10 = start maintenance mode | ||
workProcess of 30 = end maintenance mode | ||
If end maintenance mode is pause: | ||
workProcess will change from 30 to 40 | ||
If then you resume ending maintenance mode: | ||
workProcess will change from 40 to 30 | ||
|
||
|
||
// Disregard | ||
if current work process / 10 = 3 --> pause maintenance and set workProcess of 40; else set workProcess to 20 | ||
if current work process / 10 = 4 --> re-end maintenance mode and set workProcess to 30; else set workProcess to 10 | ||
// Disregard | ||
|
||
|
||
## workMode 9: Maintenance Mode | ||
|
||
if workProcess / 10 == 1: | ||
"In maintenance mode" | ||
if round_down(workProcess / 10) == 2: | ||
if workProcess % 10 == 2: | ||
if safeWarn in workState: | ||
if safeWarn !=0: | ||
if safeWarn == 1: | ||
"Maintenance mode paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP. | ||
if safeWarn == 3: | ||
"Maintenance mode paused: The top cover is not installed, operation paused" | ||
else: | ||
"Maintenance mode paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Maintenance mode paused: Your cat is approaching, operation paused" | ||
else: | ||
"Maintenance mode paused: Your cat is using the device, operation paused" | ||
else: | ||
"Maintenance mode paused" | ||
if workProcess / 10 == 3: | ||
"Exiting maintenance mode" | ||
if rounded_down(workProcess / 10) == 4: | ||
if workProcess % 10 == 2: | ||
if safeWarn in workState: | ||
if safeWarn !=0: | ||
if safeWarn == 1: | ||
"Maintenance mode exiting paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP." | ||
if safeWarn == 3: | ||
"Maintenance mode exiting paused: The top cover is not installed, operation paused" | ||
else: | ||
"Maintenance mode exiting paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Maintenance mode exiting paused: Your cat is approaching, operation paused" | ||
else: | ||
"Maintenance mode exiting paused: Your cat is using the device, operation paused" | ||
else: | ||
"Maintenance mode exiting paused" | ||
|
||
|
||
|
||
## workMode 0: Start Cleaning | ||
|
||
if workProcess / 10 == 1: | ||
"Cleaning litter box" | ||
if rounded_down(workProcess / 10) == 2: | ||
if workProcess % 10 = 2: | ||
if safeWarn in workState: | ||
if safeWarn !=0: | ||
if safeWarn == 1: | ||
"Litter box cleaning paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP." | ||
else: | ||
"Litter box cleaning paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Litter box cleaning paused: Your cat is approaching, operation paused" | ||
else: | ||
"Litter box cleaning paused: Your cat is using the device, operation paused" | ||
else: | ||
"Litter box cleaning paused" | ||
if workProcess / 10 == 3: | ||
"Resetting device" | ||
if rounded_down(workProcess / 10) == 4: | ||
if workProcess % 10 == 2: | ||
if safeWarn in workState: | ||
if safeWarn != 0: | ||
if safeWarn == 1: | ||
"Litter box paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP." | ||
else: | ||
"Litter box paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Litter box paused: Your cat is approaching, operation paused" | ||
else: | ||
"Litter box paused: Your cat is using the device, operation paused" | ||
else: | ||
"Litter box paused" | ||
|
||
|
||
|
||
## workMode 1: Dump Cat litter | ||
|
||
if workProcess / 10 == 1: | ||
"Dumping cat litter" | ||
if rounded_down(workProcess / 10) == 2: | ||
if workProcess % 10 == 2: | ||
if safeWarn in workState: | ||
if safeWarn !=0: | ||
if safeWarn == 1: | ||
"Dumping cat litter paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP." | ||
else: | ||
"Dumping cat litter paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Dumping cat litter paused: Your cat is approaching, operation paused" | ||
else: | ||
"Dumping cat litter paused: Your cat is using the device, operation paused" | ||
else: | ||
"Dumping cat litter paused" | ||
if workProcess % 10 = 3: | ||
"Resetting device" | ||
if rounded_down(workProcess / 10) == 4: | ||
if workProcess % 10 = 2: | ||
if safeWarn in workState: | ||
if safeWarn != 0: | ||
if safeWarn == 1: | ||
"Litter box paused: Pet entered while in operation, anti-pinch sensors activated, device stopped working. Please check the device ASAP." | ||
else: | ||
"Litter box paused: System error, operation paused" | ||
if safeWarn == 0: | ||
if petInTime == 0: | ||
"Litter box paused: Your cat is approaching, operation paused" | ||
else: | ||
"Litter box paused: Your cat is using the device, operation paused" | ||
else: | ||
"Litter box paused" | ||
|
||
|
||
|
||
## workMode 3: Dump Cat litter | ||
"Resetting" | ||
|
||
|
||
## workMode 4: Leveling cat litter | ||
"Leveling cat litter, please wait." | ||
|
||
|
||
## workMode 5: Calibrating | ||
|
||
"Calibrating litter box, please wait." | ||
|
||
|
||
if refreshState key in state: | ||
if workProcess = 1: | ||
"Odor removal in operation. Please wait." |
Oops, something went wrong.