Coder Social home page Coder Social logo

tcsvn / activity-assistant Goto Github PK

View Code? Open in Web Editor NEW
60.0 10.0 4.0 24.32 MB

Activity Assistant provides a platform for logging, evaluating and predicting Activities of Daily Living for Home Assistant.

License: MIT License

Dockerfile 0.28% Shell 0.40% Makefile 0.08% Python 24.38% JavaScript 59.82% CSS 2.84% HTML 11.79% PHP 0.41%
adls activity-assistant home-assistant homeassistant home-assistant-addons smarthome smart-home machine-learning django-rest-framework django activities-of-daily-living human-activity-recognition data-science data-mining visualization home-automation

activity-assistant's Introduction

Activity Assistant

Collect, evaluate and predict Activities of Daily Living from within Home Assistant.

GitHub Workflow Status Supports amd64 Architecture Supports i386 Architecture Supports aarch64 Architecture Supports armv7 Architecture Supports armhf Architecture License

Activities of Daily living (ADLs) such as eating, working, sleeping and Smart Home device readings are recorded by inhabitants. Predicting the activities of residents based on the device event-stream allows for a range of applications, including automation, action recommendation and abnormal activity detection in the context of assisted living for elderly inhabitants. Activity Assistant is a platform that streamlines the data collection process. The plugin extracts device readings from Home Assistant and tracks residents using an additional Android or the Home Assistant companion app. Moreover, Activity Assistant (will) support the deployment of trained models and running ADL predictions in real-time. A (future) Home Assistant integration provides users with a novel activity-based abstraction for automating their homes.

Installation

The installation of this add-on is pretty straightforward and not different to installing any other Hass.io add-on.

  1. Add the repository to the addon-store by pasting https://github.com/tcsvn/hassio-activity-assistant into the manage add-on repositories dialog
  2. Ensure that Home Assistant is using the recorder integration for Activity Assistant to successfully connect to the database and query devices
  3. Search for the "Activity Assistant" addon-on in the Hass.io add-on store and install the latest release (NOT edge or development).
  4. Start the "Activity Assistant" add-on.
  5. Check the logs of the add-on to see if everything went well.
  6. Ready to go!

For a guide on how to use please refer to the Documentation (tbd)

Features

  • Create and run experiments for recording ADLs and device events
  • Activity annotation using an android app
  • Activity annotation using Home Assistant input_selects and input_booleans
  • Device or activity to room assignment
  • Interactive dashboard for the running experiment and previously recorded datasets
  • Prior activity distributions with a "typical week" calendar widget
  • Dask nodes for distributed computation
  • Upload and deployment of trained models via the web interface
  • Home Assistant integration + custom entity card displaying per person activity predictions

Contributing

  1. Fork it (https://github.com/tcsvn/activity-assistant/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Related projects

Support

Buy me a coffee

How to cite

If you are using Activity Assistant for puplications please consider citing the package.

@software{activity-assistant,
  author = {Christian Meier},
  title = {Activty Assistant},
  url = {https://github.com/tcsvn/activity-assistant},
  version = {0.0.4.1-alpha},
  date = {16-02-2023}
}

License

MIT © tcsvn

activity-assistant's People

Contributors

tcsvn 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activity-assistant's Issues

Device selection UI

Hi,

Currently trying to provide a list of devices to be tracked,
very hard to find what I need.
The window is small and not sorted, no search as well.
image

Install with HA Core

Hi, I'm using HA Core so I can't use add-on.
Is this sw installable and usable NOT as an add-on?

Addon refused to connect

Cannot get addon to work, getting "refused to connect":
image

Installed using supervisor and https://github.com/tcsvn/hassio-activity-assistant repo

Boot Log:


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
No changes detected
Operations to perform:
  Synchronize unmigrated apps: backend, frontend, messages, qr_code, rest_framework, staticfiles
  Apply all migrations: admin, auth, authtoken, contenttypes, sessions
Synchronizing apps without migrations:
  Creating tables...
    Creating table backend_dataset
    Creating table backend_personstatistic
    Creating table backend_person
    Creating table backend_location
    Creating table backend_edge
    Creating table backend_device
    Creating table backend_activity
    Creating table backend_activityprediction
    Creating table backend_syntheticactivity
    Creating table backend_smartphone
    Creating table backend_model
    Creating table backend_realtimenode
    Creating table backend_deviceprediction
    Creating table backend_server
    Running deferred SQL...
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying authtoken.0001_initial... OK
  Applying authtoken.0002_auto_20160226_1747... OK
  Applying authtoken.0003_tokenproxy... OK
  Applying sessions.0001_initial... OK
CommandError: No fixture named 'inital_server' found.
[2020-12-15 15:17:08 +0200] [187] [INFO] Starting gunicorn 20.0.4
[2020-12-15 15:17:08 +0200] [187] [INFO] Listening at: http://0.0.0.0:8000 (187)
[2020-12-15 15:17:08 +0200] [187] [INFO] Using worker: sync
[2020-12-15 15:17:08 +0200] [212] [INFO] Booting worker with pid: 212

After I click on [OPEN WEB UI] I get XXXX.duckdns.org refused to connect.

And in the log I see:

Internal Server Error: /
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/activity_assistant/web/frontend/views/setup.py", line 160, in get
    srv = Server.objects.all()[0]
  File "/usr/lib/python3.8/site-packages/django/db/models/query.py", line 325, in __getitem__
    return qs._result_cache[0]
IndexError: list index out of range

Installation fails on 0.0.2-alpha

Hi,

Uninstalled previous version and installed the 0.0.2-alpha.
Once the addon is running, opened the web ui on port 8000, and pressed on "Connect".
Then I'm getting:
Server Error (500)

Attaching my logs (looks like parsing !include wrongly):


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
No changes detected
Operations to perform:
  Synchronize unmigrated apps: backend, frontend, messages, qr_code, rest_framework, staticfiles
  Apply all migrations: admin, auth, authtoken, contenttypes, sessions
Synchronizing apps without migrations:
  Creating tables...
    Creating table backend_dataset
    Creating table backend_personstatistic
    Creating table backend_person
    Creating table backend_location
    Creating table backend_edge
    Creating table backend_device
    Creating table backend_activity
    Creating table backend_activityprediction
    Creating table backend_syntheticactivity
    Creating table backend_smartphone
    Creating table backend_model
    Creating table backend_realtimenode
    Creating table backend_deviceprediction
    Creating table backend_server
    Running deferred SQL...
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying authtoken.0001_initial... OK
  Applying authtoken.0002_auto_20160226_1747... OK
  Applying authtoken.0003_tokenproxy... OK
  Applying sessions.0001_initial... OK
Installed 1 object(s) from 1 fixture(s)
[2021-01-05 00:23:12 +0200] [212] [INFO] Starting gunicorn 20.0.4
[2021-01-05 00:23:12 +0200] [212] [INFO] Listening at: unix:/tmp/gunicorn.sock (212)
[2021-01-05 00:23:12 +0200] [212] [INFO] Using worker: sync
[2021-01-05 00:23:12 +0200] [219] [INFO] Booting worker with pid: 219
Registration of a service, press Ctrl-C to exit...
(SIGTERM) terminating the process
Unregistering...
[Errno 2] No such file or directory: '/config/config/core/../../../customization/customize_global.yaml'
Registration of a service, press Ctrl-C to exit...
(SIGTERM) terminating the process
Unregistering...

I do have this file located: /config/config/core/customization/customize_global.yaml and it is working, of course the config check also passing.

Please advise

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.