User Tools

Site Tools


en:jethub_h1  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:jethub_h1 [2022/01/22 00:40]
Pavel Sokolov created
en:jethub_h1 [2022/02/02 19:46] (current)
Leonid Titov
Line 1: Line 1:
-FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// 
- 
 ======JetHub H1====== ======JetHub H1======
  
 ===== Appearance ===== ===== Appearance =====
  
-{{::1.png?400|}}+{{:1.png?400|}}
  
 ===== Description ===== ===== Description =====
  
-The controller is designed to solve home automation and monitoring tasks: polling sensors, collecting and transmitting data, PLC functions in smart home systems. The powerful JetHome JetHub H1 quad-core processor will allow it to be used as a central controller in smart home systems in conjunction with various Wi-Fi and ZigBee wireless sensors from other manufacturers. The controller case is made in a laconic modern design that will fit into any interior.+The controller is designed for home automation and monitoring tasks: polling sensors, collecting and transmitting data, PLC functions in smart home systems. The powerful JetHome JetHub H1 quad-core processor allows it to be used as a central controller in smart home systems in conjunction with various Wi-Fi and ZigBee wireless sensors from other manufacturers. The controller case is made in a laconic modern design that will fit into any interior.
  
 ===== General characteristics ===== ===== General characteristics =====
Line 21: Line 19:
   * Integrated dual-band (2.4GHz and 5GHz) Realtek RTL8822CS WiFi/Bluetooth wireless module. Supports WiFi standards IEEE 802.11a/b/g/n/ac, 2x2 MIMO, and Bluetooth 5.0;   * Integrated dual-band (2.4GHz and 5GHz) Realtek RTL8822CS WiFi/Bluetooth wireless module. Supports WiFi standards IEEE 802.11a/b/g/n/ac, 2x2 MIMO, and Bluetooth 5.0;
   * Ethernet IEEE 802.3 10/100 Mbps;   * Ethernet IEEE 802.3 10/100 Mbps;
-  * TI CC2538+CC2592 or TI CC2652P1 Zigbee wireless module with output power up to 20dBm and support Zigbee 3.0 standard.+  * TI CC2538+CC2592 or TI CC2652P1 Zigbee wireless module with output power up to 20dBm. It supports Zigbee 3.0 standard.
  
 ===== Interfaces ===== ===== Interfaces =====
Line 27: Line 25:
   * Support for MicroSD 2.x/3.x/4.x DS/HS cards;   * Support for MicroSD 2.x/3.x/4.x DS/HS cards;
   * 2 x USB 2.0 high-speed;   * 2 x USB 2.0 high-speed;
-  * The serial console is routed to the MicroUSB power connector.+  * The serial console is combined with the MicroUSB power connector.
  
-===== Nutrition =====+===== Power supply =====
  
-The controller is powered from a stabilized DC source +5V via the MicroUSB connector. Power consumption is not more than 5W (excluding external consumers connected to USB ports).+The controller is powered from a stabilized DC source +5V via the MicroUSB connector. Power consumption is less than 5W (excluding external devices attached to USB ports).
  
-When powering the controller from the computer's USB port, it must be taken into account that the standard USB 2.0 interface can limit the output current to 0.5A, which may not be enough for the controller to work normally under load.+The standard USB 2.0 interface can limit the output current to 0.5A, which may not be enough for the controller to work normally under load. This must be considered when powering the controller from the computer's USB port
  
-To power the controller, it is recommended to use the power supply supplied with the controller. When powering the controller from a computer or from another device with a USB interface, as well as when using a third-party power supply, make sure that this device or power supply is capable of providing the necessary output power: up to 5W if no additional devices will be connected to the controller or up to 10W if via USB -ports of the controller will connect additional devices powered by the USB port.+It is recommended to use the power supply supplied with the controller. When powering the controller from a computer or from another device with a USB interface, as well as with a third-party power supply, make sure that this device or power supply is capable of providing the necessary output power: up to 5W (1A) if no additional devices will be connected to the controller or up to 10W (2A) if additional devices are connected via USB ports of the controller.
  
-===== Dimensions and weights =====+===== Dimensions and weight =====
  
   * Overall dimensions: 100 x 97 x 20 mm;   * Overall dimensions: 100 x 97 x 20 mm;
   * Weight without power supply: 120 g   * Weight without power supply: 120 g
  
-===== Mode of operation =====+===== Environmental requirements =====
  
   * Operating temperature: 0..+40 C   * Operating temperature: 0..+40 C
Line 48: Line 46:
 ===== Software ===== ===== Software =====
  
-Armbiam operating system with the ability to install a large number of additional packages from the Ubuntu 20.04 repository, as well as other third-party applications. It is possible to install such popular systems for home automation as Home Assistant, openHAB, etc.+Armbian operating system with access to a large number of additional packages from the Ubuntu 20.04 repository, as well as other third-party applications. It is possible to install such popular home automation software as Home Assistant, openHAB, etc.
  
