Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.0 Requirements discussion #4

Open
PBrunot opened this issue Apr 11, 2023 · 7 comments
Open

V1.0 Requirements discussion #4

PBrunot opened this issue Apr 11, 2023 · 7 comments
Labels
documentation Improvements or additions to documentation

Comments

@PBrunot
Copy link
Contributor

PBrunot commented Apr 11, 2023

I'm opening an issue to gather feedback regarding requirements identified for the RFID lab machine management. I use English as the end-goal may be to integrate such a solution in Fab Manager.

Requirements for V1.0 (can be revised):

Functional requirements

  • Board must enable usage of lab machines by users, based on individual RFID tags
  • Board must be easy to use with no user training requirements (usage in a school context)
  • Board must be robust in case of WiFi issues, to avoid blocking the lab or powering off machines it network is out of service
  • Board must be low-maintenance for Fab Lab (ideally only initial setup and no batteries)
  • Board must physically fit next to the machines
  • Board must not interfere with long jobs (e.g. printing large 3D pieces)
  • Cumulative hours Machine usage must be registered for maintenance
  • Board must signal that machine maintenance is needed (e.g. laser lens cleaning every X hours)
  • A FabLab user can register maintenance operations to reset the maintenance signal
  • Server must be able to handle several boards simultaneously (min. 10 boards)
  • A FabLab admin must be able to ENABLE/DISABLE machine for general usage
  • Server must provide statistics per machine (usage log, hours cumulated, maintenance done)

Regulatory requiments

  • GDPR compliance based on fab member consent or anomized data.
  • Boards must be electrically safe for usage in public space.

Economical requirements

  • Boards must be low cost to manufacture (criteria < 50 eur/board)
  • Server must be low cost to operate (criteria < 50 eur/year)

Excluded requirements for V1.0 (can be revised)

  • Access control (boards control machines, not doors).
  • Server shall not depend on Fab Manager (this can be done later, and it requires some plugin because the FabManager data model is not ready : no hours per machine, no maintenance, no attribute for users to link to tags, non-Fab users in the lab...)
  • Server shall not handle users abilitation to machines (this feature can come with the Fab Manager integration)
  • Board shall not track consumables (e.g. meters of filament acquisition)
  • Board shall not track actual machine running time (it will rely on user log-on and log-off)

Design choices so far

  • Board must control power of the machine (230Vac) or provide a volt-free contact (e.g. EN signal to machine board)
  • To avoid user interaction on board, one machine per board is supported.
  • Basic architecture (Machine) <-1-connected to-1-> (Board) <-n-connected-to-1-> (Server)
  • Board has microprocessor, 16x2 LCD, RFID reader, buzzer, WiFi and bluetooth connection.
@valerionew
Copy link
Member

Thanks Pascal, looks good!

I can add a few points, mostly from a staff member perspective:

  • Maintenance performed checks should be performed by a staff member before the user is allowed to use the machine. This could conflict with the board controlling machine power, as power may be required for maintenance (e.g. mirror align on laser cutters, moving the CNC axes for cleaning etc.). I'm thinking of asking for a staff member's card to activate the machine for maintenance. We could add the option to postpone maintenance, but should we really? I'm thinking of a short tap with a staff member's card to postpone by a power cycle vs a hold for three seconds for start maintenance.
  • We don't strictly need to get the system on printed circuit boards that are manufactured. We could do with a kit made of commercial modules, at least for the first version of the system (the one that we will deploy at first).

Also, where should we put the requirements for the server? Here there is a first old draft of the specs: https://github.com/fablab-bergamo/rfid-database-interface/blob/main/README.md

Here there is also a rough TODO list: https://github.com/fablab-bergamo/rfid-database-interface/blob/main/TODO.md

@PBrunot
Copy link
Contributor Author

PBrunot commented Apr 22, 2023

@valerionew :
I've added the maintenance performed to the boards (it's in the open PR #3 ).
When the machine requires maintenance, usage is blocked.
A short tap from a fablab admin will enable the machine anyways (so postponing maintenance is not required).
A long tap (3s) will register the maintenance operation as done.

