Jura-Python-BT
Code for control and payment system of Jura Coffee Machine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
old_blue.py File Reference

Namespaces

namespace  old_blue
 

Functions

def old_blue.setupBuzzer (pin)
 
def old_blue.beep (duration)
 
def old_blue.getUID_stats ()
 
def old_blue.get_price (product)
 
def old_blue.sleepTimer (secs)
 
def old_blue.lockUnlockMachine (code, lock_status, unlock_code="77e1")
 
def old_blue.get_name (UID)
 
def old_blue.get_vorname (UID)
 
def old_blue.get_chip (UID)
 
def old_blue.get_value (UID)
 
def old_blue.set_value (UID, value)
 
def old_blue.set_buylist (UID, product_name)
 
def old_blue.readlineCR (port)
 
def old_blue.scanCard ()
 
def old_blue.getAlerts (status)
 
def old_blue.end_read (signal, frame)
 
def old_blue.read_statistics ()
 

Variables

 old_blue.filename
 
 old_blue.level
 
 old_blue.format
 
 old_blue.datefmt
 
int old_blue.BuzzerPin = 7
 
BtEncoder old_blue.BtEncoder = BtEncoder()
 
JuraEncoder old_blue.JuraEncoder = JuraEncoder()
 
os old_blue.DEVICE = os.getenv("DEVICE")
 
os old_blue.mastercard1 = os.getenv("MASTER_CARD_1")
 
os old_blue.mastercard2 = os.getenv("MASTER_CARD_2")
 
os old_blue.passwd = os.getenv("PASSWD")
 
 old_blue.try :
 
mdb old_blue.db = mdb.connect(host = "127.0.0.1", user = "root", passwd = os.getenv("PASSWD"), db = "AnnelieseDB")
 
 old_blue.except :
 
lcddriver old_blue.lcd = lcddriver.lcd()
 
dict old_blue.priceCoffee
 
dict old_blue.PRODUCTS
 
dict old_blue.in_machine_products
 
dict old_blue.ALERTS
 
MFRC522 old_blue.RFIDREADER = MFRC522.MFRC522()
 
str old_blue.machine_status = "5a401524-ab2e-2548-c435-08c300000710"
 
str old_blue.machine_status_handle = "0x000b"
 
str old_blue.barista_mode = "5a401530-ab2e-2548-c435-08c300000710"
 
str old_blue.barista_mode_handle = "0x0017"
 
str old_blue.product_progress = "5a401527-ab2e-2548-c435-08c300000710"
 
str old_blue.product_progress_handle = "0x001a"
 
str old_blue.heartbeat_uuid = "5a401529-ab2e-2548-c435-08c300000710"
 
str old_blue.heartbeat_handle = "0x0011"
 
str old_blue.heartbeat_read_uuid = "5a401538-ab2e-2548-c435-08c300000710"
 
str old_blue.heartbeat_read_handle = "0x0032"
 
str old_blue.start_product = "5a401525-ab2e-2548-c435-08c300000710"
 
str old_blue.start_product_handle = "0x000e"
 
str old_blue.statistics_command_uuid = "5A401533-ab2e-2548-c435-08c300000710"
 
str old_blue.statistics_command_handle = "0x0026"
 
str old_blue.statistics_data_uuid = "5A401534-ab2e-2548-c435-08c300000710"
 
str old_blue.statistics_data_handle = "0x0029"
 
str old_blue.uart_rx_uuid = "5a401624-ab2e-2548-c435-08c300000710"
 
str old_blue.uart_rx_hnd = "0x0036"
 
str old_blue.uart_tx_uuid = "5a401625-ab2e-2548-c435-08c300000710"
 
str old_blue.uart_tx_hnd = "0x0039"
 
dict old_blue.characteristics
 
 old_blue.child = pexpect.spawn("gatttool -b " + DEVICE + " -I -t random")
 
 old_blue.keep_alive_code
 
 old_blue.locking_code
 
 old_blue.unlock_code
 
 old_blue.KEY_DEC
 
 old_blue.all_statistics
 
 old_blue.initial_time
 
 old_blue.CURRENT_STATISTICS = decoded
 
mdb old_blue.c = db.cursor()
 
int old_blue.emergency_unlock = 0
 
 old_blue.else :
 
str old_blue.lock_status = "unlocked"
 
serial old_blue.port = serial.Serial("/dev/serial0", baudrate = 9600, timeout = 1.0)
 
bool old_blue.buttonPress = False
 
bool old_blue.continue_reading = True
 
str old_blue.lastSeen = ""
 
int old_blue.counter = 0
 
int old_blue.disp_init = 1
 
int old_blue.payment_to_date = 1
 
str old_blue.client_to_pay = ""
 
int old_blue.admin_locked = 0
 
int old_blue.admin_prod = 0
 
int old_blue.total_prod = 0
 
int old_blue.payed_prod = 0
 
int old_blue.current_time = int(time.time() - initial_time)
 
int old_blue.hour = int(time.strftime("%H"))
 
int old_blue.minute = int(time.strftime("%M"))
 
child old_blue.data = child.readline()
 
BtEncoder old_blue.decoded = BtEncoder.encDecBytes(data, KEY_DEC)
 
 old_blue.timeout
 
def old_blue.uid_str = scanCard()
 
def old_blue.prod = read_statistics()
 
bool old_blue.product_made = False
 
def old_blue.value = get_value(uid_str)
 
str old_blue.value_str = str("Balance: " + str('%.2f' % value) + " EUR")
 
def old_blue.lastName = get_name(uid_str)
 
def old_blue.preName = get_vorname(uid_str)
 
str old_blue.welStr = str("Hello " + preName)
 
str old_blue.msgStr3 = str("Hold for 2s please ")
 
str old_blue.msgStr4 = str("Chip below ")
 
time old_blue.intial_time_2 = time.time()
 
int old_blue.chosen = 0
 
int old_blue.started = 0
 
int old_blue.over = 0
 
int old_blue.time_total = int(time.time() - intial_time_2)
 
list old_blue.data2 = [int(x, 16) for x in data.split()]
 
list old_blue.as_hex = ["%02x" % d for d in decoded]
 
dict old_blue.price_product = priceCoffee[product_made]
 
int old_blue.value_new = 0
 
str old_blue.msgStr1 = str(product_made + " was made!")
 
str old_blue.msgStr2 = str(" Happy betty :) ")