-The latest version of the JetHome Armbian firmware can be downloaded at http://update.jethome.ru/armbian/ (see p. "Controller firmware") <color #ed1c24>For the H1 controller, the Armbian firmware version with the suffix "j80" is required</ color>+The latest version of the JetHome Armbian firmware can be downloaded at http://update.jethome.ru/armbian/ (see p. "Controller firmware") <color #ed1c24>For the H1 controller, the Armbian firmware version with the suffix "j80" is required</color>
  
-Images of the Home Assistant Operating System (HassOS) operating system are also available for the controller: http://wiki.jethome.ru/hassos+Images of the Home Assistant Operating System (HassOS) operating system are also available: http://wiki.jethome.ru/hassos
  
 The controller is not designed to perform high-load tasks in 24/7 mode, such as video processing. The controller is not designed to perform high-load tasks in 24/7 mode, such as video processing.
 +
 ===== General view of the controller board ===== ===== General view of the controller board =====
  
-{{::h1_pcb_top_view.png?400|}}+{{:h1_pcb_top_view.png?400|}}
  
 The figure shows: The figure shows:
   * "ETHERNET" - Ethernet connector;   * "ETHERNET" - Ethernet connector;
   * "DC 5V/CONSOLE" - MicroUSB connector for controller power supply and Linux console output;   * "DC 5V/CONSOLE" - MicroUSB connector for controller power supply and Linux console output;
-  * "USB 1" - USB connector for connecting external devices and controller firmware;+  * "USB 1" - USB connector for connecting external devices and for booting controller firmware;
   * "USB 2" - USB connector for connecting external devices;   * "USB 2" - USB connector for connecting external devices;
   * "SD-CARD" - a slot for connecting MicroSD memory cards;   * "SD-CARD" - a slot for connecting MicroSD memory cards;
Line 81: Line 80:
 The controller has two external USB 2.0 ports (USB1 and USB2. see "General view of the controller board") for connecting additional peripheral devices. When powering an external device from the USB port of the controller, the current consumed by this external device must not exceed 0.5A. The controller has two external USB 2.0 ports (USB1 and USB2. see "General view of the controller board") for connecting additional peripheral devices. When powering an external device from the USB port of the controller, the current consumed by this external device must not exceed 0.5A.
  
-The USB1 port (located closer to the power connector) is also used for controller firmware (see "Controller firmware").+The USB1 port (located closer to the power connector) is also used for booting controller firmware (see "Controller firmware").
  
 ===== UART console ===== ===== UART console =====
  
