[ADD] iot: Connect an IoT Box to your database
3
iot.rst
@ -7,4 +7,5 @@ Internet of Things (IoT)
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
iot/setup
|
||||
iot/connect
|
||||
iot/pos
|
||||
|
79
iot/connect.rst
Normal file
@ -0,0 +1,79 @@
|
||||
===================================
|
||||
Connect an IoT Box to your database
|
||||
===================================
|
||||
|
||||
Install the Internet of Things (IoT) App on your Odoo Database.
|
||||
|
||||
.. image:: media/connect01.png
|
||||
:align: center
|
||||
|
||||
Go in the IoT App and click on Connect on the IoT Boxes page.
|
||||
|
||||
.. image:: media/connect02.png
|
||||
:align: center
|
||||
|
||||
Follow the steps to connect your IoT Box.
|
||||
|
||||
.. image:: media/connect03.png
|
||||
:align: center
|
||||
|
||||
Ethernet Connection
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Connect to the IoT Box all the devices that have to be connected with
|
||||
cables (ethernet, usb devices, etc.).
|
||||
|
||||
2. Power on the IoT Box.
|
||||
|
||||
3. Then click on the Scan button.
|
||||
|
||||
.. image:: media/connect04.png
|
||||
:align: center
|
||||
|
||||
WiFi Connection
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
1. Power on the IoT Box
|
||||
|
||||
2. Copy the token
|
||||
|
||||
.. image:: media/connect05.png
|
||||
:align: center
|
||||
|
||||
1. Connect to the IoT Box WiFi Network (make sure there is no ethernet
|
||||
cable plugged in your computer).
|
||||
|
||||
.. image:: media/connect06.png
|
||||
:align: center
|
||||
|
||||
4. You will be redirected to the IoT Box Homepage (if it doesn't work,
|
||||
connect to the IP address of the box). Give a name to your IoT Box (not
|
||||
required) and paste the token, then click on next.
|
||||
|
||||
.. image:: media/connect07.png
|
||||
:align: center
|
||||
|
||||
.. tip::
|
||||
If you are on Runbot, do not forget to add the -all or -base in the
|
||||
token (e.g. this token
|
||||
**http://375228-saas-11-5-iot-f3f920.runbot16.odoo.com\|4957098401**
|
||||
should become
|
||||
**http://375228-saas-11-5-iot-f3f920-all.runbot16.odoo.com\|4957098401**).
|
||||
|
||||
5. Choose the WiFi network you want to connect with (enter the password
|
||||
if there is one) and click on Submit. Wait a few seconds before being
|
||||
redirected to your database.
|
||||
|
||||
.. image:: media/connect08.png
|
||||
:align: center
|
||||
|
||||
You should now see the IoT Box.
|
||||
|
||||
.. image:: media/connect09.png
|
||||
:align: center
|
||||
|
||||
IoT Box Schema
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. image:: media/connect10.png
|
||||
:align: center
|
BIN
iot/media/connect01.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
iot/media/connect02.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
iot/media/connect03.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
iot/media/connect04.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
iot/media/connect05.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
iot/media/connect06.png
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
iot/media/connect07.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
iot/media/connect08.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
iot/media/connect09.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
iot/media/connect10.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
iot/media/pos01.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
iot/media/pos02.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
@ -1,456 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="1600px"
|
||||
height="1200px"
|
||||
id="svg2985"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="posbox_2_doc_schema.svg"
|
||||
inkscape:export-filename="/home/odoo/sphinx_fun/_images/posbox_2_doc_schema.png"
|
||||
inkscape:export-xdpi="67.5"
|
||||
inkscape:export-ydpi="67.5">
|
||||
<defs
|
||||
id="defs2987">
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="DotL"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path6730"
|
||||
d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||
transform="scale(0.8) translate(7.4, 1)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotM"
|
||||
orient="auto"
|
||||
refY="0.0"
|
||||
refX="0.0"
|
||||
id="DotM"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path6733"
|
||||
d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
|
||||
transform="scale(0.4) translate(7.4, 1)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-8"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-8"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-88"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-6"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-2"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-1"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-7"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-0"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-9"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-3"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-5"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-11"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-0"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-60"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="DotL"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="DotL-80"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6730-7"
|
||||
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,5.92,0.8)" />
|
||||
</marker>
|
||||
<pattern
|
||||
patternTransform="matrix(1.4389319,-1.3813228,10.427428,10.009955,-23.164964,-11.035856)"
|
||||
id="pattern5531"
|
||||
xlink:href="#pattern4749"
|
||||
inkscape:collect="always" />
|
||||
<pattern
|
||||
inkscape:collect="always"
|
||||
xlink:href="#pattern6512"
|
||||
id="pattern4749"
|
||||
patternTransform="matrix(1.4070053,-1.4070053,10.196067,10.196067,-10.9375,-22.457161)" />
|
||||
<pattern
|
||||
inkscape:collect="always"
|
||||
xlink:href="#Strips1_3"
|
||||
id="pattern6512"
|
||||
patternTransform="matrix(1.4070053,-1.4070053,10.196067,10.196067,0,0)" />
|
||||
<pattern
|
||||
inkscape:stockid="Stripes 1:3"
|
||||
id="Strips1_3"
|
||||
patternTransform="translate(0,0) scale(10,10)"
|
||||
height="1"
|
||||
width="4"
|
||||
patternUnits="userSpaceOnUse"
|
||||
inkscape:collect="always">
|
||||
<rect
|
||||
id="rect4622"
|
||||
height="2"
|
||||
width="1"
|
||||
y="-0.5"
|
||||
x="0"
|
||||
style="fill:black;stroke:none" />
|
||||
</pattern>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.64"
|
||||
inkscape:cx="490.52504"
|
||||
inkscape:cy="455.63873"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="672"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2990">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="opacity:0.25;fill:url(#pattern5531);fill-opacity:1;stroke:none"
|
||||
d="m 573.99082,306.49783 c -16.99712,0 -30.68073,13.13577 -30.68073,29.45241 l 0,620.77067 -28.06009,24.4823 34.00448,43.47309 c 0.10851,0.1414 0.20853,0.2898 0.31959,0.4294 l 2.17322,2.7612 0.22366,-0.1227 c 5.56845,5.5052 13.35788,8.9277 22.01987,8.9277 l 473.95348,0 c 16.997,0 30.6807,-13.1357 30.6807,-29.4524 l 0,-671.26926 c 0,-10.7078 -5.8779,-20.03341 -14.7332,-25.18795 l -42.0582,-30.43414 -27.93222,26.16968 c -45.13239,0 -162.88495,0 -419.91056,0 z"
|
||||
id="path6489"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csccccccsssscccc" />
|
||||
<g
|
||||
transform="translate(-13.147209,52.672935)"
|
||||
id="g3847" />
|
||||
<rect
|
||||
ry="25.024"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="rect2993"
|
||||
width="509.11688"
|
||||
height="730.677"
|
||||
x="512.46881"
|
||||
y="269.79449" />
|
||||
<rect
|
||||
ry="16.049"
|
||||
y="315.75156"
|
||||
x="564.96216"
|
||||
height="638.76288"
|
||||
width="404.13022"
|
||||
id="rect3763"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.7660557;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
|
||||
<g
|
||||
id="g4326"
|
||||
transform="translate(-10.64993,-61.522705)">
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6606"
|
||||
y="626.60999"
|
||||
x="319.89322"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="626.60999"
|
||||
x="319.89322"
|
||||
id="tspan6608"
|
||||
sodipodi:role="line">HDMI</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6663"
|
||||
d="m 437.5,614.15728 54.6875,0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)" />
|
||||
</g>
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6602"
|
||||
y="176.59084"
|
||||
x="701.41144"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="176.59084"
|
||||
x="701.41144"
|
||||
id="tspan6604"
|
||||
sodipodi:role="line">SD Card</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7295"
|
||||
d="m 767.02726,201.35353 0,54.6875"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)" />
|
||||
<g
|
||||
id="g4263"
|
||||
transform="translate(34,-8)">
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6614"
|
||||
y="1097.278"
|
||||
x="578.10681"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="1097.278"
|
||||
x="578.10681"
|
||||
id="tspan6616"
|
||||
sodipodi:role="line">RJ45</tspan></text>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 612.03792,1053.883 0,-32.0313"
|
||||
id="path7311"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(-11.59618,10)"
|
||||
id="g3178">
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6598"
|
||||
y="392.33667"
|
||||
x="261.82697"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="392.33667"
|
||||
x="261.82697"
|
||||
id="tspan6600"
|
||||
sodipodi:role="line">2A Power</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6663-5"
|
||||
d="m 438.44625,383.125 54.6875,0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)" />
|
||||
</g>
|
||||
<g
|
||||
id="g3323">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="fill:#ff0d0d;fill-opacity:1;stroke:#000000;stroke-width:2.16506362;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
id="path6541"
|
||||
sodipodi:cx="1110.1562"
|
||||
sodipodi:cy="856.64062"
|
||||
sodipodi:rx="9.375"
|
||||
sodipodi:ry="10.546875"
|
||||
d="m 1119.5313,856.64062 a 9.375,10.546875 0 1 1 -18.75,0 9.375,10.546875 0 1 1 18.75,0 z"
|
||||
transform="matrix(1,0,0,0.85333333,-128.94268,-557.4604)" />
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6606-5"
|
||||
y="186.56161"
|
||||
x="998.72925"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="186.56161"
|
||||
x="998.72925"
|
||||
id="tspan6608-2"
|
||||
sodipodi:role="line">Power LED</tspan></text>
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 981.21357,201.35353 0,54.6875"
|
||||
id="path7295-5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path7295-2"
|
||||
d="m 948.45629,164.35377 0,91.55103"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.2724576px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)" />
|
||||
<g
|
||||
id="g4156">
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6606-5-6"
|
||||
y="148.21866"
|
||||
x="965.90454"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="148.21866"
|
||||
x="965.90454"
|
||||
id="tspan6608-2-7"
|
||||
sodipodi:role="line">Status LED</tspan></text>
|
||||
<path
|
||||
transform="matrix(1,0,0,0.85333333,-161.69996,-595.993)"
|
||||
d="m 1119.5313,856.64062 a 9.375,10.546875 0 1 1 -18.75,0 9.375,10.546875 0 1 1 18.75,0 z"
|
||||
sodipodi:ry="10.546875"
|
||||
sodipodi:rx="9.375"
|
||||
sodipodi:cy="856.64062"
|
||||
sodipodi:cx="1110.1562"
|
||||
id="path6539-4"
|
||||
style="fill:#00fd28;fill-opacity:1;stroke:#000000;stroke-width:2.16506362;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
<g
|
||||
id="g4268"
|
||||
transform="translate(-42,3.0206)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
x="875.10474"
|
||||
y="1086.486"
|
||||
id="text6610"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan6612"
|
||||
x="875.10474"
|
||||
y="1086.486"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans">USB</tspan></text>
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 891.39129,1042.8627 10e-6,-32.0316"
|
||||
id="path7311-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 863.90377,1038.7693 -22.64959,-22.6495"
|
||||
id="path7311-4"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 928.76104,1042.8627 10e-6,-32.0316"
|
||||
id="path7311-1-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)"
|
||||
d="m 956.24855,1038.7693 22.64958,-22.6495"
|
||||
id="path7311-1-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g4321"
|
||||
transform="translate(0,-30)">
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text6606-6"
|
||||
y="758.51514"
|
||||
x="309.24329"
|
||||
style="font-size:36.98903275px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Droid Sans;-inkscape-font-specification:Droid Sans"
|
||||
y="758.51514"
|
||||
x="309.24329"
|
||||
id="tspan6608-5"
|
||||
sodipodi:role="line">Audio</tspan></text>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6663-9"
|
||||
d="m 426.85007,746.06242 54.6875,0"
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#DotL)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 23 KiB |
165
iot/pos.rst
Normal file
@ -0,0 +1,165 @@
|
||||
===========================
|
||||
Use the IoT Box for the PoS
|
||||
===========================
|
||||
|
||||
.. image:: media/pos01.png
|
||||
:align: center
|
||||
|
||||
Prerequisites
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Before starting, make sure you have the following:
|
||||
|
||||
- An IoT Box
|
||||
|
||||
- A 2A Power adapter with pi 3 b+ 2.5 A
|
||||
|
||||
- A computer or tablet with an up-to-date web browser
|
||||
|
||||
- A running SaaS or Odoo instance with the Point of Sale and IoT apps
|
||||
installed
|
||||
|
||||
- A local network setup with DHCP (this is the default setting)
|
||||
|
||||
- An Epson USB TM-T20 Printer or another ESC/POS compatible printer
|
||||
(officially supported printers are listed at the `POS Hardware
|
||||
page <https://www.odoo.com/page/pos-ipad-android-hardware>`__)
|
||||
|
||||
- A Honeywell Eclipse USB Barcode Scanner or another compatible scanner
|
||||
|
||||
- An Epson compatible cash drawer
|
||||
|
||||
- An RJ45 Ethernet Cable (optional, WiFi is built in)
|
||||
|
||||
Set Up
|
||||
~~~~~~~
|
||||
|
||||
To connect hardware to the PoS, the first step is to connect an IoT Box
|
||||
to your database. For this, follow this
|
||||
`documentation <https://docs.google.com/document/d/1vhWrSSlSdJcRYe4tjPpXKYVMTD47lVK3ysyYc7tJDlA/edit#>`__.
|
||||
|
||||
.. image:: media/pos02.png
|
||||
:align: center
|
||||
|
||||
Then, you have to connect the peripheral devices to your IoT Box.
|
||||
|
||||
Officially supported hardware is listed on `the POS Hardware
|
||||
page <https://www.odoo.com/page/pos-ipad-android-hardware>`__, but
|
||||
other hardware might work as well.
|
||||
|
||||
- **Printer**: Connect an ESC/POS printer to a USB port and power it
|
||||
on.
|
||||
|
||||
- **Cash drawer**: The cash drawer should be connected to the printer
|
||||
with an RJ25 cable.
|
||||
|
||||
- **Barcode scanner**: Connect your barcode scanner. In order for your
|
||||
barcode scanner to be compatible it must behave as a keyboard and
|
||||
must be configured in **US QWERTY**. It also must end barcodes
|
||||
with an Enter character (keycode 28). This is most likely the
|
||||
default configuration of your barcode scanner.
|
||||
|
||||
- **Scale**: Connect your scale and power it on.
|
||||
|
||||
- **Ethernet**: If you do not wish to use Wi-Fi, plug in the Ethernet
|
||||
cable. Make sure this will connect the IoT Box to the same
|
||||
network as your POS device.
|
||||
|
||||
- **Wi-Fi**: The current version of the IoT Box has Wi-Fi built in.
|
||||
Make sure not to plug in an Ethernet cable when booting, because
|
||||
all Wi-Fi functionality will be bypassed when a wired network
|
||||
connection is available on boot.
|
||||
|
||||
Once it's done, you can connect the IoT Box to your PoS. For this, go in
|
||||
Point of Sale > Configuration > PoS, tick the box "IoT Box" and select
|
||||
the IoT Box you want to connect with. Save the changes.
|
||||
|
||||
Set up is done, you can launch a new PoS Session.
|
||||
|
||||
Troubleshoot
|
||||
~~~~~~~~~~~~
|
||||
|
||||
The PoS cannot connect to the IoT Box
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The easiest way to make sure the IoT Box is properly set-up is to
|
||||
turn it on with the printer plugged in as it will print a receipt
|
||||
indicating any error if encountered or the IoT Box's IP address
|
||||
in case of success. If no receipt is printed, check the following
|
||||
steps:
|
||||
|
||||
- Make sure the IoT Box is powered on, indicated by a brightly lit red
|
||||
status LED.
|
||||
|
||||
- Make sure the IoT Box is ready, this is indicated by a brightly lit
|
||||
green status LED just next to the red power status LED. The IoT
|
||||
Box should be ready ~2 minutes after it is started.
|
||||
|
||||
- Make sure the IoT Box is connected to the same network as your POS
|
||||
device. Both the device and the IoT Box should be visible in the
|
||||
list of connected devices on your network router.
|
||||
|
||||
- If you specified the IoT Box's IP address in the configuration, make
|
||||
sure it corresponds to the ip address printed on the IoT Box's
|
||||
status receipt.
|
||||
|
||||
- Make sure that the POS is not loaded over HTTPS.
|
||||
|
||||
- A bug in Firefox's HTTP implementation might prevent the
|
||||
autodiscovery from working reliably. You could also manually set
|
||||
up the IoT Box's IP address in the POS configuration.
|
||||
|
||||
The Barcode Scanner is not working
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The barcode scanner must be configured in US QWERTY and emit an Enter
|
||||
after each barcode. This is the default configuration of most
|
||||
barcode readers. Refer to the barcode reader documentation for
|
||||
more information.
|
||||
|
||||
- The IoT Box needs a 2A power supply to work with some barcode
|
||||
scanners. If you are not using the provided power supply, make
|
||||
sure the one you use has enough power.
|
||||
|
||||
- Some barcode scanners will need more than 2A and will not work, or
|
||||
will work unreliably, even with the provided power supply. In
|
||||
those case you can plug the barcode scanner in a self-powered USB
|
||||
hub.
|
||||
|
||||
- Some poorly built barcode scanners do not advertise themselves as
|
||||
barcode scanners but as a usb keyboard instead, and will not be
|
||||
recognized by the IoT Box.
|
||||
|
||||
The Barcode Scanner is not working reliably
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Make sure that no more than one device with 'Scan via Proxy'/'Barcode
|
||||
Scanner' enabled are connected to the IoT Box at the same time.
|
||||
|
||||
Printing the receipt takes too much time
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- A small delay before the first print is expected, as the IoT Box will
|
||||
do some preprocessing to speed up the next printings. If you
|
||||
suffer delays afterwards it is most likely due to poor network
|
||||
connection between the POS and the IoT Box.
|
||||
|
||||
Some characters are not correctly printed on the receipt
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The IoT Box does not support all languages and characters. It
|
||||
currently supports Latin and Cyrillic based scripts, with basic
|
||||
Japanese support.
|
||||
|
||||
The printer is offline
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- Make sure the printer is connected, powered, has enough paper and has
|
||||
its lid closed, and is not reporting an error. If the error
|
||||
persists, please contact support.
|
||||
|
||||
The cashdrawer does not open
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The cashdrawer should be connected to the printer and should be
|
||||
activated in the POS configuration.
|
518
iot/setup.rst
@ -1,518 +0,0 @@
|
||||
=============
|
||||
IoT Box Setup
|
||||
=============
|
||||
|
||||
POSBox Setup Guide
|
||||
==================
|
||||
|
||||
.. image:: media/posbox_setup.png
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Before you start setting up your POSBox make sure you have everything.
|
||||
You will need :
|
||||
|
||||
* The POSBox
|
||||
* A 2A Power adapter
|
||||
* A computer or tablet with an up-to-date web browser
|
||||
* A running SaaS or Odoo database with the Point of Sale installed
|
||||
* A local network set up with DHCP (this is the default setting)
|
||||
* An Epson USB TM-T20 Printer or another ESC/POS compatible printer
|
||||
(officially supported printers are listed at the `POS Hardware page
|
||||
<https://www.odoo.com/page/pos-ipad-android-hardware>`_)
|
||||
* A Honeywell Eclipse USB Barcode Scanner or another compatible scanner
|
||||
* An Epson compatible cash drawer
|
||||
* An RJ45 Ethernet Cable (optional, Wi-Fi is built in)
|
||||
|
||||
Step By Step Setup Guide
|
||||
------------------------
|
||||
|
||||
Current version of the POSBox (since 2015)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.. figure:: media/posbox_2_doc_schema.svg
|
||||
|
||||
Connect peripheral devices
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Officially supported hardware is listed on `the POS Hardware page
|
||||
<https://www.odoo.com/page/pos-ipad-android-hardware>`_, but other
|
||||
hardware might work as well.
|
||||
|
||||
* **Printer**: Connect an ESC/POS printer to a USB port and power it
|
||||
on.
|
||||
|
||||
* **Cash drawer**: The cash drawer should be connected to the printer
|
||||
with an RJ25 cable.
|
||||
|
||||
* **Barcode scanner**: Connect your barcode scanner. In order for your
|
||||
barcode scanner to be compatible it must behave as a keyboard and
|
||||
must be configured in **US QWERTY**. It also must end barcodes with an
|
||||
Enter character (keycode 28). This is most likely the default
|
||||
configuration of your barcode scanner.
|
||||
|
||||
* **Scale**: Connect your scale and power it on.
|
||||
|
||||
* **Ethernet**: If you do not wish to use Wi-Fi, plug in the Ethernet
|
||||
cable. Make sure this will connect the POSBox to the same network as
|
||||
your POS device.
|
||||
|
||||
* **Wi-Fi**: The current version of the POSBox has Wi-Fi built
|
||||
in. Make sure not to plug in an Ethernet cable, because all Wi-Fi
|
||||
functionality will be bypassed when a wired network connection is
|
||||
available.
|
||||
|
||||
Power the POSBox
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Plug the power adapter into the POSBox, a bright red status led should
|
||||
light up.
|
||||
|
||||
Make sure the POSBox is ready
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Once powered, The POSBox needs a while to boot. Once the POSBox is
|
||||
ready, it should print a status receipt with its IP address. Also the
|
||||
status LED, just next to the red power LED, should be permanently lit
|
||||
green.
|
||||
|
||||
Setup the Point of Sale
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To setup the POSBox in the Point of Sale go to :menuselection:`Point
|
||||
of Sale --> Configuration --> Point of Sale` and select your Point of
|
||||
Sale. Scroll down to the ``PoSBox / Hardware Proxy`` section and
|
||||
activate the options for the hardware you want to use through the
|
||||
POSBox. Specifying the IP of the POSBox is recommended (it is printed
|
||||
on the receipt that gets printed after booting up the POSBox). When
|
||||
the IP is not specified the Point of Sale will attempt to find it on
|
||||
the local network.
|
||||
|
||||
If you are running multiple Point of Sale on the same POSBox, make sure
|
||||
that only one of them has Remote Scanning/Barcode Scanner activated.
|
||||
|
||||
It might be a good idea to make sure the POSBox IP never changes in
|
||||
your network. Refer to your router documentation on how to achieve
|
||||
this.
|
||||
|
||||
Launch the Point of Sale
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you didn't specify the POSBox's IP address in the configuration,
|
||||
the POS will need some time to perform a network scan to find the
|
||||
POSBox. This is only done once.
|
||||
|
||||
The Point of Sale is now connected to the POSBox and your hardware
|
||||
should be ready to use.
|
||||
|
||||
Wi-Fi configuration
|
||||
-------------------
|
||||
|
||||
The most recent version of the POSBox has Wi-Fi built in. If you're
|
||||
using an older version you'll need a Linux compatible USB Wi-Fi
|
||||
adapter. Most commercially available Wi-Fi adapters are Linux
|
||||
compatible. Officially supported are Wi-Fi adapters with a Ralink 5370
|
||||
chipset.
|
||||
|
||||
Make sure not to plug in an Ethernet cable, as all Wi-Fi related
|
||||
functionality will be disabled when a wired network connection is
|
||||
available.
|
||||
|
||||
When the POSBox boots with a Wi-Fi adapter it will start its own Wi-Fi
|
||||
Access Point called "Posbox" you can connect to. The receipt that gets
|
||||
printed when the POSBox starts will reflect this. In order to make the
|
||||
POSBox connect to an already existing Wi-Fi network, go to the
|
||||
homepage of the POSBox (indicated on the receipt) and go to the Wi-Fi
|
||||
configuration page. On there you can choose a network to connect
|
||||
to. Note that we only support open and WPA(2)-PSK networks. When
|
||||
connecting to a WPA-secured network, fill in the password field. The
|
||||
POSBox will attempt to connect to the specified network and will print
|
||||
a new POSBox status receipt after it has connected.
|
||||
|
||||
If you plan on permanently setting up the POSBox with Wi-Fi, you can
|
||||
use the "persistent" checkbox on the Wi-Fi configuration page when
|
||||
connecting to a network. This will make the network choice persist
|
||||
across reboots. This means that instead of starting up its own
|
||||
"Posbox" network it will always attempt to connect to the specified
|
||||
network after it boots.
|
||||
|
||||
When the POSBox fails to connect to a network it will fall back to
|
||||
starting it's own "Posbox" Access Point. If connection is lost with a
|
||||
Wi-Fi network after connecting to it, the POSBox will attempt to
|
||||
re-establish connection automatically.
|
||||
|
||||
Multi-POS Configuration
|
||||
-----------------------
|
||||
|
||||
The advised way to setup a multi Point of Sale shop is to have one
|
||||
POSBox per Point of Sale. In this case it is mandatory to manually
|
||||
specify the IP address of each POSBox in each Point of Sale. You must
|
||||
also configure your network to make sure the POSBox's IP addresses
|
||||
don't change. Please refer to your router documentation.
|
||||
|
||||
POSBoxless Guide (advanced)
|
||||
===========================
|
||||
|
||||
.. image:: media/posboxless_setup.png
|
||||
|
||||
If you are running your Point of Sale on a Debian-based Linux
|
||||
distribution, you do not need the POSBox as you can run its software
|
||||
locally. However the installation process is not foolproof. You'll need
|
||||
at least to know how to install and run Odoo. You may also run into
|
||||
issues specific to your distribution or to your particular setup and
|
||||
hardware configuration.
|
||||
|
||||
Drivers for the various types of supported hardware are provided as
|
||||
Odoo modules. In fact, the POSBox runs an instance of Odoo that the
|
||||
Point of Sale communicates with. The instance of Odoo running on the
|
||||
POSBox is very different from a 'real' Odoo instance however. It does
|
||||
not handle *any* business data (eg. POS orders), but only serves as a
|
||||
gateway between the Point of Sale and the hardware.
|
||||
|
||||
The goal of this section will be to set up a local Odoo instance that
|
||||
behaves like the Odoo instance running on the POSBox.
|
||||
|
||||
Image building process
|
||||
----------------------
|
||||
|
||||
We generate the official POSBox images using the scripts in
|
||||
https://github.com/odoo/odoo/tree/11.0/addons/point_of_sale/tools/posbox. More
|
||||
specifically, we run
|
||||
`posbox_create_image.sh <https://github.com/odoo/odoo/blob/11.0/addons/point_of_sale/tools/posbox/posbox_create_image.sh>`_.
|
||||
This builds an image
|
||||
called ``posbox.img``, which we zip and upload to `nightly.odoo.com <https://nightly.odoo.com>`_
|
||||
for users to download.
|
||||
|
||||
The scripts in this directory might be useful as a reference if you
|
||||
get stuck or want more detail about something.
|
||||
|
||||
Summary of the image creation process
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The image creation process starts by downloading the latest `Raspbian
|
||||
<https://www.raspbian.org/>`_ image. It then locally mounts this
|
||||
Raspbian image and copies over some files and scripts that will make
|
||||
the Raspbian image turn itself into a POSBox when it boots. These
|
||||
scripts will update Raspbian, remove non-essential packages and
|
||||
install required packages. In order to boot Raspbian we use qemu,
|
||||
which is capable of providing ARM emulation. After this, the emulated
|
||||
Raspbian OS will shut itself down. We then once again locally mount
|
||||
the image, remove the scripts that were used to initialize the image
|
||||
at boot and we copy over some extra configuration files. The resulting
|
||||
image is then ready to be tested and used.
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
- A Debian-based Linux distribution (Debian, Ubuntu, Mint, etc.)
|
||||
- A running Odoo instance you connect to load the Point of Sale
|
||||
- You must uninstall any ESC/POS printer driver as it will conflict
|
||||
with Odoo's built-in driver
|
||||
|
||||
Step By Step Setup Guide
|
||||
------------------------
|
||||
|
||||
Extra dependencies
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Because Odoo runs on Python 2, you need to check which version of pip
|
||||
you need to use.
|
||||
|
||||
``# pip --version``
|
||||
|
||||
If it returns something like::
|
||||
|
||||
pip 1.5.6 from /usr/local/lib/python3.3/dist-packages/pip-1.5.6-py3.3.egg (python 3.3)
|
||||
|
||||
You need to try pip2 instead.
|
||||
|
||||
If it returns something like::
|
||||
|
||||
pip 1.4.1 from /usr/lib/python2.7/dist-packages (python 2.7)
|
||||
|
||||
You can use pip.
|
||||
|
||||
The driver modules requires the installation of new python modules:
|
||||
|
||||
``# pip install pyserial``
|
||||
|
||||
``# pip install pyusb==1.0.0b1``
|
||||
|
||||
``# pip install qrcode``
|
||||
|
||||
Access Rights
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The drivers need raw access to the printer and barcode scanner devices.
|
||||
Doing so requires a bit system administration. First we are going to
|
||||
create a group that has access to USB devices
|
||||
|
||||
``# groupadd usbusers``
|
||||
|
||||
Then we add the user who will run the OpenERP server to ``usbusers``
|
||||
|
||||
``# usermod -a -G usbusers USERNAME``
|
||||
|
||||
Then we need to create a udev rule that will automatically allow members
|
||||
of ``usbusers`` to access raw USB devices. To do so create a file called
|
||||
``99-usbusers.rules`` in the ``/etc/udev/rules.d/`` directory with the
|
||||
following content::
|
||||
|
||||
SUBSYSTEM=="usb", GROUP="usbusers", MODE="0660"
|
||||
SUBSYSTEMS=="usb", GROUP="usbusers", MODE="0660"
|
||||
|
||||
Then you need to reboot your machine.
|
||||
|
||||
Start the local Odoo instance
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
We must launch the Odoo server with the correct settings
|
||||
|
||||
``$ ./odoo.py --load=web,hw_proxy,hw_posbox_homepage,hw_posbox_upgrade,hw_scale,hw_scanner,hw_escpos``
|
||||
|
||||
Test the instance
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Plug all your hardware to your machine's USB ports, and go to
|
||||
``http://localhost:8069/hw_proxy/status`` refresh the page a few times and
|
||||
see if all your devices are indicated as *Connected*. Possible source of
|
||||
errors are: The paths on the distribution differ from the paths expected
|
||||
by the drivers, another process has grabbed exclusive access to the
|
||||
devices, the udev rules do not apply or a superseded by others.
|
||||
|
||||
Automatically start Odoo
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You must now make sure that this Odoo install is automatically started
|
||||
after boot. There are various ways to do so, and how to do it depends
|
||||
on your particular setup. Using the init system provided by your
|
||||
distribution is probably the easiest way to accomplish this.
|
||||
|
||||
Setup the Point of Sale
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The IP address field in the POS configuration must be either
|
||||
``127.0.0.1`` or ``localhost`` if you're running the created Odoo
|
||||
server on the machine that you'll use as the Point of Sale device. You
|
||||
can also leave it empty.
|
||||
|
||||
POSBox Technical Documentation
|
||||
==============================
|
||||
|
||||
Technical Overview
|
||||
------------------
|
||||
|
||||
The POSBox Hardware
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The POSBox's Hardware is based on a `Raspberry Pi 2
|
||||
<https://www.raspberrypi.org/products/raspberry-pi-2-model-b/>`_, a
|
||||
popular single-board computer. The Raspberry Pi 2 is powered with a 2A
|
||||
micro-usb power adapter. 2A is needed to give enough power to the
|
||||
barcode scanners. The Software is installed on a 8Gb Class 10 or
|
||||
Higher SD Card. All this hardware is easily available worldwide from
|
||||
independent vendors.
|
||||
|
||||
Compatible Peripherals
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Officially supported hardware is listed on the `POS Hardware page
|
||||
<https://www.odoo.com/page/pos-ipad-android-hardware>`_.
|
||||
|
||||
The POSBox Software
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The POSBox runs a heavily modified Raspbian Linux installation, a
|
||||
Debian derivative for the Raspberry Pi. It also runs a barebones
|
||||
installation of Odoo which provides the webserver and the drivers. The
|
||||
hardware drivers are implemented as Odoo modules. Those modules are
|
||||
all prefixed with ``hw_*`` and they are the only modules that are
|
||||
running on the POSBox. Odoo is only used for the framework it
|
||||
provides. No business data is processed or stored on the POSBox. The
|
||||
Odoo instance is a shallow git clone of the ``8.0`` branch.
|
||||
|
||||
The root partition on the POSBox is mounted read-only, ensuring that
|
||||
we don't wear out the SD card by writing to it too much. It also
|
||||
ensures that the filesystem cannot be corrupted by cutting the power
|
||||
to the POSBox. Linux applications expect to be able to write to
|
||||
certain directories though. So we provide a ramdisk for /etc and /var
|
||||
(Raspbian automatically provides one for /tmp). These ramdisks are
|
||||
setup by ``setup_ramdisks.sh``, which we run before all other init
|
||||
scripts by running it in ``/etc/init.d/rcS``. The ramdisks are named
|
||||
/etc_ram and /var_ram respectively. Most data from /etc and /var is
|
||||
copied to these tmpfs ramdisks. In order to restrict the size of the
|
||||
ramdisks, we do not copy over certain things to them (eg. apt related
|
||||
data). We then bind mount them over the original directories. So when
|
||||
an application writes to /etc/foo/bar it's actually writing to
|
||||
/etc_ram/foo/bar. We also bind mount / to /root_bypass_ramdisks to be
|
||||
able to get to the real /etc and /var during development.
|
||||
|
||||
Logs of the running Odoo server can be found at:
|
||||
|
||||
``/var/log/odoo/odoo.log``
|
||||
|
||||
Various POSBox related scripts (eg. wifi-related scripts) running on
|
||||
the POSBox will log to /var/log/syslog and those messages are tagged
|
||||
with ``posbox_*``.
|
||||
|
||||
Accessing the POSBox
|
||||
--------------------
|
||||
|
||||
Local Access
|
||||
~~~~~~~~~~~~
|
||||
|
||||
If you plug a QWERTY USB keyboard into one of the POSBox's USB ports,
|
||||
and if you connect a computer monitor to the *HDMI* port of the
|
||||
POSBox, you can use it as a small GNU/Linux computer and perform
|
||||
various administration tasks, like viewing some logs.
|
||||
|
||||
The POSBox will automatically log in as root on the default tty.
|
||||
|
||||
Remote Access
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
If you have the POSBox's IP address and an SSH client you can access
|
||||
the POSBox's system remotely. The login credentials are
|
||||
``pi``/``raspberry``.
|
||||
|
||||
Updating The POSBox Software
|
||||
----------------------------
|
||||
|
||||
Only upgrade the POSBox if you experience problems or want to use
|
||||
newly implemented features.
|
||||
|
||||
The best way to update the POSBox software is to download a new
|
||||
version of the image and flash the SD-Card with it. This operation is
|
||||
described in detail in `this tutorial
|
||||
<http://elinux.org/RPi_Easy_SD_Card_Setup>`_, just replace the
|
||||
standard Raspberry Pi image with the latest one found at `the official
|
||||
POSBox image page <http://nightly.odoo.com/master/posbox/>`_. This
|
||||
method of upgrading will ensure that you're running the latest version
|
||||
of the POSBox software.
|
||||
|
||||
The second way of upgrading is through the built in upgrade interface
|
||||
that can be reached through the POSBox homepage. The nice thing about
|
||||
upgrading like this is that you don't have to flash a new image. This
|
||||
upgrade method is limited to what it can do however. It can not
|
||||
eg. update installed configuration files (like
|
||||
eg. /etc/hostapd.conf). It can only upgrade:
|
||||
|
||||
- The internal Odoo application
|
||||
- Scripts in the folder ``odoo/addons/point_of_sale/tools/posbox/configuration/``
|
||||
|
||||
When in doubt, always use the first method of upgrading.
|
||||
|
||||
Troubleshoot
|
||||
============
|
||||
|
||||
The POS cannot connect to the POSBox
|
||||
------------------------------------
|
||||
|
||||
- The easiest way to make sure the POSBox is properly set-up is to turn
|
||||
it on with the printer plugged in as it will print a receipt
|
||||
indicating any error if encountered or the POSBox's IP address in case
|
||||
of success. If no receipt is printed, check the following steps:
|
||||
- Make sure the POSBox is powered on, indicated by a brightly lit red
|
||||
status LED.
|
||||
- Make sure the POSBox is ready, this is indicated by a brightly lit
|
||||
green status LED just next to the red power status LED. The POSBox
|
||||
should be ready ~2 minutes after it is started.
|
||||
- Make sure the POSBox is connected to the same network as your POS
|
||||
device. Both the device and the POSBox should be visible in the list
|
||||
of connected devices on your network router.
|
||||
- Make sure that your LAN is set up with DHCP, and gives IP addresses
|
||||
in the range 192.168.0.X, 192.168.1.X, 10.0.0.X. If you cannot setup
|
||||
your LAN that way, you must manually set up your POSBox's
|
||||
IP address.
|
||||
- If you have specified the POSBox's IP address in the configuration,
|
||||
make sure it correspond to the printed on the POSBox's status
|
||||
receipt.
|
||||
- Make sure that the POS is not loaded over HTTPS.
|
||||
- A bug in Firefox's HTTP implementation prevents the autodiscovery
|
||||
from working reliably. When using Firefox you should manually set up
|
||||
the POSBox's IP address in the POS configuration.
|
||||
|
||||
The Barcode Scanner is not working
|
||||
----------------------------------
|
||||
|
||||
- The barcode scanner must be configured in US QWERTY and emit an
|
||||
Enter after each barcode. This is the default configuration of most
|
||||
barcode readers. Refer to the barcode reader documentation for more
|
||||
information.
|
||||
- The POSBox needs a 2A power supply to work with some barcode
|
||||
scanners. If you are not using the provided power supply, make sure
|
||||
the one you use has enough power.
|
||||
- Some barcode scanners will need more than 2A and will not work, or
|
||||
will work unreliably, even with the provided power supply. In those
|
||||
case you can plug the barcode scanner in a self-powered USB hub.
|
||||
- Some poorly built barcode scanners do not advertise themselves as
|
||||
barcode scanners but as a usb keyboard instead, and will not be
|
||||
recognized by the POSBox.
|
||||
|
||||
The Barcode Scanner is not working reliably
|
||||
-------------------------------------------
|
||||
|
||||
- Make sure that no more than one device with 'Scan via
|
||||
Proxy'/'Barcode Scanner' enabled are connected to the POSBox at the
|
||||
same time.
|
||||
|
||||
Printing the receipt takes too much time
|
||||
----------------------------------------
|
||||
|
||||
- A small delay before the first print is expected, as the POSBox will
|
||||
do some preprocessing to speed up the next printings. If you suffer
|
||||
delays afterwards it is most likely due to poor network connection
|
||||
between the POS and the POSBox.
|
||||
|
||||
Some characters are not correctly printed on the receipt
|
||||
--------------------------------------------------------
|
||||
|
||||
- The POSBox does not support all languages and characters. It
|
||||
currently supports Latin and Cyrillic based scripts, with basic
|
||||
Japanese support.
|
||||
|
||||
The printer is offline
|
||||
----------------------
|
||||
|
||||
- Make sure the printer is connected, powered, has enough paper and
|
||||
has its lid closed, and is not reporting an error. If the error
|
||||
persists, please contact support.
|
||||
|
||||
The cashdrawer does not open
|
||||
----------------------------
|
||||
|
||||
- The cashdrawer should be connected to the printer and should be
|
||||
activated in the POS configuration.
|
||||
|
||||
Credits
|
||||
=======
|
||||
The POSBox project was developed by Frédéric van der Essen with the
|
||||
kind help of Gary Malherbe, Fabien Meghazi, Nicolas Wisniewsky,
|
||||
Dimitri Del Marmol, Joren Van Onder and Antony Lesuisse.
|
||||
|
||||
This development would not have been possible without the Indiegogo
|
||||
campaign and those who contributed to it. Special thanks goes to the
|
||||
partners who backed the campaign with founding partner bundles:
|
||||
|
||||
- Camptocamp
|
||||
- BHC
|
||||
- openBig
|
||||
- Eeezee-IT
|
||||
- Solarsis LDA
|
||||
- ACSONE
|
||||
- Vauxoo
|
||||
- Ekomurz
|
||||
- Datalp
|
||||
- Dao Systems
|
||||
- Eggs Solutions
|
||||
- OpusVL
|
||||
|
||||
And also the partners who've backed the development with the Founding
|
||||
POSBox Bundle:
|
||||
|
||||
- Willow IT
|
||||
- E\. Akhalwaya & Sons
|
||||
- Multibase
|
||||
- Mindesa
|
||||
- bpso.biz
|
||||
- Shine IT.
|