Regarding PCB: most of the standard parts are in the lab, no problem.
What is your idea for machine connection ? I'm not sure we can do safely interrupt a powerline with standard parts on a breadboard... I'm not an EE engineer, but it would required case-assembly-soldering of parts-fixtures before we connect mains wires ?... Also, I think the lab machines do not have an "external enable" signal to bring a volt-free signal from the relay.
Maybe we could add in serie the relay to a safety interlock.

Finally regarding server requirements I have opened a separate issue in fablab-bergamo/rfid-database .

@valerionew
Copy link
Member

valerionew commented Apr 22, 2023

Probably breaking the interlock chain is the safest, I agree with you. But while the lasers and CNCs have that, there is no interlock in 3D printers. One strategy would be operating the reset pin of the control boards, but that is not always obvious to find and to "hack into", plus it requires some modifications to the board itself that can invalidate warranty.

My idea was indeed to interrupt the power line. In 3D printers we could safely and easily do it on the low voltage line. So the user would still have to turn on the machine via the usual switch, and then the box would prompt the user for a card, closing the low voltage circuit.

Another discussion we have to do is powering of our system. If we intercept any power, such as in 3D printers, we can exploit that. But if we don't, like with the lasers and the CNCs, how do we power the box?

Last big thing on this point, we should forecast the possibility of a system that we cannot modify at all (even with non-permanent modifications). In that case, the only option would be to interrupt the power cable.

@valerionew
Copy link
Member

@PBrunot If it is ok with you, I would like to give you write access to this repo, so you can work directly on a branch of this repo instead of a fork.

@valerionew
Copy link
Member

I've also created a project in the organization's page to help us keep track of the various ongoing feature developments.

I don't know if this is going to be useful, if not just leave it be and we will delete it.

Projects documentation on github

PBrunot added a commit that referenced this issue Apr 29, 2023
* implementing comments from #1

see #1
except const expr for compatibility reasons with base library LCD

applied code formatting + esp32s3 testing

* refactoring LCDWrapper

the LCDWrapper will decide what to write in each row based on current state, and update function arguments.
main function has only to update the state

* platformio config for both ESP32 + ESP32S3

pins.h config via #define
comments improvement
Update README.md

* refactoring and PR #2 comments implementation

replaced enum with enum class

added BoardState class which wraps lcd, rfid, current user, server, machine and provides higher level function to the main.cpp

comments implementation of PR #2

memcpy instead of for loop

removed underscores for private members

init inline in the header

consistent usage of this->

* struct instead of long LCD parameter list

+ init in constructor
+ removed trailing _ for private members

* testing on esp32s3

* split RFID into a separate class

* moved config/enum inside main class

* eliminating pointers (WIP)

* removed pointers

LCD setRow is now public
LCD text logic moved from LCD to BoardState

* struct and constexpr for pins definition

#2 (comment)

* created struct for MachineId instead of uint16_t

#2 (comment)

* VSCode formatting

* removed copy constructors

* removed pointers and allocation in constructor

* first working version on ESP32s3

bugfix user_name display
tested with ESP32S3
it reads RFID tag, matches against whitelist, updates the LCD as expected

debugging

LCDWrapper : eliminated casts and connection status member, added pretty print for debugging

* AuthProvider class + testing

removed RFIDWrapper::SetUid
it works fine so far with LCD+RFID reader.
testing required for machine output enable, wrong rfid tags
still missing server interactions

* added maintenance and allowed flags for Machine

allows the server to return to the arduino client the status of the machine: if maintenance is needed, and if usage of the machine is allowed.
board now checks server at startup and tries to get up-to-date machine information.
server returns name of holder if uid is valid.
not sure if the actual usage time of the machine shall be monitored by arduino (maybe based on one RUNNING signal from the machine) or done purely server-side, based on login/logout times.

* added nocard delay

* added delay for powering off and icon

added new icons to show the power status to the machine (on, off, powering off delay).
added new constants to configure the delays in conf::machine
added provision for audible warning before power-off in main

bugfix

wifi testing

bugfix

Update LCDWrapper.tpp

added sample serial log

* removed secrets.h

* added FabUser::UserLevel, added maintenance block