-The console is brought to the Micro-USB connector (also used to power the controller) through the USB-UA interface converter installed on the board+The console is attached to the micro-USB connector (also used to power the controller) through the onboard USB-UART interface converter (RT Silicon Labs CP2102). 
 + 
 +The driver for the USB-UART interface converter for Windows can be found at [[https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers|manufacturer's website]]. 
 +For Linux, no additional driver is usually required. 
 + 
 +Port configuration: 
 +  * Speed ​​115200 bps; 
 +  * Data length 8 bits; 
 +  * Stop bit 1; 
 +  * Parity is not used; 
 +  * Hardware flow control is not used. 
 + 
 +The console is connected to the UART_AO_A port of the Amlogic S905W processor: 
 + 
 +^ Processor Pin ^ Function ^ Description ^ 
 +| GPIOAO_0 | UART_AO_A_TX | Console TX | 
 +| GPIOAO_1 | UART_AO_A_RX | Console RX | 
 + 
 + 
 +=====Zigbee Wireless Module===== 
 + 
 +The JetHome JetHub H1 controller uses a Zigbee wireless communication module based on a TI CC2538 + CC2592 or TI CC2652P1 chip. See module description: [[zb3cx_v1]] or [[zb6c_v1]] 
 + 
 +The module is connected to the UART_AO_B port of the processor (the device is presented in the system as **/dev/ttyAML2**), hardware receive/transmit control (RTS and CTS lines) is not used. It is possible to control the hardware reset of the wireless module (RESET line) and control its boot mode (BOOT line) using the system GPIO interface. 
 + 
 +A 2x5 connector with a pin pitch of 1.27mm is installed on the board for JTAG flashing: 
 + 
 +{{:jtag_connector_pinout_mini.png?200|}} 
 + 
 +Module connection: 
 + 
 +^ Processor Pin ^ Function ^ Description ^ 
 +| GPIOAO_6 | GPIOAO_6 | Module hardware reset management | 
 +| GPIOAO_9 | GPIOAO_9 | Module loading mode control | 
 +| GPIOAO_4 | UART_AO_B_TX | UART TX line | 
 +| GPIOAO_5 | UART_AO_B_RX | UART RX line | 
 +| GPIOAO_2 | UART_AO_B_CTS | UART CTS line | 
 +| GPIOAO_3 | UART_AO_B_RTS | UART RTS line | 
 + 
 + 
 +==== Wireless module control from Linux ==== 
 + 
 +**Usage of the RESET line of the wireless module** 
 + 
 +GPIO initialization: 
 +<code> 
 +# cd /sys/class/gpio 
 +# echo 507 > export 
 +# echo out > gpio507/direction 
 +</code> 
 + 
 +Activating hardware reset mode: 
 +<code> 
 +# echo 1 > gpio507/value 
 +</code> 
 + 
 +Deactivating hardware reset mode (bringing wireless module back to operating mode): 
 +<code> 
 +# echo 0 > gpio507/value 
 +</code> 
 + 
 +**Usage of the BOOT line of the wireless module from Linux** 
 + 
 +GPIO initialization: 
 +<code> 
 +# cd /sys/class/gpio 
 +# echo 510 > export 
 +# echo out > gpio510/direction 
 +</code> 
 + 
 +Way to enable bootloader mode may depend on the type of module and its firmware. For JetHome CC2538 ZigBee modules, the bootloader mode can be activated by a low logic level on the BOOT line: 
 + 
 +<code> 
 +# echo 0 > gpio510/value 
 +</code> 
 + 
 + 
 +===== Custom LED ===== 
 + 
 +There are two LEDs installed on the controller board: one to indicate the presence of supply voltage (green LED), the second user blue LED is connected to the GPIODV_24 output of the Amlogic S905W processor. 
 + 
 +**LED control from Linux** 
 + 
 +GPIO initialization: 
 +<code> 
 +# cd /sys/class/gpio 
 +# echo 474 > export 
 +# echo out > gpio474/direction 
 +</code> 
 + 
 +Turning on the LED: 
 +<code> 
 +# echo 1 > gpio474/value 
 +</code> 
 + 
 +LED off: 
 +<code> 
 +# echo 0 > gpio474/value 
 +</code> 
 + 
 +**Manipulating of LED state from Home Assistant** 
 + 
 +<code> 
 +switches: 
 +  -platform:command_line 
 +    switches: 
 +      led_gpio: 
 +        command_on: "echo 1 > /sys/class/gpio/gpio474/value" 
 +        command_off: "echo 0 > /sys/class/gpio/gpio474/value" 
 +        command_state: "cat /sys/class/gpio/gpio474/value" 
 +        value_template: '{{ value == "1" }}' 
 +        friendly_name: Blue LED 
 +</code> 
 + 
 +===== Controller Firmware ===== 
 + 
 +=== Flashing from Windows using Amlogic Burning Tool === 
 + 
 +You can use the Amlogic Burning Tool to flash the software image. See [[burning_tool_manual|Burning Tool Instructions]]. 
 + 
 +The latest JetHome Armbian firmware can be downloaded from http://update.jethome.ru/armbian/ 
 + 
 +**<color #ed1c24>H1 controller requires Armbian firmware variant with "j80" suffix</color>** 
 + 
 +The firmware should be flashed through the USB1 port of the controller (see General view of the controller board). 
 + 
 +If the controller already has a firmware with a working u-boot installed, the bootloader mode can be entered in two ways: 
 + 
 +  * Turn off the power to the controller (MicroUSB connector on the back of the case). While holding down the BOOT button (through the hole on the back of the case), connect the controller with a USB A - USB A cable to the computer. 
 +  * Connect the serial terminal to the controller, stop the system from booting during u-boot startup (for example, by pressing the Enter key at the very beginning of the system boot). Enter the update command at the u-boot command line. 
 + 
 +If the controller firmware is damaged or a firmware was installed that does not support the standard methods of switching to the bootloader mode indicated above, then the following procedure should be used: 
 + 
 +  * Turn off the power to the controller (MicroUSB connector on the back of the case). Further in the process of firmware it is not necessary to connect it; 
 +  * Open the controller case to get access to the board; 
 +  * Close the "Update" pin contacts located on the controller board near the battery; 
 +  * Connect the controller with a USB A - USB A cable to the computer. Make sure the Burning Tool has detected the connection to the controller; 
 +  * Open pin contacts "Update" (Important!); 
 +  * Then start the controller firmware process. 
 + 
 +=== Firmware flashing from Ubuntu Linux === 
 + 
 +For flashing from Linux, you can use the burn-tool utility from the repository [[https://github.com/khadas/utils]] 
 + 
 +Documentation for using the utility [[https://docs.khadas.com/vim1/UpgradeViaUSBCable.html#Upgrade-On-Ubuntu]] 
 + 
 +To install the utility, run the following commands: 
 +<code> 
 +$ git clone https://github.com/khadas/utils khadas-utils 
 +$ cd khadas-utils 
 +$ ./INSTALL 
 +</code> 
 + 
 +To flash the controller, put it into bootloader mode in any way described above. Next, run the command: 
 +<code> 
 +burn tool -i <FIRMWARE_IMAGE_FILE> 
 +</code> 
 + 
 +where <FIRMWARE_IMAGE_FILE> is the firmware file 
 + 
 +Sample program output: 
 +<code> 
 +$ burn-tool -i ~/firmware/H1/JetHome_1.0.12_Armbian_20.08_Arm-64_focal_current_5.7.16_j80.img 
 +Try to burn Amlogic image... 
 +Burning image '/home/ak/firmware/H1/JetHome_1.0.12_Armbian_20.08_Arm-64_focal_current_5.7.16_j80.img' for 'VIM1/VIM2' to eMMC... 
 +Rebooting the board........[OK] 
 +Unpacking image [OK] 
 +Initializing ddr ........[OK] 
 +Running u-boot........[OK] 
 +Create partitions [OK] 
 +Writing device tree [OK] 
 +Writing bootloader [OK] 
 +Wiping data partition [OK] 
 +Wiping cache partition [OK] 
 +Write boot partition [OK] 
 +Writing rootfs partition [OK] 
 +Resetting board [OK] 
 +Time elapsed: 6 minute(s). 
 +Done! 
 +</code> 
 + 
 +=== Firmware flashing using a USB flash drive === 
 + 
 +It is possible to flash the controller using a USB flash drive. See instruction [[jethome_armbian_burn_from_usb_flash]] 
 + 
 +===== First launch of JetHome Armbian ===== 
 + 
 +Setting up the controller at its first start or after flashing it can be done in the following ways: 
 +  * Via Ethernet network; 
 +  * Via UART console. 
 + 
 +To configure the controller over Ethernet, connect the controller to a wired local area network with a configured and running DHCP server. Identify the new IP address of the controller using your DHCP server tools. You can check MAC address of the controller printed on the bottom of the controller case. For example, in Mikrotik routers, this can be done in the IP -> DHCP Server -> Leases menu section. Next, connect to the controller using any ssh client, for example, Putty for Windows OS. 
 + 
 +To connect via the UART console, connect the controller with a MicroUSB cable to the computer (see p. "UART console"). The speed of the interface is 115200 Kbps. 
 + 
 +The default password for the "root" user is "1234"
 + 
 +On first launch, you will be prompted for: 
 +  * Set a new password for the root user; 
 +  * If the controller is connected to a network with access to the Internet, the time zone, language for the system and keyboard layout will be automatically identified; 
 +  * Next, you will be prompted to create a new user account in the system and set a password for it (it is recommended to do this). User data entry can be skipped by pressing the Enter key when prompted for the user's full name. 
 + 
 + 
 +===== Configuring WiFi in JetHome Armbian ===== 
 + 
 +To configure the connection to the WiFi network, you can use the standard console utility armbian-config. After running this utility, select the "Network" menu, then choose "WiFi" section. 
 + 
 + 
 +===== Zigbee Embedded Module Firmware ===== 
 + 
 +To flash the Zigbee module, you can use the python utility [[https://github.com/JelmerT/cc2538-bsl|cc2538-bsl]]. See manual [[cc2538_bsl_manual]] 
 + 
 +See [[cc2538_firmware]] or [[cc2652p_firmware]] for recommended firmware 
 + 
 +** Procedure for firmware: ** 
 + 
 +Switch the module to SBL (serial bootloader) mode: 
 +<code> 
 +# echo 0 > /sys/class/gpio/gpio510/value 
 +# echo 1 > /sys/class/gpio/gpio507/value 
 +# echo 0 > /sys/class/gpio/gpio507/value 
 +</code> 
 + 
 +Example command for firmware: 
 +<code> 
 +# python3 cc2538-bsl/cc2538-bsl.py -p /dev/ttyAML2 -e -w JH_2538_2592_ZNP_UART_20201010.bin 
 +</code> 
 + 
 +Reload the module into "working" mode: 
 +<code> 
 +# echo 1 > /sys/class/gpio/gpio510/value 
 +# echo 1 > /sys/class/gpio/gpio507/value 
 +# echo 0 > /sys/class/gpio/gpio507/value 
 +</code> 
 + 
 +===== HOWTO ===== 
 + 
 +  * [[h1_housing_opening_howto]] 
 +  * [[jethome_armbian_img_repacking]] 
 +  * [[home_assistant_python_venv]] 
  
en/jethub_h1.1642801229.txt.gz · Last modified: 2022/01/22 00:40 by Pavel Sokolov