Giter Site home page Giter Site logo

m5stacksats's Introduction

UP TO DATE VERSION WITH EASIER SETUP -> LNPOS <-

M5StackSats

A bitcoin Lightning-Network Point of Sale terminal using the ESP32 based M5Stack Faces Development Kit. Included in the kit is a keypad and charging dock, making it an ideal candidate for an cheap($55)/easy DIY bitcoin point of sale terminal. https://m5stack.com/products/face

bitcoinpos

Tutorial

bitcoinpos

Installing Arduino + libraries

Install the Arduino IDE and ESP32 hardware.

From "Manage Libraries" install,

  • LittlevGL
  • ArduinoJson
  • M5Stack

a

Notes

To create a splash image, you can use the Online Image to C Array Converter.

Here you can find some more information on the client server communication.

For parsing JSON responses and calculating the capacity you can use the ArduinoJson Assistant tool.

Tip me

If you like this project and might even use or extend it, why not send some tip love!

m5stacksats's People

Contributors

arcbtc avatar bavarianledger avatar dennisreimann avatar tkthundr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m5stacksats's Issues

Room77: Notice about missing WLAN

If the WLAN connection (or connection to RaspiBlitz) is not working, the device should let the user now. At the moment it just produces wrong QR code, etc.

Creating Invalid QR codes BTCPayServer version

The BTCPayServer version is creating Invalid QR codes, these cannot be scanned.
If I manually create the qr from the lightning invoice string it will create fine in any online generator.
I think there is something wrong with M5.Lcd.qrcode(invoicePayReq, 45, 0, 240, 10);

Reduce Read Macaroon Permissions

Just to keep in mind .. there is no Admin Macaroon on the POS, just a Invoice & Read Macaroon. So if the device gets stolen or hacked, the funds on the remote LND are safe. But in such scenario the Read Macarroon would still allow the attacker to read much if the information from the LND node, that is not needed to do the POS job. The newer LND allows for much more specialized Macaroons .. so for the future it would make sense to look in what way the Read Macaroon can be more restrictive.

See links:
lightningnetwork/lnd#1160
https://github.com/lightningnetwork/lnd/blob/13b56d5849a9495ed11d6928665115e88cd1d9b0/rpcserver.go#L209

Room77: Light on Numbers & Physical Security

When staff in the Room77 was punching in the amounts they almost always had a hard time seeing the numbers in the keypad of the m5stack faces kit ... so it would be cool to have a solution to better see the numnbers in a dark environment.

Also the device could need a bit of physical protection ... maybe some stickers covering the ports to make it it a bit harder to quickly temper with the device.

Room77: Instant Calculator

A nice to have feature would be: While the user is putting in an amount the math operations of the keyboard are allowed to assist bar tenders in making the bill ... like: 2.50 x 3 + 8,80 and when pressed the invoice button the calculation gets resolved into a final price.

Running over TOR - Raspiblitz

Hi,

Is there a way I could run the m5stack over TOR to connect to my node?
Maybe using LNDConnect - same that is used to connect to ZAP or ZEUS wallets.

Probably hard because of the hardware and libraries limitations - haven't found any TOR library...

Thanks!

Tipping the bar tender

see https://twitter.com/provoost/status/1206204457127727104?s=20

A lightning tipping-jar could be a static LNURL QR code, a little m5stack (without the keyboard) or a ESP32 with a small epaper ... showing always a valid invoice where you are free to set the amount. Would be great if on the backend the tipping jar can get connected to telegram (or alike) so that a small notification is send to bar tender about tip.

Room77: Keep COMPLETE report until Button press

One most requested feature from testing at Room77 was that the "COMPLETE" screen on a finished payment should stay on the screen until the bar tender presses a Button (or Device gets put back into cradle).

Room77: Reset on back into Cradle

Everytime the POS gets put back into cradle the device should reset itself to be ready for the next action. Just in case an invoice was not payed or a complete screen stayed on.

Connect to node issues

Is there a way of telling why it cant connect to a node (raspiblitz)? I double checked the (local) ip adress and the ssl certificate but the only feedback i get is "no node detected". Any ideas how i can check whats missing or wrong?

Thanks in advance!

show the exchange rate

To make the Sat calculation more transparent, the rate shall be displayed every time.
Saw this already in a branch of this project.

Room77: Check Inbound Capacity

The POS sould check the remaining inbound capacity (biggest inbound on any channel open). At least when bar tender puts in amount that is higher than that limit it should let know that this amount is not possible at the moment and give options: make on-chain, open channel to node or manage inbound capacity.

LNBits - invalid QR codes

Using LNBits, the m5stacksats apparently creates unreadable QR Codes (Zap & Phoenix unable to read)

Sketch:

  • const char* lnbitshost = "https://full_URL_to_lnbits_wallet" (including quotation marks)
  • String invoicekey = "Invoice/read key as per lnbits wallet" (including quotation marks)

Devices is able to connect to Wifi.

Room77: Battery -> Please put back into cradle

It can happen that bar tender forgets to put the POS back into cradle after use. The device should monitor Battery and maybe starts to beep (maybe with screen info) to remind user to be put back into cradle so that it stays operational for next action.

Room77: Reduce Brightness

We found that in dark environment the QR gets better scanned by phones if the brightness is a bit reduced.

Room77: EUR price in invoice description

At the moment the invoice description is just "Room77-53751723" or something. It should include the EUR price paid .. like: "Room77 8.66 EUR (53751723)"

That would help the user for the personal history and also the bar tender for history.

LND Version - QR Code broken?

I actually use a RaspiBlitz 1.5.1 with lnd 0.10.0- beta and bitcoin 0.20.0 mainnet

The connection to the node seems to be working, I can enter an amount and display a QR code. Unfortunately this QR code is faulty (seems empty)

I have already tried it with SSL/TLS and the following, even without success. Is it the new lnd and bitcoin version or could it be something else?

Room77: Button Functions and Menu

The LCD should over the buttons show the meaning of the buttons.

Those can be flexible based on if the user already entered an amount or not.

If a amount was entered:

A: CANCEL
B: Bitcoin (on-chain)
C: Bitcoin Lightning

If no amount was entered yet it could be a navigation or other options (to be discussed):

A: Info (Node & POS info)
B: History (to check latest payments for disputes)
C: Next Infoscreen/Menuscreen

If connecting over ip on a LAN

(ie const char* server = "10.xxx.xxx.xxx;)
Find replace client.setCACert(test_root_ca); to //client.setCACert(test_root_ca);
In reqinvoice function replace String topost = "{\"value\...... with:

 String topost = "{\"value\": \""+ value 
+"\", \"memo\": \""+ memo + String(random(1,1000)) 
+"\", \"expiry\": \"1000\","+
+"\"private\": true}";

find replace M5.Lcd.qrcode(payreq,45,0,240,10); to M5.Lcd.qrcode(payreq,45,0,240,14);

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.