implementing comments of issue #4
whitelist allows hardcoding of both UID and user priviledge
fixed power off delay bug

forced compilation to C++17 for std::string_view

auto logout

Update secrets.h.example

* usage of std::optional and std::find_if

instead of struct with bools and for loops over arrays.
applied consistently (millis() - start > DELAY) instead of other comparisons which are less unsigned int arithmetic safe.

formatting + constexpr

constexpr configuration strings with std::string_view

* code & names cleanup

Used "FabUser" consistently
Renamed member_uid as card_uid
split the card namespace into separate file

* added comments

* added beep and comments

* maintenance WIP

* beep, relay, diagnostics debug

* Update LCDWrapper.tpp

Update main.cpp

* Update main.cpp

* bugfixes

* const more things, struct bindings

* improving c++ guidelines adherence

more const + LCD backlight method implementation

* Update LCDWrapper.h

* applied camelCase on class members

* added logging

* moved static global variables into boardstate

+used reference passing on structs
+ some renaming to avoid variables with same name as namespace Board

* improving C++ style

avoid mixing unsigned and int arithmetic
using for range constructs
fixed bugs for LCDs with different configuration than 16x2
using string_stream to build larger strings

* Update AuthProvider.cpp

* removed raw pointers for std::unique_ptr

* Replaced LCDWrapper<>::Config with pins_conf::lcd_config

* added long tap for maintenance

added debug flag
bugfixes

* bugfix whitelist

* CI with platformio

CI tests

Update platformio.yml

Create super-linter.yml

Delete super-linter.yml

Create linter.yml

Update linter.yml

Update platformio.yml

Delete linter.yml

Update README.md

Update platformio.yml

* linter tests

* fixing linter warnings

* Squashed commit of the following:

commit e82ad83
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 24 16:28:19 2023 +0200

    LongTap

    improved LongTap feature

    added interactive display
    example in log file

commit 470bc84
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 24 15:29:58 2023 +0200

    refactored BoardState into BoardLogic

    only one class Board::BoardLogic

commit c9dc3d2
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 22:17:49 2023 +0200

    linter warnings fixes

    linter warnings fixes

    linter warnings

    all files with 2 spaces ident

    using llvm clangtidy options

    Update main.cpp

    renamed Board.h as globals.h

    because that's just what it is

commit 9dd9138
Merge: 965df35 eeca1de
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 21:29:47 2023 +0200

    Merge branch 'asynv' of https://github.com/PBrunot/rfid-arduino into async

commit 965df35
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 21:29:13 2023 +0200

    Update RFIDWrapper.cpp

commit 60f87dd
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:35:09 2023 +0200

    moved Wifi init to BoardState::init

commit 6bf6c1b
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:15:55 2023 +0200

    Update main.cpp

commit b806094
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:04:49 2023 +0200

    refactoring

    moving code from BoardState to BoardLogic
    renamed DEBUG to ENABLE_LOGS
    moved BoardState constants to conf::buzzer
    tested with real hardware

commit 43fbbdc
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 11:42:15 2023 +0200

    rewritten with arkhipenko/TaskScheduler

commit 81c2634
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 09:59:35 2023 +0200

    trying async pattern

commit eeca1de
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:35:09 2023 +0200

    moved Wifi init to BoardState::init

commit a366e8f
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:15:55 2023 +0200

    Update main.cpp

commit 0dcc714
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 19:04:49 2023 +0200

    refactoring

    moving code from BoardState to BoardLogic
    renamed DEBUG to ENABLE_LOGS
    moved BoardState constants to conf::buzzer
    tested with real hardware

commit 5ad8359
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 11:42:15 2023 +0200

    rewritten with arkhipenko/TaskScheduler

commit ee4e211
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 09:59:35 2023 +0200

    trying async pattern

commit 565689a
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 17:15:53 2023 +0200

    Update platformio.yml

commit 9bda291
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 17:06:06 2023 +0200

    Update README.md

commit 01f5aeb
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 17:02:40 2023 +0200

    Update platformio.yml

commit cf9f9f3
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 16:58:56 2023 +0200

    CI with platformio

