|
| 1 | +======================== |
| 2 | +Connect Windows IoT Odoo |
| 3 | +======================== |
| 4 | + |
| 5 | +A Virtual IoT box is a computer program that needs to be downloaded and installed on a Windows |
| 6 | +computer. This requires a Windows operating system with an Odoo 16 or later database. |
| 7 | + |
| 8 | +The Windows virtual :abbr:`IoT (Internet of Things)` box works the same way as a physical :abbr:`IoT |
| 9 | +(Internet of Things)` box, with the ability to run most of the same devices. All :abbr:`POS (Point |
| 10 | +of Sale)` devices work with it, such as a scale or printer. Payment terminals will also work, but it |
| 11 | +should be noted that :abbr:`MRP (Material Requirement Planning)` devices are not compatible. *These |
| 12 | +include cameras or measurement tools.* |
| 13 | + |
| 14 | +Pre-requisites |
| 15 | +============== |
| 16 | + |
| 17 | +The following items will be needed to complete the Windows :abbr:`IoT (Internet of Things)` |
| 18 | +installation. |
| 19 | + |
| 20 | +- Odoo 16 database or any version above. |
| 21 | +- :abbr:`IoT (Internet of Things)` compatible devices (except those mentioned above). Refer to: |
| 22 | + `Odoo's compatible IoT devices <https://www.odoo.com/app/iot-hardware>`_. |
| 23 | +- Device drivers for Windows. |
| 24 | + |
| 25 | + .. note:: |
| 26 | + Odoo recommends using an updated, recent version of Windows (Windows 10/11) as some older |
| 27 | + operating systems can cause the Windows virtual :abbr:`IoT (Internet of Things)` to not work. |
| 28 | + |
| 29 | +- Windows computer (laptop, desktop, or server). |
| 30 | +- Odoo :abbr:`IoT (Internet of Things)` subscription. Refer to: :ref:`iot/iot-eligibility`. |
| 31 | + |
| 32 | +Connect the Windows virtual Iot box to an Odoo database |
| 33 | +======================================================= |
| 34 | + |
| 35 | +The Windows virtual IoT box is simple to setup in just a few easy steps. Follow this process when |
| 36 | +installing the Windows virtual IoT software for the first time. |
| 37 | + |
| 38 | +Download and initial installation |
| 39 | +--------------------------------- |
| 40 | + |
| 41 | +To begin the installation, navigate to the Odoo 16 or higher installation package for Enterprise or |
| 42 | +Community - Windows edition at `Odoo's download page <https://odoo.com/download>`_. Next, install |
| 43 | +and setup the Odoo :file:`.exe` file. After the instructions screen, click :guilabel:`Next` to start |
| 44 | +the installation and agree to the :abbr:`TOS (Terms of Service)`. |
| 45 | + |
| 46 | +During the next step of the installation, select :guilabel:`Odoo IoT` from the :guilabel:`Select the |
| 47 | +type of install` dropdown. |
| 48 | + |
| 49 | +.. example:: |
| 50 | + For reference, the following should be installed: |
| 51 | + |
| 52 | + - **Odoo server** |
| 53 | + - **Odoo IoT** |
| 54 | + - **Nginx WebServer** |
| 55 | + - **Ghostscript interpreter** |
| 56 | + |
| 57 | +Ensure there is enough space on the computer for the installation and click :guilabel:`Next`. |
| 58 | + |
| 59 | +Setting the destination and completing the installation |
| 60 | +------------------------------------------------------- |
| 61 | + |
| 62 | +To complete the installation, select the :guilabel:`Destination Folder` and click |
| 63 | +:guilabel:`Install`. |
| 64 | + |
| 65 | +.. tip:: |
| 66 | + Choosing ``C:\odoo`` as the install location will allow for the Nginx server to start. If the |
| 67 | + folder doesn't exist, then create it. Otherwise the installation files will be spread throughout |
| 68 | + the hard drive. |
| 69 | + |
| 70 | +.. warning:: |
| 71 | + Odoo's Windows virtual IoT software shouldn't be installed inside any of the Window's User's |
| 72 | + directories. Doing so won't allow for Nginx to initialize. |
| 73 | + |
| 74 | +The installation may take a few minutes. When complete, click :guilabel:`Next` to continue. |
| 75 | + |
| 76 | +Ensure that the :guilabel:`Start Odoo` box is checked and click :guilabel:`Finish`. After |
| 77 | +installation, the Odoo server will run and automatically open `http://localhost:8069` on your web |
| 78 | +browser. The webpage should display the :abbr:`IoT (Internet of Things)` box homepage. |
| 79 | + |
| 80 | +.. seealso:: |
| 81 | + A restart of the Windows IoT program may be necessary should the web browser not display |
| 82 | + anything. :ref:`iot/restart_windows_iot` |
| 83 | + |
| 84 | +Connecting devices |
| 85 | +------------------ |
| 86 | + |
| 87 | +Next, connect the :abbr:`IoT (Internet of Things)` devices to the Windows computer. Windows should |
| 88 | +automatically detect the device because the driver is pre-installed on the computer. If not, search |
| 89 | +for and install the Windows driver for the device. |
| 90 | + |
| 91 | +Following connecting devices to the computer, refresh the :abbr:`IoT (Internet of Things)` box |
| 92 | +homepage and verify the device is seen. If not, reload the handlers through the :abbr:`IoT (Internet |
| 93 | +of Things)` box homepage. |
| 94 | + |
| 95 | +Finally, connect Windows :abbr:`IoT (Internet of Things)` to a database using existing instructions |
| 96 | +(manually using the Token). |
| 97 | + |
| 98 | +.. seealso:: |
| 99 | + :doc:`/applications/productivity/iot/config/connect` |
| 100 | + |
| 101 | +Now the installation is complete, the devices connected to :abbr:`IoT (Internet of Things)` can be |
| 102 | +used to complete processes/actions. |
| 103 | + |
| 104 | +Troubleshooting |
| 105 | +=============== |
| 106 | + |
| 107 | +.. _iot/restart_windows_iot: |
| 108 | + |
| 109 | +Restart Windows IoT box |
| 110 | +----------------------- |
| 111 | + |
| 112 | +In some instances a manual restart of the physical :abbr:`IoT (Internet of Things)` box can resolve |
| 113 | +the issue of an :abbr:`IoT (Internet of Things)` box not showing up on the database. For the Windows |
| 114 | +virtual :abbr:`IoT (Internet of Things)` box a manual restart of the Odoo server can resolve |
| 115 | +database connection issues. |
| 116 | + |
| 117 | +To restart the virtual Windows IoT server: |
| 118 | + |
| 119 | +#. Type `Services` into the Windows :guilabel:`Search Bar`. |
| 120 | +#. Select the :menuselection:`Services` App and scroll down to the :guilabel:`Odoo` service. |
| 121 | +#. Right click on :guilabel:`Odoo` and select :guilabel:`Start` or :guilabel:`Restart`. This action |
| 122 | + will manually restart the Odoo IoT server. |
| 123 | + |
| 124 | +Firewalls |
| 125 | +--------- |
| 126 | + |
| 127 | +Firewalls keep devices safe and secure. Sometimes they can block connections that should be made |
| 128 | +though. The Windows virtual :abbr:`IoT (Internet of Things)` box software may not be reachable to |
| 129 | +the :abbr:`LAN (Local Area Network)` due to a firewall preventing the connection. Consult your local |
| 130 | +IT support team to make exceptions (network discovery) in the :abbr:`OS (Operating System)` or |
| 131 | +firewall program. Windows has their own firewall as do other virus protection programs. |
| 132 | + |
| 133 | +.. example:: |
| 134 | + A client might encounter a time when they are able to reach the homepage of the :abbr:`IoT |
| 135 | + (Internet of Things)` box, yet they cannot access it from another computer/mobile device/tablet |
| 136 | + on the same network. |
| 137 | + |
| 138 | +Making an exception on Windows Defender |
| 139 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 140 | + |
| 141 | +It's possible to allow other devices to access the Windows virtual :abbr:`IoT (Internet of Things)` |
| 142 | +box while keeping the firewall on. This is done by creating a rule on *Windows Defender* and |
| 143 | +allowing communication through port `8069`. The following process describes the steps to take in |
| 144 | +order to make this exception. |
| 145 | + |
| 146 | +Create a rule in Windows Defender |
| 147 | +********************************* |
| 148 | + |
| 149 | +First, open the *Windows Firewall* by navigating to the :menuselection:`Start Menu` and typing in |
| 150 | +`Firewall`. Then, open the :menuselection:`Windows Defender Firewall` program. In the left-hand |
| 151 | +menu, navigate to :guilabel:`Advanced Settings`. |
| 152 | + |
| 153 | +Once :guilabel:`Advanced Settings` have been selected, click :guilabel:`Inbound Rules` in the |
| 154 | +left-hand menu. Then, in the right-hand menu column (under :guilabel:`Inbound Rules`), click on |
| 155 | +:guilabel:`New Rule` to create a new rule. |
| 156 | + |
| 157 | +Configure new rule |
| 158 | +****************** |
| 159 | + |
| 160 | +On the :menuselection:`Rule Type` screen, select :guilabel:`Port`. Then click :guilabel:`Next`. From |
| 161 | +the :menuselection:`Protocol and Ports` page leave the rule application to :guilabel:`TCP`. Then, |
| 162 | +select :guilabel:`Specific Local Ports` for the :guilabel:`ports` option. In the text box, type in |
| 163 | +`8069`. Finally click :guilabel:`Next` to continue to the next step. |
| 164 | + |
| 165 | +On the :menuselection:`Actions` page, select :guilabel:`Allow the connection` and click |
| 166 | +:guilabel:`Next`. The following page on the :menuselection:`Rule Configuration` wizard is the |
| 167 | +:guilabel:`Profile` page. On this page, select whichever connection type applies to the network the |
| 168 | +Windows machine is operating on. Ideally, select :guilabel:`Private` only connections. The *Private* |
| 169 | +connection type is the most secure connection while allowing the selected port to communicate. Click |
| 170 | +:guilabel:`Next` to continue. |
| 171 | + |
| 172 | +Finally, assign a new, unique name to the rule. For example, this name can be `Odoo`. Optionally, |
| 173 | +add a brief description in the :guilabel:`Description` field. Click :guilabel:`Finish` to complete |
| 174 | +the :guilabel:`Rule Configuration` wizard. Now, the new rule is active and devices can connect to |
| 175 | +the Windows virtual :abbr:`IoT (Internet of Things)` box. |
| 176 | + |
| 177 | +Uninstalling Windows IoT |
| 178 | +------------------------ |
| 179 | + |
| 180 | +Uninstalling the Windows virtual :abbr:`IoT (Internet of Things)` box is done through the Windows |
| 181 | +program manager. Using any Windows version, search for `program`. Then, select :guilabel:`Add or |
| 182 | +Remove Programs` located in the control panel. Search for `Odoo` and click the :guilabel:`three dot |
| 183 | +menu` to uninstall. |
| 184 | + |
| 185 | +Confirm the un-installation and follow the steps to uninstall through the Odoo uninstall guide. |
0 commit comments