wernerhp / ha.appdaemon.wasp Goto Github PK
View Code? Open in Web Editor NEWAn AppDaemon app for detecting occupancy using door and motions sensors.
License: MIT License
An AppDaemon app for detecting occupancy using door and motions sensors.
License: MIT License
Greeting,
could you add time delay when door sensor to close for 5 or 10 second. I have created appdaemon and work perfect but when I go out from the box the motion sensor detected the close action of the door and give me detected all the time.
Thanks a lot
I have controllerx and wasp installed in appdaemon.
When I try to add the wasp to the yaml I get a message that the module wasp can't be found.
I've simply copied the example into my appdaemon/apps/apps.yaml file, as my sensor name were the exact same.
The config:
bathroom_wasp:
module: wasp
class: Wasp
device_class: occupancy
name: Bathroom Occupancy
delay: 65
box_sensors:
- binary_sensor.bathroom_door_sensor
wasp_sensors:
- binary_sensor.bathroom_motion_sensor
The logfile:
2022-07-21 20:25:23.680526 INFO AppDaemon: Initializing app bathroom_wasp using class Wasp from module wasp
2022-07-21 20:25:23.681568 WARNING AppDaemon: Unable to find module module wasp - 'bathroom_wasp' is not initialized
2022-07-21 20:25:23.684891 WARNING AppDaemon: Unable to find module bathroom_wasp - initialize() skipped
This seems to have stopped working as of the latest HA. Can't install it either.
Home Assistant 2022.7.3
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/hacs/repositories/base.py:626
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:41:02 (2 occurrences)
Last logged: 13:43:56
[547629640112] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/config/custom_components/hacs/websocket/repository.py", line 212, in hacs_repository_download
await repository.async_install()
File "/config/custom_components/hacs/repositories/base.py", line 833, in async_install
await self.async_install_repository()
File "/config/custom_components/hacs/repositories/base.py", line 916, in async_install_repository
await self.download_content()
File "/config/custom_components/hacs/repositories/base.py", line 572, in download_content
await self.download_repository_zip()
File "/config/custom_components/hacs/repositories/base.py", line 626, in download_repository_zip
zip_file.extractall(self.content.path.local, extractable)
File "/usr/local/lib/python3.10/zipfile.py", line 1645, in extractall
self._extract_member(zipinfo, path, pwd)
File "/usr/local/lib/python3.10/zipfile.py", line 1693, in _extract_member
if member.is_dir():
File "/usr/local/lib/python3.10/zipfile.py", line 530, in is_dir
return self.filename[-1] == '/'
IndexError: string index out of range
Apolgies, I can't tell if this is a Wasp issue or a HACS?
I'd love to use your Wasp In a Box but have some questions and possibly you could just beef up the installation description from this:
"Download the wasp directory from inside the apps directory to your local apps directory, then configure the wasp module in apps.yaml".
Currently under HA I have two "apps" directories and was unsure of a few things before I start, and there is not a single "apps.yaml" files on my system...
pi@kruse-pi:/usr/share/hassio$ sudo find . -name "apps.yaml"
pi@kruse-pi:/usr/share/hassio$
so here are my specific numbered questions (once I have those answered I can just run with the ball so to speak). Below is a snapshot of my directories on the RPI using WinSCP (I know many people have their own directory structures, so I am laying out mine here)As I have done nothing more than download your repository to the deault directory suppplied at this point:
I only have two app directories under homeassistant as shown by WinSCP:
So following your instructions,
"Download the wasp directory from inside the apps directory to your local apps directory, then configure the wasp module in apps.yaml".
As i have already downloaded the repository, I guess the "apps directory is "/usr/share/hassio/homesassistant/appdaemon/apps/ha.appdaemon.wasp/, so what is the proper local apps directory, or was this already it? -
then following the instruction: "...then configure the wasp module in apps.yaml". There is no "apps.yaml" file on my systems anywhere, should I just create one and if wo what is the best location for it?
I'd like to crate more than one of these as there are multiple bathrooms, where Would I put the second instance? Or would the system be able to understand there is more than one as long as each has a duplicated entry but with a different name such as the below example in the same apps.yaml file?
`bathroom1_wasp:
module: wasp
class: Wasp
device_class: occupancy
name: Bathroom1 Occupancy
delay: 5
box_sensors:
- binary_sensor.bathroom1_door_sensor
wasp_sensors:
- binary_sensor.bathroom1_motion_sensor
bathroom2_wasp:
module: wasp
class: Wasp
device_class: occupancy
name: Bathroom2 Occupancy
delay: 5
box_sensors:
- binary_sensor.bathroom2_door_sensor
wasp_sensors:
- binary_sensor.bathroom2_motion_sensor
`
Here is my current setup:
version | core-2023.4.4 |
---|---|
installation_type | Home Assistant Supervised |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.10.10 |
os_name | Linux |
os_version | 5.10.0-21-arm64 |
arch | aarch64 |
timezone | America/New_York |
config_dir | /config |
GitHub API | ok |
---|---|
GitHub Content | ok |
GitHub Web | ok |
GitHub API Calls Remaining | 4986 |
Installed Version | 1.32.1 |
Stage | running |
Available Repositories | 1334 |
Downloaded Repositories | 24 |
can_reach_server | ok |
---|---|
remaining_requests | 23 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
host_os | Debian GNU/Linux 11 (bullseye) |
---|---|
update_channel | stable |
supervisor_version | supervisor-2023.04.0 |
agent_version | 1.4.1 |
docker_version | 23.0.3 |
disk_total | 915.4 GB |
disk_used | 15.8 GB |
healthy | true |
supported | true |
supervisor_api | ok |
version_api | ok |
installed_addons | AppDaemon (0.12.0), Core DNS Override (0.1.1), Duck DNS (1.15.0), File editor (5.5.0), Home Assistant Google Drive Backup (0.110.3), Log Viewer (0.15.0), Mosquitto broker (6.2.0), Samba share (10.0.0), Terminal & SSH (9.6.1), AdGuard Home (4.8.5) |
dashboards | 5 |
---|---|
resources | 15 |
views | 29 |
mode | storage |
oldest_recorder_run | March 17, 2023 at 9:45 AM |
---|---|
current_recorder_run | April 14, 2023 at 8:13 AM |
estimated_db_size | 1108.12 MiB |
database_engine | sqlite |
database_version | 3.38.5 |
Even though
box: off
wasp: off
The binary sensor stays on when the door is closed, even though there was no movement after closing the door
Awesome app btw.
Even though
box: off
wasp: off
The binary sensor stays on for some reason.
Awesome app btw.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
If a wasp is on and a box is opened and then closed, if that wasp REMAINS on for the duration the occupancy will show off even though that wasp is active. If that wasp changes state, things work normally.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I'd like to see the state of a wasp checked upon the timeout and if the box is closed but the wasp REMAINS active, the box should be considered occupied. It shouldn't wait for the state to actually CHANGE to trigger the occupancy again.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
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.