* Squashed commit of the following:

commit 66ba233
Author: Pascal Brunot <[email protected]>
Date:   Thu Apr 27 20:19:38 2023 +0200

    C++ style, removed const std::string_view

    as they are passed by value

    C++17 if with initializers

    code cleanup

commit c5517de
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 25 23:13:42 2023 +0200

    fixed 2 linter warnings

commit b930693
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 25 23:07:39 2023 +0200

    Update secrets.h.example

commit c8f178e
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 25 18:52:20 2023 +0200

    tested MQTT checkmachine/checkuser/startuse/stopuse

    MQTT testing

commit 55b4e15
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 25 14:50:30 2023 +0200

    MQTT WIP

commit f0985b2
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 24 22:22:58 2023 +0200

    MQTT client WIP

    FabServer / mqtt classes WIP
@PBrunot
Copy link
Contributor Author

PBrunot commented Apr 29, 2023

Nice, I've never used projects but it looks like a better option than using issues to keep tracks of things to do.
I've created a few tasks in it.

PBrunot added a commit that referenced this issue Apr 30, 2023
commit cf724f6
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 30 11:44:11 2023 +0200

    added wokwi project

    added wokwi build & URL
    pinning platformio to espressif32 6.1.0
    6.2.0  fails to build

commit 10273d7
Merge: 6b0e9fd 5c787bf
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 30 11:43:43 2023 +0200

    Merge branch 'main' of https://github.com/PBrunot/rfid-arduino

commit 5c787bf
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 29 23:00:28 2023 +0200

    Create codeql.yml

commit 6b0e9fd
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 29 22:58:09 2023 +0200

    removing string_views

commit 480bd69
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 29 20:33:58 2023 +0200

    C++ style , std::string_view

    nested namespace and using enum class default int
    using more string_views

    more string_views

commit 6fd2aa1
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 29 09:22:28 2023 +0200

    Squashed commit of the following:

    commit 66ba233
    Author: Pascal Brunot <[email protected]>
    Date:   Thu Apr 27 20:19:38 2023 +0200

        C++ style, removed const std::string_view

        as they are passed by value

        C++17 if with initializers

        code cleanup

    commit c5517de
    Author: Pascal Brunot <[email protected]>
    Date:   Tue Apr 25 23:13:42 2023 +0200

        fixed 2 linter warnings

    commit b930693
    Author: Pascal Brunot <[email protected]>
    Date:   Tue Apr 25 23:07:39 2023 +0200

        Update secrets.h.example

    commit c8f178e
    Author: Pascal Brunot <[email protected]>
    Date:   Tue Apr 25 18:52:20 2023 +0200

        tested MQTT checkmachine/checkuser/startuse/stopuse

        MQTT testing

    commit 55b4e15
    Author: Pascal Brunot <[email protected]>
    Date:   Tue Apr 25 14:50:30 2023 +0200

        MQTT WIP

    commit f0985b2
    Author: Pascal Brunot <[email protected]>
    Date:   Mon Apr 24 22:22:58 2023 +0200

        MQTT client WIP

        FabServer / mqtt classes WIP

