Giter Site home page Giter Site logo

colin-nolan / timeventx Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.33 MB

A RP2040 compatible system for scheduling an event to be performed at programmable times each day

License: GNU Affero General Public License v3.0

Python 68.21% Shell 3.66% HTML 0.27% TypeScript 26.78% CSS 0.04% Makefile 1.03%

timeventx's Introduction

Timeventx Logo

Build Status Overage Coverage

Timeventx

Timevente /taɪmventeks/ is a system for scheduling an event to be performed at programmable times each day (e.g. watering plants, feeding fish). It is designed to be ran on a RP2040 microcontroller (tested with a Raspberry Pi Pico W) running MicroPython >=1.21.0. The system features a static frontend web UI to:

  • Set timers.
  • View set timer intervals.
  • View system logs.
  • View system configuration.
  • View system stats (CPU usage, RAM usage, etc.)
  • Trigger a restart.

Screenshot of web UI

Usage

Build

To build files for a device, including the configuration:

make build [API_SERVER_LOCATION=backend_api_location (default: /api/v1)] [ARCH=architecture (default: armv6m; examples: armv6m, any)]

The following environment variables must be set:

Environment Variable Description Example
TIMEVENTX_WIFI_SSID Name of Wi-Fi network to connect homewifi
TIMEVENTX_WIFI_PASSWORD Password for the Wi-Fi network password123
TIMEVENTX_ACTION_CONTROLLER_MODULE Location of module that sets the action to perform when a timer triggers (see example) timeventx.actions.noop

Additional configuration is possible:

Environment Variable Description Default Value
TIMEVENTX_LOG_LEVEL Determines log verbosity - see possible values logging.INFO
TIMEVENTX_LOG_FILE_LOCATION Where logs should be written to /main.log
TIMEVENTX_TIMERS_DATABASE_LOCATION Location of persistent database storing timer timers /data/timers
TIMEVENTX_FRONTEND_ROOT_DIRECTORY Directory containing built frontend code /frontend
TIMEVENTX_BACKEND_PORT Port to run backend on 80
TIMEVENTX_BACKEND_INTERFACE Network interface to run backend on 0.0.0.0
TIMEVENTX_RESTART_ON_ERROR Whether the device should restart if an error is encountered True
TIMEVENTX_BASE64_ENCODED_CREDENTIALS Enables basic authentication when set to base64 encoded credentials of users in the form user:pass,user2:pass None

Deploy

To deploy the built files (see section on building above) to a device:

./scripts/deploy.sh [-d] [architecture (default: armv6m)] [device (default: /dev/ttyACM0)]

where -d deletes all existing files on the device first - including any the timers configuration database! It may be useful if the device contains legacy files.

The device needs to be reset to start the application, e.g.:

mpremote reset

Legal

AGPL v3 (contact for other licencing). Copyright 2023 Colin Nolan.

This work is in no way related to any company that I may work for.

timeventx's People

Contributors

colin-nolan avatar

Watchers

 avatar

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.