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
(69 dazwischenliegende Versionen von 8 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== WTF ==
+
{{Projekt
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.
+
|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
 +
}}
  
<div style="background-color:#FFFFCC; border:2px #000000 dashed; padding:10px">
+
== Kassomat ==
'''IMPORTANT NOTE''':
 
  
'''Kassomat itself is not the metalab.'''
+
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.
  
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.
+
== Kassomat/VM ==
  
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>
+
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).
  
== Kontakt ==
+
== Components ==
[[User:Vierlex]] fuehlt sich verantwortlich.
 
Mailingliste gibt es auch! [https://lists.metalab.at/mailman/listinfo/kassomat kassomat@lists.metalab.at]
 
  
== Zeitplan ==
+
* '''Changeomatic'''
 +
** [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)
  
* ''''All-in Alpacca' Alpha''', ''April/Mai '13''
 
** Man kann Zeug bezahlen und bekommt Retour Geld!
 
** Spenden.
 
** Einkaeufe werden geloggt.
 
* ''''Bumble Bee' Beta''', ''Juni '13''
 
** Einloggen mit MOS-Account moeglich
 
** anlegen von Projekt/Community Toepfen
 
** Shiny final UX fuer Kassomat
 
* ''''Funny Ferret' Final''', ''? '13''
 
** Strichcode-Erkennung
 
** Laserjobs bezahlbar
 
** Vinylcutter/Druckerjobs bezahlbar
 
** Gehaeuse
 
** Shiny final UX fuer Backend (Projekt/Community-Topfverwaltung)
 
** sonstige softwareseitige Features
 
  
== Bisher entstandene Kosten ==
+
* '''Maintenance Mode Application'''
 +
** [https://github.com/metalab-kassomat/kassomat-scripts Source]
 +
** Written in Python
 +
*** set the coin levels: <code>./kassomat-set-coin-levels.py</code>
 +
*** count the coins (n.b. '''this will dump all coins through the bottom opening!'''): <code>./kassomat-count-coins.py</code>
 +
** UI: Console interface
 +
** libs
 +
*** [https://pypi.python.org/pypi/redis redis]
  
* Geldcheckhardware von aus.at, '''1006€''' ''(abgerechnet)''
 
** Smart Hopper
 
** NV200 + Smart Payout
 
** passendes Kabelzeug
 
* 2 Netzteile ueber [[User:overflo]] bestellt, '''52€''' ''(abgerechnet)''
 
** er hat eine Rechnung ans Metalab gestellen.
 
* Rohmaterial fuer das Gehaeuse, '''?€'''
 
  
'''Insgesamt (zur Zeit): 1058€'''
+
* '''Payout'''
 +
** [https://github.com/metalab-kassomat/kassomat-payout Source]
 +
** Written in C, can be built with make
 +
** Linux daemon
 +
** [https://github.com/metalab-kassomat/kassomat-payout/blob/master/docs/overview.md JSON API] (accessible via Redis)
 +
** UI: none
 +
** 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")
  
== was gerade passiert (ieren wird) ==
 
[[Datei:Kassomat-Mockup.png|600px]]
 
* mittlerweile sind eigene Netzeile eingetroffen.
 
* ''' es wird fleissig gecodet. '''
 
* MendlMax Netzteile haben sich als passender temporaerer Ersatz herrausgestellt. eigene netzteile sind bestellt.
 
* <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>
 
* finale Gehäuseplanung
 
* <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... ==
+
* '''Payout Simulator''' ''for development without the real hardware''
* '''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.
+
** [https://github.com/metalab-kassomat/kassomat-payout-simulator Source]
* '''7.2.13''', Geldscheinmanagment-Hardware wurde erfolgreich erworben.
+
** Written in Java, can be built (and run) with [https://maven.apache.org/ Maven]
* '''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.
+
*** build: <code>mvn install</code>
* '''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.
+
*** run: <code>mvn exec:java -Dexec.mainClass="at.metalab.payoutsim.PayoutSimMain"</code>
* '''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.
+
** UI: Graphical Swing Frontend
* '''24.11.12''', Angebot von AuS.at wird eingeholt.
+
** libs
* <strike>'''22.11.12, ca. 20:00''' treffen sich [[User:ΠTΩ]] und [[User:Vierlex]] und besprechen das Gehaeuse</strike> einer war krank, Ersatztermin folgt.
+
*** [http://redisson.org/ Redisson] (Redis client)
* '''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.
+
*** [https://github.com/FasterXML/jackson Jackson] (JSON library)
* '''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
 
  
== Was gibts zu tun? (und wer machts) ==
+
* '''[http://redis.io/ Redis]'''
* Gehaeuse? Aus was und wie bauen? Was soll es koennen? Tuer noetig?
+
** message broker between the different components (Changeomatic, Payout and the Maintenance Mode Application)
** [[User:Zwax]], [[User:ΠTΩ]], [[User:Hobbes]]
+
** not used as a datastore!
* Wie verbindet man Geldcheckhardware mit Laptop?
 
** [[User:anlumo]]
 
* API von Herstellerfirma checken (haben fuer Linux/C++ auch was)
 
** [[User:Vierlex]]
 
* Wie schaut die UIX aus?
 
** [[User:redplanet]]
 
* Wie soll die Datenbank ausschauen?
 
** [[User:metaz]]
 
* Datenbank Backup Moeglichkeit?
 
* Frontend implementieren
 
** [[User:redplanet]], [[User:Vierlex]]
 
* Backened implementieren (mittels http server in der ORM library)
 
** [[User:anlumo]]
 
* AuthentifizierungsschnittstellenBLA zum MOS
 
** [[User:Hop]]
 
  
== features, Features. FEATURES! ==
+
[[Datei:kassomat-overview.png|500px|thumb|left|Overview of the various components]]
  
zeug was man noch tun kann.
+
{{#ev:youtube|V_DINDvbJZY|360|left|Kassomat mit Change-o-matic in Action}}
 
+
{{#ev:youtube|V_xZ0XY37NehM|360|left|Kassomat zum Geldzählen verwenden}}
* 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]]

Version vom 23. November 2016, 22:25 Uhr


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: 2016-11-23


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.

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
Kassomat mit Change-o-matic in Action
Kassomat zum Geldzählen verwenden