commit 349154f
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 24 16:55:45 2023 +0200

    Squashed commit of the following:

    commit e82ad83
    Author: Pascal Brunot <[email protected]>
    Date:   Mon Apr 24 16:28:19 2023 +0200

        LongTap

        improved LongTap feature

        added interactive display
        example in log file

    commit 470bc84
    Author: Pascal Brunot <[email protected]>
    Date:   Mon Apr 24 15:29:58 2023 +0200

        refactored BoardState into BoardLogic

        only one class Board::BoardLogic

    commit c9dc3d2
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 22:17:49 2023 +0200

        linter warnings fixes

        linter warnings fixes

        linter warnings

        all files with 2 spaces ident

        using llvm clangtidy options

        Update main.cpp

        renamed Board.h as globals.h

        because that's just what it is

    commit 9dd9138
    Merge: 965df35 eeca1de
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 21:29:47 2023 +0200

        Merge branch 'asynv' of https://github.com/PBrunot/rfid-arduino into async

    commit 965df35
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 21:29:13 2023 +0200

        Update RFIDWrapper.cpp

    commit 60f87dd
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:35:09 2023 +0200

        moved Wifi init to BoardState::init

    commit 6bf6c1b
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:15:55 2023 +0200

        Update main.cpp

    commit b806094
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:04:49 2023 +0200

        refactoring

        moving code from BoardState to BoardLogic
        renamed DEBUG to ENABLE_LOGS
        moved BoardState constants to conf::buzzer
        tested with real hardware

    commit 43fbbdc
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 11:42:15 2023 +0200

        rewritten with arkhipenko/TaskScheduler

    commit 81c2634
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 09:59:35 2023 +0200

        trying async pattern

    commit eeca1de
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:35:09 2023 +0200

        moved Wifi init to BoardState::init

    commit a366e8f
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:15:55 2023 +0200

        Update main.cpp

    commit 0dcc714
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 19:04:49 2023 +0200

        refactoring

        moving code from BoardState to BoardLogic
        renamed DEBUG to ENABLE_LOGS
        moved BoardState constants to conf::buzzer
        tested with real hardware

    commit 5ad8359
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 11:42:15 2023 +0200

        rewritten with arkhipenko/TaskScheduler

    commit ee4e211
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 09:59:35 2023 +0200

        trying async pattern

    commit 565689a
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 17:15:53 2023 +0200

        Update platformio.yml

    commit 9bda291
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 17:06:06 2023 +0200

        Update README.md

    commit 01f5aeb
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 17:02:40 2023 +0200

        Update platformio.yml

    commit cf9f9f3
    Author: Pascal Brunot <[email protected]>
    Date:   Sun Apr 23 16:58:56 2023 +0200

        CI with platformio

commit ec57145
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 21:20:01 2023 +0200

    fixing linter warnings

commit 138deb0
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 20:18:04 2023 +0200

    linter tests

commit e083839
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 23 16:58:56 2023 +0200

    CI with platformio

    CI tests

    Update platformio.yml

    Create super-linter.yml

    Delete super-linter.yml

    Create linter.yml

    Update linter.yml

    Update platformio.yml

    Delete linter.yml

    Update README.md

    Update platformio.yml

commit b4d042c
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 22 15:27:28 2023 +0200

    bugfix whitelist

commit d671bd5
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 22 14:44:19 2023 +0200

    added long tap for maintenance

    added debug flag
    bugfixes

commit 4e7edbf
Author: Pascal Brunot <[email protected]>
Date:   Thu Apr 20 21:32:44 2023 +0200

    Replaced LCDWrapper<>::Config with pins_conf::lcd_config

commit 0c53680
Author: Pascal Brunot <[email protected]>
Date:   Thu Apr 20 21:01:28 2023 +0200

    removed raw pointers for std::unique_ptr

commit f0d33e1
Author: Pascal Brunot <[email protected]>
Date:   Wed Apr 19 22:54:12 2023 +0200

    Update AuthProvider.cpp

commit 379214e
Author: Pascal Brunot <[email protected]>
Date:   Wed Apr 19 22:42:36 2023 +0200

    improving C++ style

    avoid mixing unsigned and int arithmetic
    using for range constructs
    fixed bugs for LCDs with different configuration than 16x2
    using string_stream to build larger strings

commit b3a9a75
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 18 23:06:53 2023 +0200

    moved static global variables into boardstate

    +used reference passing on structs
    + some renaming to avoid variables with same name as namespace Board

commit 368cf05
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 17 22:17:33 2023 +0200

    added logging

commit b0f1107
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 17 21:36:27 2023 +0200

    applied camelCase on class members

commit b8981db
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 17 21:26:11 2023 +0200

    Update LCDWrapper.h

commit 855df9c
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 16 11:50:40 2023 +0200

    improving c++ guidelines adherence

    more const + LCD backlight method implementation

commit 0cc7f2f
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 21:20:36 2023 +0200

    const more things, struct bindings

commit 2da8a83
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 20:41:53 2023 +0200

    bugfixes

commit 49e1cc5
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 19:12:05 2023 +0200

    Update main.cpp

