Giter VIP home page Giter VIP logo

pracmonfront's Introduction

pracMonFront

Front-end for PracticeMonitor

Using PHP, Apache EChart, Python 3.11

Goal

A MVP GUI for Practice Monitor that can run on my web host, for demo purposes.

Dev environment

Desktop Ubuntu, MS VS Code, Python 3.11 venv, PHP built-in web server

Architecture

This is OK for now, but maybe isn't scalable

  • RPi Zero, USB to keyboard

    • Python script watching keyboard
    • At end of each session, uploads session data to cloud (see data format below)
  • Web page on server

    • Uses PHP to run Python code:
      • Query IOT, update local DB
      • Present HTML page to slice and dice data
        • Apache ECharts

IOT Data

Store:

  • {start time (ISO format date & time)}
  • {session length (seconds)}
  • {keypress count}
  • A feed for each user?
    • TODO: And/or a feed for test data!

App front end

Notes

  • Use phone as hotspot???
  • GUI option to show gaps in sessions (non-stacked data) - shows practice patterns

Problems, Questions

  • How to install needed Python libs on Ionos?
    • And so PHP will see them

code

  • generate_test_data.py - As it says, generates test data to send to AIO. Limit 30 records in 10 minutes???
  • get_session_data.py - Retrieve all records from AIO, save news ones (if any) to local DB, output JS.
  • ionos_test.php/py
  • pmf_front.php - symlink to pmf?.html
  • server.sh - starts PHP server; run in separate console

Feed names

Do I want/need to use a Group?

# How is this name supposed to be formatted? neither "/" nor "." work.
# FEED_NAME = "PracticeMonitor.perfdata"
# Perhaps all lower case would have worked. Not sure I want to use a group anyway.
#
# >>> from Adafruit_IO import Client
# >>> aio = Client("robcranfill", "XXX")
# >>> f = aio.feeds()
# >>> f
# [Feed(name='perfdata', key='perfdata', id=2660025, description='Feed for PerformanceMonitor project.', 
# unit_type=None, unit_symbol=None, history=True, visibility='private', license=None, status_notify=False, 
# status_timeout=4320), 
# Feed(name='perfdata', key='practicemonitor.perfdata', id=2660022, description='', 
# unit_type=None, unit_symbol=None, history=True, visibility='private', license=None, status_notify=False, 
# status_timeout=4320)]
#

pracmonfront's People

Contributors

robcranfill avatar

Watchers

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