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)
 
(50 dazwischenliegende Versionen von 7 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== WTF ==
+
[[Datei:Kassomat 2022.jpg|mini|rechts|Kassomat]]
 +
 
 
{{Projekt
 
{{Projekt
|image=No-Logo.png
+
|image=KASSOMAT.png
|involved=[[User:anlumo]]
+
|involved=[[User:anlumo]] [[User:m68k]] [[User:ripper]] [[User:phaer]] [[User:hetti]]
 
|startdate=XX.10.2012
 
|startdate=XX.10.2012
 
|status=in progress
 
|status=in progress
|wtf=box which manages money, you pay for stuff, crowdfund, etc.
+
|wtf=box which changes banknotes into coins
 
}}
 
}}
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">
 
'''IMPORTANT NOTE''':
 
 
'''Kassomat itself is not the metalab.'''
 
 
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.
 
 
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>
 
 
== Kontakt ==
 
Mailingliste gibt es auch! [https://lists.metalab.at/mailman/listinfo/kassomat kassomat@lists.metalab.at]
 
 
== Zeitplan ==
 
 
* ''''All-in Alpacca' Alpha''', ''when its done''
 
** Man kann Zeug bezahlen und bekommt Retour Geld!
 
** Spenden.
 
** Einkaeufe werden geloggt.
 
** Gehaeuse
 
 
* ''''Bumble Bee' Beta''', ''when its done''
 
** 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''', ''when its done''
 
** Einloggen mit MOS-Account moeglich
 
** Strichcode-Erkennung
 
** Laserjobs bezahlbar - LazzerAuth-Integration
 
** Shiny final UX fuer Backend; Projekt/Community-Topfverwaltung
 
** sonstige softwareseitige Features
 
 
== Bisher entstandene Kosten ==
 
 
* 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
 
** Aluprofile, 52€ (abgerechnet)
 
** Schnellverbinder fuer Eckverbindungen, 145€ (abgerechnet)
 
** 100xNutsteine, 30€ (abgerechnet)
 
** 200xSchrauben & Beilagscheiben, 7€ (abgerechnet)
 
** 2x 1m Flacheisen, 8€ (abgerechnet)
 
* Arbeitszeit fuer Software und Gehaeusebau: ahahahahahah
 
 
'''Insgesamt (zur Zeit): 1301€'''
 
 
== was gerade passiert (ieren wird) ==
 
* '''Ende Jaenner/Anfang Februar Hobbes wegen Gehaeuse fragen.'''
 
* '''[https://www.yoctoproject.org/ Yocto-Image] fuers Netbook basteln'''
 
* ''' es wird fleissig gecodet. '''
 
** feinheiten beim geldwechsel-screen
 
** SSP commands implementieren
 
** <s>was gekauft wird muss vernünftig geloggt werden.</s>
 
** <s>Klartextkommunikation mit Geldautomataton. Encryption implementiert.</s>
 
*** <s>encrypte kommunikation setup fehlt noch.</s>
 
* <s>alle Gehaeuseteile beisammen! yea.</s>
 
* <s>25.6 Gehaeusezutaten bestellt. 1.7.13 verschickt worden</s>
 
* <s>Datenbankkommunikation mit der UI.</s>
 
* <s>Gehaeuseplan ist fertig, Stueckliste wird erstellt.</s>
 
* <s>8.6 und 9.6 Kassomat Hackathon, lets do this.</s>
 
* <s>2.6 Kassomat Pre-Hackathon.. vierlex kann einführung in Qt geben, anlumo einführung in c++, projektbezogen</s>
 
* <s>es wurde viel in Richtung Bitcoin definiert/spezifiziert.</s>
 
* <s>finale Gehäuseplanung</s> fertig! wohoo!
 
[[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
+
== Kassomat ==
  
== Was gibts zu tun? (und wer machts) ==
+
payoutd controls the hardware and feeds events into redis queues where other tools may pick them up.
* Gehaeuse? Aus was und wie bauen? Was soll es koennen? Tuer noetig?
+
Changeomatic listens to events in those redis queues and allows users to change banknotes into coins.
** [[User:ΠTΩ]] (Gehaeuseplan), [[User:Hobbes]] (schweissen)
+
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! :)
* Frontend implementieren (Qt/qml, c++)
+
There is now an [https://github.com/metalab-kassomat umbrella organization] on github which contains all the sub-projects listed below.
* Backened implementieren (mittels http server in der ORM library)
 
** [[User:anlumo]]
 
* AuthentifizierungsschnittstellenBLA zum MOS
 
** [[User:Hop]]
 
  
=== done ===
+
'''''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]
* Wie schaut die UIX aus?
 
** [[User:redplanet]]
 
* Wie verbindet man Geldcheckhardware mit Laptop?
 
** [[User:anlumo]]
 
* API von Herstellerfirma checken (haben fuer Linux/C++ auch was)
 
** [[User:Vierlex]]
 
* Wie soll die Datenbank ausschauen?
 
** [[User:metaz]]
 
  
== features, Features. FEATURES! ==
+
== Kassomat/VM ==
  
zeug was man noch tun kann.
+
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).
  
* Strichcodeerkennung ueber die Webcam. ''ist einfach zu machen, gibt open source libs dafür - [[Benutzer:anlumo|anlumo]]''
+
== Components ==
* 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 ==
+
* '''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)
  
  
Ablauf (K=Kassomat, S=BC-Server):
+
* '''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]
  
<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:
+
* '''Payout'''
hinschicken nur cent-Beträge
+
** [https://github.com/metalab-kassomat/kassomat-payout Source]
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!
+
** 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")
  
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:
+
* '''Payout Simulator''' ''for development without the real hardware''
 +
** [https://github.com/metalab-kassomat/kassomat-payout-simulator 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.payoutsim.PayoutSimMain"</code>
 +
** UI: Graphical Swing Frontend
 +
** libs
 +
*** [http://redisson.org/ Redisson] (Redis client)
 +
*** [https://github.com/FasterXML/jackson Jackson] (JSON library)
  
  
  1. Automat erkennt QR-Code
+
* '''[http://redis.io/ Redis]'''
  2. K->S: erkannte uri und Betrag, der gerade in € eingezahlt wurde
+
** message broker between the different components (Changeomatic, Payout and the Maintenance Mode Application)
sendbtc:
+
** not used as a datastore!
address: bitcoin://aoishjdsoaidhashd
 
eurocent: 3000
 
  3. S->K: Transaktions-ID
 
sentbtc:
 
txid: aosihduawiusdfhgsiufhewufbsidjlbfkdsbfdfksb
 
4. Transaktions-ID im Kassomat loggen!
 
  
Fehlerfall zu Punkt 3:
+
[[Datei:kassomat-overview.png|500px|thumb|left|Overview of the various components]]
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