commit 6a0d727
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 19:07:26 2023 +0200

    Update LCDWrapper.tpp

    Update main.cpp

commit 1ffcbe9
Merge: 32f7b2c 9050259
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 19:05:44 2023 +0200

    Merge branch 'main' of https://github.com/PBrunot/rfid-arduino

commit 32f7b2c
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 19:05:40 2023 +0200

    beep, relay, diagnostics debug

commit 9050259
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 19:04:58 2023 +0200

    maintenance WIP

commit b3cc92e
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 15 10:24:35 2023 +0200

    added beep and comments

commit 7c32787
Author: Pascal Brunot <[email protected]>
Date:   Fri Apr 14 19:43:52 2023 +0200

    added comments

commit a2c2ec3
Author: Pascal Brunot <[email protected]>
Date:   Fri Apr 14 19:27:43 2023 +0200

    code & names cleanup

    Used "FabUser" consistently
    Renamed member_uid as card_uid
    split the card namespace into separate file

commit 12465a7
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 11 23:14:44 2023 +0200

    usage of std::optional and std::find_if

    instead of struct with bools and for loops over arrays.
    applied consistently (millis() - start > DELAY) instead of other comparisons which are less unsigned int arithmetic safe.

    formatting + constexpr

    constexpr configuration strings with std::string_view

commit 2ac456c
Author: Pascal Brunot <[email protected]>
Date:   Tue Apr 11 22:18:47 2023 +0200

    added FabUser::UserLevel, added maintenance block

    implementing comments of issue #4
    whitelist allows hardcoding of both UID and user priviledge
    fixed power off delay bug

    forced compilation to C++17 for std::string_view

    auto logout

    Update secrets.h.example

commit dc4242b
Merge: 6fcc289 ba659cd
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 10 21:54:13 2023 +0200

    Merge branch 'main' of https://github.com/PBrunot/rfid-arduino

commit 6fcc289
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 10 21:38:23 2023 +0200

    removed secrets.h

commit 90f61f8
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 10 20:04:58 2023 +0200

    added delay for powering off and icon

    added new icons to show the power status to the machine (on, off, powering off delay).
    added new constants to configure the delays in conf::machine
    added provision for audible warning before power-off in main

    bugfix

    wifi testing

    bugfix

    Update LCDWrapper.tpp

    added sample serial log

commit 42eca17
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 10 17:04:55 2023 +0200

    added nocard delay

commit 72ce28e
Author: Pascal Brunot <[email protected]>
Date:   Mon Apr 10 16:17:02 2023 +0200

    added maintenance and allowed flags for Machine

    allows the server to return to the arduino client the status of the machine: if maintenance is needed, and if usage of the machine is allowed.
    board now checks server at startup and tries to get up-to-date machine information.
    server returns name of holder if uid is valid.
    not sure if the actual usage time of the machine shall be monitored by arduino (maybe based on one RUNNING signal from the machine) or done purely server-side, based on login/logout times.

commit 9220f68
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 19:37:18 2023 +0200

    AuthProvider class + testing

    removed RFIDWrapper::SetUid
    it works fine so far with LCD+RFID reader.
    testing required for machine output enable, wrong rfid tags
    still missing server interactions

commit 1bd69f0
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 12:42:41 2023 +0200

    first working version on ESP32s3

    bugfix user_name display
    tested with ESP32S3
    it reads RFID tag, matches against whitelist, updates the LCD as expected

    debugging

    LCDWrapper : eliminated casts and connection status member, added pretty print for debugging

commit 9523fb7
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 11:41:43 2023 +0200

    removed pointers and allocation in constructor

commit 222ba5c
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 11:01:43 2023 +0200

    removed copy constructors

commit 8c64623
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 10:58:06 2023 +0200

    VSCode formatting

commit 215589d
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 10:51:34 2023 +0200

    created struct for MachineId instead of uint16_t

    #2 (comment)

commit 9cb7eb5
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 10:29:57 2023 +0200

    struct and constexpr for pins definition

    #2 (comment)

commit 99f885d
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 10:14:24 2023 +0200

    removed pointers

    LCD setRow is now public
    LCD text logic moved from LCD to BoardState

