GithubHelp home page GithubHelp logo

automation-scripts's Introduction

Master Control Program

This system is used to secure spaces with an electronic door latch.

Dependencies:

Hardware requirements:

  • Server protocol RS-485 for the server/client communication.
  • Arduino Nano for the door client (This is required for the matching footprint).
  • NFC reader. This is the one that we are using for our version of the door lock.

Diagram of the door lock project


Todo

  • Server

    • Super admins vs group admins
    • Make plugins respect disabled mode
    • When unlocking from web ui, display user in log
  • Client

    • New NFC reader
    • Add doorbell input (capacitive?)
    • Design/build case for front
    • Build 2nd client for testing & back door

License

Copyright (C) 2014-2016 MakeICT

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see The GNU licenses page


This is a work in progress. For more information, please visit the MakeICT Wiki.


automation-scripts's People

Contributors

rowbotronics avatar

Watchers

 avatar  avatar  avatar

automation-scripts's Issues

Change database encoding

The database currently uses Latin-1 encoding. This should be changed to UTF-8 to prevent issues with characters that aren't included in Latin-1.

โ€™ character in event field causes script crash

Log output:

The following exception was thrown:

'latin-1' codec can't encode character '\u2019' in position 11: ordinal not in range(256)

File "/usr/lib/python3/dist-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/pi/code/automation-scripts/RegistrationMonitor.py", line 324, in Run
self.SendEventReminders(upcoming_events)
File "/home/pi/code/automation-scripts/RegistrationMonitor.py", line 278, in SendEventReminders
action="Send event reminder email")
File "/home/pi/code/automation-scripts/database/init.py", line 195, in AddLogEntry
self.NewCursor().execute(sql,(timestamp, event_name, registrant_name, registrant_email, action))
File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 207, in execute
args = tuple(map(db.literal, args))
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 304, in literal
s = self.escape(o, self.encoders)
File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 226, in unicode_literal
return db.literal(str(u).encode(unicode_literal.charset))

Send a list of upcoming events

Create and send a list of upcoming events to some group of people that want it. Newsletter subscribers? A special mailing list? Something on the forum?

Key usage and member statistics

Generate regular report on key usage and new/lapsed members for onboarding/membership committee.

Should also have the ability to manually run for information on set periods of time.

Send locker invoices monthly, regardless of renewal frequency

It might be nice to charge people on a monthly basis for their lockers even if they are on a membership plan that renews less frequently.

  • Add a field in WA for locker renewal date
  • Check this field daily to see who is up for renewal
  • Generate and send invoice based existing locker rental info
  • Send reminders if locker is not paid in a timely manner
  • Alert volunteers if locker is unpaid for too long

Member join/lapse info

Parse contact notes field for information on when members joined/lapsed. Save info in database or spreadsheet.

Apply account balance to open invoices

WildApricot does not give users a way to apply a positive balance towards an invoice. We could probably do this through the API. When we eventually get the automatic charges for the 3D printers up and running it would be very handy to be able to pre-pay and not have to deal with every 32 cent print.

  • Check to see who has an open invoice and a positive balance
  • Apply the balance to the invoice
  • If invoice is fully paid send email to notify user and tell them their remaining balance
  • If invoice is not fully paid send an email notifying user of the updated amount and payment options

Stops working on external IP change?

The script stopped sending emails after about a week. Found that the external IP of home router had changed. After restarting the script it resumed proper function. Not sure where the stdout logs are getting dumped when running as a service.

Cleanup Main Loop Code

Main monitoring code should be combine to reduce number of API calls and make it easier to add functionality.

Need way to hold spot

For registrants who plan to pay in cash some mechanism to prevent deletion of their registration is needed.

Add waiver links to WA accounts

Currently the smartwaiver integration only updates the WA account with the date the waiver was signed. It also syncs the waivers to google drive. Ideally we would add a link to the location of the person's waiver in drive to their WA account, like we had before with the paper waiver scans.

Don't cancel registration if warnings aren't sent on time

Sometimes the event monitor script fails to run properly for a period of time. When it gets fixed, it will fire off a bunch of emails for upcoming events, so people might get an incomplete registration warning followed immediately by a cancellation message all with dates in the past. In these events we should prevent the cancellation from occurring, and maybe send the warning with a modified date.

Send notice of payment receipt

Perhaps an email should be sent when an unpaid registration is marked as paid. Will need to check WA behavior to prevent redundant emails.

Automatically apply authorizations

Create a script that automatically grants authorizations to people that attend an authorization class. Currently authorizations are entered manually by the instructors after the class, but 99.9% of the time they authorize everyone who took the class. This would save some hassle for our instructors.

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.