====== First steps ======
#;;
Gate
#;;
The Unipi Gate is delivered with Linux Debian OS ([[.:download-image:03-opensource|Base OS]]).
This article assumes Unipi Gate is in factory settings and covers:
* Mounting and connections
* Connecting power supply
* Accessing the device
{{ :files:img_warning-line_b.png?nolink |}}
[[.:safety-instructions#symbols_and_notes|{{:en:hw:05_safety-instructions_iso-7010-m002.png?nolink |(🕮)}}]]
**Attention**: \\
Always follow the [[.:safety-instructions|]] when handling the device.
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Note:** \\
If you cannot tell the device's current state, check the description of all possible states available in [[en:hw:025-gate:led-indication|]] category including visual demonstration.
===== Mounting =====
{{page>..:din-mounting-gate-hidden}}
===== Connection =====
Disconnectable screw terminals are used to connect the wires to the device. The purpose of each terminal contact is described on the top side of the unit case. Use the appropriate flathead screwdriver to install the wires into the terminals. Do not exceed the maximum tightening torque specified in [[.:technical-parameters#storage_installation_and_working_conditions|technical parameters]].
{{ :files:img_warning-line_b.png?nolink |}}
{{:en:hw:09_safety-instructions_pseudo-ISO-7010-attention.png?nolink |(!)}}
**Attention**: \\
Always connect all cable shields (RS-485, analog sensors, etc.) on one side of the cable only, directly to the ground terminal of the cabinet/box, never to the ground point of the device.
{{ :files:img_warning-line_o.png?nolink |}}
{{:en:hw:02_safety-instructions_ISO-7010-W012.png?nolink |/↯\}}
**Warning**: \\
Take extra care when plugging in. There is a risk of electric shock! Always ensure and check that the environment and device are disconnected from all voltage sources before starting work.
==== Connecting peripherals, sensors, control elements and communication cables ====
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Note:** \\
Unipi Gate has an interface marked as **eth0** (100 Mbit) and **eth1** (1 Gbit). By default, these interfaces are connected to the **br0** network bridge and act as a two-port switch. The MAC address for **br0** is taken from the **eth0** interface. As such, it does not matter which port is used to connect the device to a local network. In the regular mode, the MAC address is assigned for each port individually.
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:09_safety-instructions_pseudo-ISO-7010-attention.png?nolink |(!)}}
**Attention:** \\
Device in default configuration should be connected to a local network with only a single cable. If both interfaces are connected to the same network, a loop may occur disabling communication in the entire network.
==== Connection via a local network with DHCP server ====
Despite its rather complicated name, this approach is simple and the most frequent connection method. All that is needed to do is to connect Unipi Gate to a computer network via ethernet cable. Then connect a computer or tablet to the same network (using either Ethernet or Wi-Fi). The network's DHCP server (router or Wi-Fi router) will then automatically provide both devices with an IP address from the available address range.
Unipi Gate's IP address can be obtained either from the DHCP server, or by using a suitable network scan program (such as [[en:files:software:tools:advanced-ip-scan-hidden|Advanced IP Scanner]]). **In most cases, however, the [[.:01-first-steps:mdns-hidden|mDNS record]] will suffice.**
;#;
//The used IP addresses are samples.//
;#;
{{ :files:hw:connecting_to_unipi_gate-lan.png?direct |}}
==== Direct connection ====
This method requires a physical link between the computer and the Unipi Gate device via Ethernet cable. As this solution does not include a DHCP server, both the computer and the Unipi Gate are assigned a random IP address from the range of 169.254.XXX.XXX.
The Unipi Gate device's IP address can be obtained by using a suitable network scan program (such as [[en:files:software:tools:advanced-ip-scan-hidden|Advanced IP Scanner]]). **In most cases, however, the [[.:01-first-steps:mdns-hidden|mDNS record]] will suffice.**
;#;
//The used IP addresses are samples.//
;#;
{{ :files:hw:connecting_to_unipi_gate-direct.png?direct |}}
==== Connection to a local network with DHCP using Unipi Gate's network bridge ====
This method combines both above-mentioned variants and is useful in cases when your router does not have enough free Ethernet ports and Wi-Fi connection for your computer is not available.
Start by connecting the Unipi Gate device into the router's free port via Ethernet cable. Use a second Ethernet cable to connect your computer to the second port on Unipi Gate. As both Unipi Gate's ports act as a network switch (or a patch cord), both devices are connected to the same network and will be assigned IP addresses automatically by a DHCP server, using the available IP address range.
The Unipi Gate device's IP address can be obtained by using a suitable network scan program (such as [[en:files:software:tools:advanced-ip-scan-hidden|Advanced IP Scanner]]). **In most cases, however, the [[.:01-first-steps:mdns-hidden|mDNS record]] will suffice.**
;#;
//The used IP addresses are samples.//
;#;
{{ :files:hw:connecting_to_unipi_gate-bridge.png?direct |}}
==== Connecting the power supply ====
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:01_safety-instructions_ISO-7010-W001.png?nolink |/!\}}
**Attention:** \\
Make sure to connect the power supply last. Connection and disconnection of other interfaces should be done with the power supply disconnected; otherwise, the device can be damaged.
To ensure correct operation of the device, it is necessary to first connect the power supply wires to the contacts as described on the device, VCC/positive contact and GND/negative contact of the detachable screw terminal block. For information on recommended supply voltage tolerance and power consumption, refer to [[.:technical-parameters#storage_installation_and_working_conditions|operating conditions]] and the manufacturing label.
;#;
//Power supply connection//
;#;
{{ :en:hw:04_first-steps_gate_power-supply.png?direct&200 |}}
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Tip:** \\
Unipi Gate device can be powered by [[https://www.unipi.technology/power-supplies-c15|9-30 V⎓ power supply]].
{{ :files:img_warning-line_o.png?nolink |}}
{{ :en:hw:02_safety-instructions_ISO-7010-W012.png?nolink |/↯\}}
**Warning**: \\
The device has appliance class III. To protect against electric shock and to comply with electromagnetic compatibility (EMC), it is necessary to connect a protective ground conductor to the ground connector of the device marked on the case with symbol {{:files:earth_ground.png?nolink&16|(⏚)}}. For ground conductor connection use ring tongue and provided M4 screw with serrated lock washer.
{{ :files:img_breakline_2.png?nolink |}}
The DIN rail on which the device is installed must be connected to the main protective earth point of the cabinet/box as well.
The device enters regular mode in a few seconds after the power supply is connected. The mode is physically indicated by PWR LED continuous emitting and ACT LED emitting with short flashes ([[en:hw:025-gate:led-indication#pwr_is_on_act_is_on_with_short_blinks|demonstration here]] / [[en:hw:025-gate:led-indication#regular_mode|startup simulator here]]).
===== Accessing the device =====
The unit is now ready to house the implementation of any project done in Base OS.
==== Device address ====
Unipi Gate can be addressed with the [[en:hw:025-gate:01-first-steps:mdns-hidden|mDNS record]]. mDNS address format is as follows:
* **[model]-sn[serial number].local**
Example:
G100-sn1262901234.local
**Model** and **serial number** can be found on the manufacturing label. It is located on the side of the device.
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Note:** \\
Alternatively the Unipi Gate can be addressed via its IP address.
The IP address can usually be found on the DHCP server or by using a network scanner (such as [[en:files:software:tools:advanced-ip-scan-hidden|Advanced IP Scanner]]).
{{ :files:img_breakline_bold.png?nolink |}}
When the Unipi Gate is connected directly to a PC or laptop, both the computer and the Unipi Gate are assigned a random IP address from the range 169.254.XXX.XXX.
==== Connecting via SSH ====
To install additional SW and to create control logic, it is necessary to [[en:automation:unipi-ssh-connect-hidden|connect via SSH]] using the address from previous step.
Username for the SSH connection is **unipi**. For the first login use the factory default password. For further information see [[en:sw:04-unipi-firmware:02-passwords]].
{{ :files:img_warning-line_b.png?nolink |}}
{{ :en:hw:08_safety-instructions_pseudo-ISO-7010-info.png?nolink |(i)}}
**Note:** \\
Units in default state, or with a freshly installed clean OS image, have a randomly generated factory password. This password can be found on the informational label.
After logging in for the first time, you will be prompted to set custom user password.
/* Co dále */
===== Further info =====
* [[.:image#flashing_the_os_using_the_service_interface|Flashing an OS image]]
* [[.:image#backup_and_restore_the_os|Backup and restore the OS]]
* [[en:sw:01-mervis:running-on-gate-hidden|Flashing Mervis on Unipi Gate]] and [[en:sw:01-mervis:creating-new-project-hidden|create the first program in Mervis on Unipi]]
* [[en:sw:03-3rd-party:nodered:installation-unipi|Installing Node-RED on Unipi Gate]]
* [[en:sw:04-unipi-firmware#apt_repository|Unipi tools in our OS images]]
* Available [[en:sw:02-apis]]