Kassomat: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
(Bild hinzugefügt, Videos entfernt, da nicht mehr verfügbar)
 
(61 dazwischenliegende Versionen von 8 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== WTF ==
+
[[Datei:Kassomat 2022.jpg|mini|rechts|Kassomat]]
Eine selbstgebaute Kassa mit Touchinterface, die hauptsaechlich als Ersatz zur offenen Kassa im Einsatz sein soll, die verhindern soll dass nicht einfach so mehrere Geldscheine aus der Kassa verschwinden. Zusaetzlich eroeffnen sich angenehme Funktionalitaet wie zB: iButton Credits, automatische Buchhaltung, Lazzzor Jobs erfassen, Barcode Scanner,.. whatnot.
 
  
<div style="background-color:#FFFFCC; border:2px #000000 dashed; padding:10px">
+
{{Projekt
'''IMPORTANT NOTE''':
+
|image=KASSOMAT.png
 +
|involved=[[User:anlumo]] [[User:m68k]] [[User:ripper]] [[User:phaer]] [[User:hetti]]
 +
|startdate=XX.10.2012
 +
|status=in progress
 +
|wtf=box which changes banknotes into coins
 +
}}
  
'''Kassomat itself is not the metalab.'''
+
== Kassomat ==
  
There are '''certain parties that will use the Kassomat''', where metalab shall be one. Kassomat uses the concept of a “project” in the software. Every project has an owner (such as the metalab, the photolab group, a single person, etc). This owner is responsible for handling all legal and tax implications. Kassomat is '''only a box where people put money in''', that records which project got what amount of money, so it can be split up again afterwards.
+
payoutd controls the hardware and feeds events into redis queues where other tools may pick them up.
 +
Changeomatic listens to events in those redis queues and allows users to change banknotes into coins.
 +
The protocol is documented in the [https://github.com/metalab-kassomat/kassomat-payout/blob/master/docs/overview.md payoutd repository]. People who are interested in implementing a more advanced POS system are very welcome to do so! :)
 +
There is now an [https://github.com/metalab-kassomat umbrella organization] on github which contains all the sub-projects listed below.
  
In addition to that, we're planning to '''allow people to prepay''' small amounts of money, so we can do stuff like payment by iButton. '''No loans will be given.''' ''-- anlumo, internal mailinglist, 15:15, 4.4.13''</div>
+
'''''Please note:''' From 6/2021 on the manufacturer of Smart Hopper (coin unit) and NV200 (banknotes) will no longer provide new currency or firmware updates. No spare parts, too.'' [https://metalab.at/wiki/Datei:Innovative_Technology_Ltd_-_Obsolete_Products_Notification.pdf cf. PDF]
  
== Kontakt ==
+
== Kassomat/VM ==
[[User:Vierlex]] fuehlt sich verantwortlich.
 
Mailingliste gibt es auch! [https://lists.metalab.at/mailman/listinfo/kassomat kassomat@lists.metalab.at]
 
  
== Zeitplan ==
+
Instead of installing a lot of packages and requirements you could opt to use [https://www.virtualbox.org VirtualBox] and [https://www.vagrantup.com Vagrant]. The [https://github.com/metalab-kassomat/kassomat-vm kassomat-vm] repository contains all the necessary files to get a fully provisioned virtual machine (it is even possible to plug the actual hardware into your host and use it from inside the vm).
  
* ''''All-in Alpacca' Alpha''', ''Anfang Juli '13''
+
== Components ==
** Man kann Zeug bezahlen und bekommt Retour Geld!
 
** Spenden.
 
** Einkaeufe werden geloggt.
 
** Gehaeuse
 
  
* ''yeah we kind are behind scheduele.. that will hopefully change with the kassomat hackathon (see below)''
+
* '''Changeomatic'''
** ''sooo we got some stuff working butt still behind schedule,.. changing scheduele''
+
** [https://github.com/metalab-kassomat/kassomat-changeomatic Source]
 +
** Written in Java, can be built (and run) with [https://maven.apache.org/ Maven]
 +
*** build: <code>mvn install</code>
 +
*** run: <code>mvn exec:java -Dexec.mainClass="at.metalab.changeomatic.ChangeomaticMain"</code>
 +
** UI: Graphical Swing Frontend
 +
** libs
 +
*** [http://redisson.org/ Redisson] (Redis client)
 +
*** [https://github.com/FasterXML/jackson Jackson] (JSON library)
  
* ''''Bumble Bee' Beta''', ''? '13''
 
** anlegen von Projekt/Community Töpfen
 
** moneycodes zum ausbezahlen von spenden.
 
** Bitcoin bezahlen und auszahlen lassen
 
** Shiny final UX fuer Kassomat
 
** Vinylcutter/Druckerjobs bezahlbar
 
  
* ''''Funny Ferret' Final''', ''? '13''
+
* '''Maintenance Mode Application'''
** Einloggen mit MOS-Account moeglich
+
** [https://github.com/metalab-kassomat/kassomat-scripts Source]
** Strichcode-Erkennung
+
** Written in Python
** Laserjobs bezahlbar - LazzerAuth-Integration
+
*** set the coin levels: <code>./kassomat-set-coin-levels.py</code>
** Shiny final UX fuer Backend; Projekt/Community-Topfverwaltung
+
*** count the coins (n.b. '''this will dump all coins through the bottom opening!'''): <code>./kassomat-count-coins.py</code>
** sonstige softwareseitige Features
+
** UI: Console interface
 +
** libs
 +
*** [https://pypi.python.org/pypi/redis redis]
  
== Bisher entstandene Kosten ==
 
  
* Geldcheckhardware von aus.at, '''1006€''' ''(abgerechnet)''
+
* '''Payout'''
** Smart Hopper
+
** [https://github.com/metalab-kassomat/kassomat-payout Source]
** NV200 + Smart Payout
+
** Written in C, can be built with make
** passendes Kabelzeug
+
** Linux daemon
* 2 Netzteile ueber [[User:overflo]] bestellt, '''52€''' ''(abgerechnet)''
+
** [https://github.com/metalab-kassomat/kassomat-payout/blob/master/docs/overview.md JSON API] (accessible via Redis)
** er hat eine Rechnung ans Metalab gestellen.
+
** UI: none
* Rohmaterial fuer das Gehaeuse, '''?€'''
+
** libs
 +
*** [https://github.com/redis/hiredis hiredis] (Redis client)
 +
*** [http://libevent.org libevent2] (Event Dispatching)
 +
*** [http://www.digip.org/jansson/ libjansson] (JSON library)
 +
*** [https://sourceforge.net/projects/libuuid/ libuuid]
 +
*** ITL example code (aka "vendor hardware library")
  
'''Insgesamt (zur Zeit): 1058€'''
 
  
== was gerade passiert (ieren wird) ==
+
* '''Payout Simulator''' ''for development without the real hardware''
* '''Klartextkommunikation mit Geldautomataton. Encryption implementiert. encrypte kommunikation setup fehlt noch.'''
+
** [https://github.com/metalab-kassomat/kassomat-payout-simulator Source]
* '''Datenbankkommunikation mit der UI passt.'''
+
** Written in Java, can be built (and run) with [https://maven.apache.org/ Maven]
* '''Gehaeusezutaten bestellt.'''
+
*** build: <code>mvn install</code>
* Gehaeuseplan ist fertig, Stueckliste wird erstellt und dann wird bestellt.
+
*** run: <code>mvn exec:java -Dexec.mainClass="at.metalab.payoutsim.PayoutSimMain"</code>
* 8.6 und 9.6 Kassomat Hackathon, lets do this.
+
** UI: Graphical Swing Frontend
* 2.6 Kassomat Pre-Hackathon.. vierlex kann einführung in Qt geben, anlumo einführung in c++, projektbezogen
+
** libs
* es wurde viel in Richtung Bitcoin definiert/spezifiziert.
+
*** [http://redisson.org/ Redisson] (Redis client)
* <s>finale Gehäuseplanung</s> fertig! wohoo!
+
*** [https://github.com/FasterXML/jackson Jackson] (JSON library)
* ''' es wird fleissig gecodet. '''
 
[[Datei:Kassomat-Mockup.png|600px]]
 
* <s>MendlMax Netzteile haben sich als passender temporaerer Ersatz herrausgestellt. eigene netzteile sind bestellt.</s>
 
** mittlerweile sind eigene Netzeile eingetroffen. juhu!
 
* <s>Hardware ist da! fehlt nur noch das Netzteil dann kanns losgehen!!!<s/>
 
* <s>Lieferung in Auftrag gegeben, ETA Mitte/Ende Jaenner</s>
 
* <s>Arbeitsgruppentreffen mit Bitcoin Leuten</s>
 
* <s>rudimentaeres GUI bauen</s> (http://qt.digia.com/Global/Images/Qt/Files/EducationMaterial/L7%20-%20pdf.zip fuer alle die mitmachen wollen)
 
** https://github.com/Metalab/kassomat look here
 
* <s>Datenbank planen</s>
 
* in den Linux-Example Code einlesen (wer das "SDK" haben will kassomat-owner@lists.metalab.at anschreiben, nutzt nicht viel wenn man die Hardware hat aber nja..)
 
  
== was bisher geschah... ==
 
* '''3.4''' Anlumo und Vierlex und viele Bitcoin-Leute haben darueber geplaudert wies jetzt genau rennen soll. ergebnis sieht man weiter unten. Das Feature wurde mal fuer die Beta angelegt.
 
* '''15.2 - 17.2''' waehrend des aeusserst erfolgreichen [[Hackathon 9]] wurde die Hardware mit buggy Testprogrammen unter Windows und Linux erfolgreich auf Funktionalitaet ueberprueft sowie weitere Vorgehensweise beschlossen. Checkout le git.
 
* '''7.2.13''', Geldscheinmanagment-Hardware wurde erfolgreich erworben.
 
* '''7.1.13''', spontane, interessante Plauderei mit den Bitcoin-Leuten ueber die Moeglichkeit ihre bereits bestehende APP einzubinden. Kassomat braeuchte dann dementsprechend permanenten Internetzugang. Arbeitstreffen wird folgen.
 
* '''19.12.12, 10:00, SBahn Station/Strebersdorf''' treffen mit [[User:ΠTΩ]] wegen dem Gehaeuse planen/Hardware besichtigen. War recht lustig, Vorführeffekt, Gerät hat nicht reagiert, aber es wurde angeboten wenn wir die Teile abholen kommen, sie Vorort auszupackenm zusammenzubauen und zu testen damits auch fix funktioniert.
 
* '''30.11.12''', Angebot ist da, das ganze Zeug kostet 1016e. Wuerde gerne mit Zwax und Tom vorher das Zeug besichtigen und das Gehaeuse planen bevor wirs kaufen. moeglich erst ab 10ten Dezember weil Tom daweil in den US verweilt.
 
* '''24.11.12''', Angebot von AuS.at wird eingeholt.
 
* <strike>'''22.11.12, ca. 20:00''' treffen sich [[User:ΠTΩ]] und [[User:Vierlex]] und besprechen das Gehaeuse</strike> einer war krank, Ersatztermin folgt.
 
* '''20.11.12''' Weitere GeldscheinEss- und -ausspuck Loesung [http://www.jcmglobal.biz/en/products/productdetails.aspx?ProdID=VEGA Vega+RC von JCM]. Sowie eine groessere All-in-One Loesung [http://www.ballywulff.de/master.php?var_1=15&var_2=42&var_3=14 MCT 100](beinhaltet den Vega+RC) die man etwas customizen wuerde bzw vielleicht billiger kriegen koennt wenn man bestimmte Features nicht mitbestellt. Grosses Plus ist das bereits vorhandene (wenn auch sehr grosse) Gehaeuse! Fuer beide Items wurde bereits per-Mail angefragt. '''update''' [[User:ΠTΩ]] baut ein tolles Gehaeuse! voll super.
 
* '''18.11.12''' erstes offizielles Orga Treffen eigentlich nur zum Thema Gehaeuse. Es ist schwerer als gedacht eine kostenguenstige und professionelle Lösung zu finden (zu dem das Budget sich verschmälert hat, siehe unten). Weitere Recherche nach geeignetem Material oder bereits fertigen Boxen nötig.
 
* <strike>'''WICHTIG''' erstes Organisations treffen in Planung! am '''18.11'''</strike>
 
* '''14.11.12 (nachtrag)''' ersteigerter NV200 ist NICHT erweiterbar mit einem Smartpayout Modul, daher muss alles neu angeschaft werden. dadurch erhöhen sich die Kosten auf 850€ OHNE Gehaeuse!
 
* '''13.11.12''' Windows und Linux SDK get! (für Cash-Hardware)
 
* '''7.11.12''' erstes UI Brainstorming. gar nicht so einfach. & Piratenpad Update.
 
* '''5.11.12''' you can has http://piratepad.net/CUBI9uXphb (fuer Planung und Organisation) and https://github.com/Metalab/kassomat
 
  
* '''1.11.12''' [[User:Vierlex]] schaut sich die low-level API [http://www.innovative-technology.co.uk//images/pdocuments/sspdoc/GA138%202_0_0.pdf PDF] der Geraete an. NV200 (ohne Smart Payout Modul) um 160€ ersteigert. Hat auch um C Libraries bei [http://www.innovative-technology.co.uk inovative technology] angefragt
+
* '''[http://redis.io/ Redis]'''
 +
** message broker between the different components (Changeomatic, Payout and the Maintenance Mode Application)
 +
** not used as a datastore!
  
== Was gibts zu tun? (und wer machts) ==
+
[[Datei:kassomat-overview.png|500px|thumb|left|Overview of the various components]]
* Gehaeuse? Aus was und wie bauen? Was soll es koennen? Tuer noetig?
 
** [[User:Zwax]], [[User:ΠTΩ]], [[User:Hobbes]]
 
* Wie verbindet man Geldcheckhardware mit Laptop?
 
** [[User:anlumo]]
 
* API von Herstellerfirma checken (haben fuer Linux/C++ auch was) '''done'''
 
** [[User:Vierlex]]
 
* Wie schaut die UIX aus?
 
** [[User:redplanet]]
 
* Wie soll die Datenbank ausschauen? '''done'''
 
** [[User:metaz]]
 
* Datenbank Backup Moeglichkeit?
 
* Frontend implementieren
 
** [[User:Vierlex]]
 
* Backened implementieren (mittels http server in der ORM library)
 
** [[User:anlumo]]
 
* AuthentifizierungsschnittstellenBLA zum MOS
 
** [[User:Hop]]
 
 
 
== features, Features. FEATURES! ==
 
 
 
zeug was man noch tun kann.
 
 
 
* Strichcodeerkennung ueber die Webcam. ''ist einfach zu machen, gibt open source libs dafür - [[Benutzer:anlumo|anlumo]]''
 
* Logging der verschiedenen Einnahmen (fuer Buchhaltung interessant und Statistiken: Mate-konsum um welche Uhrzeiten am meisten verkauft?)
 
* Lazzzor Jobs bezahlen
 
* iButton mit Credits
 
* Vinyldrucker Jobs bezahlen
 
* Druckerauftraege bezahlen
 
* Autonome Kassaverwaltung (für div. Kleingruppen zb Fotolab,Werkstatt die über den Kassomat Geld in ihre gemeinsame Kassa einzahlen und sich auszahlen lassen können)
 
* Custom Bezahlauftrag (wieviel/wofuer, spende)
 
* Verwaltung von Spendentöpfen ala kickstarter.com! immer sichtbar, immer einzahlbar. Automatische Bewerbung von aktuellen Projekten als Idle-Screen.
 
* Eine weitere Red Alert-Anzeige
 
* von hand eingetragene "its empty"-notification bei bezahlung von schrauben oder bauteilen aus dem sortiment (falls gwünscht)
 
* Bitcoins!
 
 
 
== Bitcoin/Kassomat-Protokoll ==
 
 
 
 
 
Ablauf (K=Kassomat, S=BC-Server):
 
 
 
<pre>
 
  1. K->S Jemand will €2 bezahlen
 
quote:
 
eurocent: 200
 
  2. S->K
 
quote:
 
uri: bitcoin:16f5635f73f?amount=0.01465324
 
  3. K: wandelt uri in einen QR-Code um und zeigt ihn an (->zxing)
 
  4. warten… (sleep 10sec)
 
  5. BT-Workflow:
 
  6.
 
    1. S->K €2 wurden bezahlt
 
receivebtc:
 
uri: bitcoin:16f5635f73f?amount=0.01465324
 
eurocent: 5000
 
txid: aosihduawiusdfhgsiufhewufbsidjlbfkdsbfdfksb
 
    2. K: Dialog wird geschlossen (mit Danke-Hinweis oder sowas)
 
    3. Wenn mehr als das gezahlt wurde: Guthaben in € wird aufgerechnet
 
  7. normaler Workflow:
 
  8.
 
    1. Geld wird eingeworfen, als Kontostand wird €8 angezeigt.
 
 
 
Websocket-Protokoll:
 
hinschicken nur cent-Beträge
 
zurück kommen URIs, wenn sie angezeigt werden sollen als QR-Code, oder uri+betrag, wenn für diese URI etwas bezahlt wurde. Der Betrag kann unterschiedlich sein!
 
 
 
Nur mit TLS, mit cert-pinning + client-side cert! Auch checken, welche crypto verwendet wird, kein RC4 erlauben!
 
TLS macht schon challenge/response, d.h. es ist replay-sicher
 
 
 
Geldfluss in anderer Richtung:
 
 
 
 
 
  1. Automat erkennt QR-Code
 
  2. K->S: erkannte uri und Betrag, der gerade in € eingezahlt wurde
 
sendbtc:
 
address: bitcoin://aoishjdsoaidhashd
 
eurocent: 3000
 
  3. S->K: Transaktions-ID
 
sentbtc:
 
txid: aosihduawiusdfhgsiufhewufbsidjlbfkdsbfdfksb
 
4. Transaktions-ID im Kassomat loggen!
 
 
 
Fehlerfall zu Punkt 3:
 
sentbtc:
 
error: "message"
 
</pre>
 
  
 
[[Kategorie:Projekte]]
 
[[Kategorie:Projekte]]

Aktuelle Version vom 20. Mai 2022, 22:00 Uhr

Kassomat



Kassomat
KASSOMAT.png
Gestartet: XX.10.2012
Involvierte: User:anlumo User:m68k User:ripper User:phaer User:hetti
Status: in progress
Beschreibung: box which changes banknotes into coins
Shutdownprozedur:
Zuletzt aktualisiert: 2022-05-20


Kassomat

payoutd controls the hardware and feeds events into redis queues where other tools may pick them up. Changeomatic listens to events in those redis queues and allows users to change banknotes into coins. The protocol is documented in the payoutd repository. People who are interested in implementing a more advanced POS system are very welcome to do so! :) There is now an umbrella organization on github which contains all the sub-projects listed below.

Please note: From 6/2021 on the manufacturer of Smart Hopper (coin unit) and NV200 (banknotes) will no longer provide new currency or firmware updates. No spare parts, too. cf. PDF

Kassomat/VM

Instead of installing a lot of packages and requirements you could opt to use VirtualBox and Vagrant. The kassomat-vm repository contains all the necessary files to get a fully provisioned virtual machine (it is even possible to plug the actual hardware into your host and use it from inside the vm).

Components

  • Changeomatic
    • Source
    • Written in Java, can be built (and run) with Maven
      • build: mvn install
      • run: mvn exec:java -Dexec.mainClass="at.metalab.changeomatic.ChangeomaticMain"
    • UI: Graphical Swing Frontend
    • libs


  • Maintenance Mode Application
    • Source
    • Written in Python
      • set the coin levels: ./kassomat-set-coin-levels.py
      • count the coins (n.b. this will dump all coins through the bottom opening!): ./kassomat-count-coins.py
    • UI: Console interface
    • libs


  • Payout
    • Source
    • Written in C, can be built with make
    • Linux daemon
    • JSON API (accessible via Redis)
    • UI: none
    • libs


  • Payout Simulator for development without the real hardware
    • Source
    • Written in Java, can be built (and run) with Maven
      • build: mvn install
      • run: mvn exec:java -Dexec.mainClass="at.metalab.payoutsim.PayoutSimMain"
    • UI: Graphical Swing Frontend
    • libs


  • Redis
    • message broker between the different components (Changeomatic, Payout and the Maintenance Mode Application)
    • not used as a datastore!
Overview of the various components