{"id":4227,"date":"2023-04-25T14:36:15","date_gmt":"2023-04-25T14:36:15","guid":{"rendered":"https:\/\/lora.vsb.cz\/?page_id=4227"},"modified":"2023-04-26T20:11:22","modified_gmt":"2023-04-26T20:11:22","slug":"multifunctional-switching-device","status":"publish","type":"page","link":"https:\/\/lora.vsb.cz\/index.php\/multifunctional-switching-device\/","title":{"rendered":"Multifunctional switching device"},"content":{"rendered":"<table style=\"height: 66px;\" width=\"356\">\n<tbody>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>TTN version:<\/strong><\/td>\n<td><strong><span style=\"color: #008000;\">TTNv3<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Board:<\/strong><\/td>\n<td>Adafruit Feather M0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Activation:<\/strong><\/td>\n<td>OTAA<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Device Class:<\/strong><\/td>\n<td>Class A<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Transmission:<\/strong><\/td>\n<td>Duplex Data Transmission<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Last updated:<\/strong><\/td>\n<td>April 26, 2023<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: #ff0000;\">Warning: <\/span>This article is for informational purposes only and is not a guide. If you assemble the device, you do so at your own risk. We are not responsible for any damage, injury or loss of life! The device works in the electrical grid in the Czech Republic, whose parameters and standards may differ from the grid parameters in your country.<\/strong><\/p>\n<p>This article describes the design of a device that can switch, for example, the lights in a small parking lot or lights around a house based on\u00a0lighting intensity, time settings, light intensity at selected times, or sunrise and sunset times. The device also functions as a measuring device that measures light intensity (with a BH1750 sensor), voltage and frequency of the power line (with a PZEM-004T-100A measuring device). When the device is switched on, it measures the electrical energy consumption, current, active power and power factor of the switched device (also with the PZEM). Furthermore, the voltage, state and temperature of the battery that powers the device during a power failure (by the LC709203F module) and the temperature of the RTC are measured. The device uses the <a href=\"https:\/\/lora.vsb.cz\/index.php\/adafruit-feather-m0\/\" target=\"_blank\" rel=\"noopener\"><strong>Adafruit Feather M0 RFM95 LoRa Radio<\/strong><\/a> and the components listed below. <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4252 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-scaled.jpg\" alt=\"Switch clock\" width=\"700\" height=\"500\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-300x214.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-1024x731.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-768x549.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-1536x1097.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_complete-2048x1463.jpg 2048w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2><strong><span style=\"color: #800000;\">Content<\/span><\/strong><\/h2>\n<ul>\n<li>Main features<\/li>\n<li>Components<\/li>\n<li>Assembly<\/li>\n<li>Arduino IDE setup<\/li>\n<li>The Things Stack setup<\/li>\n<li>Program<\/li>\n<li>Telegraf, InfluxDB &amp; Grafana<\/li>\n<li>MSD control via downlinks<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Main features<\/span><\/strong><\/h2>\n<ul>\n<li>The device sends measured data using uplinks to the TTS network.<\/li>\n<li>When switching a device powered from three phases (400 V), the PZEM only measures the voltage and frequency of the phase from which the multifunctional switching device is powered.<\/li>\n<li>When the device is switched on, it measures the electrical energy consumption, current, active power and power factor of the switched device.<\/li>\n<li>The device sends information about its set configuration to the TTS network.<\/li>\n<li>The multifunction switching device is set using received downlinks from the TTS network.<\/li>\n<li>A Python program, a Python script and a Grafana panel plugins are available for the Multifunctional switching device, with which this device can be easily set up via the TTS network.<\/li>\n<li>Data sent in both uplinks and downlinks use Cayenne LPP formatting (with added data types and custom added type for time).<\/li>\n<li>Device setup using downlinks is password protected.<\/li>\n<li>Traffic is divided using FPort into measured data sent with FPort 1 and downlink configuration and configuration information is sent in FPort 2.<\/li>\n<li>It is possible to set how often and what data will be sent in uplinks.<\/li>\n<li>It is possible to set how many samples of measured data will be used to calculate the resulting averages, which will be sent in the uplink.<\/li>\n<li>It is possible to set the threshold and the safe zone of light intensity, for switching according to the light intensity.<\/li>\n<li>It is possible to set up to three switch-off and three switch-on times.<\/li>\n<li>The device automatically calculates the sunrise and sunset times according to the selected coordinates.<\/li>\n<li>The ability to remotely change the working modes of the device or remotely restart it.<\/li>\n<li>The device automatically sets the date and time obtained from the TTS network.<\/li>\n<li>All set values are stored in the EEPROM memory, so that the device does not have to be set again after a restart or an unexpected shutdown.<\/li>\n<li>The device sends information about device errors and incorrectly entered settings.<\/li>\n<li>In the event of a power failure, the device is powered by the battery.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #189bd6;\"><strong>Components<\/strong><\/span><\/h2>\n<h5><span style=\"color: #189bd6;\"><strong>Box<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.gewiss.com\/ww\/en\/products\/product.1000002.1000088.GW44208\" target=\"_blank\" rel=\"noopener\">Box Gewiss GW44208 &#8211; IP56 &#8211; 240x190x90<\/a><\/li>\n<li><a href=\"https:\/\/www.hadex.cz\/l590-din-lista-35x75mmx1m-derovana\/\" target=\"_blank\" rel=\"noopener\">DIN rail 3,5 cm<\/a><\/li>\n<li>2x <a href=\"https:\/\/www.sez.sk\/en\/produkty\/tvm-13-2-2\/\" target=\"_blank\" rel=\"noopener\">cable gland Pg 13.5<\/a><\/li>\n<li>2x <a href=\"https:\/\/www.gewiss.com\/ww\/en\/products\/product.1000002.1000088.GW50429\" target=\"_blank\" rel=\"noopener\">Flexible Polymer Cable Gland<\/a><\/li>\n<li>2x <a href=\"https:\/\/www.okw.com\/en\/Cable-glands-strain-relief\/C2325418.htm\" target=\"_blank\" rel=\"noopener\">cable gland M25x1.5<\/a><\/li>\n<li>Plastic flat sheet plate 3 mm thick (dimensions according to the bottom of the box, white)<\/li>\n<li><a href=\"https:\/\/www.papirnictvieshop.cz\/karton-p-p-modelovaci-podlozka-a3-pp-eanKPP1-991-skup2903.php\" target=\"_blank\" rel=\"noopener\">Modeling pad A3 (1-991, Karton P+P spol. s.r.o.)<\/a><\/li>\n<li>2x Bolt (short) and nut to the DIN rail<\/li>\n<li>12x Screw 2.5 mm, length 10 mm<\/li>\n<li>12x spring washer on screw<\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>&#8222;Cube&#8220;<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/3299\" target=\"_blank\" rel=\"noopener\">Black Nylon Machine Screw and Stand-off Set \u2013 M2.5 Thread<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/2890\" target=\"_blank\" rel=\"noopener\">FeatherWing Doubler<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/3173\" target=\"_blank\" rel=\"noopener\">Terminal Block kit for Feather &#8211; 0.1&#8243; Pitch<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/3178\" target=\"_blank\" rel=\"noopener\">Adafruit Feather M0 RFM95 LoRa Radio<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/4712\" target=\"_blank\" rel=\"noopener\">Adafruit LC709203F LiPoly \/ LiIon Fuel Gauge and Battery Monitor<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/372\" target=\"_blank\" rel=\"noopener\">10K Precision Epoxy Thermistor &#8211; 3950 NTC<\/a><\/li>\n<li><a href=\"https:\/\/www.hadex.cz\/m481-rtc-hodiny-realneho-casu-ds3231-at24c32\/\" target=\"_blank\" rel=\"noopener\">RTC Real Time Clock DS3231 AT24C32<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/1661\" target=\"_blank\" rel=\"noopener\">uFL SMT Antenna Connector<\/a><\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/851\" target=\"_blank\" rel=\"noopener\">SMA to uFL\/u.FL\/IPX\/IPEX RF Adapter Cable<\/a><\/li>\n<li><a href=\"https:\/\/www.laskakit.cz\/nicerf-sw868-zd115-antena-2-15dbi-11cm-868mhz\/\" target=\"_blank\" rel=\"noopener\">NiceRF SW868-ZD115 Antenna 2.15dBi 11cm 868MHz<\/a><\/li>\n<li><a href=\"https:\/\/www.laskakit.cz\/baterie-li-po-3-7v-2000mah-lipo\/\" target=\"_blank\" rel=\"noopener\">GeB LiPol Battery 104050 2500mAh 3.7V JST-PH 2.0<\/a><\/li>\n<li>A cable with a Micro-USB B connector that will be cut later<\/li>\n<li><a href=\"https:\/\/www.adafruit.com\/product\/4650\" target=\"_blank\" rel=\"noopener\">Adafruit FeatherWing OLED &#8211; 128&#215;64 OLED<\/a> <span style=\"color: #ff6600;\">(not implemented in the v1.0 code)<\/span><\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>Light intensity sensor<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.laskakit.cz\/snimac-intenzity-osvetleni-bh1750\/\" target=\"_blank\" rel=\"noopener\">Light intensity sensor BH1750<\/a><\/li>\n<li>Glass vial with lid (SPOFA)<\/li>\n<li>26AWG \/ 4PRS UTP Patch Cable EEKSONG<\/li>\n<li><a href=\"https:\/\/www.lidl.cz\/p\/parkside-sortiment-malych-dilu\/p100360675001?mktc=shopping&amp;gclid=Cj0KCQiAjbagBhD3ARIsANRrqEsxuFg3l2LkF38hA_LgLqB9fmR7AWPEtPvPlQxNius4nUqDYHxOEa0aAjjqEALw_wcB\" target=\"_blank\" rel=\"noopener\">Assorted Shrink Tubing<\/a><\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>5V Power source<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.hadex.cz\/m393b-napajeci-zdroj-modul-wx-dc12003-230v5v-700ma\/\" target=\"_blank\" rel=\"noopener\">Power supply module WX-DC12003 230V\/5V 700mA<\/a><\/li>\n<li><a href=\"http:\/\/www.elfax.cz\/5000%7C.d.F70100.czm-52-ark-5002-10x10x75mm-5mm-mala-.html\" target=\"_blank\" rel=\"noopener\">CZM 5\/2 (ARK 500\/2) 10x10x7.5mm 5mm small<\/a><\/li>\n<li><a href=\"https:\/\/www.hadex.cz\/l630-svorkovnice-do-dps-2p-cy350-35-2p-rm35mm-zelena\/\" target=\"_blank\" rel=\"noopener\">PCB terminal block 2P CY350-3.5-2P RM3.5mm, green<\/a><\/li>\n<li>Box (from pins) 5.5&#215;3.5&#215;1.5 cm<\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>Electrical mains part<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.hadex.cz\/m570a-meric-spotreby-pzem-004t-80-260vac-100a-uvolnitelna-merici-civka\/\" target=\"_blank\" rel=\"noopener\">PZEM-004T-100A-V3.0<\/a><\/li>\n<li><a href=\"https:\/\/www.hadex.cz\/l571-stykac-cjx3-25-230v25a-4p-na-din-listu\/\" target=\"_blank\" rel=\"noopener\">Contactor CJX3-25 230V\/25A 4P<\/a><\/li>\n<li><a href=\"https:\/\/www.laskakit.cz\/1-kanal-5v-rele-modul--high-low-250vac-30a\/\" target=\"_blank\" rel=\"noopener\">1-channel 5V relay module, High-Low 250VAC 30A<\/a><\/li>\n<li><a href=\"https:\/\/www.onsemi.com\/download\/data-sheet\/pdf\/bc550c-d.pdf\" target=\"_blank\" rel=\"noopener\">NPN Transistor BC550C<\/a><\/li>\n<li><a href=\"https:\/\/www.laskakit.cz\/50x70mm-pcb-prototypova-deska\/?gclid=Cj0KCQjwn9CgBhDjARIsAD15h0AIrNMZoeXuJKpHjYJnrSeap4bioCeSCb4JMTc-9T3bE2XJohM8I28aAu--EALw_wcB\" target=\"_blank\" rel=\"noopener\">50x70mm PCB prototype board<\/a><\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>Common and o<\/strong><\/span><span style=\"color: #189bd6;\"><strong>ther<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.hadex.cz\/d453-dupont-konektory-1-8pin-s-rozteci-254mm-pro-pcb-sada-310ks\/\" target=\"_blank\" rel=\"noopener\">Dupont connectors 1-8pin with 2.54mm pitch for PCB<\/a><\/li>\n<li>2m DuPont wire<\/li>\n<li><a href=\"https:\/\/www.laskakit.cz\/--sup--stemma-qt--qwiic-jst-sh-4-pin-kabel-20cm\/\" target=\"_blank\" rel=\"noopener\">STEMMA QT &#8211; 20 cm<\/a><\/li>\n<li>15x 100 mm cable ties<\/li>\n<li>4x <a href=\"https:\/\/www.wago.com\/global\/installation-terminal-blocks-and-connectors\/compact-splicing-connector\/p\/221-413\" target=\"_blank\" rel=\"noopener\">COMPACT Splicing Connector Wago 221-413<\/a><\/li>\n<li>5x <a href=\"https:\/\/www.wago.com\/global\/installation-terminal-blocks-and-connectors\/compact-splicing-connector\/p\/221-415\" target=\"_blank\" rel=\"noopener\">COMPACT Splicing Connector Wago 221-415<\/a><\/li>\n<li>Wires with a cross-section of 2.5 mm\u00b2<\/li>\n<\/ul>\n<h5><span style=\"color: #189bd6;\"><strong>Tools<\/strong><\/span><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.centropen.eu\/ohp-permanent-2636-f-pg-1903-c-181\/\" target=\"_blank\" rel=\"noopener\">Centropen OHP Permanent marker 2636 F<\/a><\/li>\n<li><a href=\"https:\/\/www.uhu.cz\/uhu-super-glue-minis-3-x-1-g.html\" target=\"_blank\" rel=\"noopener\">UHU SUPER GLUE MINIS 3 x 1 g<\/a><\/li>\n<li>Soldering iron and solder<\/li>\n<li>Snap-off knife<\/li>\n<li>Drill and drill bits<\/li>\n<li>A set of screwdrivers<\/li>\n<li>Pliers<\/li>\n<li>Hot melt glue gun<\/li>\n<li>PC + micro USB cable<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Assembly<\/span><\/strong><\/h2>\n<p>The following section describes the procedure for connecting and assembling the device according to the electrotechnical diagram of the multifunctional switching device below.<\/p>\n<p><span style=\"color: #ff0000;\">Note:<\/span> When choosing a connection with a measuring coil, the PZEM measuring device is connected according to the diagram. The PZEM input marked N is connected to the phase (Live wire) and the meter input L is connected to the neutral wire. Modules connected to the I\u00b2C bus will use the following addresses: RTC module address 0x57, LC709203F module address 0x0B and BH1750 module address 0x23.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4848 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2.png\" alt=\"\" width=\"801\" height=\"801\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2.png 2048w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2-300x300.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2-1024x1024.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2-150x150.png 150w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2-768x768.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_schema2-1536x1536.png 1536w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">&#8222;Cube&#8220; &#8211; First half<\/span><\/strong><\/h4>\n<h6><span style=\"color: #189bd6;\"><strong>Adafruit Feather M0<\/strong><\/span><\/h6>\n<ol>\n<li>Solder the <strong>uFL SMT antenna connector<\/strong> to the Adafruit Feather M0 board.<\/li>\n<li>Next, solder the <strong>Stacking Headers for Feather (12-pin and 16-pin female headers)<\/strong> to the board (<strong>headers from FeatherWing Doubler<\/strong>).<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4320 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-scaled.jpg\" alt=\"AFM0 - Soldered headers and antenna connector\" width=\"601\" height=\"244\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-300x122.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-1024x415.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-768x311.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-1536x623.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-AFM03-2048x830.jpg 2048w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><span style=\"color: #189bd6;\"><strong>FeatherWing Doubler<\/strong><\/span><\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4328 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1.jpg\" alt=\"FeatherWing Doubler Soldered Headers\" width=\"599\" height=\"253\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1.jpg 2478w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1-300x127.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1-1024x433.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1-768x325.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1-1536x650.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler1-2048x866.jpg 2048w\" sizes=\"auto, (max-width: 599px) 100vw, 599px\" \/><\/p>\n<ol>\n<li>Solder the <strong>Header Kit for Feather (12-pin and 16-pin Female Header Set)<\/strong> to the FeatherWing Doubler (<strong>headers from FeatherWing Doubler<\/strong>) as shown below.<\/li>\n<li>Next, solder the <strong>Terminal Block kit for Feather &#8211; 0.1&#8243; Pitch<\/strong> to the FeatherWing Doubler as shown below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4327 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler3.jpg\" alt=\"FeatherWing Doubler Soldered Headers\" width=\"250\" height=\"232\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler3.jpg 1133w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler3-300x278.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler3-1024x949.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler3-768x712.jpg 768w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4329 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-scaled.jpg\" alt=\"FeatherWing Doubler Soldered Headers\" width=\"500\" height=\"180\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-300x108.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-1024x369.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-768x277.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-1536x553.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler2-2048x738.jpg 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<li>From the <strong>Black Nylon Machine Screw and Stand-off Set<\/strong>, prepare 6 x <strong>12mm long M-F hex standoff<\/strong>, 8 x <strong>12mm long F-F hex standoff<\/strong>,<span style=\"color: #ff0000;\"><del>4 x <strong>M2.5 x 6mm Screw<\/strong><\/del> <\/span>(<span style=\"color: #ff0000;\"><strong>Update note: <\/strong><\/span>Device tests have found that the vibration of the contactor opening and closing will shake the Adafruit Feather M0 board and cause it to reboot! This was solved by replacing the original 4x M2.5 x 6mm Screw in the pictures bellow with these <strong>4 x 12mm long M-F hex standoffs<\/strong>, to which the Adafruit Feather M0 board is finally screwed (in the later steps of assembling the Cube).)<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4336 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4.jpg\" alt=\"Doubler, bolts and nuts\" width=\"501\" height=\"186\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4.jpg 1817w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4-300x111.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4-1024x380.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4-768x285.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler4-1536x571.jpg 1536w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/li>\n<li>Screw everything together as shown below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4337 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-scaled.jpg\" alt=\"Doubler, screwed bolts and nuts\" width=\"250\" height=\"212\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-300x255.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-1024x869.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-768x652.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-1536x1304.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler5-2048x1739.jpg 2048w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/li>\n<li>Screw the <strong>tinned wires<\/strong> to the <strong>Terminal Block kit<\/strong> as follows:\n<ol>\n<li>Connect the <strong>red wire<\/strong>, which has a JST connector on the other end, to the <strong>BAT pin<\/strong>.<\/li>\n<li>Connect <strong>pin RST<\/strong> with a wire to <strong>pin A0<\/strong> (yellow wire).<\/li>\n<li>Connect <strong>pin IO1<\/strong> with a wire to <strong>pin 11<\/strong> (because pin 6 uses the button on the display) (white wire).<\/li>\n<li>Screw a <strong>15cm wire to the GND pin<\/strong> (blue wire).<\/li>\n<li>Screw a <strong>15cm wire to the 3V pin<\/strong> (dark pink wire).<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4335 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-scaled.jpg\" alt=\"Cube - wires\" width=\"497\" height=\"367\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-300x221.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-1024x755.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-768x566.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-1536x1132.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_Doubler6-2048x1509.jpg 2048w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><span style=\"color: #189bd6;\"><strong>RTC and Adafruit LC709203F<\/strong><\/span><\/h6>\n<ol>\n<li>First, solder the <strong>Male Headers<\/strong> to the <strong>RTC<\/strong> and <strong>LC709203F<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4348 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-scaled.jpg\" alt=\"RTC and LC\" width=\"502\" height=\"156\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-300x93.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-1024x318.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-768x238.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-1536x477.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-2048x636.jpg 2048w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/li>\n<li>Then prepare 2 x <strong>M2.5 x 6mm Screw<\/strong>, <strong>12mm long F-F hex standoff<\/strong>, 2 x <strong>4-pin DuPont connector<\/strong>, 4 x <strong>15cm wire<\/strong> (DuPont wire), <strong>STEMMA QT &#8211; 20 cm<\/strong>.<\/li>\n<li>Attach the <strong>DuPont 4-pin connector<\/strong> to the <strong>DuPont cable<\/strong>. (Yellow &#8211; SCL, White &#8211; SDA, Red &#8211; VCC, Blue &#8211; GND)<\/li>\n<li><strong>STEMMA QT<\/strong> &#8211; <strong>divide the 20 cm cable in half<\/strong> and attach a <strong>4-pin DuPont connector<\/strong> to it <strong>according to the connection of the STEMMA QT connector<\/strong> and the <strong>order of the pins on the RTC module<\/strong>. (Yellow &#8211; SCL, Blue &#8211; SDA, Red &#8211; VCC, Black &#8211; GND)<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4353 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-scaled.jpg\" alt=\"Preparation of RTC, LC\" width=\"600\" height=\"209\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-300x104.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-1024x356.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-768x267.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-1536x535.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC2-2048x713.jpg 2048w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li>\n<li>Connect the modules with the created cable and screw them on top of each other using <strong>M2.5 x 6mm screws<\/strong> and <strong>12mm long F-F hex standoff<\/strong> as shown in the picture.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4359 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3.jpg\" alt=\"Connected RTC and LC\" width=\"301\" height=\"198\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3.jpg 2404w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3-300x197.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3-1024x673.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3-768x505.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3-1536x1010.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-RTC-LC3-2048x1347.jpg 2048w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Light intensity sensor<\/span><\/strong><\/h4>\n<ol>\n<li>First, solder the <strong>Male Headers<\/strong> that are bent at right angles to the <strong>BH1750 module<\/strong>.<\/li>\n<li>Prepare the <strong>other half of the split 20cm STEMMA QT cable<\/strong>. Slide the <strong>heat shrink tubes<\/strong> onto the <strong>individual wires of the STEMMA QT cable<\/strong> and thread <strong>one heat shrink tube<\/strong> onto the <strong>UTP cable<\/strong>.<\/li>\n<li>Choose four wires from the UTP cable and <strong>write down their colors and the colors of the STEMMA QT cable wires<\/strong> to which they will be soldered.<\/li>\n<li>Solder the <strong>STEMMA QT cable<\/strong> to the <strong>UTP cable<\/strong> and gradually heat shrink the individual tubes.<\/li>\n<li>Make a small hole in the <strong>lid<\/strong> and thread the <strong>UTP cable<\/strong> through it as you can see in the picture below.<\/li>\n<li>Attach a <strong>4-pin DuPont connector<\/strong> to the UTP cable <strong>according to the connection of the STEMMA QT connector<\/strong> and the <strong>order of the pins on the BH1750 module<\/strong>. (Yellow &#8211; SCL, Blue &#8211; SDA, Red &#8211; VCC, Black &#8211; GND)<\/li>\n<li>Prepare a <strong>glass vial<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4367 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-scaled.jpg\" alt=\"Light Intensity sensor preparation\" width=\"499\" height=\"381\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-300x229.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-1024x783.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-768x587.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-1536x1174.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI1-2048x1565.jpg 2048w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/li>\n<li>Connect the BH1750 module to the DuPont connector, put it in the glass vial, close the lid and <strong>adjust the distance of the UTP cable inside the vial<\/strong>.<\/li>\n<li>Carefully <strong>remove the lid without moving the UTP cable<\/strong> and use a hot glue gun to <strong>glue it to the UTP cable<\/strong>. (remove the BH1750 module before gluing)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4368 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-scaled.jpg\" alt=\"Light Intensity sensor cable preparation\" width=\"500\" height=\"396\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-300x237.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-1024x810.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-768x607.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-1536x1215.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI2-2048x1620.jpg 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<li>Connect the BH1750 module back to the DuPont connector and <strong>close the vial with the lid<\/strong>.<\/li>\n<li>Trim the <strong>Flexible Polymer Cable Gland<\/strong> to fit the <strong>Pg 13.5 cable gland top nut<\/strong>.<\/li>\n<li>Then <strong>cut a small hole<\/strong> in the Flexible Polymer Cable Gland for the UTP cable.<\/li>\n<li>Put the <strong>top nut of the cable gland Pg 13.5<\/strong> on the UTP cable, then the <strong>Flexible Polymer Cable Gland<\/strong> and finally the <strong>rubber seal from the cable gland Pg 13.5<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4366 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-scaled.jpg\" alt=\"Light Intensity sensor final\" width=\"500\" height=\"466\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-300x280.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-1024x955.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-768x716.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-1536x1432.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-LI3-2048x1910.jpg 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Antenna<\/span><\/strong><\/h4>\n<ol>\n<li>Prepare <strong>Flexible Polymer Cable Gland<\/strong>, <strong>cable gland Pg 13.5<\/strong>, <strong>SMA to uFL\/u.FL\/IPX\/IPEX RF Adapter Cable<\/strong> and <strong>NiceRF SW868-ZD115 Antenna 2.15dBi 11cm 868MHz<\/strong>.<\/li>\n<li>Trim the <strong>Flexible Polymer Cable Gland<\/strong> to fit the <strong>Pg 13.5 cable gland top nut<\/strong>.<\/li>\n<li>Then <strong>cut a small hole<\/strong> in the <strong>Flexible Polymer Cable Gland<\/strong> for the <strong>Adapter Cable<\/strong>.<\/li>\n<li>Thread the <strong>Flexible Polymer Cable Gland<\/strong> onto the <strong>SMA<\/strong> and <strong>screw the nut firmly<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4376 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-scaled.jpg\" alt=\"Antenna assembly\" width=\"401\" height=\"368\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-300x275.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-1024x940.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-768x705.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-1536x1410.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna1-2048x1880.jpg 2048w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Then push the <strong>Flexible Polymer Cable Gland<\/strong> all the way inside the\u00a0<strong>Pg 13.5 cable gland top nut<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4377 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2.jpg\" alt=\"Antenna assembly\" width=\"302\" height=\"157\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2.jpg 1599w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2-300x156.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2-1024x533.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2-768x400.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna2-1536x800.jpg 1536w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/li>\n<li>Then put the <strong>rubber seal from the cable gland Pg 13.5<\/strong> on the <strong>cable of the adapter<\/strong> and firmly screw the <strong>Pg 13.5 cable gland top nut<\/strong> to the <strong>rest of the cable gland Pg 13.5<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4375 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3.jpg\" alt=\"Antenna assembly\" width=\"301\" height=\"127\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3.jpg 1572w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3-300x127.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3-1024x433.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3-768x324.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Stwitch-Antenna3-1536x649.jpg 1536w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/li>\n<li>Finally screw the <strong>antenna<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4374 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-scaled.jpg\" alt=\"Antenna assembled\" width=\"500\" height=\"262\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-300x157.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-1024x537.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-768x402.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-1536x805.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Antenna4-2048x1073.jpg 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">5V Power source<\/span><\/strong><\/h4>\n<ol>\n<li>Prepare <strong>Power supply module WX-DC12003<\/strong>, <strong>CZM 5\/2 (ARK 500\/2)<\/strong>, <strong>PCB terminal block 2P CY350-3.5-2P<\/strong>, <strong>Box (from pins)<\/strong> and 2x <strong>COMPACT Splicing Connector Wago 221-415 <\/strong>and <strong>UHU SUPER GLUE MINI<\/strong>.<\/li>\n<li>Solder <strong>CZM 5\/2 (ARK 500\/2)<\/strong> and <strong>PCB terminal block 2P CY350-3.5-2P<\/strong> to the <strong>Power supply module WX-DC12003\u00a0<\/strong>as shown below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4393 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-scaled.jpg\" alt=\"5V Power source preparation\" width=\"602\" height=\"196\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-300x98.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-1024x334.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-768x250.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-1536x500.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power1-2048x667.jpg 2048w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/li>\n<li>In the <strong>upper part of the plastic box<\/strong>, make holes according to the size of the terminal blocks.<\/li>\n<li>Place the <strong>WX-DC12003 power supply module<\/strong> in the box, push the <strong>terminal blocks<\/strong> through the holes and <strong>close the box <\/strong>as shown below.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4394 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2.jpg\" alt=\"5V Power source assembly\" width=\"401\" height=\"279\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2.jpg 1580w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2-300x209.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2-1024x713.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2-768x535.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power2-1536x1069.jpg 1536w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Glue both <strong>COMPACT Splicing Wago 221-415 connectors<\/strong> to the <strong>top of the box<\/strong> using <strong>UHU SUPER GLUE MINI<\/strong> as shown below.<\/li>\n<li>Connect the <strong>glued Wago connectors<\/strong> to the <strong>power supply <\/strong>using <strong>two tinned wires<\/strong> as shown below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4392 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3.jpg\" alt=\"5V Power source assembled\" width=\"201\" height=\"275\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3.jpg 1185w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3-220x300.jpg 220w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3-750x1024.jpg 750w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3-768x1049.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Power3-1125x1536.jpg 1125w\" sizes=\"auto, (max-width: 201px) 100vw, 201px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Electrical mains part<\/span><\/strong><\/h4>\n<h6><span style=\"color: #189bd6;\"><strong>PZEM<\/strong><\/span><\/h6>\n<ol>\n<li>Attach the <strong>4-pin DuPont connector<\/strong> to the <strong>4-wire 30cm DuPont cable<\/strong> as shown below. (On PZEM 5V &#8211; Red, Rx &#8211; Yellow, Tx &#8211; White, GND &#8211; Blue)<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4387 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM.jpg\" alt=\"PZEM - DuPont 4-pin connector\" width=\"400\" height=\"412\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM.jpg 2378w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM-292x300.jpg 292w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM-996x1024.jpg 996w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM-768x790.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM-1494x1536.jpg 1494w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-PZEM-1992x2048.jpg 1992w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><span style=\"color: #189bd6;\"><strong>Contactor and relay<\/strong><\/span><\/h6>\n<ol>\n<li>Prepare the <strong>NPN Transistor BC550C<\/strong>, <strong>50x70mm PCB prototype board<\/strong> and <strong>3-pin Male Headers<\/strong>.<\/li>\n<li>From the <strong>50x70mm PCB prototype board<\/strong>, cut a piece of board as you can see in the image below. (<strong>3&#215;3 holes<\/strong>)<\/li>\n<li>Drill a mounting hole into the <strong>cut piece of board<\/strong> as shown below.<\/li>\n<li>Then solder the <strong>NPN Transistor BC550C<\/strong> and <strong>3-pin Male Headers<\/strong> to this <strong>cut piece of board<\/strong> so that one pin of the transistor is connected to one pin of the Male Headers. Do this for all transistor pins.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4404 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1.jpg\" alt=\"Transistor on PCB\" width=\"301\" height=\"175\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1.jpg 2016w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1-300x174.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1-1024x595.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1-768x446.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains1-1536x893.jpg 1536w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/li>\n<li>Thread the <strong>M2.5 x 10mm screw<\/strong> through the board and screw it in tightly with the <strong>M2.5 hex nut<\/strong>.<\/li>\n<li>Next, thread the screw through the mounting hole on the <strong>1-channel 5V relay module, High-Low 250VAC 30A<\/strong> and tighten firmly with the <strong>M2.5 hex nut<\/strong>.<\/li>\n<li>Remove the protruding part of the screw with combination pliers.<\/li>\n<li>Check that the <strong>jumper on the Relay module<\/strong> is in the <strong>Com-Low position<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4405 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains2.jpg\" alt=\"Transistor on relay\" width=\"400\" height=\"368\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains2.jpg 1524w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains2-300x276.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains2-1024x941.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains2-768x706.jpg 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Attach the center pin of the <strong>3-pin DuPont connector<\/strong> (<strong>transistors Base<\/strong>) to the <strong>center (yellow) wire<\/strong> of the <strong>3-wire 30cm DuPont cable<\/strong> as shown below.<\/li>\n<li>Then attach the pin of the <strong>3-pin DuPont connector<\/strong> to a <strong>separate short (blue) wire<\/strong> on the side where the <strong>Emitter of the transistor<\/strong> will be connected (to GND).<\/li>\n<li>Then attach the last pin of the 3<strong>-pin DuPont connector<\/strong> to a <strong>separate short (white) wire<\/strong> on the side where the <strong>Collector of the transistor<\/strong> will be connected (to CH1 of the relay module).<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4406 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-scaled.jpg\" alt=\"Wires to relay and transistor\" width=\"301\" height=\"335\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-scaled.jpg 2306w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-270x300.jpg 270w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-922x1024.jpg 922w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-768x853.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-1383x1536.jpg 1383w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains3-1844x2048.jpg 1844w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/li>\n<li>Connect the <strong>DuPont connector<\/strong> to the <strong>3-pin Male Headers<\/strong> of the transistor module. (blue &#8211; emitter, yellow &#8211; base, white &#8211; collector).<\/li>\n<li>Connect the <strong>two blue wires<\/strong> to the <strong>DC- terminal<\/strong> of the relay module, the<strong> red wire<\/strong> to the <strong>DC+ terminal<\/strong>, the <strong>white wire<\/strong> to the <strong>CH1 terminal<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4407 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900.jpg\" alt=\"Connected wires to relay and transistor\" width=\"303\" height=\"348\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900.jpg 2201w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900-261x300.jpg 261w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900-892x1024.jpg 892w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900-768x882.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900-1337x1536.jpg 1337w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains4-scaled-e1679055629900-1783x2048.jpg 1783w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/li>\n<li>Thread two <strong>M2.5 x 10mm screws<\/strong> through the holes in the bottom of the <strong>Contactor CJX3-25 230V\/25A 4P<\/strong> and screw them tightly with <strong>M2.5 Hex nuts<\/strong> as you can see in the picture below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4408 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5.jpg\" alt=\"Contactor\" width=\"200\" height=\"305\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5.jpg 1244w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5-197x300.jpg 197w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5-673x1024.jpg 673w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5-768x1169.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains5-1009x1536.jpg 1009w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/li>\n<li>Place the <strong>relay module<\/strong> on the screws on the contactor and screw it with two <strong>M2.5 hex nuts<\/strong> as shown in the picture below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4409 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-scaled.jpg\" alt=\"Relay on contactor\" width=\"400\" height=\"355\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-300x266.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-1024x909.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-768x682.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-1536x1363.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains6-2048x1818.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Use a <strong>brown wire with a cross-section of 2.5 mm\u00b2<\/strong> to connect the <strong>terminal of the relay module NO1<\/strong> with the <strong>terminal of the contactor A2<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4410 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-scaled.jpg\" alt=\"Contator and relay connected\" width=\"300\" height=\"348\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-scaled.jpg 2209w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-259x300.jpg 259w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-884x1024.jpg 884w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-768x890.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-1326x1536.jpg 1326w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains7-1768x2048.jpg 1768w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>Next, connect the <strong>terminal of the relay module COM1<\/strong> with the <strong>terminal of the COMPACT Splicing Wago 221-415 connector<\/strong> with a <strong>brown wire with a cross-section of 2.5 mm\u00b2<\/strong>.<\/li>\n<li>Finally, connect the <strong>COMPACT Splicing Wago 221-415 connector<\/strong> to <strong>terminal 4 on the contactor<\/strong> with a <strong>brown wire with a cross-section of 2.5 mm\u00b2<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4411 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8.jpg\" alt=\"Contator, relay and Wago connected\" width=\"300\" height=\"320\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8.jpg 1858w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8-282x300.jpg 282w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8-961x1024.jpg 961w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8-768x818.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Mains8-1441x1536.jpg 1441w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Box<\/span><\/strong><\/h4>\n<h6><span style=\"color: #189bd6;\"><strong>Chassis<\/strong><\/span><\/h6>\n<ol>\n<li>Prepare the <strong>box Gewiss GW44208 &#8211; IP56 &#8211; 240x190x90<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4431 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1.jpg\" alt=\"Box\" width=\"300\" height=\"376\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1.jpg 1243w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1-239x300.jpg 239w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1-816x1024.jpg 816w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1-768x964.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis1-1224x1536.jpg 1224w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>Cut the <strong>plastic flat sheet plate 3 mm thick<\/strong> to cover all the mounting holes in the box as shown in the picture below.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4432 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2.jpg\" alt=\"Plastic flat sheet plate 3 mm thick\" width=\"400\" height=\"314\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2.jpg 2079w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2-300x235.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2-1024x803.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2-768x603.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2-1536x1205.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis2-2048x1607.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Cut out the exact shape of the inside of the box from <strong>Modeling pad A3<\/strong> and cut the holes according to the mounting holes in the box as shown in the picture below. Also drill mounting holes in the <strong>plastic flat sheet plate 3 mm thick<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4433 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3.jpg\" alt=\"Modelling pad inside box\" width=\"400\" height=\"316\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3.jpg 2248w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3-300x237.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3-1024x809.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3-768x607.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3-1536x1214.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis3-2048x1619.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Refer to the component layout in the following two images and create component mounting holes and cable holes in <strong>Modeling Pad A3<\/strong> as shown in the <strong>third image<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4440 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-scaled.jpg\" alt=\"Final placement of components and DIN\" width=\"800\" height=\"307\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-300x115.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-1024x394.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-768x295.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-1536x591.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis9-2048x787.jpg 2048w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4436 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6.jpg\" alt=\"Mounting holes in the modeling pad\" width=\"401\" height=\"307\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6.jpg 1559w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6-300x230.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6-1024x786.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6-768x589.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis6-1536x1178.jpg 1536w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Lightly screw <strong>plastic flat sheet plate 3 mm thick<\/strong> and <strong>Modeling Pad A3<\/strong> into the box using <strong>twelve screws 2.5 mm, length 10 mm<\/strong>.<\/li>\n<li><strong>Draw the holes<\/strong> created in the <strong>Modeling Pad A3<\/strong> using the <strong>Centropen OHP Permanent marker 2636 F<\/strong> on a <strong>plastic flat sheet plate 3 mm thick<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4437 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7.jpg\" alt=\"Screw-on 3mm thick plastic flat plate and modeling pad inside the box\" width=\"400\" height=\"314\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7.jpg 2334w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7-300x235.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7-1024x804.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7-768x603.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7-1536x1206.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis7-2048x1608.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Unscrew and take out the <strong>plastic flat sheet plate 3 mm thick<\/strong> and <strong>Modeling Pad A3<\/strong> from the box.<\/li>\n<li><strong>Drill the holes you sketched<\/strong> into the <strong>3mm thick plastic flat plate<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4438 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-scaled.jpg\" alt=\"Mounting holes in the modeling pad and plastic flat sheet plate 3 mm thick\" width=\"300\" height=\"451\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-scaled.jpg 1703w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-200x300.jpg 200w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-681x1024.jpg 681w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-768x1154.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-1022x1536.jpg 1022w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Chassis8-1363x2048.jpg 1363w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>Place the <strong>Modeling Pad A3<\/strong> on top of a <strong>plastic flat sheet plate 3 mm thick<\/strong> and the <strong>chassis<\/strong> is ready.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><span style=\"color: #189bd6;\"><strong>Assembly of prepared parts<\/strong><\/span><\/h6>\n<ol>\n<li>Prepare the <strong>DIN rail 3.5 cm<\/strong>, 2x <strong>Bolt (short) and nut to the DIN rail<\/strong>, <strong>assembled FeatherWing Doubler<\/strong> (from the section &#8222;Cube&#8220; &#8211; First half) and 4x <strong>M2.5 x 10mm screw<\/strong>.<\/li>\n<li>Screw the <strong>DIN rail 3.5 cm<\/strong> using <strong>two bolts and nuts<\/strong> to the chassis on the right side as shown in the picture below.<\/li>\n<li>Screw the <strong>assembled FeatherWing Doubler<\/strong> (from the section &#8222;Cube&#8220; &#8211; First half) to the chassis using 4x <strong>M2.5 x 10mm<\/strong> screws as shown in the picture below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4446 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-scaled.jpg\" alt=\"Assembly of prepared parts on the chassis - Cube and DIN\" width=\"400\" height=\"309\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-300x232.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-1024x791.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-768x593.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-1536x1186.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch-Box1-2048x1582.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Thread the wires of the <strong>measuring coil<\/strong> through the holes in the chassis and then fasten the <strong>measuring coil<\/strong> with the help of two <strong>cable ties<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4511 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-scaled.jpg\" alt=\"\" width=\"801\" height=\"301\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-300x113.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-1024x384.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-768x288.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-1536x577.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly-2048x769.jpg 2048w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/li>\n<li>Attach the <strong>PZEM-004T-100A-V3.0<\/strong> measuring device to the chassis using six <strong>cable ties<\/strong>.<\/li>\n<li>Thread the <strong>wires of the measuring coil<\/strong> through the holes in the chassis and connect them to the <strong>PZEM<\/strong> as shown in the picture below.<\/li>\n<li>Connect the <strong>DuPont cable made in the &#8222;Electrical mains part &#8211; PZEM&#8220; section<\/strong> to the <strong>PZEM<\/strong> measuring device, thread it through the chassis and lead it out through the hole next to the <strong>&#8222;Cube&#8220;<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4512 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-scaled.jpg\" alt=\"\" width=\"400\" height=\"309\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-300x232.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-1024x792.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-768x594.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-1536x1188.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly2-2048x1584.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Place the <strong>Contactor and relay<\/strong> block (created in the <strong>&#8222;Electrical mains part &#8211; Contactor and relay&#8220;<\/strong> section) on the <strong>3.5 cm DIN rail<\/strong>.<\/li>\n<li>Thread the <strong>DuPont cable of this block<\/strong> through the chassis and <strong>divide it into individual wires under the chassis<\/strong>.<\/li>\n<li>Thread the <strong>yellow wire<\/strong> through the hole next to the <strong>&#8222;Cube&#8220;<\/strong> (where the cable from PZEM is threaded through).<\/li>\n<li>Thread the <strong>red wire<\/strong> under the <strong>&#8222;Cube&#8220;<\/strong> on the <strong>left side<\/strong>.<\/li>\n<li>Thread the<strong> blue wire<\/strong> under the <strong>&#8222;Cube&#8220;<\/strong> on the <strong>right side<\/strong> as shown in the picture.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4513 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3.jpg\" alt=\"\" width=\"401\" height=\"308\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3.jpg 2017w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3-300x231.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3-1024x787.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3-768x591.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly3-1536x1181.jpg 1536w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Attach the <strong>5V Power source<\/strong> (created in the <strong>&#8222;5V Power source&#8220;<\/strong> section) using three <strong>cable ties<\/strong> to the chassis as shown in the picture below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4514 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4.jpg\" alt=\"\" width=\"400\" height=\"302\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4.jpg 2156w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4-300x227.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4-1024x774.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4-768x581.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4-1536x1161.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly4-2048x1548.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Next to the <strong>&#8222;Cube&#8220;<\/strong> on the right side, glue the <strong>COMPACT Splicing Wago 221-415 connector<\/strong> as shown in the picture below.<\/li>\n<li>Connect the <strong>red wire<\/strong> of the <strong>DuPont cable from PZEM<\/strong> to the <strong>glued connector<\/strong>.<\/li>\n<li>Connect the <strong>white wire of the DuPont cable from PZEM<\/strong> to the <strong>pin RX0<\/strong> on the <strong>FeatherWing Doubler<\/strong>.<\/li>\n<li>Connect the <strong>yellow wire of the DuPont cable from PZEM<\/strong> to the <strong>pin TX1<\/strong> on the <strong>FeatherWing Doubler<\/strong>.<\/li>\n<li>Connect the <strong>yellow wire from the Contactor and relay block<\/strong> to the <strong>pin 12<\/strong> on the <strong>FeatherWing Doubler<\/strong>.<\/li>\n<li>Connect the <strong>wire connected to the 3V pin on the FeatherWing Doubler<\/strong> (dark pink wire) to the <strong>glued connector<\/strong>.<\/li>\n<li>Connect the <strong>red\u00a0wire from the Contactor and relay block<\/strong> to the left <strong>connector of the 5V Power source with 5 V<\/strong>.<\/li>\n<li>Connect a <strong>black wire<\/strong>, which has a JST connector on the other end, to the right <strong>connector of the 5V Power source with GND<\/strong>.<\/li>\n<li>Connect the <strong>blue wire from the Contactor and relay block<\/strong> to the right <strong>connector of the 5V Power source with GND<\/strong>.<\/li>\n<li>Connect the <strong>blue wire of the cable from PZEM<\/strong> to the right <strong>connector of the 5V Power source with GND<\/strong>.<\/li>\n<li>To the right <strong>connector of the 5V Power source with GND<\/strong>, connect the <strong>blue wire<\/strong> connected to the<strong> GND pin on the FeatherWing Doubler<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4515 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5.jpg\" alt=\"\" width=\"401\" height=\"420\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5.jpg 2265w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5-286x300.jpg 286w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5-977x1024.jpg 977w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5-768x805.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5-1465x1536.jpg 1465w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly5-1953x2048.jpg 1953w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Prepare the <strong>RTC and Adafruit LC709203F module<\/strong> and the <strong>DuPont cable<\/strong> (created in the <strong>\u201cCube\u201d section \u2013 First half &#8211; RTC and Adafruit LC709203F<\/strong>).<\/li>\n<li>Use the <strong>yellow wire<\/strong> of the DuPont cable to connect the <strong>SCL pin on the RTC module<\/strong> to the <strong>SCL pin on the FeatherWing Doubler<\/strong>.<\/li>\n<li>Use the <strong>white wire<\/strong> of the DuPont cable to connect the <strong>SDA pin on the RTC module<\/strong> to the <strong>SDA pin on the FeatherWing Doubler<\/strong>.<\/li>\n<li>Connect the <strong>red wire<\/strong> of the DuPont cable to the <strong>VCC pin on the RTC module<\/strong> with the <strong>COMPACT Splicing Wago 221-415 connector next to the &#8222;Cube&#8220; on the right side<\/strong> as shown in the image below.<\/li>\n<li>Use the<strong> blue wire<\/strong> of the DuPont cable to connect the <strong>GND pin on the RTC module<\/strong> with the <strong>right connector of the 5V Power source with GND<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4516 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6.jpg\" alt=\"\" width=\"400\" height=\"286\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6.jpg 2273w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6-300x214.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6-1024x732.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6-768x549.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6-1536x1097.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly6-2048x1463.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Flip the connected <strong>RTC and Adafruit LC709203F block<\/strong> over and screw it to the <strong>FeatherWing Doubler<\/strong> using three <strong>M2.5 x 4mm Screws<\/strong>.<\/li>\n<li>Connect the <strong>JST connector<\/strong> to the JST socket on the <strong>Adafruit<\/strong> <strong>LC709203F<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4517 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7.jpg\" alt=\"\" width=\"400\" height=\"437\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7.jpg 1474w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7-274x300.jpg 274w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7-937x1024.jpg 937w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7-768x839.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly7-1405x1536.jpg 1405w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Attach the <strong>battery<\/strong> to the chassis using two <strong>cable ties<\/strong>.<\/li>\n<li>To the <strong>LC709203F<\/strong> module, connect the <strong>thermistor<\/strong> between the <strong>GND<\/strong> and <strong>Therm<\/strong> pins using a <strong>DuPont connector<\/strong>.<\/li>\n<li>Bring the <strong>thermistor<\/strong> to the <strong>battery<\/strong>.<\/li>\n<li><strong>Glue<\/strong> the <strong>M2.5 hex nut<\/strong> from the bottom side of the chassis and screw the <strong>12mm long M-F hex standoff<\/strong> into it from the top side of the chassis (on the right side of the battery).<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4518 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-scaled.jpg\" alt=\"\" width=\"400\" height=\"299\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-300x224.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-1024x766.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-768x574.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-1536x1149.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly8-2048x1532.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Glue 4x <strong>COMPACT Splicing Connector Wago 221-413<\/strong> and 1x <strong>COMPACT Splicing Connector Wago 221-415<\/strong> to the chassis as shown in the picture below.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4520 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11.jpg\" alt=\"\" width=\"400\" height=\"311\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11.jpg 2171w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11-300x233.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11-1024x796.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11-768x597.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11-1536x1194.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly11-2048x1592.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Connect the <strong>live<\/strong>, <strong>neutral<\/strong> and <strong>ground<\/strong> <strong>wires<\/strong> to the individual components according to the <strong>picture below<\/strong> and the <strong>diagram at the top of the &#8222;Assembly&#8220; section<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4521 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12.jpg\" alt=\"\" width=\"398\" height=\"306\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12.jpg 2393w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12-300x231.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12-1024x787.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12-768x590.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12-1536x1180.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly12-2048x1574.jpg 2048w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/li>\n<li><strong>Drill holes<\/strong> for 2x <strong>cable gland Pg 13.5<\/strong> and 2x <strong>cable gland M25x1.5<\/strong> in the <strong>Gewiss GW44208 box<\/strong>.<\/li>\n<li>Insert the <strong>chassis<\/strong> into the <strong>box<\/strong> and <strong>screw it to the mounting holes of the box<\/strong> using 12x <strong>Screw 2.5 mm, length 10 mm<\/strong>.<\/li>\n<li>Screw <strong>cable gland Pg 13.5 with antenna<\/strong>, <strong>cable gland Pg 13.5 for light intensity sensor BH1750<\/strong> and 2x <strong>cable gland M25x1.5<\/strong> for input wires and output wires for switched equipment into the drilled holes in the box.<\/li>\n<li>Thread the <strong>antenna cable<\/strong> through the &#8222;Cube&#8220;.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4522 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-scaled.jpg\" alt=\"\" width=\"401\" height=\"343\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-300x257.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-1024x876.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-768x657.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-1536x1315.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly13-2048x1753.jpg 2048w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Pass the <strong>light intensity sensor cable<\/strong> through the <strong>cable gland Pg 13.5<\/strong> into the box, secure it with a <strong>cable tie<\/strong> and connect the <strong>STEMMA QT connector<\/strong> to the <strong>STEMMA QT input on the LC709203F module<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4523 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-scaled.jpg\" alt=\"\" width=\"400\" height=\"283\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-300x212.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-1024x725.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-768x544.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-1536x1088.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/03\/Switch_assembly14-2048x1450.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Connect the <strong>antenna cable<\/strong> to the <strong>Adafruit Feather M0<\/strong> board.<\/li>\n<li>Plug the <strong>Adafruit Feather M0<\/strong> board into the<strong> FeatherWing Doubler<\/strong>.<\/li>\n<li>Screw the <strong>Adafruit Feather M0<\/strong> board using 4x <strong>M2.5 x 4mm Screws<\/strong>.<\/li>\n<li>Connect the <strong>cable with the Micro-USB B connector<\/strong> to the <strong>5V Power source<\/strong> with the correct polarity.<\/li>\n<li>Connect the <strong>Micro-USB B connector<\/strong> to the <strong>Adafruit Feather M0<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4896 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-scaled.jpg\" alt=\"\" width=\"400\" height=\"299\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-300x224.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-1024x765.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-768x574.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-1536x1147.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final1-2048x1530.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Connect the <strong>battery<\/strong> to the <strong>LC709203F module<\/strong> using the JST connector.<\/li>\n<li>Finally, connect the assembled multifunctional switching device to the <strong>mains<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4897 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-scaled.jpg\" alt=\"\" width=\"400\" height=\"330\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-scaled.jpg 2560w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-300x248.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-1024x847.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-768x635.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-1536x1270.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_final2-2048x1694.jpg 2048w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Arduino IDE setup<\/span><\/strong><\/h2>\n<h4><strong><span style=\"color: #800000;\">Arduino IDE and board setup<\/span><\/strong><\/h4>\n<ol>\n<li>Download <a href=\"https:\/\/www.arduino.cc\/en\/software\" target=\"_blank\" rel=\"noopener\"><strong>Arduino IDE<\/strong><\/a>.<\/li>\n<li>Run Arduino IDE.<\/li>\n<li style=\"text-align: left;\">In the Arduino IDE <strong>File -&gt; Preferences <\/strong>copy and paste the link below into the <strong>Additional Boards Manager URLs<\/strong>.<br \/>\n<code>https:\/\/adafruit.github.io\/arduino-board-index\/package_adafruit_index.json<\/code><\/li>\n<li>Click OK.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2905 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"518\" height=\"347\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2.png 805w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-300x201.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-768x515.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup2-272x182.png 272w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/li>\n<li>Install the Adafruit boards via <strong>Boards Manager -&gt; <\/strong>search <strong>Arduino SAMD Boards<\/strong><strong>\u00a0-&gt; Install<\/strong>.<\/li>\n<li>Install the Adafruit boards via <strong>Boards Manager -&gt; <\/strong>search <strong>Adafruit SAMD<\/strong><strong> Boards -&gt; Install<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3649 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup1.png\" alt=\"M0 Setup Arduino IDE\" width=\"303\" height=\"500\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup1.png 492w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup1-182x300.png 182w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/li>\n<li>You should see in <strong>Tools -&gt; Board -&gt; Adafruit SAMD<\/strong> the Adafruit Feather M0.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3650\" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup2.png\" alt=\"M0 Setup Arduino IDE\" width=\"702\" height=\"262\" \/><\/li>\n<li>Connect the Adafruit Feather M0 using micro USB cable to your computer.<\/li>\n<li>Choose the appropriate COM port which is used for communication with Adafruit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3653 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32.png\" alt=\"M0 Setup Arduino IDE\" width=\"291\" height=\"169\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32.png 452w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32-300x174.png 300w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/li>\n<\/ol>\n<h4><strong><span style=\"color: #800000;\">Arduino IDE &#8211; Included Libraries<\/span><\/strong><\/h4>\n<ol>\n<li>In the Arduino IDE\u00a0<strong>Library Manager<\/strong> search\u00a0and\u00a0<strong>install it with all dependencies<\/strong>:\n<ol>\n<li><strong>Adafruit LC709203F<\/strong> by Adafruit<\/li>\n<li><strong>hp_BH1750<\/strong> by Stefan Armborst<\/li>\n<li><strong>RTClib<\/strong> by Adafruit<\/li>\n<li><strong>Timezone<\/strong> by Jack Christensen<\/li>\n<li><strong>ArduinoJson<\/strong> by Benoit Blanchon<\/li>\n<li><strong>Adafruit Fram I2C<\/strong> by Adafruit<\/li>\n<\/ol>\n<\/li>\n<li>Download as ZIP this libraries:\n<ol>\n<li><a href=\"https:\/\/github.com\/zygisjas\/PZEM-004T-V30-SAMD21\" target=\"_blank\" rel=\"noopener\"><strong>PZEM-004T-V30-SAMD21<\/strong><\/a> by zygisjas.<\/li>\n<li><a href=\"https:\/\/github.com\/OndrejKnebl\/CayenneLPP_Arduino\" target=\"_blank\" rel=\"noopener\"><strong>CayenneLPP_Arduino<\/strong><\/a> by OndrejKnebl &#8211; added the datatype to original code from Electronic Cats<\/li>\n<li><a href=\"https:\/\/github.com\/OndrejKnebl\/EEPROM_additional_functions\" target=\"_blank\" rel=\"noopener\"><strong>EEPROM_additional_functions<\/strong><\/a> by OndrejKnebl<\/li>\n<li><a href=\"https:\/\/github.com\/OndrejKnebl\/SunriseSunset\" target=\"_blank\" rel=\"noopener\"><strong>SunriseSunset<\/strong><\/a> by OndrejKnebl<\/li>\n<\/ol>\n<\/li>\n<li>In the Arduino IDE\u00a0<strong>Sketch -&gt; Include Library -&gt; Add .ZIP Library\u2026\u00a0<\/strong>choose downloaded ZIP.<\/li>\n<li>Add all downloaded ZIP libraries.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><span style=\"color: #800000;\"><strong>MCCI LoRaWAN LMIC library setup &#8211; Over The Air Activation (OTAA), Device class A<\/strong><\/span><\/h4>\n<ol>\n<li>In the Arduino IDE <strong>Library Manager<\/strong> search <strong>MCCI LoRaWAN LMIC library<\/strong> by Terry Moore and install it.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2909 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/09\/AF32u4_A2_Setup6.png\" alt=\"Adafruit 32u4 Arduino2 Setup\" width=\"250\" height=\"403\" \/><\/li>\n<li>On Windows open <strong>lmic_project_config.h<\/strong> located in <strong>\\Documents\\Arduino\\libraries\\MCCI_LoRaWAN_LMIC_library\\project_config\\<\/strong><\/li>\n<li>Change project definitions to definitions listed bellow and save it.<\/li>\n<\/ol>\n<pre style=\"padding-left: 40px;\">\/\/ project-specific definitions\r\n#define CFG_eu868 1\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ for Europe (change it based on your location)\r\n#define CFG_sx1276_radio 1\r\n#define DISABLE_PING 1               \/\/ Device Class B disabled\r\n#define DISABLE_BEACONS 1            \/\/ Device Class B disabled\r\n#define LMIC_ENABLE_DeviceTimeReq 1  \/\/ TTS Network Time<\/pre>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">The Things Stack setup<\/span><\/strong><\/h2>\n<h4><span style=\"color: #800000;\"><strong>Add Feather M0 into The Things Stack<\/strong><\/span><\/h4>\n<ol>\n<li><a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\"><strong>Create an account<\/strong><\/a> on The Things Network if you don&#8217;t have one.<\/li>\n<li><strong>Login<\/strong> on <strong><a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\">The Things Network<\/a><\/strong>.<\/li>\n<li>Click on your username and choose <strong>Console<\/strong>.<\/li>\n<li>Select a network cluster.<\/li>\n<\/ol>\n<h6><strong>Add application<\/strong><\/h6>\n<ol>\n<li><strong>Go to applications<\/strong>.<\/li>\n<li>Click on button <strong>+ Create application<\/strong>.<\/li>\n<li>Write something into <strong>Application ID<\/strong>.<\/li>\n<li>Click on button <strong>Create application<\/strong>.<\/li>\n<\/ol>\n<h6><strong>Add end device<\/strong><\/h6>\n<ol>\n<li>In your application click on button <strong>+ Register end device<\/strong>.<\/li>\n<li>Input Method \u2013 Choose <strong>Enter end device specifics manually<\/strong>.<\/li>\n<li>Frequency plan &#8211; <span style=\"color: #000000;\"><strong>Europe 863-870 MHz (SF9 for RX2 &#8211; recommended)<\/strong><\/span><\/li>\n<li>LoRaWAN version &#8211; <strong>LoRaWAN Specification 1.0.3<\/strong><\/li>\n<li>Click on <strong>Show advanced activation, LoRaWAN class and cluster settings<\/strong><\/li>\n<li>Activation mode &#8211; <strong>Over the air activation (OTAA)<\/strong><\/li>\n<li>Additional LoRaWAN class capabilities &#8211; <strong>None (class A only)<\/strong><\/li>\n<li><strong>Deselect<\/strong> &#8211; Use network&#8217;s default MAC settings<\/li>\n<li>Rx2 data rate = <strong>3<\/strong><\/li>\n<li>Rx2 frequency = <strong>869,525 MHz<\/strong><\/li>\n<li>JoinEUI &#8211; <strong>0000000000000000<\/strong><\/li>\n<li>Click on <strong>Confirm<\/strong>.<\/li>\n<li>DevEUI &#8211; <strong>Generate<\/strong><\/li>\n<li>AppKey &#8211; <strong>Generate<\/strong><\/li>\n<li>End device ID &#8211; here you can name your device<\/li>\n<li>After registration &#8211; <strong>View registered end device<\/strong><\/li>\n<li>Click on button <strong>Register end device<\/strong><\/li>\n<li>Click on <strong>General settings<\/strong><\/li>\n<li>Network layer &#8211; <strong>Expand<\/strong><\/li>\n<li>Click on <strong>Advanced MAC settings<\/strong><\/li>\n<li>Desired Rx1 delay = <strong>1<\/strong><\/li>\n<li>Rx1 data rate offset = <strong>0<\/strong><\/li>\n<li>Add Frequency = <strong>868100000<\/strong><\/li>\n<li>Add Frequency = <strong>868300000<\/strong><\/li>\n<li>Add Frequency = <strong>868500000<\/strong><\/li>\n<li>Add Frequency = <strong>867100000<\/strong><\/li>\n<li>Add Frequency = <strong>867300000<\/strong><\/li>\n<li>Add Frequency = <strong>867500000<\/strong><\/li>\n<li>Add Frequency = <strong>867700000<\/strong><\/li>\n<li>Add Frequency = <strong>867900000<\/strong><\/li>\n<li>Adaptive data rate (ADR) &#8211; <strong>Disabled<\/strong><\/li>\n<li>Click on button <strong>Save changes<\/strong><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><span style=\"color: #800000;\"><strong>CayenneLPP formatter &#8211; Additional data types and <\/strong><\/span><span style=\"color: #800000;\"><strong>Original LPPv1 data types<\/strong><\/span><\/h4>\n<ol>\n<li>In\u00a0<strong>TTS -&gt; Applications -&gt; YourAppName -&gt; Payload formatters -&gt; Uplink<\/strong>\u00a0change\u00a0<strong>Formatter type<\/strong> to <strong>Custom Javascript formatter<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2494 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_1.png\" alt=\"Cayenne_TTS_Advanced_1\" width=\"502\" height=\"422\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_1.png 982w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_1-300x252.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_1-768x646.png 768w\" sizes=\"auto, (max-width: 502px) 100vw, 502px\" \/><\/li>\n<li>To the <strong>Formatter code<\/strong> field copy and paste <strong><a href=\"https:\/\/github.com\/OndrejKnebl\/CayenneLPP_Arduino\/blob\/main\/decoders\/decoder.js\" target=\"_blank\" rel=\"noopener\">Cayenne LPP Decoder<\/a><\/strong>.<\/li>\n<li><strong>Save changes<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2496 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_3.png\" alt=\"Cayenne_TTS_Advanced_3\" width=\"604\" height=\"396\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_3.png 1268w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_3-300x197.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_3-1024x672.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/07\/Cayenne_TTS_Advanced_3-768x504.png 768w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Program<\/span><\/strong><\/h2>\n<ol>\n<li>To your Arduino IDE copy and paste <a href=\"https:\/\/github.com\/OndrejKnebl\/Multifunctional_switching_device\/blob\/main\/MultifunctionalSwitchingDevice\/MultifunctionalSwitchingDevice.ino\" target=\"_blank\" rel=\"noopener\"><strong>program for Multifunctional Switching Device<\/strong><\/a>.<\/li>\n<li>In program replace <strong>APPEUI<\/strong>, <strong>DEVEUI<\/strong> and <strong>APPKEY<\/strong> with keys in TTS. Keys are in <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Overview -&gt; Activation information<\/strong>.<\/li>\n<li>Furthermore, the selected <strong>password<\/strong> must be entered in the <strong>myPassword<\/strong> variable<strong> in the program<\/strong>.<\/li>\n<li><strong>In the program<\/strong>, in the section marked <strong>&#8222;Here change your default settings&#8220;<\/strong>, it is possible to define the <strong>time correction<\/strong>, <strong>how often the time should be requested from the TTS network<\/strong>, the <strong>SF<\/strong> value and other settings, which are commented in detail in the program.<\/li>\n<li>Connect Adafruit Feather M0 using micro USB cable to your computer.<\/li>\n<li>Choose the appropriate COM port which is used for communication with Adafruit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3653 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32.png\" alt=\"M0 Setup Arduino IDE\" width=\"300\" height=\"174\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32.png 452w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/01\/M0-Setup32-300x174.png 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>In Arduino IDE click on <strong>Upload<\/strong> button to upload program to your Adafruit Feather M0.<\/li>\n<li>In <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Live data<\/strong> you should every 1 minute (Default value) see <strong>decoded uplink data from Multifunctional Switching Device<\/strong>.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Program description<\/span><\/strong><\/h4>\n<p>Based on the implemented working modes, the MSD can switch the connected device according to the light intensity or the set switching times. Furthermore, according to the light intensity at the selected times or according to the sunrise and sunset in the place defined by the coordinates. The MSD can also be always on or off.<\/p>\n<p>The program sends measured data from the PZEM measuring device and the BH1750, LC709203F and RTC modules to the LoRaWAN network. Furthermore, information about contactor states, the currently set MSD configuration, errors and sunrise and sunset times are sent to the network. All data listed is encoded and sent in CayenneLPP format with added data types. Additionally, a custom data type for time was added to the CayenneLPP library, as the type defined in the original unix time library was unnecessarily large at 4 bytes compared to the newly defined 3 byte type. This new type is large enough to send time to and from the MSD.<\/p>\n<p>The program further implements data processing from received downlinks. The used MCCI LoRaWAN LMIC library has implemented in its examples of use only the statement of the information that the downlink was received and the statement of how many bytes of the payload were received. The code for listing and decoding received data has been implemented. The CayenneLPP format was also chosen for the payload received in downlinks, which is decoded on the device using the aforementioned CayenneLPP library.<\/p>\n<p>Device communication was divided using FPort numbers so that 1 is used for sending measured data in uplinks and 2 for both uplinks and downlinks with configuration data.<\/p>\n<p>In the case of receiving a downlink with an FPort number other than 2, the received payload is not processed. The decoded payload must also contain the correct numeric password, otherwise the received MSD settings will not be applied. If valid settings are sent in the appropriate channels and data types according to the CayenneLPP that the code implements, the ranges of received setting values are checked. When the data with the settings are within the implemented ranges, these settings are applied, stored in the EEPROM memory, and an uplink is sent from the MSD with information about the new configuration. If settings with values outside the range are sent, these settings are not applied and an uplink is sent from the MSD with information about the current configuration and the error of the specified setting.<\/p>\n<p>Using downlinks, it is possible to set many MSD functions at once. For example, there is an option to set in which intervals the device will send the measured data and from how many samples this data will be averaged. Furthermore, it is possible to change the working mode of the MSD with downlinks, for example from switching according to light intensity to switching according to set times. It is also possible to choose which data will be sent in uplinks.<\/p>\n<p>MSD obtains the date and time from the TTS network and stores them in the RTC module. The data with the set configuration is stored in the EEPROM in case of restarting the Feather, so that it is not necessary to perform the MSD settings again using downlinks.<\/p>\n<p>All data that is sent in the uplinks is also listed with <strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multifunctional_switching_device\/tree\/main#encoding-tables-of-data-sent-in-uplinks\" target=\"_blank\" rel=\"noopener\">CayenneLPP encoding in tables<\/a><\/strong>. The data that is received in the downlinks is also shown with <strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multifunctional_switching_device\/tree\/main#decoding-tables-of-data-received-in-downlinks\" target=\"_blank\" rel=\"noopener\">decoding in the tables<\/a><\/strong>. How the data is stored in the <strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multifunctional_switching_device\/tree\/main#data-storage-table-in-eeprom-memory\" target=\"_blank\" rel=\"noopener\">EEPROM is shown in table<\/a><\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">More information about some parts of the program<\/span><\/strong><\/h4>\n<ul>\n<li>More information about <strong>Cayenne LPP<\/strong> can be found here:<strong> <a href=\"https:\/\/lora.vsb.cz\/index.php\/cayenne-lpp\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lora.vsb.cz\/index.php\/cayenne-lpp\/<\/a><\/strong><\/li>\n<li>More information about <strong>TTS Network Time<\/strong> can be found here: <strong><a href=\"https:\/\/lora.vsb.cz\/index.php\/tts-network-time\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lora.vsb.cz\/index.php\/tts-network-time\/<\/a><\/strong><\/li>\n<li>More information about <strong>Downlink reception and Cayenne LPP decoding<\/strong> can be found here:<strong> <a href=\"https:\/\/lora.vsb.cz\/index.php\/downlink-reception-and-cayenne-lpp-decoding\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lora.vsb.cz\/index.php\/downlink-reception-and-cayenne-lpp-decoding\/<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Telegraf, InfluxDB &amp; Grafana<\/span><\/strong><\/h2>\n<p>For data storage and visualization, we use an open-source time series database\u00a0<a href=\"https:\/\/www.influxdata.com\/\" target=\"_blank\" rel=\"noopener\"><strong>InfluxDB<\/strong><\/a>\u00a0and an open-source analytical and interactive visualization web application\u00a0<a href=\"https:\/\/grafana.com\/\" target=\"_blank\" rel=\"noopener\"><strong>Grafana<\/strong><\/a>. Data from The Things Stack is sent via MQTT to the MQTT consumer\u00a0<strong><a href=\"https:\/\/www.influxdata.com\/time-series-platform\/telegraf\/\" target=\"_blank\" rel=\"noopener\">Telegraf<\/a><\/strong>, which then stores the data in the InfluxDB database.<\/p>\n<ol>\n<li><strong>Install the TIG following the instructions in this tutorial: <a href=\"https:\/\/lora.vsb.cz\/index.php\/telegraf-influxdb-grafana\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lora.vsb.cz\/index.php\/telegraf-influxdb-grafana\/<\/a><\/strong><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3><strong>Grafana dashboard setup<\/strong><\/h3>\n<ol>\n<li>Add the required panels according to the procedure given in the tutorial (in the section &#8222;Grafana dashboard setup&#8220;) and enter queries using the Query table.<\/li>\n<li>To find out the set bits, for example, from the value in <strong>uplink_message_decoded_payload_digital_in_150<\/strong>, it is necessary to write the query manually.<\/li>\n<li>In the settings of the newly added blank panel, press the pencil symbol and put the query with <strong>your topic<\/strong> in the field.<\/li>\n<li>An example of creating a query to determine if a <strong>Switching times error<\/strong> has occurred is shown below and uses a <strong>bitwise AND<\/strong>:\n<pre class=\" prettyprinted\"><span class=\"pln\">SELECT last(\"uplink_message_decoded_payload_digital_in_150\"::integer) &amp; 16 FROM \"tts\" WHERE (\"topic\" = 'v3\/msd@ttn\/devices\/msd-1\/up') AND $timeFilter GROUP BY time($__interval) fill(null)\r\n<\/span><\/pre>\n<\/li>\n<li>Use the same methods mentioned for all required panels.<\/li>\n<li>For example, your <strong>Dashboard<\/strong> might look like this:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4929 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard.png\" alt=\"\" width=\"999\" height=\"663\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard.png 2499w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-300x199.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-1024x680.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-768x510.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-1536x1020.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-2048x1360.png 2048w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSZ_Dashboard-272x182.png 272w\" sizes=\"auto, (max-width: 999px) 100vw, 999px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h1><strong>MSD control via downlinks<\/strong><\/h1>\n<p>The following section describes the ways in which MSD settings can be changed using settings sent in downlinks from the TTS network.<\/p>\n<p>First, you will need to generate an API key in TTS in your application, following the procedure below. You will need this generated API key for all downlink solutions below.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">The Things Stack &#8211; API key<\/span><\/strong><\/h2>\n<ol>\n<li>In <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; API keys<\/strong>\u00a0click\u00a0button\u00a0<strong>+Add API key<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4117 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API.png\" alt=\"API key\" width=\"802\" height=\"300\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API.png 1920w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API-300x112.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API-1024x383.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API-768x288.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API-1536x575.png 1536w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/li>\n<li>Write something in the <strong>Name<\/strong>.<\/li>\n<li>Select <strong>Grant individual rights<\/strong>.<\/li>\n<li>Check <strong>Write downlink application traffic<\/strong>.<\/li>\n<li>Click on button <strong>Create API key<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4120 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API2.png\" alt=\"API key\" width=\"400\" height=\"489\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API2.png 717w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/TTS_API2-245x300.png 245w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Click the <strong>Copy to Clipboard<\/strong> button and save the key somewhere safe for later use.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Controling device with downlinks from python script or program<\/span><\/strong><\/h2>\n<p>One option for setting MSD via downlinks is using a python script or program. The program mentioned is a graphical user interface that has a script code base in it. In addition, the program implements checks of entered settings and ranges. Cayenne LPP automatic encoding is implemented for both script and program. Encoded data is sent to TTS using the POST method.<\/p>\n<h4><\/h4>\n<h4><strong><span style=\"color: #800000;\">Requirements<\/span><\/strong><\/h4>\n<ul>\n<li><a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"noopener\"><strong>Python &gt;= 3.10<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/requests\/\" target=\"_blank\" rel=\"noopener\"><strong>Requests library<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Sending downlinks via TTS using a Multiswitch Python script<\/span><\/strong><\/h4>\n<p>The Multiswitch Python script contains the implementation of all possible MSD settings and all setting options have been commented in detail in the code. This script does not do any MSD checking of settings and ranges and may send settings that MSD does not implement. This script is a modified script originally developed for the <a href=\"https:\/\/lora.vsb.cz\/index.php\/sending-downlinks-via-tts-using-a-python-script\/\" target=\"_blank\" rel=\"noopener\"><strong>Sending downlinks via TTS using a Python script<\/strong><\/a> tutorial.<\/p>\n<p>We recommend going through this tutorial where you will learn how to <a href=\"https:\/\/lora.vsb.cz\/index.php\/sending-downlinks-via-tts-using-a-python-script\/\" target=\"_blank\" rel=\"noopener\"><strong>Send downlinks via TTS using a Python script<\/strong><\/a> .<\/p>\n<ul>\n<li><strong>The script for MSD<\/strong> can be found here: <a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Python_script\" target=\"_blank\" rel=\"noopener\"><strong>Multiswitch Python script<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Sending downlinks via TTS using a TTS Multiswitch Python program<\/span><\/strong><\/h4>\n<p>TTS Multiswitch Python program is a solution directly for MSD. With this program you can easily set up MSD. In the background of the program, encoding to Cayenne LPP in the correct channels and data types is done automatically before the data is sent. Another advantage is that the program inputs are treated so that it is not possible to enter invalid settings or settings outside the range of desired values. Encoded data is sent to TTS using the POST method. The GUI was created using <a href=\"https:\/\/docs.python.org\/3\/library\/tkinter.html\" target=\"_blank\" rel=\"noopener\"><strong>Tkinter<\/strong><\/a>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4991 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Multi_Python.png\" alt=\"\" width=\"600\" height=\"395\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Multi_Python.png 1178w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Multi_Python-300x198.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Multi_Python-1024x675.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Multi_Python-768x506.png 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<ul>\n<li><strong>The program for MSD<\/strong> can be found here: <a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Python_program\" target=\"_blank\" rel=\"noopener\"><strong>TTS Multiswitch Python program<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">User guide<\/span><\/strong><\/h6>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Python_program\/blob\/main\/CZ%20-%20TTS%20Multiswitch%20Python%20program.pdf\" target=\"_blank\" rel=\"noopener\">User manual in Czech<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Python_program\/blob\/main\/EN%20-%20TTS%20Multiswitch%20Python%20program.pdf\" target=\"_blank\" rel=\"noopener\">User manual in English<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Send MSD settings<\/span><\/strong><\/h6>\n<ol>\n<li>In a terminal open in the <strong>unzipped program folder<\/strong>, <strong>run the program<\/strong> with the following command:\n<pre class=\" prettyprinted\"><span class=\"pln\">python3 \"TTS Multiswitch.py\"\r\n<\/span><\/pre>\n<\/li>\n<li>Choose the desired settings in the <strong>TTS settings<\/strong> field and fill in the data about your registered MSD and the generated API key in the <strong>End device<\/strong> field.<\/li>\n<li>In the <strong>Settings password<\/strong> field, enter the password you set in MSD.<\/li>\n<li>For example, if you want to change the<strong> interval of sending uplinks<\/strong>, check the <strong>checkbox on the left<\/strong> next to the <strong>Send data every [s]<\/strong> field, <strong>set the required interval value<\/strong> in the field and press the <strong>Send common settings<\/strong> button.<\/li>\n<li>Information about the action performed is displayed in the <strong>Operational information<\/strong> field.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5020 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpythonProgramTTS.png\" alt=\"\" width=\"689\" height=\"454\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpythonProgramTTS.png 1178w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpythonProgramTTS-300x198.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpythonProgramTTS-1024x675.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpythonProgramTTS-768x506.png 768w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/li>\n<li>You should see the following in the <strong>TTS console<\/strong>:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5026 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2.png\" alt=\"\" width=\"689\" height=\"86\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2.png 996w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2-300x38.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2-768x96.png 768w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">More information<\/span><\/strong><\/h4>\n<ul>\n<li>More information about the implemented <a href=\"https:\/\/lora.vsb.cz\/index.php\/cayenne-lpp-encoder-in-python\/\" target=\"_blank\" rel=\"noopener\"><strong>Cayenne LPP encoder in Python<\/strong><\/a><\/li>\n<li>More information about the <a href=\"https:\/\/lora.vsb.cz\/index.php\/sending-downlinks-via-tts-using-a-python-script\/\" target=\"_blank\" rel=\"noopener\"><strong>Sending downlinks via TTS using a Python script<\/strong><\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Controling device with downlinks from Grafana plugins<\/span><\/strong><\/h2>\n<p>If you want to learn more about setting up the development environment for creating Grafana panel plugins and more information about panel development, you can find more information in the <a href=\"https:\/\/lora.vsb.cz\/index.php\/grafana-panel-plugin-for-sending-downlinks\/\" target=\"_blank\" rel=\"noopener\"><strong>Grafana panel plugin (for sending downlinks)<\/strong><\/a> tutorial.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">Universal Grafana panel plugin for sending downlinks via TTS<\/span><\/strong><\/h4>\n<p>A universal payload sending plugin can be used to set MSD. The disadvantage of this method is that the data with the required settings must be manually encoded with Cayenne LPP before being entered into the &#8222;Payload&#8220; field. Encoded data is sent to TTS using the POST method.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4612 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/grafanaPlugin2.png\" alt=\"\" width=\"400\" height=\"343\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/grafanaPlugin2.png 620w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/grafanaPlugin2-300x257.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Import Universal Grafana panel plugin from Github to your Grafana<\/span><\/strong><\/h6>\n<ol>\n<li>If you followed the <strong><a href=\"https:\/\/lora.vsb.cz\/index.php\/telegraf-influxdb-grafana\/\" target=\"_blank\" rel=\"noopener\">Telegraf and InfluxDB and Grafana<\/a><\/strong> tutorial, clone our plugin&#8217;s GitHub repository to your folder <strong>my-grafana-plugins<\/strong>:\n<pre>$ git <span class=\"hljs-built_in\">clone<\/span> https:\/\/github.com\/OndrejKnebl\/TTS_Downlink_Sender_plugin.git my-grafana-plugins<\/pre>\n<\/li>\n<li>You need to restart the grafana container:\n<pre>$ sudo docker restart grafana<\/pre>\n<\/li>\n<li>Now you can visit your Grafana web application from a browser in your internal network at\u00a0<code class=\" prettyprinted\"><strong><em><span class=\"pln\">http<\/span><span class=\"pun\">:<\/span><span class=\"com\">\/\/IP<\/span><\/em><\/strong><em><span class=\"com\">_<\/span><\/em><strong><em><span class=\"com\">AddressOfServer:3000<\/span><\/em><\/strong><\/code>\u00a0(for example 192.168.1.120:3000).<\/li>\n<li>Log in with your username and password.<\/li>\n<li>Click on\u00a0<strong>Configuration -&gt; Plugins<\/strong>. Make sure that your plugin is there.<\/li>\n<li>Click on\u00a0<strong>Dashboards -&gt; Browse -&gt; Your dashboard<\/strong>.<\/li>\n<li>Choose\u00a0<strong>Add a new panel<\/strong>.<\/li>\n<li>Choose your plugin panel and save dashboard.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">More information, user guide and plugin source codes<\/span><\/strong><\/h6>\n<p>More information, user guide and plugin source codes are given in the <a href=\"https:\/\/lora.vsb.cz\/index.php\/grafana-panel-plugin-for-sending-downlinks\/\" target=\"_blank\" rel=\"noopener\"><strong>Grafana panel plugin (for sending downlinks)<\/strong><\/a> tutorial.<\/p>\n<p>&nbsp;<\/p>\n<h4><strong><span style=\"color: #800000;\">TTS Multiswitch &#8211; Grafana panel plugin for sending downlinks via TTS<\/span><\/strong><\/h4>\n<p>TTS Multiswitch is a solution directly for MSD. With this plugin you can easily set up MSD. In the background of the plugin, encoding to Cayenne LPP in the correct channels and data types is done automatically before the data is sent. Another advantage is that the plugin inputs are treated so that it is not possible to enter invalid settings or settings outside the range of desired values. Encoded data is sent to TTS using the POST method.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4964 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Panel_plugin1.png\" alt=\"\" width=\"550\" height=\"532\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Panel_plugin1.png 1042w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Panel_plugin1-300x290.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Panel_plugin1-1024x990.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/TTS_Panel_plugin1-768x742.png 768w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Import TTS Multiswitch plugin from Github to your Grafana<\/span><\/strong><\/h6>\n<ol>\n<li>If you followed the <strong><a href=\"https:\/\/lora.vsb.cz\/index.php\/telegraf-influxdb-grafana\/\" target=\"_blank\" rel=\"noopener\">Telegraf and InfluxDB and Grafana<\/a><\/strong> tutorial, clone our plugin&#8217;s GitHub repository to your folder <strong>my-grafana-plugins<\/strong>:\n<pre>$ git <span class=\"hljs-built_in\">clone<\/span> https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin.git my-grafana-plugins<\/pre>\n<\/li>\n<li>You need to restart the grafana container:\n<pre>$ sudo docker restart grafana<\/pre>\n<\/li>\n<li>Now you can visit your Grafana web application from a browser in your internal network at\u00a0<code class=\" prettyprinted\"><strong><em><span class=\"pln\">http<\/span><span class=\"pun\">:<\/span><span class=\"com\">\/\/IP<\/span><\/em><\/strong><em><span class=\"com\">_<\/span><\/em><strong><em><span class=\"com\">AddressOfServer:3000<\/span><\/em><\/strong><\/code>\u00a0(for example 192.168.1.120:3000).<\/li>\n<li>Log in with your username and password.<\/li>\n<li>Click on\u00a0<strong>Configuration -&gt; Plugins<\/strong>. Make sure that your plugin is there.<\/li>\n<li>Click on\u00a0<strong>Dashboards -&gt; Browse -&gt; Your dashboard<\/strong>.<\/li>\n<li>Choose\u00a0<strong>Add a new panel<\/strong>.<\/li>\n<li>Choose your plugin panel and save dashboard.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">User guide<\/span><\/strong><\/h6>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin\/blob\/main\/loravsbcz-ttsmultiswitch-panel\/CZ%20%20-%20U%C5%BEivatelsk%C3%A1%20p%C5%99%C3%ADru%C4%8Dka%20-%20%20TTS%20Multiswitch%20Grafana%20panel%20plugin.pdf\" target=\"_blank\" rel=\"noopener\">User manual in Czech<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin\/blob\/main\/loravsbcz-ttsmultiswitch-panel\/EN%20-%20User%20manual%20-%20TTS%20Multiswitch%20Grafana%20panel%20plugin.pdf\" target=\"_blank\" rel=\"noopener\">User manual in English<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Plugin source codes<\/span><\/strong><\/h6>\n<p>The three source code files that are commented in detail are listed below:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin_source_codes\/blob\/main\/SimplePanel.tsx\" target=\"_blank\" rel=\"noopener\">\/src\/components\/SimplePanel.tsx<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin_source_codes\/blob\/main\/types.ts\" target=\"_blank\" rel=\"noopener\">\/src\/types.ts<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/github.com\/OndrejKnebl\/Multiswitch_Grafana_panel_plugin_source_codes\/blob\/main\/module.ts\" target=\"_blank\" rel=\"noopener\">\/src\/module.ts<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Send MSD settings<\/span><\/strong><\/h6>\n<ol>\n<li>In Grafana, go to your Dashboard with the <strong>TTS Multiswitch<\/strong> panel.<\/li>\n<li>Choose the desired settings in the <strong>TTS settings<\/strong> field and fill in the data about your registered MSD and the generated API key in the <strong>Downlink settings<\/strong>\u00a0field.<\/li>\n<li>In the <strong>Settings password<\/strong> field, enter the password you set in MSD.<\/li>\n<li>For example, if you want to change the<strong> interval of sending uplinks<\/strong>, check the <strong>checkbox on the left<\/strong> next to the <strong>Send data every [s]<\/strong> field, <strong>set the required interval value<\/strong> in the field and press the <strong>Send common settings<\/strong> button.<\/li>\n<li>Information about the action performed is displayed in the <b>Alert<\/b> field.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5035 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpluginTTS.png\" alt=\"\" width=\"550\" height=\"590\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpluginTTS.png 938w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpluginTTS-280x300.png 280w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpluginTTS-768x824.png 768w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/li>\n<li>You should see the following in the <strong>TTS console<\/strong>:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5026 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2.png\" alt=\"\" width=\"689\" height=\"86\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2.png 996w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2-300x38.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/MSDpayloadTTS2-768x96.png 768w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong><span style=\"color: #800000;\">Final look of Grafana Dashboard for MSD<\/span><\/strong><\/h6>\n<p>Your final dashboard in Grafana might look like this:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5066 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final.png\" alt=\"\" width=\"1000\" height=\"975\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final.png 2482w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final-300x292.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final-1024x998.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final-768x749.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final-1536x1497.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/04\/Dashboard-final-2048x1996.png 2048w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>TTN version: TTNv3 Board: Adafruit Feather M0 Activation: OTAA Device Class: Class A Transmission: Duplex Data Transmission Last updated: April 26, 2023 Warning: This article is for informational purposes only and is not a guide. If you assemble the device, you do so at your own risk. We are not responsible for any damage, injury [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4227","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/comments?post=4227"}],"version-history":[{"count":286,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4227\/revisions"}],"predecessor-version":[{"id":5069,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4227\/revisions\/5069"}],"wp:attachment":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/media?parent=4227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}