Coder Social home page Coder Social logo

wernerhp / ha.appdaemon.wasp Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 0.0 12 KB

An AppDaemon app for detecting occupancy using door and motions sensors.

License: MIT License

Python 100.00%
appdaemon appdaemon-apps homeassistant home-automation hacs home-assistant

ha.appdaemon.wasp's People

Contributors

wernerhp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ha.appdaemon.wasp's Issues

Added Time delay

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

Unable to find module wasp

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

Install stopped working with Home Assistant 2022.7.3

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?

Installation Instruction Needs Clarification

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:

image

I only have two app directories under homeassistant as shown by WinSCP:

image

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".

  1. 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? -

  2. 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?

  3. 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:

System Information

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
Home Assistant Community Store
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
AccuWeather
can_reach_server ok
remaining_requests 23
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
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
dashboards 5
resources 15
views 29
mode storage
Recorder
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

Binary Sensor stays on

Even though

box: off
wasp: off

The binary sensor stays on for some reason.

Awesome app btw.

Wasp on - box opened then closed - wasp still on = unoccupied

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.