Skip to content
Python Web Services to communicate wih Devices
Python HTML Shell
Branch: master
Clone or download
rousseldenis and legalsylvain [IMP] Allow get_status receive parameters
Allows to pass parameters to the '/hw_proxy/status_json' request
and trasmit them to get_status() function
Latest commit f05d95e Sep 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config [IMP] Make config as template Oct 23, 2019
debian [IMP] add auto restart in systemd service conf Oct 9, 2019
pywebdriver [IMP] Allow get_status receive parameters Oct 23, 2019
.gitignore [IMP] Make config as template Oct 23, 2019
LICENSE [IMP] Minor changes needed for the debianization of the project Dec 1, 2014
MANIFEST.in [IMP] Bump to version 0.3.5 Aug 24, 2015
README.md [IMP] Make config as template Oct 23, 2019
VERSION [IMP] add auto restart in systemd service conf Oct 9, 2019
build.sh
pywebdriverd [REF] Refactoring Feb 27, 2015
requirements.txt [UPD] dependencies Aug 26, 2019
setup.py [IMP] switch to gunicorn and packaging for bionic Dec 12, 2018

README.md

pywebdriver

Summary

Python Web Services to communicate wih Devices.

The aim of this project is to ease the communication between application and Devices, providing light WebServices based on Python-Flask libraries. The software can be installed on a computer or a Raspberry-like device. It is compatible with Linux distribution.

Table of Content

Features

Web Page

This apps provides a light flask app to:

  • know the state of the devices;
  • know informations about system;
  • test communication with some devices (e.g. send a test message to the customer display, print a test ticket, etc...).

Specific WebServices for Odoo

The aim of this sub project is to provide WebServices and Web Page to simulate the behaviour of Odoo Apps (hw_proxy applications & co) to allow Odoo users to use Odoo Point of Sale with PyWebDriver as a Proxy.

  • Odoo8:
    • Printers :
      • Epson TM-T20
    • Credit Card Reader:
      • Ingenico and Sagem credit card readers with Telium Manager version 37783600 or superior
      • Ingenico i2200 check reader and writer
    • Customer Display:
    • Scale:
      • TODO : planned by GRAP (Any help welcome);
    • Barcode Reader, Cash Box :
      • Not Planned

Generic WebServices using CUP

Done.

End-Users / Customers Section

If you're interested by a feature that is not currently supported, please contact our team for a quotation.

Otherwise, if you like this project, feel free to make a donation.

Contributors

The main contributors of this project are :

A lot of the code come from other projects. Licences and copyright are mentionned in each file or in a readme file of the folder. The main other contributors are:

Developers Section

Installation on Debian/Ubuntu [OLD]

sudo add-apt-repository ppa:akretion-team/pywebdriver
sudo apt-get update
sudo apt-get install pywebdriver

Installation on Ubuntu 18.04 [NEW]

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 305CB544DDFC7A97
sudo apt-add-repository 'deb [arch=amd64] http://apt.akretion.com/ pywebdriver-nightly main'
sudo apt update
sudo apt install pywebdriver

Installation on Mac OS X

Pywebdriver can be installed on Mac OS X and is successfully used in production on a Mac OS X computer with Bixolon customer display, Ingenico credit card reader and check printer. TODO: write installation instructions.

Browser settings

You need to confirmed security exception on your browers for the following paths: http://localhost and https://localhost

see here and click on 'Advanced' and 'confirm security exception'

Base configuration

config.ini file

Copy the config.ini.tmpl file to config.ini and make modifications as wished.

It is possible to load selectively drivers you need as some are incompatible.

Add a line in config.ini file like :

[application]
drivers=odoo8,cups_driver

If not, default drivers will be loaded:

  • cups_driver
  • display_driver
  • escpos_driver
  • serial_driver
  • signature_driver
  • telium_driver
  • opcua_driver
  • odoo7
  • odoo8

Specific configuration

For the customer display Epson OCD300, you need to change the config file (config/config.ini).

Change line device_name in category [display_driver] with this :

device_name=/dev/ttyACM0

Development

To test this module, do the following steps:

  • download it from git;
git clone https://github.com/akretion/pywebdriver.git
  • Install dependency by running this two command
sudo apt-get install cups python-cups python-pip python-netifaces
sudo pip install -r requirement.txt
  • set correct parameters in the config/config.ini file;
  • call this command:
   python pywebdriver.py
  • Call the url : http://localhost:8069 (by default, but depending of your config.ini file) in a browser to see devices state;

Contribute

If you find a bug, feel free to report it and submit a bugfix.

If you want to propose extra features not yet covered, please contact us or submit a Pull Request.

Localization

For the moment, localization is managed for english and french languages. If you want to manage extra lozalisation, do the following:

  • call this command to generate '.pot' file:
pybabel extract -F translations/settings_babel.cfg -o translations/i18n.pot .
  • call one of the two commands to generate '.po' file:
pybabel init -i translations/i18n.pot -d translations -l <code>  # (First time)
pybabel update -i translations/i18n.pot -d translations          # (Next times)
  • Edit your '.po' file and write correct translation;
  • call this command to generate '.mo' file:
pybabel compile -d translations
  • Change your config.ini file to test the result;
  • Do a Pull Request to share your work;

Other Projects

If you're interested by this project, you could perhaps take a look at these other projects:

You can’t perform that action at this time.