commit 3d44ade
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 09:06:27 2023 +0200

    eliminating pointers (WIP)

commit e165ba3
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 08:06:09 2023 +0200

    moved config/enum inside main class

commit 5ca8de0
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 9 00:26:53 2023 +0200

    split RFID into a separate class

commit ab3bdc8
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 8 23:44:51 2023 +0200

    testing on esp32s3

commit 9d77b1a
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 8 22:41:09 2023 +0200

    struct instead of long LCD parameter list

    + init in constructor
    + removed trailing _ for private members

commit b798b37
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 8 20:41:06 2023 +0200

    refactoring and PR #2 comments implementation

    replaced enum with enum class

    added BoardState class which wraps lcd, rfid, current user, server, machine and provides higher level function to the main.cpp

    comments implementation of PR #2

    memcpy instead of for loop

    removed underscores for private members

    init inline in the header

    consistent usage of this->

commit 60c4bde
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 8 13:21:42 2023 +0200

    platformio config for both ESP32 + ESP32S3

    pins.h config via #define
    comments improvement
    Update README.md

commit b1f59ee
Author: Pascal Brunot <[email protected]>
Date:   Sat Apr 8 13:06:12 2023 +0200

    refactoring LCDWrapper

    the LCDWrapper will decide what to write in each row based on current state, and update function arguments.
    main function has only to update the state

commit a9319c4
Author: Pascal Brunot <[email protected]>
Date:   Sun Apr 2 15:07:32 2023 +0200

    implementing comments from #1

    see #1
    except const expr for compatibility reasons with base library LCD

    applied code formatting + esp32s3 testing
@PBrunot PBrunot added the documentation Improvements or additions to documentation label Jun 1, 2024
@PBrunot
Copy link
Contributor Author

PBrunot commented Jun 9, 2024

Review of Requirements as of June 2024

Functional requirements

Requirement Status notes
Board must enable usage of lab machines by users, based on individual RFID tags -
Board must be easy to use with no user training requirements (usage in a school context) QRCode and LCD
Board must be robust in case of WiFi issues, to avoid blocking the lab or powering off machines it network is out of service Caching of RFID+whitelist to allow usage
Board must be low-maintenance for Fab Lab (ideally only initial setup and no batteries) Powered by the machine itself
Board must physically fit next to the machines approx 10x10x6 cm
Board must not interfere with long jobs (e.g. printing large 3D pieces) Autologoff can be disabled
Cumulative hours Machine usage must be registered for maintenance Some bugs to be fixed
Board must signal that machine maintenance is needed (e.g. laser lens cleaning every X hours) LCD displays expired maintenance text
A FabLab user can register maintenance operations to reset the maintenance signal Done with long tap
Server must be able to handle several boards simultaneously (min. 10 boards) Tested with 5,6 so far without issues
A FabLab admin must be able to ENABLE/DISABLE machine for general usage "Blocked for all" in backend project
Server must provide statistics per machine (usage log, hours cumulated, maintenance done) See backend project

Regulatory requiments

Requirement Status notes
GDPR compliance based on fab member consent or anomized data. Purge and GDPR consent to be reviewed
Boards must be electrically safe for usage in public space. So far only 24VDC is used

Economical requirements

Requirement Status notes
Boards must be low cost to manufacture (criteria < 50 eur/board) approx 15eur/board
Server must be low cost to operate (criteria < 50 eur/year) runs on Raspberry Pi or DebianVM

Excluded requirements for V1.0 (can be revised)

Requirement Status
Access control (boards control machines, not doors). ❌ not planned
Server shall not depend on Fab Manager (this can be done later, and it requires some plugin because the FabManager data model is not ready : no hours per machine, no maintenance, no attribute for users to link to tags, non-Fab users in the lab...) not started
Server shall not handle users abilitation to machines (this feature can come with the Fab Manager integration) ✅ actually this has been done in the backend as optional step for critical machines
Board shall not track consumables (e.g. meters of filament acquisition) ❌ not planned
Board shall not track actual machine running time (it will rely on user log-on and log-off) 💡could be done with external signal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants