toreamun / victorsmartkill-homeassistant Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration for Victor Smart-Kill WI-FI electronic mouse and rat traps from VictorPest.com.
License: MIT License
Home Assistant integration for Victor Smart-Kill WI-FI electronic mouse and rat traps from VictorPest.com.
License: MIT License
Logger: homeassistant.config_entries
Source: custom_components/victorsmartkill/init.py:63
Integration: Victor Smart-Kill (documentation, issues)
First occurred: 12:57:27 AM (2 occurrences)
Last logged: 1:12:11 AM
Error setting up entry email for victorsmartkill
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/config_entries.py", line 353, in async_setup
result = await component.async_setup_entry(hass, self)
File "/home/homeassistant/.homeassistant/custom_components/victorsmartkill/init.py", line 63, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, coordinator.platforms)
AttributeError: 'ConfigEntries' object has no attribute 'async_forward_entry_setups'
Upstream seems to be stuffing a human-readable comment where a date is expected (and, you know, that date has a format)
(confirmed: no pre-existing issue)
On configuration of a new install of 2023.1.7 HA with Integration 2023.1.0, victor-smart-kill==1.1.1
Error fetching victorsmartkill data: {0: {'trapstatistics': {'last_maintenance_date': [TypeError("check_type() got an unexpected keyword argument 'argname'"), ValidationError('Not a valid datetime.')]}}}
I've confirmed credentials, they do work.
2023.1.7
2023.1.0 with "victor-smart-kill==1.1.1" in requirements
On configuration, and the authentication is accepted, the configuration integration periodically shows "Retrying setup: None" and seems to keep reconnecting. The remote service is online, as a manual connection does connect, and the App connects.
It seems to be that the fetched data is doing that old "we'll just record a human-readable comment there, because schema doesn't matter?" Yeah, I hate sloppy schema, totally blame the upstream:
..."last_maintenance_date":"No maintenance records exist."
...
'last_maintenance_date': [TypeError("check_type() got an unexpected keyword argument 'argname'"), ValidationError('Not a valid datetime.')]
I mean, hey, "No maintenance records exist", you mean that's not ISO8601? :-/ grrr
I do see that your schema is a union, so this is probably beyond what I can figure out for why the validation is enforcing a data time schema -- it's like it's choosing the date time rather than string, then detecting that it's not a string.
last_maintenance_date: Union[str, datetime]
2023-04-09 20:15:46.492 DEBUG (MainThread) [httpx._client] HTTP Request: GET https://www.victorsmartkill.com/traps/ "HTTP/1.1 200 OK"
2023-04-09 20:15:46.493 DEBUG (MainThread) [victor_smart_kill._client] Response status code 200 from GET traps/ with content: b'{"count":1,"next":null,"previous":null,"results":[{"id":123456,"url":"https://www.victorsmartkill.com/traps/123456/","corruption_status":0,"operator":null,"operator_name":null,"name":"D34dMaus","ssid":"xxx","serial_number":"xxx","auto_upgrade":false,"status":0,"location":"https://www.victorsmartkill.com/locations/128640/","lat":"xxx","long":"xxx","upgrade_firmware":null,"commercial_gateway":null,"commercial_monitor_mode_enabled":false,"lorawan_app_key":"xxx","site_name":null,"floor_plan_x":0.0,"floor_plan_y":0.0,"building_name":null,"floor_name":null,"room":null,"room_name":null,"trap_type":2,"trap_type_verbose":"Mouse Trap","alerts":260298,"trapstatistics":{"id":123456,"url":"https://www.victorsmartkill.com/trapstatistics/253002/","trap":"https://www.victorsmartkill.com/traps/123456/","trap_name":"D34dMaus","kills_present":0,"install_date":"2023-01-08T00:48:37.571164Z","owner_name":"[email protected]","owner_email":"[email protected]","last_report_date":"2023-04-09T17:26:14.758205Z","last_kill_date":"2022-12-21T09:56:42.762351Z","temperature":0,"battery_level":41,"total_kills":3,"total_escapes":null,"rx_power_level":-60,"firmware_version":"2.0.17","trap_provisioned":true,"last_sequence_number":null,"total_retreats":null,"wireless_network_rssi":-60,"error_code":0,"send_conn_lost_nt":true,"send_empty_trap_nt":false,"board_type":"WEMT","last_maintenance_date":"No maintenance records exist.","bait_level":null,"current_bait":null,"last_bait_quantity":null}}]}'
2023-04-09 20:15:46.496 DEBUG (MainThread) [custom_components.victorsmartkill] Error getting traps from Victor Smart-Kill API: ValidationError({0: {'trapstatistics': {'last_maintenance_date': [TypeError("check_type() got an unexpected keyword argument 'argname'"), ValidationError('Not a valid datetime.')]}}})
Traceback (most recent call last):
File "/volume1/@appdata/homeassistant/config/custom_components/victorsmartkill/__init__.py", line 178, in _get_traps
traps = await self._api.get_traps()
File "/volume1/@appstore/homeassistant/env/lib/python3.10/site-packages/victor_smart_kill/_api.py", line 109, in get_traps
return await self._get_list_by_schema(TrapSchema(), "traps/")
File "/volume1/@appstore/homeassistant/env/lib/python3.10/site-packages/victor_smart_kill/_api.py", line 49, in _get_list_by_schema
return schema.load(
File "/volume1/@appstore/homeassistant/env/lib/python3.10/site-packages/marshmallow_dataclass/__init__.py", line 756, in load
all_loaded = super().load(data, many=many, **kwargs)
File "/volume1/@appstore/homeassistant/env/lib/python3.10/site-packages/marshmallow/schema.py", line 722, in load
return self._do_load(
File "/volume1/@appstore/homeassistant/env/lib/python3.10/site-packages/marshmallow/schema.py", line 909, in _do_load
raise exc
marshmallow.exceptions.ValidationError: {0: {'trapstatistics': {'last_maintenance_date': [TypeError("check_type() got an unexpected keyword argument 'argname'"), ValidationError('Not a valid datetime.')]}}}
2023-04-09 20:15:46.497 ERROR (MainThread) [custom_components.victorsmartkill] Error fetching victorsmartkill data: {0: {'trapstatistics': {'last_maintenance_date': [TypeError("check_type() got an unexpected keyword argument 'argname'"), ValidationError('Not a valid datetime.')]}}}
2023-04-09 20:15:46.498 DEBUG (MainThread) [custom_components.victorsmartkill] Finished fetching victorsmartkill data in 1.384 seconds (success: False)
2023-04-09 20:15:46.498 DEBUG (MainThread) [custom_components.victorsmartkill] Close API client.
voluptuous.error.SchemaError: unsupported schema data type 'Platform'
Logger: homeassistant.loader
Source: loader.py:802
First occurred: 13:34:45 (1 occurrences)
Last logged: 13:34:45
No 'version' key in the manifest file for custom integration 'victorsmartkill'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'victorsmartkill'
2021.3.0
N/A
I have connected three mouse and three rat traps. Everything seems to work great (thanks!) except the temperature sensors are showing 0ºC for all traps.
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill] Received traps list [redacted, redacted, redacted, redacted, redacted, redacted] from Victor Smart-Kill API.
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill] Finished fetching victorsmartkill data in 2.013 seconds (success: True)
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.new_trap_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.villa_mouse_trap_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.guesthouse_mouse_tra_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.villa_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.guesthouse_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.boathouse_capture received update from coordinator: off
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_wireless_network_rssi received update from coordinator: -72
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_last_report_date received update from coordinator: 2021-09-03T22:57:14.543529+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.new_trap_battery_level received update from coordinator: 97
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_wireless_network_rssi received update from coordinator: -69
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_last_report_date received update from coordinator: 2021-09-03T22:46:28.073021+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_mouse_trap_battery_level received update from coordinator: 95
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_wireless_network_rssi received update from coordinator: -73
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_last_report_date received update from coordinator: 2021-09-03T23:01:29.952778+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_mouse_tra_battery_level received update from coordinator: 98
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_wireless_network_rssi received update from coordinator: -62
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_last_report_date received update from coordinator: 2021-09-03T22:30:06.892837+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.villa_battery_level received update from coordinator: 94
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_wireless_network_rssi received update from coordinator: -69
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_last_report_date received update from coordinator: 2021-09-03T18:34:04.673294+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.guesthouse_battery_level received update from coordinator: 100
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_kills_present received update from coordinator: 0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_total_kills received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_total_escapes received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_total_retreats received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_wireless_network_rssi received update from coordinator: -67
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_temperature received update from coordinator: 0.0
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_last_kill_date received update from coordinator: None
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_last_report_date received update from coordinator: 2021-09-03T16:07:22.814790+02:00
2021-09-04 11:51:51 DEBUG (MainThread) [custom_components.victorsmartkill.entity] sensor.boathouse_battery_level received update from coordinator: 94
after updating Home Assistant, integration shows as unavailable. I have deleted and readded the integration.
Firmware: 2.0.17
Hardware: WERT
Logger: homeassistant.components.sensor
Source: helpers/update_coordinator.py:331
Integration: Sensor (documentation, issues)
First occurred: 10:44:46 AM (2 occurrences)
Last logged: 10:44:47 AM
Error adding entities for domain sensor with platform victorsmartkill
Error while setting up victorsmartkill platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 775, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/victorsmartkill/entity.py", line 124, in async_added_to_hass
await super().async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 331, in async_added_to_hass
self.coordinator.async_add_listener(
TypeError: VictorSmartKillDataUpdateCoordinator.async_add_listener() takes 2 positional arguments but 3 were given
Logger: homeassistant.components.binary_sensor
Source: helpers/update_coordinator.py:331
Integration: Binary sensor (documentation, issues)
First occurred: 10:44:46 AM (2 occurrences)
Last logged: 10:44:47 AM
Error adding entities for domain binary_sensor with platform victorsmartkill
Error while setting up victorsmartkill platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 397, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 641, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 775, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/victorsmartkill/entity.py", line 124, in async_added_to_hass
await super().async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 331, in async_added_to_hass
self.coordinator.async_add_listener(
TypeError: VictorSmartKillDataUpdateCoordinator.async_add_listener() takes 2 positional arguments but 3 were given
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.7.1",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "aarch64",
"timezone": "America/Chicago",
"os_name": "Linux",
"os_version": "5.15.32-v8",
"supervisor": "2022.07.0",
"host_os": "Home Assistant OS 8.2",
"docker_version": "20.10.14",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"victorsmartkill": {
"version": "2022.2.3",
"requirements": [
"victor-smart-kill==1.1.0"
]
},
"localtuya": {
"version": "4.0.1",
"requirements": []
},
"scheduler": {
"version": "v0.0.0",
"requirements": []
},
"watchman": {
"version": "0.5.1",
"requirements": [
"prettytable==3.0.0"
]
},
"netdaemon": {
"version": "22.05.0",
"requirements": [
"awesomeversion>=21.1.0"
]
},
"thermal_comfort": {
"version": "1.4.3",
"requirements": []
},
"weatheralerts": {
"version": "0.1.5",
"requirements": []
},
"garbage_collection": {
"version": "4.7.8",
"requirements": [
"python-dateutil>=2.8.2"
]
},
"weatherapi": {
"version": "0.8",
"requirements": []
},
"iphonedetect": {
"version": "1.4.0",
"requirements": []
},
"openweathermaphistory": {
"version": "1.0.5",
"requirements": []
},
"tuya_local": {
"version": "0.17.1",
"requirements": [
"pycryptodome~=3.14.1",
"tinytuya~=1.6.0"
]
},
"mass": {
"version": "2022.7.0b1",
"requirements": [
"music-assistant==1.6.0"
]
},
"hacs": {
"version": "1.25.5",
"requirements": [
"aiogithubapi>=22.2.4"
]
},
"nodered": {
"version": "1.0.8",
"requirements": []
}
},
"integration_manifest": {
"domain": "victorsmartkill",
"name": "Victor Smart-Kill",
"version": "2022.2.3",
"documentation": "https://github.com/toreamun/victorsmartkill-homeassistant",
"issue_tracker": "https://github.com/toreamun/victorsmartkill-homeassistant/issues",
"dependencies": [],
"config_flow": true,
"codeowners": [
"@toreamun"
],
"requirements": [
"victor-smart-kill==1.1.0"
],
"iot_class": "cloud_polling",
"is_built_in": false
},
"data": {
"config_entry": {
"entry_id": "860bfbf0b48ceae36f4b23128f34a24c",
"version": 1,
"domain": "victorsmartkill",
"title": "REDACTED",
"data": {
"username": "REDACTED",
"password": "REDACTED"
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "REDACTED",
"disabled_by": null
},
"data": {
"146708": {
"id": 146708,
"url": "https://www.victorsmartkill.com/traps/146708/",
"corruption_status": 0,
"corruption_status_options": null,
"operator": null,
"operator_name": null,
"name": "Garage1",
"ssid": "REDACTED",
"serial_number": "REDACTED",
"auto_upgrade": false,
"status": 0,
"location": "https://www.victorsmartkill.com/locations/108067/",
"lat": "REDACTED",
"long": "REDACTED",
"upgrade_firmware": null,
"commercial_gateway": null,
"commercial_monitor_mode_enabled": false,
"lorawan_app_key": "REDACTED",
"site_name": null,
"floor_plan_x": 0,
"floor_plan_y": 0,
"building_name": null,
"floor_name": null,
"room": null,
"room_name": null,
"trap_type": 1,
"trap_type_verbose": "Rat Trap",
"alerts": 256561,
"trapstatistics": {
"id": 146708,
"url": "https://www.victorsmartkill.com/trapstatistics/146708/",
"trap": "https://www.victorsmartkill.com/traps/146708/",
"trap_name": "Garage1",
"kills_present": 0,
"install_date": "2022-03-24T16:12:59.198428+00:00",
"owner_name": "REDACTED",
"owner_email": "REDACTED",
"last_report_date": "2022-07-08T14:37:32.876301+00:00",
"last_kill_date": "2022-04-30T11:17:53.842342+00:00",
"temperature": 0,
"battery_level": 31,
"total_kills": 3,
"total_escapes": 2,
"rx_power_level": -60,
"firmware_version": "2.0.17",
"trap_provisioned": true,
"last_sequence_number": null,
"total_retreats": null,
"wireless_network_rssi": -60,
"error_code": 0,
"send_conn_lost_nt": true,
"send_empty_trap_nt": true,
"board_type": "WERT",
"last_maintenance_date": "No maintenance records exist."
}
}
},
"last_exception": null
}
}
2021.12.0
N/A
I seem to be missing most of the entities?
2021-12-14 14:27:38 DEBUG (MainThread) [custom_components.victorsmartkill.config_flow] Fetch API-token for user '[email protected]' to test for correct username and password.
2021-12-14 14:27:39 DEBUG (MainThread) [custom_components.victorsmartkill.config_flow] HTTP status 400: {"non_field_errors":["Unable to log in with provided credentials."]}
2021-12-14 14:28:28 DEBUG (MainThread) [custom_components.victorsmartkill.config_flow] Fetch API-token for user '[email protected]' to test for correct username and password.
2021-12-14 14:28:28 DEBUG (MainThread) [custom_components.victorsmartkill] async_setup_entry [email protected].
2021-12-14 14:28:28 INFO (MainThread) [custom_components.victorsmartkill]
-------------------------------------------------------------------
Victor Smart-Kill
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/toreamun/victorsmartkill-homeassistant/issues
-------------------------------------------------------------------
2021-12-14 14:28:28 INFO (MainThread) [custom_components.victorsmartkill] Data update coordinator for Victor Smart-Kill account [email protected] initialized with ['binary_sensor', 'sensor'] platforms and update interval 0:10:00.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill] Received traps list [263258] from Victor Smart-Kill API.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill] Finished fetching victorsmartkill data in 1.583 seconds (success: True)
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill] Forward setup to binary_sensor platform.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill] Forward setup to sensor platform.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill.binary_sensor] Add ['VictorSmartKillBinarySensor'] binary sensors for trap named 'Hytta inne' with Victor trap id 263258.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill] Listener _handle_coordinator_update added to coordinator.
2021-12-14 14:28:30 DEBUG (MainThread) [custom_components.victorsmartkill.entity] binary_sensor.hytta_inne_capture has been added to hass.
2021-12-14 14:29:23 DEBUG (MainThread) [custom_components.victorsmartkill] async_unload_entry [email protected].
hi. I just installed it from hacs.
I can see all the files at the folder.
But the app won’t show up at integrations.
Can you help me.
Thanks.
Hi,
Just saw that my integration with HA stopped working:
I dont know with what version of HA this happened, now on latest 2023.1.7
Anyone else with the same issue?
Also thought I would check for the login credentials for the Integration, but cant find where to look for it, please advice?
Thanks,
AseKarlsson
I've noticed that my trap battery level sensor has a latitude/longitude assigned to it. It is not accurate to where the trap is (off by about 30KM).
Where is this information pulled from? Is there any way to update/disable it, as it shows on the Map tab.
HASS config:
Victor smartkill integration 2021.3.0
Home Assistant 2021.3.4
hass.config_entries.async_setup_platforms is scheduled to be removed in HA 2022.12
See https://developers.home-assistant.io/blog/ and home-assistant/core#73806
I believe this is a known issue as I found a couple closed issues that appear to be similar. In my case I see binary_sensor.patio_sizzler_capture
which is an occupancy sensor that reports the capture. Is there any way to exclude these from appearing on the map?
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.12.8",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.7",
"docker": true,
"arch": "x86_64",
"timezone": "America/Chicago",
"os_name": "Linux",
"os_version": "5.15.80",
"supervisor": "2022.12.1",
"host_os": "Home Assistant OS 9.4",
"docker_version": "20.10.19",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"favicon": {
"version": "10.4",
"requirements": []
},
"spotcast": {
"version": "v3.6.30",
"requirements": [
"spotify_token==1.0.0"
]
},
"garbage_collection": {
"version": "4.10.2",
"requirements": [
"python-dateutil>=2.8.2"
]
},
"zha_toolkit": {
"version": "v0.8.28",
"requirements": [
"packaging>=20.8",
"pytz"
]
},
"auto_backup": {
"version": "1.3.0",
"requirements": []
},
"victorsmartkill": {
"version": "2022.7.1",
"requirements": [
"victor-smart-kill==1.1.0"
]
},
"nws_alerts": {
"version": "2.5",
"requirements": []
},
"alexa_media": {
"version": "4.3.2",
"requirements": [
"alexapy==1.26.4",
"packaging>=20.3",
"wrapt>=1.12.1"
]
},
"navien_water_heater": {
"version": "0.0.7",
"requirements": []
},
"keymaster": {
"version": "v0.0.82",
"requirements": []
},
"nest_protect": {
"version": "0.3.8",
"requirements": []
},
"browser_mod": {
"version": "2.1.2",
"requirements": []
},
"watchman": {
"version": "0.5.1",
"requirements": [
"prettytable==3.0.0"
]
},
"webrtc": {
"version": "v2.3.1",
"requirements": []
},
"nodered": {
"version": "1.1.2",
"requirements": []
},
"hacs": {
"version": "1.29.0",
"requirements": [
"aiogithubapi>=22.10.1"
]
}
},
"integration_manifest": {
"domain": "victorsmartkill",
"name": "Victor Smart-Kill",
"version": "2022.7.1",
"documentation": "https://github.com/toreamun/victorsmartkill-homeassistant",
"issue_tracker": "https://github.com/toreamun/victorsmartkill-homeassistant/issues",
"dependencies": [],
"config_flow": true,
"codeowners": [
"@toreamun"
],
"requirements": [
"victor-smart-kill==1.1.0"
],
"iot_class": "cloud_polling",
"is_built_in": false
},
"data": {
"config_entry": {
"entry_id": "7aeda8b77bfd5db6e19474bc716af791",
"version": 1,
"domain": "victorsmartkill",
"title": "**REDACTED**",
"data": {
"username": "**REDACTED**",
"password": "**REDACTED**"
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "**REDACTED**",
"disabled_by": null
},
"data": {
"76696": {
"id": 76696,
"url": "https://www.victorsmartkill.com/traps/76696/",
"corruption_status": 0,
"corruption_status_options": null,
"operator": "https://www.victorsmartkill.com/operators/2/",
"operator_name": "Woodstream Consumer",
"name": "Garage Sizzler",
"ssid": "**REDACTED**",
"serial_number": "**REDACTED**",
"auto_upgrade": false,
"status": 0,
"location": "https://www.victorsmartkill.com/locations/12066/",
"lat": "**REDACTED**",
"long": "**REDACTED**",
"upgrade_firmware": null,
"commercial_gateway": null,
"commercial_monitor_mode_enabled": false,
"lorawan_app_key": "**REDACTED**",
"site_name": null,
"floor_plan_x": 0,
"floor_plan_y": 0,
"building_name": null,
"floor_name": null,
"room": null,
"room_name": null,
"trap_type": 2,
"trap_type_verbose": "Mouse Trap",
"alerts": 257190,
"trapstatistics": {
"id": 76696,
"url": "https://www.victorsmartkill.com/trapstatistics/76696/",
"trap": "https://www.victorsmartkill.com/traps/76696/",
"trap_name": "Garage Sizzler",
"kills_present": 0,
"install_date": "2019-08-04T19:25:19.268578+00:00",
"owner_name": "**REDACTED**",
"owner_email": "**REDACTED**",
"last_report_date": "2022-12-22T03:11:12.226236+00:00",
"last_kill_date": null,
"temperature": 221,
"battery_level": 87,
"total_kills": null,
"total_escapes": null,
"rx_power_level": -56,
"firmware_version": "1.3.2",
"trap_provisioned": true,
"last_sequence_number": null,
"total_retreats": null,
"wireless_network_rssi": -56,
"error_code": 0,
"send_conn_lost_nt": true,
"send_empty_trap_nt": true,
"board_type": "WEMT",
"last_maintenance_date": "No maintenance records exist."
}
},
"80458": {
"id": 80458,
"url": "https://www.victorsmartkill.com/traps/80458/",
"corruption_status": 0,
"corruption_status_options": null,
"operator": "https://www.victorsmartkill.com/operators/2/",
"operator_name": "Woodstream Consumer",
"name": "Patio Sizzler",
"ssid": "**REDACTED**",
"serial_number": "**REDACTED**",
"auto_upgrade": false,
"status": 0,
"location": "https://www.victorsmartkill.com/locations/12067/",
"lat": "**REDACTED**",
"long": "**REDACTED**",
"upgrade_firmware": null,
"commercial_gateway": null,
"commercial_monitor_mode_enabled": false,
"lorawan_app_key": "**REDACTED**",
"site_name": null,
"floor_plan_x": 0,
"floor_plan_y": 0,
"building_name": null,
"floor_name": null,
"room": null,
"room_name": null,
"trap_type": 1,
"trap_type_verbose": "Rat Trap",
"alerts": 257190,
"trapstatistics": {
"id": 80458,
"url": "https://www.victorsmartkill.com/trapstatistics/80458/",
"trap": "https://www.victorsmartkill.com/traps/80458/",
"trap_name": "Patio Sizzler",
"kills_present": 0,
"install_date": "2020-03-30T16:11:02.089228+00:00",
"owner_name": "**REDACTED**",
"owner_email": "**REDACTED**",
"last_report_date": "2022-12-05T18:04:26.595859+00:00",
"last_kill_date": "2022-11-07T16:57:37.615429+00:00",
"temperature": 324,
"battery_level": 11,
"total_kills": 35,
"total_escapes": 664,
"rx_power_level": -62,
"firmware_version": "1.3.2",
"trap_provisioned": true,
"last_sequence_number": null,
"total_retreats": null,
"wireless_network_rssi": -62,
"error_code": 0,
"send_conn_lost_nt": false,
"send_empty_trap_nt": false,
"board_type": "WERT",
"last_maintenance_date": "No maintenance records exist."
}
}
},
"last_exception": null
}
}
Hi Tore,
Just bought my Smart-Kill M1 Mouse trap.
Nice integration from you, but some of the fileds does not seem to populate and stays as Unknown (see attached picture).
Have I missed something in the setup?
(Extra question: What will the status be for "Kills Present" when I cought a mouse instead of "Clear" so I can write automation?)
Thanks,
AseKarlsson
HA adds support for diagnostics in version HA 2022.2.
HA 2012.11.0 supports entity categories to clean up the auto generated dashboards.
Would you welcome a PR to add them?
Log showing this when setting up this integration.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/victorsmartkill/init.py", line 63, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, coordinator.platforms)
AttributeError: 'ConfigEntries' object has no attribute 'async_forward_entry_setups'
clean install HACS / VictorsmartKill gives me the following error.
Promt for username/password seems to be oke.
Log Details (ERROR)
Logger: custom_components.victorsmartkill
Source: helpers/update_coordinator.py:165
Integration: Victor Smart-Kill (documentation, issues)
First occurred: 2:55:35 PM (3 occurrences)
Last logged: 2:55:54 PM
Error fetching victorsmartkill data: {0: {'location': ['Field may not be null.'], 'long': ['Field may not be null.'], 'lat': ['Field may not be null.'], 'floor_plan_x': ['Field may not be null.'], 'floor_plan_y': ['Field may not be null.']}}
-->
"victor-smart-kill==0.0.5"
After adding the custom component the user/pass prompt comes up. This seems to be oke.
The sensors are not activated. When checking the LOG, the error above shows up.
Logger: homeassistant.setup
Source: setup.py:172
First occurred: 10:01:47 PM (1 occurrences)
Last logged: 10:01:47 PM
Setup failed for victorsmartkill: Integration not found.
A clear and concise description of what the bug is.
Add your logs here.
Traps reports back to Victor cloud regularly. If a trap stops reporting, this should be noted by triggering a sensor.
The API has no such thing as a connection lost flag. The common report to cloud schedule has to be used. It seems like around 24 hours is normal period for the traps I have tested.
This integration stopped working for me.
The log message shows the following:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/victorsmartkill/init.py:63
Integration: Victor Smart-Kill (documentation, issues)
First occurred: 14:37:06 (1 occurrences)
Last logged: 14:37:06
Error setting up entry [email protected] for victorsmartkill
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/victorsmartkill/init.py", line 63, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, coordinator.platforms)
AttributeError: 'ConfigEntries' object has no attribute 'async_forward_entry_setups'
I'm running version 2022.7.6 on a RPI4.
The version of the Victor component is 2022.7.1
Symptom: The integration does not appear to start properly.
0.32
Add your logs here.
HACS 1.10 running on 2021.1.3. Installs the custom component correctly but even after restart the integration is not available in the UI list. Other integrations via HACS have successfully installed.
Add your logs here.
Core 2024.2.2
Supervisor 2024.02.0
Operating System 11.4
Frontend 20240207.1
2023.1.0
This is the exact line I found in the homeassistant.log
2024-02-22 22:22:37.045 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from victorsmartkill, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/toreamun/victorsmartkill-homeassistant/issues
I believe debug logs is not necessary, as the statement above should be clear.
The rat trap has "occupancy" and should not be shown as a "location".
Today it pops up on the map in the side bar of home assistant together with trackers and other..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.