tag:blogger.com,1999:blog-4947915644260136462024-03-28T04:37:39.076-05:00HAnix-diy - PublicTechnical blog to share ideas about Home Automation and other thingsTheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.comBlogger281125tag:blogger.com,1999:blog-494791564426013646.post-62073642141749674722024-02-18T21:49:00.001-06:002024-02-20T21:50:07.986-06:00Flipper Zero - setting up a development environment<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpPQB1dQpwqTjyl21GGcZUHuEXfpIq01z_4CBy3PfvDeR7vL0YQ4HdRH5_jGgqdfg6C8ziP7NadipE26s1eN6wb44bIRJRw7oceuoiySOa6MmVBEQ9rvyRYW5XydaSvIpDMLITHz8B9YMmVH4cfKR8bmLsERj2S8nAGYnCfFPs122TbX4xSwaN8k5rPuo/s1961/fz.webp" style="clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1960" data-original-width="1961" height="96" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpPQB1dQpwqTjyl21GGcZUHuEXfpIq01z_4CBy3PfvDeR7vL0YQ4HdRH5_jGgqdfg6C8ziP7NadipE26s1eN6wb44bIRJRw7oceuoiySOa6MmVBEQ9rvyRYW5XydaSvIpDMLITHz8B9YMmVH4cfKR8bmLsERj2S8nAGYnCfFPs122TbX4xSwaN8k5rPuo/w96-h96/fz.webp" width="96" /></a>Flipper Zero is defined as "hacking" tool, i.e. is a collection of HW and SW that allows to explore and interact with technology around us.</p><p><span>How can we work on it ?<span></span></span></p><a name='more'></a><p></p><h1>Goal</h1><div>This article goal is to set up a working development environment for Flipper Zero, where to build and install the stock firmware in the device.</div><h1>Development environment</h1><div>Flipper Zero is open source.<br />One of the capabilities of Flipper Zero is to be used to develop applications interacting with the outer world via peripherals, like the GPIO.</div><div>In order to do that, is necessary to set up a development environment.</div><div>Of course it can be done in many different way, the device itself has a kind of an embedded mini IDE but is not practical.</div><div><br /></div><div>So my goal is to have an IDE running on a Linux box or a Mac, capable to work in C or Python, connected with the Flipper Zero.<br />The examples in this article are based on a Linux box with Ubuntu 22.04 LTS</div><div><br /></div><h2>Grocery list</h2><div>So what we need to have to setup our development environment ?</div><div><br /></div><h3>Hardware</h3><div><ul><li>a computer Linux or Mac based (Linux in this example)</li><li>a Flipper Zero</li></ul></div><h3>Software</h3><div><ul><li>on the Linux machine connected to the Flipper Zero, need to be installed :</li><ul><li>Git (vs 2.25.1)</li><li>Terminal</li><li>qFlipper (mainly for maintenance/official firmware upgrade)</li><li>Visual Studio Code (IDE - vs 1.86.2)</li><li>latest Python (>= 3.x - on my machine 3.8.10)</li></ul></ul><h3>Code</h3><ul><li>Firmware/apps for Flipper (github)<br />There are different repo we can use, here some :</li><ul><li><a href="https://github.com/flipperdevices/flipperzero-firmware" target="_blank">Stock firmware</a> --> The firmware installed by default<br />(in the end will be around 2 GB)</li><li><a href="https://github.com/Flipper-XFW/Xtreme-Firmware" target="_blank">Xtreme Firmware</a> --> extra functionalities<br />(in the end will be around 3 GB)</li><li><a href="https://github.com/jamisonderek/flipper-zero-tutorials.git" target="_blank">Flipper Zero tutorial</a> --> examples of app<br />(in the end will be around 35 MB)</li></ul></ul><div>We are going to use in this article only the stock firmware.</div></div><h2>Setting up</h2><div>Start to clone the repos you are interested in.<br />Better to clone rather than download the zip code, is much easier to keep the sandbox updated since the repo content can change quite often.<br />After creating a directory somewhere for the firmware :</div><div><ul><li><span style="font-family: courier; font-size: x-small;">git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git</span></li></ul><div><span style="font-family: inherit;">For the firmware be sure to use the --recursive option since there are lot of submodules to be initialized.</span></div></div><div><span style="font-family: inherit;"><br /></span></div><h3>Firmware code init</h3><div>Let start with the stock firmware.</div><div>From a terminal go in the repo root. In my case : <span style="font-family: courier; font-size: x-small;">cd ~/Projects/FlipperZero/flipperzero-firmware</span></div><div>In it there is a script called <span style="font-family: courier;">fbt (</span><span style="font-family: inherit;">Flipper Build Tool - fbt)</span>. </div><div>This script is used to build the code and initialize it, so the first time (i.e. after the installation from the repo), just execute it : <span style="font-family: courier;">./fbt</span></div><div><br /></div><div>The script is checking for missing tools/libraries and initialize the environment to be used by Visual Studio Code.</div><div>Once the first fbt run ends, execute it again to build but the Visual Studio Code menu :<br /> <span><span style="font-family: courier;">./fbt vscode_dist</span><br /><span style="font-family: inherit;">This will build the VSC menu accessible via the <i>Ctrl - Shift - B</i> command</span></span></div><h3 style="text-align: left;">Visual Studio Code (VSC)</h3><div>At this point open the VSC and load the folder with the original firmware and complete the suggested extension installation (if any).<br />After this task, it may require to restart VSC few times, the environment is ready.</div><div><br /></div><div>As first task we'll try to build the firmware and install in the Flipper Zero.</div><div><br /></div><h1 style="text-align: left;">Building the firmware</h1><div><br /></div><div>Before to proceed be sure to have the Flipper Zero connected to the USB port.<br />Verify everything is OK running qFlipper but don't leave qFlipper running while building and flashing the device.</div><div>Leave the Flipper Zero connected to the USB cable but close qFlipper.</div><h2 style="text-align: left;">Step 1</h2><div>Select the release branch.<br />After the initialization the default selected branch is dev (development).<br />It can be done in the terminal or in VSC.</div><div><br /></div><h3 style="text-align: left;">From terminal</h3><div><ul style="text-align: left;"><li><span style="font-family: courier;">git status</span><br />to show what branch is selected</li><li><span style="font-family: courier;">git branch</span><br />to show what branches are. The first time only dev will appears since on;y the local copy is shown.<br /></li><li><span style="font-family: courier;">git checkout <name_branch></span><br />to switch branch. The first time be sure to select origin:<name branch></li></ul><div>The repo has two branches :<br /><ul style="text-align: left;"><li><span style="font-family: courier;">dev</span></li><li><span style="font-family: courier;">release_0_98</span></li></ul><div>So select : <span style="font-family: courier;">git checkout release_0_98</span></div></div></div><div><br /></div><h3 style="text-align: left;">From VSC</h3><div>Select Source control on the left bar </div><div><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhUWTWAnoSDOJs-ACnKYe6BgeEiv80agpmZyJCi3DE8uHdCimpFiL_BM6BQ8oiqtGkBTZ5snOIE-pl_gkHqRoQR986yz9IIo_ze4hpXbFU3-C6bjJOwwnUGPKexi-7S8t4UJID3BvITYN0V19olYx6TE4DixXLXo4w66D8zf5umLB6ywnCU0ChkJS3Bt9g" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" data-original-height="219" data-original-width="502" height="140" src="https://blogger.googleusercontent.com/img/a/AVvXsEhUWTWAnoSDOJs-ACnKYe6BgeEiv80agpmZyJCi3DE8uHdCimpFiL_BM6BQ8oiqtGkBTZ5snOIE-pl_gkHqRoQR986yz9IIo_ze4hpXbFU3-C6bjJOwwnUGPKexi-7S8t4UJID3BvITYN0V19olYx6TE4DixXLXo4w66D8zf5umLB6ywnCU0ChkJS3Bt9g" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The dev environment is selected (see on the left of the flipperzero_firmware)</td></tr></tbody></table><br /><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div>Click on "dev" and select "release_0_98" (or the first time the origin:release_0_98)</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg8DK8_ozIQRtotsfkQnvWl59Q4x_fmZowFoVm4jlqGjfsuVqdBWGTAXBF6hXHADUPNohrX3HRXyiHkGrr2ev4iwG0hD-b3wtWkkGpvabzssBMBt-U1QKSLifU655BZsjqQvDKRtSVEFZ9Adx6ZWKIF3kFSemodktTPdrh-O_hRJvZCKz1u00OepJ2g_LA" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="177" data-original-width="494" height="115" src="https://blogger.googleusercontent.com/img/a/AVvXsEg8DK8_ozIQRtotsfkQnvWl59Q4x_fmZowFoVm4jlqGjfsuVqdBWGTAXBF6hXHADUPNohrX3HRXyiHkGrr2ev4iwG0hD-b3wtWkkGpvabzssBMBt-U1QKSLifU655BZsjqQvDKRtSVEFZ9Adx6ZWKIF3kFSemodktTPdrh-O_hRJvZCKz1u00OepJ2g_LA" width="320" /></a></div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div>Done</div><div><br /></div><h2 style="text-align: left;">Step 2</h2><div>Click "Ctrl-Shift-B" to show the task list.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEho4b4w_Vi5ZQIY2FFf9-55_IfHMWg1uqzWHqOcYmzUjV8FCwZbzPLRyJKJo4wQNg8tMjz_pbnK41gi3_I4NiSYwlAAfKlxkbI_mx3D1pkFKIji9jtzBu8fLM1KWgjNPu3JWaZvmYkDyFNvpuvgUuCPXYf2SY_8a4sOFExm9_yleWNGPILmseOra48JdtA" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="890" data-original-width="1633" height="347" src="https://blogger.googleusercontent.com/img/a/AVvXsEho4b4w_Vi5ZQIY2FFf9-55_IfHMWg1uqzWHqOcYmzUjV8FCwZbzPLRyJKJo4wQNg8tMjz_pbnK41gi3_I4NiSYwlAAfKlxkbI_mx3D1pkFKIji9jtzBu8fLM1KWgjNPu3JWaZvmYkDyFNvpuvgUuCPXYf2SY_8a4sOFExm9_yleWNGPILmseOra48JdtA=w640-h347" width="640" /></a></div><br /><div>Be sure to have the Flipper Zero connected to an USB port, then select "Flash USB with resources"</div></div><div><br /></div><div>The building will start and if no errors will load it on the Flipper Zero.<br />During the flash an Updating view will appear indicating the operation and in the end, if everything OK :</div><div><ul style="text-align: left;"><li>another view on Flipper will indicate : Firmware update Success</li><li>running qFlipper again will show the firmware release as : 0.98.3<br />The build date remains wrong<br /><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj19QOfnbbmb43d_tAua9dTM9H98HWkEaRxyKLaM2Uk723mEcWPYbNhf29Yv223IhaGFaVCOgPcFxLB6d2CkNyAHcTCPVIe1qVCHMh68lTgA_hLBQqpGAlcKZhZYahoYMBqfAH1cY6tBbjD2kdUaY7RhgU9kVnwq_LtNFX-P230TLjCnaLC6EMdrMQo4JQ" style="clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="415" data-original-width="816" height="163" src="https://blogger.googleusercontent.com/img/a/AVvXsEj19QOfnbbmb43d_tAua9dTM9H98HWkEaRxyKLaM2Uk723mEcWPYbNhf29Yv223IhaGFaVCOgPcFxLB6d2CkNyAHcTCPVIe1qVCHMh68lTgA_hLBQqpGAlcKZhZYahoYMBqfAH1cY6tBbjD2kdUaY7RhgU9kVnwq_LtNFX-P230TLjCnaLC6EMdrMQo4JQ" width="320" /></a></li></ul><div>Done, the firmware was built and installed</div></div><div><h1>Resources</h1><div><ul><li>Firmware</li><ul><li><a href="https://github.com/flipperdevices/flipperzero-firmware" target="_blank">Stock firmware</a> --> The firmware installed by default</li><li><a href="https://github.com/Flipper-XFW/Xtreme-Firmware" target="_blank">Xtreme Firmware</a> --> extra functionalities</li><li><a href="https://github.com/jamisonderek/flipper-zero-tutorials.git" target="_blank">Flipper Zero tutorial</a> --> examples of apps<br /></li></ul></ul></div></div><div><br /></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-66798386471027716682024-02-10T10:51:00.000-06:002024-02-17T20:39:13.768-06:00Flipper Zero - introduction<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUMDK2zes153fd8PHmwnLtCMMb7ye0bxveKD-YteplFhU1Ml-lkY6qbMcaSuDdjcDY0fbWHtG_-lF0W4MEl4x-IpdInDexxunJldbwpwmPFHg6TDeXPEefwYffQqdm0swwM-G3IVrGkmxPXOFRnCCx7nUtdyUX6SFrkDiXqXusDVxuTbsU9NoMo3WKjFA/s1961/fz.webp" style="clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1960" data-original-width="1961" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUMDK2zes153fd8PHmwnLtCMMb7ye0bxveKD-YteplFhU1Ml-lkY6qbMcaSuDdjcDY0fbWHtG_-lF0W4MEl4x-IpdInDexxunJldbwpwmPFHg6TDeXPEefwYffQqdm0swwM-G3IVrGkmxPXOFRnCCx7nUtdyUX6SFrkDiXqXusDVxuTbsU9NoMo3WKjFA/w88-h88/fz.webp" width="88" /></a>Flipper Zero is defined as "hacking" tool, i.e. is a collection of devices and SW that allows to explore and interact with technology around us.<span><br /><br /></span></p><a name='more'></a><p></p><h1 style="text-align: left;">Controversial</h1><p>Before to look more in deep, let me say a word about the perception of people usually not knowing the argument.<br />Flipper Zero is becoming a controversial device because, according to people who doesn't know what it is, is used by criminals to stole cars, enter in homes and do lot of other crimes.<br />Although technically is true that some crimes (i,e, acts against some laws) can be made using some Flipper Zero potentialities, the device can do lot of useful, law abiding, things.<br />In other words, the tool is NOT designed to commit crimes, it can be used to do positive, useful things.<br />And like ANY tools, it can be used by criminals to commit crimes.<br />People who wants to ban Flipper and label who own one as criminal, should do the same with EVERYTHING else. Examples ?<br />A car, a hammer, cash .. the list is infinite. </p><p>Everything can be used to commit crimes.</p><p>Another very very very important thing to understand is that a Flipper Zero simply integrate functionalities that exists in other forms.<br />i.e. is not a new invention. Everything that can be done with a Flipper Zero can be done in thousands of other way.<br />Flipper Zero simply is "convenient", not "innovative"<br />Who knows what he/she is doing, can build the same functionalities with other HW,<br />A Raspberry Pi type board, Linux, etc. .. there is an entire universe of hacking platforms and tools out there, for a long time.</p><p>One thing Flipper Zero can be guilty of, is to facilitate people to understand lot of things and yes, maybe facilitate criminals to do something, exactly like a car can be used to kill or fast escape a crime.<br />i.e. the problem are the criminals, not the tools and surely NOT people who wants to learn and, why not, also having fun. </p><h1 style="text-align: left;">Who and what ?</h1><div>Like ANY tool, anybody can use it to do different things.</div><div>So this specific tool is designed with the idea to interact with everyday tech in many different fields.</div><div>I'm not even starting to do a list of things that can be done with a Flipper Zero, there are tons and tons of sites with everything.</div><div><br /></div><div>On my blog, I want just to write about what I do with it.</div><div><br /></div><div>From a technical perspective, what exactly is a Flipper Zero ?</div><div>Let see some data (<a href="https://flipperzero.one/" target="_blank">see here for a recap</a> - What's inside paragraph) :</div><div><ul style="text-align: left;"><li>Processor <a href="https://www.st.com/en/microcontrollers-microprocessors/stm32wb55rg.html" target="_blank">STM32WB55RG</a><br />As the data sheet claims, is a Ultra-low-power dual core Arm Cortex-M4 MCU 64 MHz, Cortex-M0+ 32 MHz with 1 Mbyte of Flash memory, Bluetooth LE 5.4, 802.15.4, Zigbee, Thread, Matter, USB, LCD, AES-256<br /><br />Wow, lot of stuff. I did use ST processors eons ago, so I was little bit surprised to see an ST processor in it. Cool</li><li>All the memory available is the one in the processor, so is not much.<br />For that an SD card is used to store applications and data.</li><li>Bunch of peripherals for RFID/NFC/iButton/Infrared/etc.</li><li>GPIO<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7TCYd0o3THlZRZxi1PVacsqAOEJBRHYVLETNqRPDNzbVj2PhTkIuGZUALx7gHB0tDTzTGLlGfF0vRr9LswzHPAOxuBhOveuLajszP7cUo3tnQJMucIbprBI1TuqSzR11UQUgel1xT5efKIr4e71x6pXjFTANCS43gv_Sx-hwWo6TvrxkylprHdkhOUvg/s1680/flipper_zero_gpio_pi.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1375" data-original-width="1680" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7TCYd0o3THlZRZxi1PVacsqAOEJBRHYVLETNqRPDNzbVj2PhTkIuGZUALx7gHB0tDTzTGLlGfF0vRr9LswzHPAOxuBhOveuLajszP7cUo3tnQJMucIbprBI1TuqSzR11UQUgel1xT5efKIr4e71x6pXjFTANCS43gv_Sx-hwWo6TvrxkylprHdkhOUvg/w400-h328/flipper_zero_gpio_pi.jpg" width="400" /></a></div><br /></li>On other articles I will discuss more related topics.</ul></div><h1 style="text-align: left;">Resources</h1><div><ul style="text-align: left;"><li>Flipper - <a href="https://flipperzero.one/" target="_blank">Flipper Zero presentation</a></li><li>Flipper - <a href="https://docs.flipper.net/" target="_blank">Flipper Zero documentation</a></li><li>Flipper - <a href="https://docs.flipper.net/qflipper" target="_blank">qFlipper</a> --> Linux/Mac/Windows tool to manage a Flipper Zero</li></ul></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-23655137851699127782024-02-03T09:13:00.000-06:002024-02-09T09:14:08.668-06:00Pimoroni Badger 2040 - quick intro<p></p><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmnRUqgbCkOzGfdeFhmyJXvedpWLf-9YfNk9bcxvF4n5hASTOM8UO8bAe-8Jr7dRRV7kAXuXuBB49H_ZsBbn2vIKlYo02bZwK2z_z62OkGucfFjislmTkzAKARbNSYhuOF8ozr_HHiGdkcR6VV-gJQx1v7WUruIEAgO_i80sBAajN-WkhYXiNPu7FS/s147/badger2040.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="90" data-original-width="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmnRUqgbCkOzGfdeFhmyJXvedpWLf-9YfNk9bcxvF4n5hASTOM8UO8bAe-8Jr7dRRV7kAXuXuBB49H_ZsBbn2vIKlYo02bZwK2z_z62OkGucfFjislmTkzAKARbNSYhuOF8ozr_HHiGdkcR6VV-gJQx1v7WUruIEAgO_i80sBAajN-WkhYXiNPu7FS/s16000/badger2040.png" /></a></div><div style="text-align: left;">To have some fun I did buy a couple of gadgets from <a href="https://shop.pimoroni.com/" target="_blank">Pimoroni</a>, electronic badges with a 2.9 inch eInk display.<br />There are two flavor of the board, one basic (Badger 2400) and one with connectivity (WiFi - Badger 2400W).<br />A nice way to start to play with the Pico series from Raspberry.</div><div style="text-align: left;"><br /></div><span><a name='more'></a></span><div style="text-align: left;"><br /></div><div style="text-align: left;">For some time I did plan to design an electronic badge, so having something "ready off the shelf" to play with can give me some experience and ideas about how to design eventually mine.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">The goal is to be able to put down some specifications for "my" personal badge and of course having fun playing with this new toy. </div><div style="text-align: left;">There are many ways to work with this gadget as explained in the Pimoroni page, the one I choose to follow is the <a href="https://micropython.org/" target="_blank">MicroPython</a> one.</div><div style="text-align: left;"><br /></div><h2 style="text-align: left;">Environment Preparation</h2><div style="text-align: left;">In order to work on the badge we need to :</div><div style="text-align: left;"><ul style="text-align: left;"><li>install <a href="https://thonny.org/" target="_blank">Thonny</a> (MicroPython IDE)</li><ul><li>under Linux best choice is to install it via Snap</li></ul><li>connect the Badger via USB to the computer</li><li>open Thonny</li><ul><li>select 'MicroPython (Raspberry Pi Pico)' as interpreter by clicking on the box at the bottom right<br /><br />If everything is OK in the shell area should appears this :<br /><br /><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeDCss2UKGzmj85_yXDDjYMtzcN28nU27xk0GrlEQt1zoJElnDRL2MZINbr8o19dj0EKwgYMUX8Jgkph4UtmpU6st-8eg-YOSTS_mcD07RMhDd58Kdq_rxBLEBJSAU8lUyTr0kZUZXbb-jssR5XKD1nmGmyXaYZs0NaO52kWpSwiCF3w4EXoDe4XHA/s1544/Screen%20Shot%202022-08-19%20at%202.00.22%20PM.png" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="144" data-original-width="1544" height="38" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeDCss2UKGzmj85_yXDDjYMtzcN28nU27xk0GrlEQt1zoJElnDRL2MZINbr8o19dj0EKwgYMUX8Jgkph4UtmpU6st-8eg-YOSTS_mcD07RMhDd58Kdq_rxBLEBJSAU8lUyTr0kZUZXbb-jssR5XKD1nmGmyXaYZs0NaO52kWpSwiCF3w4EXoDe4XHA/w400-h38/Screen%20Shot%202022-08-19%20at%202.00.22%20PM.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"></td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><div style="text-align: left;"><br />I did find that some USB ports (at least on a Mac) doesn't recognize the board.<br />In case of problems before to start Klingon swear words, try to use different USB ports.<br />Also in some cases is possible to have to manually select the USB port connected to the Badger - to do so</div></div></li><ul><li>in Thonny click on the MicroPython (Raspberry PiPico) on the right bottom corner</li><li>click on Configure Interpreter<br /></li><li>on the Port field, select the right port</li></ul></ul></ul><div>At this point is better be sure to use the latest MicroPython image on the board.<br />To do so is enough to download a uf2 file provided by Pimoroni that contains the latest MicroPython image and the latest version of applications.</div><ul style="text-align: left;"><li>download the latest uf2 file for the Badger 2040 (or Badger 2040W) : <a href="https://github.com/pimoroni/pimoroni-pico/releases" target="_blank">Embedded Enviro Escapades</a></li><li>Set the board as driver - there is a specific set of buttons to press to force the board in download mode. Typically the bootsel button<br />In this mode the board is seen to the host computer as a disk drive.<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjoPe2otLnP07JjvUR9dP4VYX88JPWp7TDadQsBYeu-qI_i6vRbMElVohEcfh-KQ5pGPMXaYuBrOzBoZb61LvRnlq10nC1bFQTG4gN6dH2db6rg-k8yJna-Q7ijBalJIgrcM-LqNveSqTv6qdACj89d7tU7Y362slBshyBVi0Qv_4HAIbdAx8ESrYBdUM/s600/2400badger-rear.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="401" data-original-width="600" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjoPe2otLnP07JjvUR9dP4VYX88JPWp7TDadQsBYeu-qI_i6vRbMElVohEcfh-KQ5pGPMXaYuBrOzBoZb61LvRnlq10nC1bFQTG4gN6dH2db6rg-k8yJna-Q7ijBalJIgrcM-LqNveSqTv6qdACj89d7tU7Y362slBshyBVi0Qv_4HAIbdAx8ESrYBdUM/s320/2400badger-rear.jpeg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Badger 2400 back - two buttons - reset and bootsel</td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCr8-Erg55ElYk9RaDIMDa2svbhaLJlvCjDAverkIsoBLs6icqTfMxPiEklGeaofOV8H28-SmCBh2jnFN0bh7KiSqc8Z0iXwisvXipGDKhWC3V_OsKL2qW016n5mz8TFc0Jrn69aVvAXnKQa8S_Ps3C4Hrtm2HZieqD0Z8AGjAxr3bAb-cRI0ZJveQryk/s800/badger_2040_w-1.webp" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="533" data-original-width="800" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCr8-Erg55ElYk9RaDIMDa2svbhaLJlvCjDAverkIsoBLs6icqTfMxPiEklGeaofOV8H28-SmCBh2jnFN0bh7KiSqc8Z0iXwisvXipGDKhWC3V_OsKL2qW016n5mz8TFc0Jrn69aVvAXnKQa8S_Ps3C4Hrtm2HZieqD0Z8AGjAxr3bAb-cRI0ZJveQryk/s320/badger_2040_w-1.webp" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Badger 2400 WiFi - one button on the board (bootsel) and 1 button on the badger, reset</td></tr></tbody></table><br /></li><li>Copy the uf2 file on the board root<br /><br /></li></ul><div>That's it, after the downloading the board will reset itself and the MicroPython and applications will be up and running.<br />At this point will be possible to connect the host via Thonny to work on the board.</div><div><br /></div><h2 style="text-align: left;">The Badge</h2><div>The uf2 package contains already different small applications, one of them is the "badge".</div><div>There is of course a launcher, that allows to choose a specific application using some buttons present on the board.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQzYfMhpbiojbHcOnhrTmRMVSavVMYSDk5EHMQ6VXQVJaIgCmSxQvzEmgLRDBGP9nRAuWxezlctfAg56Nrj2cb8trKMx0wBRNC90vTAjZo3-aipsCeQX33mujSwJefenTAfnbyM71sH_1TDD9SlE4AiAt9MhaZyfV4kcrL4rk8DCdRsJCOVa3dPjHVqeo/s1038/pimoroni-pico-badger-bc230e17191d6b4a8df0b57ae03d77c9.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="607" data-original-width="1038" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQzYfMhpbiojbHcOnhrTmRMVSavVMYSDk5EHMQ6VXQVJaIgCmSxQvzEmgLRDBGP9nRAuWxezlctfAg56Nrj2cb8trKMx0wBRNC90vTAjZo3-aipsCeQX33mujSwJefenTAfnbyM71sH_1TDD9SlE4AiAt9MhaZyfV4kcrL4rk8DCdRsJCOVa3dPjHVqeo/s320/pimoroni-pico-badger-bc230e17191d6b4a8df0b57ae03d77c9.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Badger 2400 WiFi board</td></tr></tbody></table><br /><div>There are three buttons on the bottom (a, b and c) and two buttons on the side (up, down).<br />In the picture above is shown the launcher. Up/Down buttons will select a page with 3 choices and the buttons a,b and c will select one of the three.<br />To return to the launcher just press together the a and c buttons</div><div><br /></div></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><h2 style="text-align: left;">Resources</h2><div style="text-align: left;"><ul style="text-align: left;"><li>Official site : <a href="https://shop.pimoroni.com/" target="_blank">Pimoroni</a></li><li>Pimoroni : <a href="https://shop.pimoroni.com/products/badger-2040?variant=39752959852627" target="_blank">Badger 2040</a></li><li>Pimoroni : <a href="https://learn.pimoroni.com/article/getting-started-with-pico" target="_blank">Getting started with Raspberry Pi Pico</a></li><li>Pimoroni : <a href="https://learn.pimoroni.com/article/getting-started-with-badger-2040" target="_blank">Getting started with Badger 2040</a></li><li>Official site : <a href="https://micropython.org/" target="_blank">MicroPython</a></li></ul></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><br /></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-28910466199336615672023-11-24T22:51:00.003-06:002023-12-15T15:07:45.109-06:00Repairs - Moen Chateau valve repair (UPDATE)<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0g3YQjyxzVsOWv_3VAAxL0IkCR0csnBvHKHc9NnyjOq1BMzZCeVm3QcJkt8WrYttytb9oQl97lsvinlzcfFrAAWef-XkrGwcejltE4xlOKitPInTbsDNaOqkYsL2HK8uinh-dQTxngCfvoWxjiJcm2bXX8aK1C6MVTszr3i2l-F9WgFBWiuAzTGwtD8M/s4000/20231019_230225.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0g3YQjyxzVsOWv_3VAAxL0IkCR0csnBvHKHc9NnyjOq1BMzZCeVm3QcJkt8WrYttytb9oQl97lsvinlzcfFrAAWef-XkrGwcejltE4xlOKitPInTbsDNaOqkYsL2HK8uinh-dQTxngCfvoWxjiJcm2bXX8aK1C6MVTszr3i2l-F9WgFBWiuAzTGwtD8M/w110-h147/20231019_230225.jpg" width="110" /></a></div><br />In a home there is ALWAYS something to do and fix.<p></p><p>This time is an old bathtub/shower valve that start to be difficult to operate.</p><p>Is an old Moen Chateau fixture, with very very very probably a totally worn out cartridge.</p><p>This article should be titled "plan for the worse, hope for the best" :)</p><span><a name='more'></a></span><p>In these cases is a good idea to start to investigate the problem and possible solutions.</p><h2 style="text-align: left;">Problem</h2><p>To open the water the handle need to be pulled and to close it it need to be pushed.<br />Pulling the handle is become more and more difficult, very hard to do so and is almost impossible to control the flow.</p><p>i.e. is almost an on/off operation rather than a smooth flow regulation.</p><p>To set the water temperature the handle need to be rotate, clockwise for the hot water and counterclockwise for the cold water.</p><p>Also in this case the operation is more difficult than usual, the handle oppose some resistance and actually engage the change temperature after a while.</p><h2 style="text-align: left;">Identify the fixture</h2>The first thing to do is to try to identify as much precise as possible the brand and model of the broken piece.<br />In my case I was able to identify at 90% accuracy the brand, a Moen and the model, Chateau.<br />Is a model used in the 80s/90s.<br />Since the house was built in the 80s it could be accurate. <br /><br /><h2 style="text-align: left;">Diagnose</h2><p>Looking around the problem is related to an old/worn out cartridge in the valve itself.</p><p>The Moen Chateau valve used a cartridge type 1220.<br />So to fix the shower I need to buy such cartridge or an equivalent (1225)</p><h2 style="text-align: left;">Repair - the plan</h2><p>There are lot of video that shows how to remove an old cartridge and the operation is really simple ... unless something goes wrong.</p><p>The main problem here is the fact that doesn't exists a local shut-off valve.<br />It is necessary to remove the water to all the house.<br />If something goes wrong, NO WATER will be available in all the house until the shower valve is fixed !</p><p>One thing that can go wrong is the cartridge breaking apart while pulling it off.<br />There is a tool, a "puller" that need to be used and sometime, due to corrosion/age, the puller instead to remove the entire cartridge, removes only the internal part, leaving the external body of the cartridge inside the valve.<br />There are tricks that can be done to remedy that, but is always good to plan for the worse and be ready to call a plumber, in case the entire valve need to be changed because damaged by the cartridge.</p><p>I don't know how old is the cartridge, but surely I know are more than 16 years it is in there.<br />The average lifespan of a cartridge is about 7 years !!<br />So twice the normal working time means possible parts glued together or worse. </p><p>These my preparation steps :</p><p></p><ul style="text-align: left;"><li>collect links to different scenario for the cartridge change, including the worse ones</li><li>buying two cartridges (I have two identical showers valve, thus same age)<br />Did buy two 1225<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmUAQe99FIW-bGxsA_LC17AkGW1mGnnHA8H53zpexmoUTZbe50o4N2IuJHOT-olfIMAsMtnnn2avfi0BxM_K4bhPMBM4wnLbJBS44EQanQAmTzY6jjjd1x-FysChVferLg4qia0ccnmveqqCPH_Yx-2lN9ALkEcJjoGyn1ufjkSscKLh5N-AEMy1B_mkw/s402/Screenshot%20from%202023-11-24%2022-54-33.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="392" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmUAQe99FIW-bGxsA_LC17AkGW1mGnnHA8H53zpexmoUTZbe50o4N2IuJHOT-olfIMAsMtnnn2avfi0BxM_K4bhPMBM4wnLbJBS44EQanQAmTzY6jjjd1x-FysChVferLg4qia0ccnmveqqCPH_Yx-2lN9ALkEcJjoGyn1ufjkSscKLh5N-AEMy1B_mkw/s320/Screenshot%20from%202023-11-24%2022-54-33.png" width="312" /></a></div><br /></li><li>buy the classic puller tool</li><li>buy a more sophisticated puller capable to extract the cartridge in case of break out</li><li>buy silicon grease (for the new cartridge)</li><li>plan the work on a weekday morning in order to be able to call for help</li><li>identify one or more plumber to call in case of need</li></ul><div>Then the repair day :</div><div><ul style="text-align: left;"><li>review some videos just before to start</li><li>prepare all the tools</li><li>shut off the water</li><li>substitute the cartridge</li><li>.... hope everything goes well ....</li><li>pull back everything</li><li>turn on the main water valve</li></ul><div>If something goes wrong :</div><div><ul style="text-align: left;"><li>try to fix the problem</li><li>if damage is done or a big damage is possible, call a plumber and be ready for a big bill</li></ul></div><div>If no leakages and the new cartridge works fine, call the day :)</div></div><div><br /></div><h2 style="text-align: left;">Repair - execution</h2><div><br /></div><div>Finally the big day arrived.<br />Everything planned and ... everything smooth and as planned, no problems !</div><div><br /></div><div>After closing the main water valve, I removed the faucet handler and the metal cover.<br />Then removed the cartridge block pin and using the Ona puller tool, I removed the old cartridge.</div><div>No problem at all, even if it was a very old cartridge it didn't remained stuck as I feared.<br />A very neat and clean removal </div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaL9HL4dHLTicZcvFVakzzXy5jIEVhJ0PIYPPIvvK_3q_P_uIgZEofrW7wXnS1DPbl9xwGs3T347HHpBtQi79HeFK4sIYYy0C-4hqubWHECSyhKR5JtKBdSmxYgak-LCqCxJOpYPzXJDWxxhbRSQpQLLYurKvVdM5gY-BoZ2EU2uIawRTSiRElwhz-8ko/s4000/20231124_112437.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaL9HL4dHLTicZcvFVakzzXy5jIEVhJ0PIYPPIvvK_3q_P_uIgZEofrW7wXnS1DPbl9xwGs3T347HHpBtQi79HeFK4sIYYy0C-4hqubWHECSyhKR5JtKBdSmxYgak-LCqCxJOpYPzXJDWxxhbRSQpQLLYurKvVdM5gY-BoZ2EU2uIawRTSiRElwhz-8ko/s320/20231124_112437.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The old cartridge removed<div class="separator" style="clear: both; text-align: center;"><br /></div></td></tr></tbody></table><div><br /></div><div>Following the instructions I did prepare the new cartridge, abundantly greasing it and installed, no problem whatsoever.</div><div>The valve was in good conditions</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgPFfx4I2QlvbnFaH56K6Cuya2SStJ2Z37kvgmZcWXWocq-Fr2K2GlNQTwQcpT7-isr-bIBWMsIsMyfziBZ7AAb6w8CyX_xgrmGUvr6Zz2atfioDuVb2VLgq9KhNi0UfZ3_vxPqUv5iXfgEIGsKS404O7plsHLlfh-mJG7-2kCQ6j8nBGEa7ZdJ4ivIpk/s4000/20231124_112457.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgPFfx4I2QlvbnFaH56K6Cuya2SStJ2Z37kvgmZcWXWocq-Fr2K2GlNQTwQcpT7-isr-bIBWMsIsMyfziBZ7AAb6w8CyX_xgrmGUvr6Zz2atfioDuVb2VLgq9KhNi0UfZ3_vxPqUv5iXfgEIGsKS404O7plsHLlfh-mJG7-2kCQ6j8nBGEa7ZdJ4ivIpk/s320/20231124_112457.jpg" width="240" /></a></div></div><div><br /></div><div>As only problem I discovered that the faucet handler, already a replacement of the original one, was broken, had few cracks, probably due to the need to pull and push it hard</div><div>So after the repair I went to buy a new one.</div><div><br /></div><div>Now opening/regulating the water temperature/closing is incredibly smooth and effortless.<br />Actually I don't even recall to have EVER experienced such smoothness before.</div><div><br /></div><h2 style="text-align: left;">Small problem</h2><div><br /></div><div>After changing the cartridge to the second shower, again everything went well.<br />No cartridge stuck in the valve and new one slip in without problems.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0BndE3lp6kSoOpG8Br-9jZBLE0ipQCOxBE8muu_Tt1y0XdaEIlhJZftycWALx2QbJZ4MfRRwH8dzlGT8VQfo8X_mdI2kk_0DDrjtyJoo2Ottpp38exavo71wwoCuq9w6sgyUU-Lm8LrHTYAhLUbozZoSZnIb1-OtFSYyC-bqFFrJIh4x1wIkpxndob4/s4000/20231207_101855.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV0BndE3lp6kSoOpG8Br-9jZBLE0ipQCOxBE8muu_Tt1y0XdaEIlhJZftycWALx2QbJZ4MfRRwH8dzlGT8VQfo8X_mdI2kk_0DDrjtyJoo2Ottpp38exavo71wwoCuq9w6sgyUU-Lm8LrHTYAhLUbozZoSZnIb1-OtFSYyC-bqFFrJIh4x1wIkpxndob4/s320/20231207_101855.jpg" width="240" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl5MTzqi20imIcMU_pHnlUcJh0Ckcg8cPyt4PZ5Q8O8onqHBojvK4CE9EwjIMU6VEBXZN7rvEbL4HT45H3gqJWF7zOAg00cODSY9t2_ahuwRL6KZjw33M0vsD8iVvIGXo6vLXLT5CBmjK8GPuHC_Gli6JU0ER8rOk441rc8gz2QZ66NX0j7QC5GPjluOo/s4000/20231207_102015.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl5MTzqi20imIcMU_pHnlUcJh0Ckcg8cPyt4PZ5Q8O8onqHBojvK4CE9EwjIMU6VEBXZN7rvEbL4HT45H3gqJWF7zOAg00cODSY9t2_ahuwRL6KZjw33M0vsD8iVvIGXo6vLXLT5CBmjK8GPuHC_Gli6JU0ER8rOk441rc8gz2QZ66NX0j7QC5GPjluOo/s320/20231207_102015.jpg" width="240" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-uNgkDUWKv_2KiXpQD1A5aPmf15wgANFvxg-5Nd4kP366Rfa_dS3ovGCX35qcv_Fa0zQsXyn4PBFyRLd19_sRNMf6Pb2LoqRiVUoRcGRcG09JA0YrJLuG624p1VASQZOfkd5DcXzaJZb06tMkqWhm3NdkuHuU5npMLgQdbmpAtu5mC8y9IrTfIJ4NJT4/s4000/20231207_102107.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-uNgkDUWKv_2KiXpQD1A5aPmf15wgANFvxg-5Nd4kP366Rfa_dS3ovGCX35qcv_Fa0zQsXyn4PBFyRLd19_sRNMf6Pb2LoqRiVUoRcGRcG09JA0YrJLuG624p1VASQZOfkd5DcXzaJZb06tMkqWhm3NdkuHuU5npMLgQdbmpAtu5mC8y9IrTfIJ4NJT4/s320/20231207_102107.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDnI7WXio5N5Uffma1mS-oPVJX2aKGtDF6gnx6kLgscc-ma9bQGys86HPpfo3xbTnhhsWMO85-UMM88sigHEfjQyohTyokFdWU55VLifFect63uY0OQO0jSlTcge2fG1MH03H1Lkw63axepyzAxuq3xtfH74CqDirer2zst9YJQvQFNszlA3P9oGpoeM/s4000/20231207_102151.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDnI7WXio5N5Uffma1mS-oPVJX2aKGtDF6gnx6kLgscc-ma9bQGys86HPpfo3xbTnhhsWMO85-UMM88sigHEfjQyohTyokFdWU55VLifFect63uY0OQO0jSlTcge2fG1MH03H1Lkw63axepyzAxuq3xtfH74CqDirer2zst9YJQvQFNszlA3P9oGpoeM/s320/20231207_102151.jpg" width="320" /></a></div><br /><div><br /></div><div>However a small side effect happened.</div><div><br /></div><div>When opening the valve (pulling the handle) automatically the handle is shutting off automatically, stopping around the middle of the course.</div><div>For now no action will be taken, is possible the new cartridge needs some time to adjust itself.<br /><br />I'll check back in a month to see if the problem solved itself.</div><div><br /></div><div><br /></div><div><br /></div><p></p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li>Youtube - <a href="https://www.youtube.com/watch?v=KUa6H6v5CME" target="_blank">Old Moen Shower Faucet Hard to Turn On and Off</a></li><li>Youtube - <a href="https://www.youtube.com/watch?v=_ZbOAjBXpDE" target="_blank">THE PROPER WAY TO REPLACE A MOEN 1225 CARTRIDGE</a></li><li>Youtube - <a href="https://www.youtube.com/watch?v=T4NIAiSkl3w" target="_blank">WATCH THIS!!! if you have a stuck Moen Cartridge</a></li><li>Youtube - <a href="https://www.youtube.com/watch?v=EWe9nwF3cb0" target="_blank">ONA Puller: The Premier Moen Cartridge Extractor!</a></li><li>Moen - <a href="https://solutions.moen.com/FAQ's/FAQ's-Troubleshooting/General/Handle_will_not_stay_in_the_on_position_(one-handle_faucets)#:~:text=Solution-,Typical%20Cause,the%20connector%20could%20be%20broken." target="_blank">Handle will not stay in the on position (one-handle faucets)</a></li><li>Youtube - <a href="https://www.youtube.com/watch?v=qcp1HMk-KWQ" target="_blank">Moen Handle Slides Down Itself SOLVED</a></li></ul>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-73299548788959524002023-09-16T09:50:00.002-05:002023-09-18T10:02:15.845-05:00Cooling the server area 2.0<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_tkL5U5ByEsIaANMZZRv8CMVhnAma0xpowxP26tu_37CjuOw9YkQkpq_Oa8aJ36CYrdyZgwE9bpEKFxwNjvgKWx7BYXj1w8EFUT78qbtLTgjsAzMSW5w_YAwjIJuESvj-vFf-WYyCky4ExruFJ90n-KsmuPO4B2gbdXZwo07uJIHtqF4jtvhDAwZMHQ/s640/wind-4054954_640.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="640" data-original-width="452" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgb_tkL5U5ByEsIaANMZZRv8CMVhnAma0xpowxP26tu_37CjuOw9YkQkpq_Oa8aJ36CYrdyZgwE9bpEKFxwNjvgKWx7BYXj1w8EFUT78qbtLTgjsAzMSW5w_YAwjIJuESvj-vFf-WYyCky4ExruFJ90n-KsmuPO4B2gbdXZwo07uJIHtqF4jtvhDAwZMHQ/w99-h140/wind-4054954_640.jpg" width="99" /></a></div><br />Years ago .. almost 10 !!! I did set up a <a href="https://hanixdiy.blogspot.com/2015/08/cooling-server-area.html" target="_blank">cooling system for the server area</a>, basically a under stairs area in garage. <br /><br /><p></p><p>Is time to try to improve the system.</p><p><br /></p><p><br /></p><span><a name='more'></a></span><h2 style="text-align: left;">The 1.0 version</h2><p>When I did set up the original cooling system honestly I didn't do ANY calculation or planning, I simply took something I had around, put it together and tested.</p><p>I have to say that "something" the system was doing, however I can't say to see big differences when the system it was ON.<br />There were differences but only of few degrees. <br />I'm sure is better than nothing but is not what I would like to have.</p><p>The current cooling system is based on two fans, both connected to an X10 relay module :</p><p></p><ul style="text-align: left;"><li><i>Intake fan<br /></i>It is a fan installed over an insulated box connected with a pipe to an hole to bring in fresh air from the house (the room connected to the server area is the laundry)<br />The fan is bringing air IN the server area (on X10 is called <b>Server Fan In</b>)</li><li><i>Outtake fan<br /></i>It is a fan installed on the server room door that push out air in the garage.<br />The fan is bringing air OUT the server area (on X10 is called <b>Server Fan Out</b>)</li></ul><p></p><p>There are also a bunch of sensors :</p><p></p><ul style="text-align: left;"><li>18S20 inside the server area</li><li>18S20 in the garage (close to the server area)</li><li>18S20 in the laundry room</li><li>Temperature/humidity Ambient Weather sensor in the server area</li><li>Temperature/humidity Ambient Weather sensor in the garage area</li><li>Temperature/humidity Ambient Weather sensor in a room (office)</li><li>Temperature/humidity Ambient Weather sensor outside</li></ul><p></p><p>The first 3 sensors are connected to a USB converter connected to the server.<br />They were used with the old server via <a href="https://www.digitemp.com/" target="_blank">Digitemp</a></p><h2 style="text-align: left;">The 2.0 version</h2><p>This time would it better to do some measurement/calculations and try to improve the cooling.</p><p>Here some working areas/ideas :</p><p></p><ul style="text-align: left;"><li>Better fan system</li><li>Peltier cooler (future plan)</li></ul><p></p><h3 style="text-align: left;">Intake fan</h3><p>Originally I used as intake fan a normal 5 inch computer cooling fan, not much aspiration of fresh air from the laundry.</p><p>Then I did buy a <a href="https://www.amazon.com/dp/B07VYGQPCZ?ref=ppx_yo2ov_dt_b_product_details&th=1" target="_blank">similar cooling fan</a> but certified to have at least 90 CFM.<br />I did some measurements with an anemometer for HVAC and it resulted capable to have an effective CFM measured at the duct opening in the laundry of ~30 CFM.<br />Maximum power : 4.4 Watt</p><p>I decided then to buy something more bigger and designed for bathrooms, an inline fan with about 190 CFM declared.<br />Temporarily installed still using the original cooling box in polietilene I did measure at the duct opening in the laundry about 90 CFM !<br />Maximum power : 74 Watt</p><p>So far tests with the new fan did show a nice improvement of the temperature/humidity in the server area, much better than before.</p><p><br /></p><h3 style="text-align: left;">Controlling the fans</h3><p>The fan originally were controlled by the server itself, <a href="https://hanixdiy.blogspot.com/2023/06/server-chronical-digitemp-reading-from.html" target="_blank">reading the Dallas 1Wire temperature sensors</a>.<br />The old server had installed Heyu, thus it was able to directly control the fans via X10 relais modules.</p><p>Currently the X10 (handled by Heyu) is done on a <a href="https://hanixdiy.blogspot.com/2022/07/ha-temporary-server.html" target="_blank">separate HA server</a>, thus the main server can't directly control the fans via X10.</p><p>Two choices can be followed :</p><p></p><ol style="text-align: left;"><li>reinstall the HA server in the main server</li><li>find a way to send commands to the HA server</li></ol><h4 style="text-align: left;">Reinstall HA server</h4><div>It would make sense to reinstall everything on the new server as it was before.<br /><br />Pro : </div><div><ul style="text-align: left;"><li>remove a server (ok is a Raspberry Pi :) )</li><li>reuse almost as is the scripts done for the old server</li></ul><div>Cons:</div></div><p></p><p></p><ul style="text-align: left;"><li>reinstall lot of stuff on the server</li><li>reconfigure everything</li></ul><h4 style="text-align: left;">Alternative control</h4><div>Alternatively could be interesting to see if there is a way to remotely control X10 loads via sending messages.</div><div>One possibility is to use the API made available on the HA-Bridge app (installed on the HA server) used to allow Alexa to control some X10 lights.</div><div>HA-Bridge in-fact has a limited RESTful API that should be perfect for the activation/deactivation of the fans.</div><div><br /></div><p></p><p><br /></p><p>Let's collect some data :</p><p></p><ul style="text-align: left;"><li>cubic feet of the server room</li><li>power used in the server room</li></ul><div>Other things to explore :</div><ul style="text-align: left;"><li>how improve monitoring</li><li>develop algorithm to control fans</li><li>use better fans</li><li>use a peltier unit</li></ul><p></p><p><br /></p><p><br /></p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li><a href="https://red-dot-geek.com/computer-fans-beginner/" target="_blank">Computer fan measurements</a></li><li><a href="https://www.netcomtech.co.uk/airconcalculation/#:~:text=Add%20together%20all%20the%20wattages,Routers%20and%20multiply%20by%203.5.&text=Take%20the%20total%20wattage%20of%20the%20lighting%20and%20multiply%20by%204.25.&text=Add%20all%20the%20BTUs%20together.&text=This%20is%20the%20amount%20of,handle%20that%20amount%20of%20heat." target="_blank">Server Room air cooling requirements</a></li><li><a href="https://www.google.com/search?q=how+measure+CFM+of+a+fan&oq=how+measure+CFM+of+a+fan&aqs=chrome..69i57.3850j0j1&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:ae826fca,vid:kFhiSwwtewM" target="_blank">Measure CFM of a fan (pragmatic)</a></li><li><a href="https://www.digitemp.com/" target="_blank">Digitemp</a></li></ul><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-62436438207547903442023-09-04T09:34:00.004-05:002023-09-08T11:05:12.848-05:00Repairs - Mazda 5 Aux input<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE473nVc2KFYOo7BGQvMPivNtOok5DYcAevZ0wChWCzKlzBfhJLEfmD1El4rUlKOXC18VvkAkwcmNefZJUDz08dQ5SXCBrusaJ9U6uwhm1U7exEvep-ZLgf9KBu_s7Vjcq-4vXu6Vfy52ljeLhWmMcPDpfg3Uo0le722r5pjvPz0dhz2EQ1o8TsoYxIk8/s1280/Mazda_Mazda5_2012.webp" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="960" data-original-width="1280" height="108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE473nVc2KFYOo7BGQvMPivNtOok5DYcAevZ0wChWCzKlzBfhJLEfmD1El4rUlKOXC18VvkAkwcmNefZJUDz08dQ5SXCBrusaJ9U6uwhm1U7exEvep-ZLgf9KBu_s7Vjcq-4vXu6Vfy52ljeLhWmMcPDpfg3Uo0le722r5pjvPz0dhz2EQ1o8TsoYxIk8/w144-h108/Mazda_Mazda5_2012.webp" width="144" /></a></div><br /><br /><p></p><p>This time I spent some resources to fix the AUX input on my Mazda 5 2012.</p><p><br /></p><p><br /></p><span><a name='more'></a></span><h2 style="text-align: left;">The problem</h2><p>The Mazda 5 2012 by default has an entertainment system (radio/CD) plus the possibility to connect external sources via an AUXiliary audio port, via a 3.5 mm stereo jack.</p><p>To use it is enough to plug in a 3.5 mm jack to the AUX port, push the AUX button on the console and whatever is connected is redirected to the car audio system.</p><p>Suddenly that stopped to work, i.e. pushing the AUX button on the console didn't redirected the AUX input to the internal speakers.<br />Even worse, the AUX selection was actively disabled.</p><h2 style="text-align: left;">Some research</h2><p>So of course I did do some research and discovered that :</p><p></p><ul style="text-align: left;"><li>is a common problem to the Mazda audio system</li><li>is solved by changing the AUX outlet (~60$)</li><li> I was lucky my system did work perfectly for almost 10 years !</li></ul><div>But what is exactly the problem ?</div><div><br /></div><div>Well, the AUX outlet (internal marking <b><span style="font-family: courier;">401lag-008-01e</span></b> ) uses a 3.5 mm female socket with on switch, used to inform the audio dashboard that a 3.5 mm jack is inserted in the plug.</div><div><br /></div><div><br /></div><div>If no cables are inserted, the AUX selection is disabled.</div><div>Now, the problem is that with time and use, the 3.5 mm jack internal switch broke down, thus stopping to inform the console that a cable is plugged in.</div><div><br /></div><div>So the problem is real trivial.</div><div><br /></div><h2 style="text-align: left;">Analysis</h2><div><br />Following some examples found on the net I identified some solutions :</div><div><ol style="text-align: left;"><li>well, the easiest would be to buy a new AUX outlet.<br />Found prices from 40$ to 60$ for the outlet itself.<br />Assuming to ask somebody to change it, the total cost could be easily reach 200$ !!!<br />So .. NO !</li><li>Remove the broken outlet, open it and :</li><ol><li>change the 3.5 mm broken jack with a new one.<br />Feasible and relatively cheap, however the component is not an easy to find model, one can spend hours on Mouser or Digkey looking for something similar, order one and then desolder and resolder the new one.</li><li>hack somehow the enabling signal</li></ol></ol><div>Note that the "function" to disable the AUX selection if no cables are connected is quite useless.</div><h2 style="text-align: left;">401lag-008-01e </h2><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhs73v0ypiXhEfSSZziZoVmUU9S7uUzyEHDNkdxWLZPouBY77OzFSaiKkr_U2eDwni67UbM5MHjWhUdbVVGeSdarIH3rQKxsFvMXz_dasu-Bw_wftMNWqXBltNVUZOMIir_at-THS42w2NKOWFbkiREBjLlo60HOiRyH7CMT2sPLPzA0R3tkvimD9n83Q/s1721/401lag-008-01e.jpeg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="963" data-original-width="1721" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhs73v0ypiXhEfSSZziZoVmUU9S7uUzyEHDNkdxWLZPouBY77OzFSaiKkr_U2eDwni67UbM5MHjWhUdbVVGeSdarIH3rQKxsFvMXz_dasu-Bw_wftMNWqXBltNVUZOMIir_at-THS42w2NKOWFbkiREBjLlo60HOiRyH7CMT2sPLPzA0R3tkvimD9n83Q/s320/401lag-008-01e.jpeg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><b style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: start;"><span style="font-family: courier;">401lag-008-01e</span></b></td></tr></tbody></table></div><div><br /></div><div>After opening the AUX outlet box I found the ID code of it : 401lag-008-01e <br />Looking on the net for this code I did find some info, among them the pinout toward the radio.<br />Basically the 401lag-008-01e module transpose the 3.5 mm audio stereo signal (3 wires) in a 5 wires cable connected on a 6 position connector.</div><div><br /></div><div>Pinout : </div><div><ol style="text-align: left;"><li>Not connected</li><li>Enabling signal</li><li>Left channel</li><li>Ground</li><li>Right channel</li><li>Enabling signal</li></ol><div>Looking for tests other people did, I identified two possible "hack" to restore the AUX selection.</div></div><div>One is to ground the pin 6, the other one is is to short the pin 2 with the pin 6.</div><div><br /></div><div>I did try both of them but in the case of the Mazda 5 2012, the correct one is to short the pin 2 with the pin 6.<br />So I did solder a small wire between the pins on the module and ... voila' !<br />Now the audio console always "sees" a 3.5 mm jack cable connected.</div><div><br /></div><div>Cost : 0$</div><div><br /></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li><a href="https://www.ebay.com/itm/201605458585?chn=ps&norover=1&mkevt=1&mkrid=711-117182-37290-0&mkcid=2&mkscid=101&itemid=201605458585&targetid=1645685074288&device=c&mktype=pla&googleloc=9025857&poi=&campaignid=20394411824&mkgroupid=156841631692&rlsatarget=aud-1412318123216:pla-1645685074288&abcId=9317282&merchantid=101509763" target="_blank">eBay compatible AUX outlet</a><br />Note that the USB part will NOT work at all with the 2012 model. Only from 2013 model USB is supported. But the audio AUX will work</li><li><a href="https://www.youtube.com/watch?v=nend_xdxb0U" target="_blank">Video </a>to show how disassemble the dashboard</li></ul></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-63982686383472091402023-07-29T17:30:00.002-05:002023-10-19T23:56:08.538-05:00Repairs - attic fans<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmFj1Qq8Calh7RTv4doMRrfYOvqUji19kEWlF4pf8drtjyGb9AJBiiPV7KBcnbmvd15LiEfXk7UUODEVVJOPXT7ce-lmTN-2hyDw6aI03dbCH1-59MZ9IWaooK59Iv8D5B_EHYheoaBwghXTMSwUJJcGzopYUhCQ6tpMnfKj7UHXUJJSQUQyJ_8kELkSI/s1600/attic-fan-mounted-on-shingle-roof.webp" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmFj1Qq8Calh7RTv4doMRrfYOvqUji19kEWlF4pf8drtjyGb9AJBiiPV7KBcnbmvd15LiEfXk7UUODEVVJOPXT7ce-lmTN-2hyDw6aI03dbCH1-59MZ9IWaooK59Iv8D5B_EHYheoaBwghXTMSwUJJcGzopYUhCQ6tpMnfKj7UHXUJJSQUQyJ_8kELkSI/w102-h102/attic-fan-mounted-on-shingle-roof.webp" width="102" /></a></div>Arkansas is very hot place in summer, so basically every roof has one or more fans to help to reduce the accumulation of heat and humidity.<p></p><p>It is very important structure for the health of the house.</p><p><br /></p><span><a name='more'></a></span><p>Few important points to have these fans on the roof :</p><p></p><ul style="text-align: left;"><li>Keep Attic Moisture Free<br />Excess moisture is never a good thing when it comes to an home.<br />Mold, bad odors, bacteria that can destroy wood and other material, insects .. you name it</li><li>Extend the Life of the Roof<br />The roof is the most vital feature of any house.</li><li>Lower Room Temperatures<br />Removing excess heat from the roof allows the HVAC to run better and thus keeping the room temperature comfortable without spending too much, thus</li><li>Reduce Your Power Costs</li></ul><div>But like all machinery, sometime these fans just broke down.</div><div>Like the ones described in this article.</div><div><br /></div><div>Let see what is going on.</div><div><br /></div><h2 style="text-align: left;">The fans</h2><div><br /></div><div>The specific fans described in this article were installed back in 2014, when I had the roof re-done after a heavy hail storm.<br />So the fans had quite a nice run, about 9 years !<br />Considering the harsh environment is not bad.</div><div><br /></div><div>This kind of fan is divided basically in two unit, a thermostat that controls when to turn on and off the fan and the fan itself (a 1.5 HP electric motor connected to the blades of the fan).</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXDQrTo1ylro0Tl-pXNdoHoFcQHABShWEnQge3723nQRtAvH46LARmtZjap3K0ljV0kVC-33EnBwhlfa7SVuMqpupR1R5x76uOVdZzinxBWxJnWg27lnR0XI4vgEl_RtVnijP49qdgOGwPjCImX6qyjBmyI4SpHCHwARpRn5a5jMHk3hwAS24bLNwKuQo/s4000/20230622_110637.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXDQrTo1ylro0Tl-pXNdoHoFcQHABShWEnQge3723nQRtAvH46LARmtZjap3K0ljV0kVC-33EnBwhlfa7SVuMqpupR1R5x76uOVdZzinxBWxJnWg27lnR0XI4vgEl_RtVnijP49qdgOGwPjCImX6qyjBmyI4SpHCHwARpRn5a5jMHk3hwAS24bLNwKuQo/s320/20230622_110637.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHmSmf2TdgXv5eS3-n6SjbkordGczjvPw6DzMkYaseeFjfJcVwHq1pOm7KPuFLEora7YDD6mfVvzCyndRQipn_ve6orjUJU1ylXfWzdpQXRa1uzYCZcCjM5jm0LnrLty4JNjdF7mCZzBQ-Zm3C-LGBYxgIgaTFrPKKSt_1A9vrQ0ca1zy2P1wW-BBhEs/s4000/20230622_110644.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMHmSmf2TdgXv5eS3-n6SjbkordGczjvPw6DzMkYaseeFjfJcVwHq1pOm7KPuFLEora7YDD6mfVvzCyndRQipn_ve6orjUJU1ylXfWzdpQXRa1uzYCZcCjM5jm0LnrLty4JNjdF7mCZzBQ-Zm3C-LGBYxgIgaTFrPKKSt_1A9vrQ0ca1zy2P1wW-BBhEs/s320/20230622_110644.jpg" width="240" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXA_ysSfaq2cCmti9wEov3XFK7N4wCN6mbIWyHs1Si-23Suw9EOBGg6qOCNSyN4lqUL_9tnmV8cfx_spjebVgS68TMTkfBWGcYxZRPQxsisc8MqE1R3oMHyXKRsU6FfGOB1QD0ipRTqn9rcQhoJlp2Gy0OxdtvVgtwXJH1nwMib15WGDnGVgzY_prmnRI/s4000/20230622_110658.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXA_ysSfaq2cCmti9wEov3XFK7N4wCN6mbIWyHs1Si-23Suw9EOBGg6qOCNSyN4lqUL_9tnmV8cfx_spjebVgS68TMTkfBWGcYxZRPQxsisc8MqE1R3oMHyXKRsU6FfGOB1QD0ipRTqn9rcQhoJlp2Gy0OxdtvVgtwXJH1nwMib15WGDnGVgzY_prmnRI/s320/20230622_110658.jpg" width="240" /></a></div><br /><div>This kind of fan is made by company <a href="https://www.airvent.com/" target="_blank">Air vent Inc</a>.</div><div><br /></div><h2 style="text-align: left;">The repair</h2><div><br /></div><div>The repair is conceptually easy, just change the motor.</div><div>The problem is purely logistic.</div><div><br /></div><div>First of all finding the motor alone is quite expensive, so I opted to buy a new attic fan from the same company and harvest the motor and the thermostat from the new unit.<br />Amazingly I saved about 50$ and plus I had a lot of others spare parts.</div><div><br /></div><div>Then is the matter to remove the motor from the braces and this is not easy.</div><div><br /></div><div><span style="color: red;"><i><b>OF COURSE ... REMOVE THE POWER BEFORE TO DO ANYTHING !!!!</b></i></span></div><div><br />There are 3 screws that keep together the braces and is easy to access them, however the motor has a metal blade (like a "propeller") and that need to be removed in order to remove the motor.<br />The blade is connected to the shaft with a screw, not an easy position to reach, small space to operate.</div><div><br /></div><div>Then the opposite operation is needed.</div><div>i.e. slide the new motor in the braces, reattach the blade and then screw the braces back together.</div><div><br /></div><div>It would be really easier to do that accessing from the roof, removing the attic fan unit cover, remove the blade, go down and remove the motor from the braces, etc.</div><div>But it imply to go on the roof and take apart basically all the unit, lot of extra work not mentioning the danger to go on a roof in July with 45 C !!<br /><br />After changing the motor to both the fans, one of the two fans broke again.<br />A brace that hold the motor on place, broke down, probably due the vibrations, old age of the brace and the small bending when the motor was substituted.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/FIUgvYzJf9s" width="320" youtube-src-id="FIUgvYzJf9s"></iframe></div><br /><div>Fortunately having bough an entire unit rather than only the motor, I was able to cannibalize also one of the 3 braces of the new one.<br />Voila' ! Now the fan is happily back running removing humidity and heat from my roof. </div><div><br /></div><h3 style="text-align: left;">Note</h3><div><br /></div><div>Although I think to be able to do this repair, I did prefer to hire an electrician to do it, for many reasons, like avoiding to go on the roof (vertigo) and having someone with more practical experience on this kind of works.<br />I did hire <a href="https://www.crowelectricalservicesinc.com/" target="_blank">Crow Electrical Services </a> and I have to say this guy rock ! :)<br />He changed both fans in less than an hour and repaired the broken one in a jiffy.<br />Yeah, is maybe little bit of advertisement, but this guy deserve it :)</div><div><br /></div><div><br /></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-76486372496588429422023-07-16T20:54:00.004-05:002023-09-06T13:57:43.222-05:00Repairs - HP OfficeJet 4630 (UPDATE)<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhD0wuPheocMtVGCnSN103Fd6TQCXT8MTAHuN2ARqXWLK7LYChBF8ENCvv3bkFVwovvwzWS6wYFC_hc_2ZDdze6B8kDh_fcXY6XTiIaNV1THdhXUzwJbd_fE8zNn4QP9dYVYW6Qgf4c5cWRo5GT8fppgNp5t-vr90B_wuiCS6e_e7Jy-A1I-mmMYG6fkk/s755/hp4630.webp" style="clear: left; display: inline; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="566" data-original-width="755" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhD0wuPheocMtVGCnSN103Fd6TQCXT8MTAHuN2ARqXWLK7LYChBF8ENCvv3bkFVwovvwzWS6wYFC_hc_2ZDdze6B8kDh_fcXY6XTiIaNV1THdhXUzwJbd_fE8zNn4QP9dYVYW6Qgf4c5cWRo5GT8fppgNp5t-vr90B_wuiCS6e_e7Jy-A1I-mmMYG6fkk/w200-h150/hp4630.webp" width="200" /></a> </p>Back in the 2014 I did buy the HP Office-jet 4630.<br /><p></p><p><br /></p><p>Nice machine and it worked flawlessly until few days ago.</p><p>Here how I fixed it.</p><span><a name='more'></a></span><p>To be honest the printer started quite some time ago (maybe a couple of years ?) to generate a muzzled sound when the display was on.</p><p>But no other symptoms were present so I just ignored it.</p><p>Recently I had a blackout due to a repair that required to cut off power from the main breaker.<br />This kind of interruptions can generate quite nasty burst of EMF over the line and the printer actually was NOT connected to a surge suppressor.</p><p>So, to make a story short, when the power did come back, the printer didn't boot and started to report a list of errors (on the display).</p><p>The most common was the code 0XB80003E8, but powering off and back on could generate other errors.<br /></p><p>Initially I did try to follow the HP suggestions, however these instructions assumed the printer to start after the error visualization.<br />In my case the printer was stuck showing one of the errors, until after few attempts, it totally died, i.e. not even showing error codes on the display that remained blank.</p><p>So the diagnosis was quite obvious ... muzzled buzzing noise under load, totally died after an outtage = power supply dead.</p><p>So I did look for a replacement.<br />The power supply for the printer is a sealed box with the 110/240V input on one side and 3 pin connector on the other one, with +32V - GND - +12V</p><p>Btw, on the broken one I was able to measure the +32V but instead the +12V the power supply was just giving +5V.</p><p>So I found on eBay a new power supply and changed it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho7saerGJMaFL9I7oFnls5q2y7rrNKJL2g7cugCgDl4qls0mhBwyDf3AkpU8A47f8eSgB8OcyWnwz8rqtTNoaoKMKGDA13z7OflScDveN7zeuEVjALcPDcGz4cH9WsZEIDxRz_zzpYRQ0JnQIvZGwcfjBb7QozUooTAnsgMsLYwYH4VqxM276sX-4l6BY/s1000/s-l1600.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1000" data-original-width="1000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho7saerGJMaFL9I7oFnls5q2y7rrNKJL2g7cugCgDl4qls0mhBwyDf3AkpU8A47f8eSgB8OcyWnwz8rqtTNoaoKMKGDA13z7OflScDveN7zeuEVjALcPDcGz4cH9WsZEIDxRz_zzpYRQ0JnQIvZGwcfjBb7QozUooTAnsgMsLYwYH4VqxM276sX-4l6BY/s320/s-l1600.jpg" width="320" /></a></div><br /><p>Maybe one day if I have time I'll try to open the sealed broken power supply and try to see what went wrong, a post mortem.<br />If I'll some time to spare (I doubt it :) )<br /><br />Voila' ... printer fixed.</p><span><!--more--></span><p>UPDATE ! July 2023</p><p>The printer did went in fault again after another black out (removed power to repair an attic fan).<br />I had around another power supply but this time it didn't fix the problem.</p><p>I was able to restart it again after forcing the ink carriage to the right, I think some mechanical parts reached a critical worn out, so during the boot the firmware is unable to find some parts in the correct place.<br />To "fix" the printer the only way would be to replace all the worn out parts, it cost much less to buy a new one at this point.<span></span></p><!--more--><p></p><p>UPDATE ! September 2023</p><p>As predicted the printer remains in constant error, probably due to some mechanical misalignment and thus I replaced it.<br />Anyway not bad 9 years working !</p><p> </p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-37449542019521599942023-07-09T14:42:00.000-05:002023-07-13T14:42:51.231-05:00Huzzah32 - fHelper<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZKam9U3O6wItAmXMwOe-3q8W07rZWh1ytFlkkxVvfiM7dv_kCGunZzdpHGxo3FUwschoUfqFxMm_OB0l50qgIAFjxsPQGjsHp2yr9ZTXxjNAem1q8EK8_q8SdbnruAUCehmgqxcxnSww/s1600/Screen+Shot+2019-03-04+at+3.15.28+PM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="254" data-original-width="203" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZKam9U3O6wItAmXMwOe-3q8W07rZWh1ytFlkkxVvfiM7dv_kCGunZzdpHGxo3FUwschoUfqFxMm_OB0l50qgIAFjxsPQGjsHp2yr9ZTXxjNAem1q8EK8_q8SdbnruAUCehmgqxcxnSww/s200/Screen+Shot+2019-03-04+at+3.15.28+PM.png" width="159" /></a></div>
<br />
<br />
<br />
Time ago I did work on a fun project to control the soil of a plant in the office, the <a href="https://hanixdiy.blogspot.com/2017/03/office-gadget-fhelper.html" target="_blank">fHelper project</a>.<br />
<br />
<br />
<br />
However the project had some problems.<br />
<br />
<br />
<br />
<br />
<br />
<a name='more'></a>First of all the soil <a href="https://hanixdiy.blogspot.com/2017/05/grove-moisture-sensor-bad-design.html" target="_blank">sensor used was crappy</a> and thus I decided to abandon it totally.<br />
Second the platform used was overkill and basically unusable (and expensive).<br />
In order to decently use the Raspberry a <a href="https://hanixdiy.blogspot.com/2016/11/5v-solar-power-supply-for-raspberry-pi_16.html" target="_blank">very complex power management </a>was requested, because you have to avoid to have a Raspberry turn off unexpected and the needed current implied to have a mechanism to shut down the system if the battery was running down and then turn it on automatically when the battery was charged (via solar or other means).<br />
Also the Groove system was far to be perfect.<br />
Nice maybe to experiment, but over-expensive , slow and complicated for a real solution.<br />
<br />
I decided to redesign the fHelper this time around the Huzzah32, that has WiFi and BLE capabilities.<br />
This should simplify the power management, no need for complex algorithm for the shutdown and restart, very small footprint and less current needed.<br />
<br />
<h2>
Shopping list</h2>
<br />
So we have few basic modules to use :<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ym9-P6QxBcjIq9RC8w7rfmEufmKvE_6uV3EM2mi6wMOUm42CHbHfXiqAJo3hw13Lm7OxYem7qWS1lKfh5egUEl3OQMsbpIWvK2ENgkFPydWCX1X72EudQQO5gHYRPvG7mq-OCJOkwas/s1600/huzzah32.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="513" data-original-width="640" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ym9-P6QxBcjIq9RC8w7rfmEufmKvE_6uV3EM2mi6wMOUm42CHbHfXiqAJo3hw13Lm7OxYem7qWS1lKfh5egUEl3OQMsbpIWvK2ENgkFPydWCX1X72EudQQO5gHYRPvG7mq-OCJOkwas/s200/huzzah32.jpg" width="200" /></a></div>
<br />
<br />
<br />
The Huzzah32<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWVAIbKaWSx_VUrC4ONMhNipIM1imsN0s7MMfHY244dhrTL-8T0VgovmRvojs_89UpF0P4akD3-P1lyJl0iez-iQFnl4uJ9mBYh6YzKy1Ra60N3hamp7GY7iwSEhltEP1fYPIilGzxoAo/s1600/soilsnesor.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="500" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWVAIbKaWSx_VUrC4ONMhNipIM1imsN0s7MMfHY244dhrTL-8T0VgovmRvojs_89UpF0P4akD3-P1lyJl0iez-iQFnl4uJ9mBYh6YzKy1Ra60N3hamp7GY7iwSEhltEP1fYPIilGzxoAo/s200/soilsnesor.jpg" width="200" /></a></div>
<br />
<br />
<br />
<br />
A capacitive soil sensor<br />
This sensor doesn't use two electrodes with a running current but it measure the capacity between them, thus no corrosion on the electrodes and thus no electrophoresis, cause of the corrosion but also potentially cause of altering the soil composition.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0mcDZN2LVLDmPPaUC_jn_jDrNftJ8VCoYOzZClx3qK9INJI0wmzEWDWwtexNmNM3PkzZF4aFi1-w9KJub7nyGUqKzYKmJJgWyQkYSYC2MetHZCpzkpBjQECGIDljfxp79tkTUlBc0OTU/s1600/lipobattery.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="500" data-original-width="500" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0mcDZN2LVLDmPPaUC_jn_jDrNftJ8VCoYOzZClx3qK9INJI0wmzEWDWwtexNmNM3PkzZF4aFi1-w9KJub7nyGUqKzYKmJJgWyQkYSYC2MetHZCpzkpBjQECGIDljfxp79tkTUlBc0OTU/s200/lipobattery.jpg" width="200" /></a></div>
<br />
<br />
<br />
<br />
<br />
A battery<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h2>
The system</h2>
The idea is to have the Huzzah32 reading the soil sensor and then send a message (email/slack/something) when the system measure some levels.<br />
Or maybe host a webserver showing the real time status.<br />
<br />
An app will basically connect with the module in BLE for settings and WiFi for normal work.<br />
The BLE will allow to assign WiFi settings and email/slack/other services.<br />
<br />
In future maybe can be integrated for the solar panel and chargers.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio58QFQfToA1e5gzH65zlptp2s3m3lGsGAkzCK7vtrDfekrx6IJx966YFa_hgL-J8u6Ep7QYTKoQTt3mG90TkAtoDIcOPrOB5qwagWvPhHt8fs8QAWha58XJcP0P1MyQv5oOyY-HcPGnA/s1600/fhelper-huzzah-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="481" data-original-width="428" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEio58QFQfToA1e5gzH65zlptp2s3m3lGsGAkzCK7vtrDfekrx6IJx966YFa_hgL-J8u6Ep7QYTKoQTt3mG90TkAtoDIcOPrOB5qwagWvPhHt8fs8QAWha58XJcP0P1MyQv5oOyY-HcPGnA/s320/fhelper-huzzah-1.png" width="284" /></a></div>
This a very simple block schematic.<br />
For development/test a Oled display can be used, however the final version would not use any local display if not maybe few LED to indicate the status.<br />
This because the need to keep a small footprint of the code (the space on the Huzzah 32 is not much).<br />
<br />
<h3>
Interfacing the sensor</h3>
<br />
The first step is to be able to read the soil sensor.<br />
<br />
The soil sensor used is a capacitive one.<br />
It means that it translate the humidity level as capacity value.<br />
This allows to avoid corrosion on the PCB traces. The traces are actually protected by the PCB coloring.<br />
The sensor returns a value inversely proportional to the humidity level, i.e. more high the returned value, more dry is the soil.<br />
The maximum value should be around 3500 (totally dry) and the minimum value 0 would indicate the sensor immersed in water.<br />
<br />
The Huzzah32 has some limitations about the analog pins.<br />
There are two ADC and one (the first one) is active only after the WiFi is enabled.<br />
The second one doesn't have the limitations, so the sensor is connected to the ADC 2 Channel 2 (A2 - pin 34)<br />
<div>
<br /></div>
The ADC returns a value between 0 and 3500.<br />
Where 0 is indicating totally wet and 3500 totally dry.<br />
<br />
<h2>
Calibration</h2>
In order to avoid to assign fixed values and considering the unstable precise measurement, the best approach is to have a calibration procedure to set up the system.<br />
The code has to assume two values :<br />
<ul>
<li>Dry</li>
<li>Wet</li>
</ul>
Initially Dry is set around 3000. Everything over 3000 indicate the need to add water (too dry).<br />
The Wet value initially is set around 900. Everything below 900 indicate too much water.<br />
Any value between the two indicate that the plant has enough water.<br />
<br />
The calibration procedure allows to assign different values to Dry and Wet (and thus Normal that is the middle).<br />
<div>
<ul>
<li>put the sensor in the soil when it is dry</li>
<li>start the calibration</li>
<ul>
<li>20 measurements are done </li>
<li>the average is calculated and the value is assigned as Dry</li>
</ul>
<li>Calibration waits</li>
<li>Add water to the plant until overflow</li>
<li>Continue calibration</li>
<ul>
<li>20 measurements are done</li>
<li>the average is calculated and the value is assigned as Wet</li>
</ul>
<li>The Normal is considered any value between Dry and Wet</li>
</ul>
<div>
<br /></div>
<div>
<h2>
LED indicator</h2>
<br />
A LED indicator can be added to indicate locally the status of the system.<br />
A single RED LED can indicate the conditions :<br />
<br />
<ul>
<li>Off - normal - enough water on the plant</li>
<li>On - water the plant</li>
<li>Flashing - too much water</li>
</ul>
<br />
<h2>
Timing</h2>
The reading of the sensor should be done once every minute.<br />
Is useless to have more reading since the process measured is a slow one.<br />
Even one reading every 5 minutes should be OK.<br />
To do so a timer is implemented in order to trigger a reading every "n seconds".</div>
</div>
<h2>
Footprint</h2>
One of the challenge to use Huzzah is the limited space available for the code (using Arduino at least).<br />
Approx 130k are available for the code and using BLE, adds a lot of extra code.<br />
Also WiFi and the display can take quite some space depending what they have to do.<br />
<br />
BLE for it's nature should be used only to set up WiFi and thus using WiFi to send out the notifications/data but because the amount of memory required can be tricky to use.<br />
<br />
<h2>
First release</h2>
<br />
As first release the system is wired for the WiFi in the office and is monitoring the humidity using the default settings.<br />
The goal is to send a message on slack when the plant requires water.<br />
<br />
<h3>
System configuration - hardware</h3>
<br />
For this application we'll have the basic Huzzah32, with a battery as backup, power from a USB charger, the display and the sensor.<br />
<br />
<h3>
System configuration - software</h3>
<div>
As for the software side, the system will use the SSD1306 display library and the WiFi support library.</div>
<div>
The sensor is read via analog, by default already present.</div>
<div>
<br /></div>
<br />
<br />
<h2>
Referrals</h2>
<br />
<ul>
<li><a href="https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/using-arduino-ide">ESP286 Arduino WiFi</a></li>
<li><a href="https://medium.com/@urish/how-to-connect-your-t-shirt-to-slack-using-arduino-90761201d70f">Sending messages to slack from Arduino</a></li>
<li><a href="https://elyxor.slack.com/apps">Create slack bots</a></li>
<li><br /></li>
</ul>
<br />
<br />
<br />
<br />
<br />TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-65308294855612333962023-06-11T23:26:00.002-05:002023-06-13T08:38:38.069-05:00Home Automation - controlling lights with CURL and HA-Bridge<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijc9pCMTQ_ImlTCUymYbQfmuO1geq8dLTFtoo5dpoRMzurssf8CpupwfbMr0T1iVqLOG0fDYvaFm6c1Z92SUDLi3rUrkWWRrKpNUYWtSTldzHKwUqX4N8Pi_kG_WiesCYI4ZpF9g_k9MZ6s7pQwfLhGgIYADrEge4WPkVej46QmZWrNkJsVM0THmCO/s300/raspberry-pi-model-b-300x225.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="225" data-original-width="300" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijc9pCMTQ_ImlTCUymYbQfmuO1geq8dLTFtoo5dpoRMzurssf8CpupwfbMr0T1iVqLOG0fDYvaFm6c1Z92SUDLi3rUrkWWRrKpNUYWtSTldzHKwUqX4N8Pi_kG_WiesCYI4ZpF9g_k9MZ6s7pQwfLhGgIYADrEge4WPkVej46QmZWrNkJsVM0THmCO/w153-h115/raspberry-pi-model-b-300x225.jpg" width="153" /></a></div> In order to control lights are years I'm using HA-Bridge, running on a server I call HA server.<p></p><p>Originally (and possible it will return there) was hosted by Opus, my main server.</p><p>It is quite a while now is running over a Raspberry Pi.<br />This article is about how to control X10 via HA-Bridge from another computer in the network (hint, the network is not exposed to the outside)</p><span><a name='more'></a></span><p>There are already some articles about HA-Bridge in my blog :</p><p></p><ul style="text-align: left;"><li><a href="https://hanixdiy.blogspot.com/2021/06/home-automation-fixing-ha-bridge.html" target="_blank">Home Automation - fixing Ha-Bridge</a></li><li><a href="https://hanixdiy.blogspot.com/2022/07/ha-temporary-server.html" target="_blank">Server chronicles - HA temporary server</a></li><li><a href="https://hanixdiy.blogspot.com/2016/11/plying-with-alexa-and-echo.html" target="_blank">Playing with Alexa and Echo</a></li><li><a href="https://hanixdiy.blogspot.com/2023/06/home-automation-remotely-controlling.html" target="_blank">Home Automation - remotely controlling lights from HA server via ssh</a></li></ul><div>Now the goal is to be able to send REST commands via Curl to HA-Bridge from another computer in the network.<br />Mainly is used to control the server area fans from a script on a computer in the server room.<br />The alternative would be to reinstall the HA server on the main server so that it can control directly X10 via <a href="https://www.heyu.org/" target="_blank">Heyu</a><br /><br /></div><h2 style="text-align: left;">HA-Bridge API</h2><div>HA-Bridge supports some API as described in the documentation.</div><div>Using CURL from a terminal is possible to send out commands and retrieve information about the status of the controlled devices.</div><div><br /></div><div>Before to start a session, is necessary to obtain a username that will be used in the subsequent commands.</div><div><br /></div><div>In order to use the API is necessary to know some terms used :</div><div><br /></div><div><ul style="text-align: left;"><li><span style="font-family: courier;"><user></span><br />Code obtained with a specific API to be used in some other API.<br />NOT all the commands requires the user.</li><li><span style="font-family: courier;"><device ID></span><br />Is a numeric ID assigned to a device.<br />Is possible to know th eID asking for the list of devices (or looking at the webconsole of the server)</li><li><span style="font-family: courier;"><HA server IP></span><br />URL of the HA server hosting the HA-Bridge</li></ul><div>To work with the HA-Bridge API is necessary to follow this flow :</div></div><div><ol style="text-align: left;"><li>request username</li><li>API command</li><li>.......</li><li>API command</li></ol></div><div><br /></div><h3 style="text-align: left;">API </h3><h4 style="text-align: left;">Request username</h4><div>To do so is enough to send out a command :</div><div><br /></div><div><span style="font-family: courier;">$ curl -H "Content-Type: application/json" -X POST -d '{"devicetype": "<any string>"}' http://<HA server IP>/api</span></div><div><br /></div><div>The string after the devicetype is arbitrary and non important, is just used to generate the user code.<br />Note that the username will NOT be stored in the server, remains alive for the session.</div><div><br /></div><div>If the server is up and OK, it will answer with (for example) :</div><div><br /></div><div><span style="font-family: courier;">[{"success":{"username":"a2b0cdfd044246cb8c80717bdd2e727b"}}]</span></div><div><br /></div><div>The username will be used in the light control commands as <user>, don't use double quote in the command API</div><div><br /></div><h4 style="text-align: left;">List all lights registered info</h4><div><div><div><span style="font-family: courier;">$ curl -H "Content-Type: application/json" -X GET http://<IP-address-server>/api/<user>/lights</span></div><div><span style="font-family: courier;"><br /></span></div>So for example to retrieve the status of all the lights a command (assuming the HA server to be at 192.168.2.4 with a user named a2b0cdfd044246cb8c80717bdd2e727b will be :</div><div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;">$ curl -v -H "Content-Type: application/json" -X GET http://192.168.2.4/api/a2b0cdfd044246cb8c80717bdd2e727b/lights</span></div><div><span style="font-family: courier; font-size: x-small;">Note: Unnecessary use of -X or --request, GET is already inferred.</span></div><div><span style="font-family: courier; font-size: x-small;">* Trying 192.168.2.4:80...</span></div><div><span style="font-family: courier; font-size: x-small;">* TCP_NODELAY set</span></div><div><span style="font-family: courier; font-size: x-small;">* Connected to 192.168.2.4 (192.168.2.4) port 80 (#0)</span></div><div><span style="font-family: courier; font-size: x-small;">> GET /api/amitheuser/lights HTTP/1.1</span></div><div><span style="font-family: courier; font-size: x-small;">> Host: 192.168.2.4</span></div><div><span style="font-family: courier; font-size: x-small;">> User-Agent: curl/7.68.0</span></div><div><span style="font-family: courier; font-size: x-small;">> Accept: */*</span></div><div><span style="font-family: courier; font-size: x-small;">> Content-Type: application/json</span></div><div><span style="font-family: courier; font-size: x-small;">> </span></div><div><span style="font-family: courier; font-size: x-small;">* Mark bundle as not supporting multiuse</span></div><div><span style="font-family: courier; font-size: x-small;">< HTTP/1.1 200 OK</span></div><div><span style="font-family: courier; font-size: x-small;">< Date: Mon, 12 Jun 2023 14:02:49 GMT</span></div><div><span style="font-family: courier; font-size: x-small;">< Content-Type: application/json</span></div><div><span style="font-family: courier; font-size: x-small;">< Transfer-Encoding: chunked</span></div><div><span style="font-family: courier; font-size: x-small;">< Server: Jetty(9.4.z-SNAPSHOT)</span></div><div><span style="font-family: courier; font-size: x-small;">< </span></div><div><span style="font-family: courier; font-size: x-small;">{"1110":{"state":{"on":false,"bri":1,"alert":"none","reachable":true},"type":"Dimmable light","name":"All l</span></div><div><span style="font-family: courier; font-size: x-small;">...........................................</span></div><div><span style="font-family: courier; font-size: x-small;">...........................................</span></div><div><span style="font-family: courier; font-size: x-small;">light","name":"Zapper","modelid":"LWB007","manufacturername":"Philips","uniqueid":"85:97:a6:cf:a7:4d:ef:0b-cb","swversion":"66012040"}}</span></div><div><span style="font-family: courier; font-size: x-small;"><br /></span></div>Use the command jq to beautify the JSON result.<br />The first number of the block is the <device ID></div></div><div><br /></div><h4 style="text-align: left;">Retrieve status single light</h4></div><div>Is possible to retrieve information and status about a single light :</div><div><br /></div><div><span style="font-family: courier;">$ curl -H "Content-Type: application/json" -X GET http://<HA server IP>/api/devices/<device ID></span></div><div><br /></div><div>Alternatively is possible to use :</div><div><span style="font-family: courier;"><br /></span></div><div>$ <span style="font-family: courier;">curl -H "Content-Type: application/json" -X GET http://<HA server IP>/api/<user>/lights</span></div><div><span style="font-family: courier;"><br /></span></div><div>This is an example of beautified block :</div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;">{</span></div><div><span style="font-family: courier; font-size: x-small;"> "id": "1105",</span></div><div><span style="font-family: courier; font-size: x-small;"> "uniqueid": "af:21:d0:c9:7d:b2:e2:0b-7e",</span></div><div><span style="font-family: courier; font-size: x-small;"> "name": "Office lab",</span></div><div><span style="font-family: courier; font-size: x-small;"> "mapId": "undefined-copy-copy",</span></div><div><span style="font-family: courier; font-size: x-small;"> "mapType": "cmdDevice",</span></div><div><span style="font-family: courier; font-size: x-small;"> "deviceType": "exec",</span></div><div><span style="font-family: courier; font-size: x-small;"> "offUrl": "[{\"item\":\"/usr/local/bin/heyu -c /home/pi/.heyu/x10config off office_lab\",\"type\":\"cmdDevice\"}]",</span></div><div><span style="font-family: courier; font-size: x-small;"> "onUrl": "[{\"item\":\"/usr/local/bin/heyu -c /home/pi/.heyu/x10config on office_lab\",\"type\":\"cmdDevice\"}]",</span></div><div><span style="font-family: courier; font-size: x-small;"> "inactive": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "noState": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "offState": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "description": "Office lab light (C5)",</span></div><div><span style="font-family: courier; font-size: x-small;"> "deviceState": {</span></div><div><span style="font-family: courier; font-size: x-small;"> "on": true,</span></div><div><span style="font-family: courier; font-size: x-small;"> "bri": 254,</span></div><div><span style="font-family: courier; font-size: x-small;"> "alert": "none",</span></div><div><span style="font-family: courier; font-size: x-small;"> "reachable": true</span></div><div><span style="font-family: courier; font-size: x-small;"> },</span></div><div><span style="font-family: courier; font-size: x-small;"> "onFirstDim": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "onWhenDimPresent": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "lockDeviceId": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "dimNoOn": false,</span></div><div><span style="font-family: courier; font-size: x-small;"> "dimOnColor": false</span></div><div><span style="font-family: courier; font-size: x-small;">}</span></div></div><div><br /></div><div><h4 style="text-align: left;">Control a light</h4><div><div><span style="font-family: courier;">$ curl -v -H "Content-Type: application/json" -X PUT -d "{"on": <true/false>}" http://<HA server IP>/api/<user>/lights/<device ID>/state</span></div></div><div><br /></div><div><div>For example to turn ON a light :</div><div><br /></div><div><div><span style="font-family: courier; font-size: x-small;">$ curl -H "Content-Type: application/json" -X PUT -d '{"on": true}' http://192.168.2.4/api/e4f3896c7a3d40118c6585129e2bc264/lights/1105/state</span></div><div><br /></div><div>will return : </div><div><br /></div><div><span style="font-family: courier;">[{"success":{"/lights/1105/state/on":true}}]</span></div></div><div><br /></div></div><h2 style="text-align: left;">Workflow</h2><div><br /></div><div>A normal session thus should include to request a username and then use it to activate lights and/or retrieve status.</div><div>The good thing about using this method is exactly the capability to know if a light was turned on or off.</div><div><br />Some questions are open right now, hopefully I will find answers soon.</div><div>For example :</div><div><br /></div><div><ul style="text-align: left;"><li>how long a username is retained ?<br />i.e. for how long I can use an obtained username before it stops to work.<br />During early tests I noticed that using an arbitrary username did work only for retrieving commands, change state commands DO require a requested username.<br /><br /></li></ul></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li>GitHub - <a href="https://github.com/bwssytems/ha-bridge" target="_blank">HA-Bridge</a></li><ul><li>GitHub - <a href="https://github.com/bwssytems/ha-bridge#hue-rest-api-usage" target="_blank">API usage</a></li></ul></ul></div><p></p></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-14262894409521730312023-06-10T15:35:00.002-05:002023-10-25T09:13:59.157-05:00Plex - RIPping the Blu Ray rift<p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBE-bQc-CDQ4AhBO9WdFloSwrpahP60zM8yLz42DOr02JfzDZQqkEcmYWXNY6Bnh0m8QCHRUf8Rb9bVQYWlBa-wI0AsTxHSujO_ox3iFWk_GdFmp91XodKX0ZpwwxViTRlrNwobCdO6fBYqZvTveeBqHEb5S2qPCS5r9uZmfB8O353W3Ww0eDf96L/s62/image.png" style="clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="24" data-original-width="62" height="24" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPBE-bQc-CDQ4AhBO9WdFloSwrpahP60zM8yLz42DOr02JfzDZQqkEcmYWXNY6Bnh0m8QCHRUf8Rb9bVQYWlBa-wI0AsTxHSujO_ox3iFWk_GdFmp91XodKX0ZpwwxViTRlrNwobCdO6fBYqZvTveeBqHEb5S2qPCS5r9uZmfB8O353W3Ww0eDf96L/s1600/image.png" width="62" /></a> The main purpose of Plex is to have my Movie collection always available.<br />I usually RIP the DVD I own and save the movies on my server in order to stream my content when I want, without the need to play disk jokey with tons of DVD.</p><p>But ... what about Blu Ray ?</p><span><a name='more'></a></span><p>I do have few movies ONLY on Blu Ray.<br />I did look for them in other formats but no really luck so far.<br />So in the end I decided to try to RIP the Blu Ray directly.</p><p>First of all I did look for the cheapest Blu Ray reader and for less than 40$ I did buy a <a href="https://www.amazon.com/dp/B0B8DPJZPF?tag=altme03-20&linkCode=osi&th=1&psc=1" target="_blank">Yaeonku</a>.</p><p>Connected to the Linux machine (Ubuntu 22.04 LTS) did work immediately, recognized without problems.</p><p>Then I did try to run HandBrake on a Blu Ray inserted in the driver, it started to read chapters but in the end reported "No Title Found".</p><p>Some research did show the need for a specific library and key, so I did add them and after that, HandBrake was able to read the Blu Ray !</p><p>However there is a problem.<br />RIPping a Blu Ray measn ending up by default with a file quite big, up to 30 or more GB !!!</p><p>Some settings are needed to reduce the dimension of the file while keeping the a decent quality.<br />Compromise is the key here.</p><h2 style="text-align: left;">Adding libraries</h2><p>As mentioned before, in order to have the Blu Ray reader working, is necessary to install some libraries and a "key" file.</p><p>For Linux (Ubuntu 22.04) I simply add the libraries with :</p><p><span style="font-family: courier;">sudo apt install libaacs-dev libbluray2</span></p><p>Then is necessary to retrieve and manually install a "key" file.<br />The library and key file are used mainly by VLC but I suspect they are used by other programs as well.</p><p>To install the key file (assuming VLC is already installed) :</p><p></p><ul style="text-align: left;"><li><a href="http://fvonline-db.bplaced.net/fv_download.php?lang=eng" target="_blank">download a keydb.c</a>fg file</li><li>rename the downloaded file as <b>KEYDB.cfg</b></li><li>copy in the directory ~/.config/aacs the file</li><ul><li>if the directory doesn't exist, created it</li></ul></ul>That's it.<h2 style="text-align: left;">HandBrake settings</h2><p>If left as default, a Blu Ray can end up with a ripped file in mp4 (m4v format) from 15 to 30 GB !!<br />Clearly too big ! Sure, the quality is awesome but in the end undetectable when watching on a normal TV.</p><p>To reduce the size, these some settings I did experimented with.</p><p>After selecting the the disc (<b>Open Source</b>) click on the <b>Preset</b> tab, then select <b>Web</b> and then choose <i>Vimeo YouTube 720p30</i>.</p><p>The result quality is great, for about 2 hours movie is possible to end up with a 2 GB file.</p><p>Still little bit bigger for my needs, so after ripped the Blu Ray, another passage is needed using the program Avidemux.</p><div><h2>Avidemux settings</h2><p>The input for Avidemux is the m4v file generated by HandBrake.<br />So once opened the program, load the generated file.</p><p>Then in the Video Output section, select the <b>Mpeg4 AVC (x264)</b>, then hit the button below, <b>Configure</b>.</p><p>In the <i>Rate control</i> section of the pop up, in the <b>Encoding Mode</b>, select <b>Video Size</b> and in the <b>Target Video Video Size</b> box, enter the dimension you would like to have.</p><p>Note that the code will TRY to reach that dimension but not necessarily will be able to do so.</p><p>There are many other parameters to play with, but for now this is the only modifications.</p></div><div><br /></div><h2 style="text-align: left;">Resources</h2><p></p><p></p><ul style="text-align: left;"><li><a href="https://www.videolan.org/vlc/" target="_blank">VLC</a></li><li><a href="https://handbrake.fr/" target="_blank">HandBrake</a></li><li><a href="https://avidemux.sourceforge.net/" target="_blank">Avidemux</a></li><li><a href="https://en.wikipedia.org/wiki/Advanced_Access_Content_System" target="_blank">AACS library</a></li><li><a href="http://fvonline-db.bplaced.net/" target="_blank">KeyDB file</a></li></ul><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-44767123069554391612023-05-21T10:50:00.001-05:002023-06-08T14:36:36.361-05:00Ender 3 Pro - an unclogging story<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJiQ78aKQsf2Jz-v1GhUawvSRr8LO8JCRbTucPZgtQn67Z-8ApD35t-MrPEuZmuo6mnFq4j-pnNb8-e7tkySfbDFzOrkEnIMry13aFlXDlu-gNKffd_h8ZBD8e75H4dZxAfreYF2z9rkuaZB34eY1tmZ3aNn37FJsrtV5uoYZnVgNTxGszRtqTTmTG/s1024/ender-3-pro-right.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJiQ78aKQsf2Jz-v1GhUawvSRr8LO8JCRbTucPZgtQn67Z-8ApD35t-MrPEuZmuo6mnFq4j-pnNb8-e7tkySfbDFzOrkEnIMry13aFlXDlu-gNKffd_h8ZBD8e75H4dZxAfreYF2z9rkuaZB34eY1tmZ3aNn37FJsrtV5uoYZnVgNTxGszRtqTTmTG/w127-h127/ender-3-pro-right.jpg" width="127" /></a></div><p><br /></p>For many years I did prints without any problem, then recently, while trying some new filaments, I started to experience clogging events, one really bad.<p></p><p><br /></p><p>Hopefully these notes can help to know what to do in a clog event.</p><span><a name='more'></a></span><h2 style="text-align: left;">How to recognize a clog</h2><p>First of all is important to recognize some symptoms of a clog.<br />There are "generic" universal symptoms but any printer has its own behavior, on mine there are mainly two things that can be symptoms of a clog :</p><p></p><ul style="text-align: left;"><li>the extruder "jump back"<br />Basically the extruder is trying to push the filament but because the clog lose adhesion and the filament jump back, doing a recognizable "click"</li><li>under-extrusion (i.e. not enough filament is coming out)</li></ul><div>Not necessarily the two things happens at the same time and with the same intensity.<br />It can start with only some occasional "extruder jumping back" or some occasional under-extrusion, up to a constant jumping back, without any filament coming out.</div><p></p><p>This mainly cause no print or the print remains very brittle, with a bad adhesion between layers, often with also a really horrible print (missing parts, holes, etc.)</p><h2 style="text-align: left;">What to do</h2><p>Other than start to say very bad words, the first thing is to have a deep breath and be patience.</p><p>Then :</p><p></p><ul style="text-align: left;"><li>Heat the hot end up to the filament temperature (usually around 200 C if PLA)</li><li>Remove/unload the filament</li><li>Detach the Bowden tube from the hot end</li><li>Unscrew the Bowden tube holder</li><li>Raise the temperature of the nozzle to the top (usually 260 C)</li><li>Use the unclog needle from the top, pushing out as much material as you can</li></ul><div>when the needle doesn't encounter anymore resistance put back everything and try.</div><div>If still problems the clog is a bad one, so the best thing is to take a deeper level.</div><div>Repeat as before, then :</div><div><ul style="text-align: left;"><li>remove the fan cage so to expose the hot end</li><li>remove the nozzle</li><li>Decrease the temperature around 150-180 C<br />Keeping the high temperature often ends up having a kind of "gue" that stick everywhere.<br />Ideally we want all the plastic melt in a single blob.</li><li>with something with the diameter of the internal tube, try to push out the clog.<br />A piece of Bowden tube or maybe a nylon filament.</li></ul><div>Looking in the hot end from above you must be able to see thru the internal tube.</div><div><br /></div><div>Usually in these cases better to change the nozzle anyway, very probably will be impossible to clean it good.</div><div><br /></div><div>Put back together the hot end, re-screw the fan cage, reattach the Bowden tube, the printer should be back working.</div><div><br /></div><div>A trick suggested to me when putting back everything, is to screw in the nozzle, then unscrew it little bit, push in the Bowden tube and then full screw the Bowden tube.<br />In this way there is a bigger chance to avoid gaps between the Bowden tube and the base of the nozzle, one of the primary cause of clogs.</div><div><br /></div><h2 style="text-align: left;">Cold pull</h2><div>There is also a technique called Cold Pull that can be used.<br />I did try but didn't solve the problem, maybe is not working with all type of clog.<br />In any case taking apart the hot end even if is a longer and uncomfortable procedure, I think is the best one.</div><div><br /></div><h2 style="text-align: left;">A clog</h2><div><br /></div><div>This is a clog example.</div><div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYugQA02w67ZTPYrz1EXbxhCNL0QfytTwGIORb8zSnRPjfZICgBXGGHsCGJe4Qvil1oupN7-U-CJZrafeqQvMdiS9C4-sAnm4XCTaSiMKbKkDbaKqyAij4DVg8WuQQGnPSSK3CHC-8QtAnOQ4FhP1Fw5otaDm_s2AG1tpvmpTFSI-2hU2zeXcyvZ4j/s808/clog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="484" data-original-width="808" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYugQA02w67ZTPYrz1EXbxhCNL0QfytTwGIORb8zSnRPjfZICgBXGGHsCGJe4Qvil1oupN7-U-CJZrafeqQvMdiS9C4-sAnm4XCTaSiMKbKkDbaKqyAij4DVg8WuQQGnPSSK3CHC-8QtAnOQ4FhP1Fw5otaDm_s2AG1tpvmpTFSI-2hU2zeXcyvZ4j/s320/clog.png" width="320" /></a></div></div><div><br /></div><div>On the left of the cent, the actual clog removed from the hot chamber.<br />On the right a piece of filament that was stuck above the clog.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><h2 style="text-align: left;">Resources</h2><div><br /></div><div>Of course online is possible to find tons of video and suggestions, this was just my experience.<br />A couple of good videos covering </div><div><ul style="text-align: left;"><li>YouTube - <a href="https://www.youtube.com/watch?v=bg4sOaSvimY" target="_blank">Ender 3 unclog - examples</a></li><li>YouTube - <a href="https://www.youtube.com/watch?v=_bZ_ETKBipQ" target="_blank">Unclog techniques</a></li><li>YouTube - <a href="https://www.youtube.com/watch?v=lixQgJUVNLc" target="_blank">Cold Pull techniques</a></li></ul><div><br /></div></div></div><br />TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-67407082179397220842023-05-20T09:56:00.000-05:002023-05-26T09:56:46.020-05:00Ender 3 Pro - PID tuning<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYRkVqZpwx9lMlB8DSXCxxM3VVfvptSPinrU9SR0qI2p-XkGxoHHVPVYO0gIDDR7K64CEHN69pslVqGuV2LtuginkH8IxUjBx_EKQErEEMUrN_oiuxR6ODJRn3Jc5HW9Lp7VlIcX1_Ge9gYSVFtkBrpXv9jYnYemrObUj4CoQ_VFH9qGlT8Bq2lY_B/s1024/ender-3-pro-right.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1024" data-original-width="1024" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYRkVqZpwx9lMlB8DSXCxxM3VVfvptSPinrU9SR0qI2p-XkGxoHHVPVYO0gIDDR7K64CEHN69pslVqGuV2LtuginkH8IxUjBx_EKQErEEMUrN_oiuxR6ODJRn3Jc5HW9Lp7VlIcX1_Ge9gYSVFtkBrpXv9jYnYemrObUj4CoQ_VFH9qGlT8Bq2lY_B/w157-h157/ender-3-pro-right.jpg" width="157" /></a></div><p><br /></p><p>Normally the printer is coming with already stored some calibration information.</p><p>One of them is the Proportional Integral Derivative (<a href="https://en.wikipedia.org/wiki/PID_controller" target="_blank">PID</a>) controller for the temperature of the hot end and the bed.</p><p>It is necessary to execute the PID in case sensors are changed or just to be sure everything is OK. </p><span><a name='more'></a></span><p>To perform the PID usually a program need to be installed to a computer and then connect the computer via USB to the printer. <br />The program is called<a href="https://www.pronterface.com/" target="_blank"> Pronteface </a>and exist for all platforms, however there is another way that doesn't need to install or connect anything else, since it uses OctoPrint.</p><p>Below the procedures to run <a href="https://en.wikipedia.org/wiki/PID_controller" target="_blank">PID</a> for both hot end and bed of the printer.</p><p><b><i><span style="color: red; font-size: medium;">CAUTION ! <br />Both procedures can take quite some time to be executed due to the thermal inertia !!</span></i></b></p><h2 style="text-align: left;">Hotend - PID tuning with OctoPrint</h2><div><ul style="text-align: left;"><li>Turn on the printer</li><li>Heat the hotend to 200</li><li>Unload any present filament</li><li>Cool off the hotend</li></ul><div>When the hotend is at normal temperature : </div></div><div><ul style="text-align: left;"><li>Go on OctoPrint</li><li>Go on terminal</li><li>in the entry box digit : <span style="font-family: courier;">M303 S200 C10 </span> then hit enter</li><li>Wait to receive the message :<br /><span style="font-family: courier;">Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h<br /></span></li><li>The next 3 lines contains temperature settings :<br /><span style="font-family: courier;">Recv: #define DEFAULT_Kp 24.54<br />Recv: #define DEFAULT_Ki 1.95<br />Recv: #define DEFAULT_Kd 77.22<br />Recv: ok</span><br /></li><li>The 3 value need to be saved in the firmware, to do so : M301 Pxx.xx Ixx.xx Dxx.xx<br />where P stands for the Kp, I stands for Ki and D stands for Kd.<br />Thus in the example : <span style="font-family: courier;">M301 P24.54 I1.95 D77.22</span></li><li><span style="font-family: inherit;">After that force the values to be written in Eeprom with :</span><span style="font-family: courier;"> M500</span></li><li><span style="font-family: inherit;">PID procedure completed</span></li></ul><h2 style="text-align: left;">Bed - PID tuning with Octoprint</h2></div><div><div><ul><li>Turn on the printer</li><li>Verify the bed is at normal temperature</li></ul></div><div><ul><li>Go on OctoPrint</li><li>Go on terminal</li><li>in the entry box digit : <span style="font-family: courier;">M303 E-1 S50 C10 </span> then hit enter</li><li>Wait to receive the message :<br /><span style="font-family: courier;">Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h<br /></span></li><li>The next 3 lines contains temperature settings :<br /><span style="font-family: courier;">Recv: #define DEFAULT_Kp 24.54<br />Recv: #define DEFAULT_Ki 1.95<br />Recv: #define DEFAULT_Kd 77.22<br />Recv: ok</span><br /></li><li>The 3 value need to be saved in the firmware, to do so : M304 Pxx.xx Ixx.xx Dxx.xx<br />where P stands for the Kp, I stands for Ki and D stands for Kd.<br />Thus in the example : <span style="font-family: courier;">M304 P24.54 I1.95 D77.22</span></li><li><span style="font-family: inherit;">After that force the values to be written in Eeprom with :</span><span style="font-family: courier;"> M500</span></li><li><span style="font-family: inherit;">PID procedure completed</span></li></ul></div></div><div>A firmware modification is required to activate the PID for the Bed.</div><div><br /></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li>Pronteface - <a href="https://www.pronterface.com/" target="_blank">Program to control the 3D Printer</a></li><li>All3Dp - <a href="https://all3dp.com/2/3d-printer-g-code-commands-list-tutorial/" target="_blank">Tutorial on M/G codes</a></li><li>Youtube - <a href="https://www.youtube.com/watch?v=g-s4qGuSFt8" target="_blank">How to PID tuning</a></li><li>Blog - <a href="https://sebastian.expert/marlin-g-codes-m500-m501-m502-m503/" target="_blank">Marlin M codes</a></li><li>Blog - <a href="https://print3d.world/easy-ender-3-hot-end-pid-auto-tuning/" target="_blank">Easy Ender 3 Hot End PID</a></li><li>Wikipedia - <a href="https://en.wikipedia.org/wiki/PID_controller" target="_blank">PID Controller</a></li><li>Blog - <a href="https://3dprintbeginner.com/hotend-and-heatbed-pid-tuning/" target="_blank">Hotend and Heatbed PID tuning</a></li></ul></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-39787152556789837532023-05-14T10:12:00.003-05:002023-10-19T23:56:31.886-05:00Repairs - ASUS TUF FC705G fan replacement<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUP6BcX0LyAYoskclVSiy-kcwvHsk_y9tdIP32oaE0ahlmgR0zXLuZn40xOt45eWu1cfu-i8PCNnfmyR48GRTfHtO9myMmSmEyj111nIOP-dyJtL1YncwUSGbOEBwyVIAU-zakPmOSxnR_C5m2ObgKynOz6LMFU75OelZeNZifrpxhQJwkZ7-lvqqQ/s1012/6501561cv7d.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="988" data-original-width="1012" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUP6BcX0LyAYoskclVSiy-kcwvHsk_y9tdIP32oaE0ahlmgR0zXLuZn40xOt45eWu1cfu-i8PCNnfmyR48GRTfHtO9myMmSmEyj111nIOP-dyJtL1YncwUSGbOEBwyVIAU-zakPmOSxnR_C5m2ObgKynOz6LMFU75OelZeNZifrpxhQJwkZ7-lvqqQ/w200-h195/6501561cv7d.jpg" width="200" /></a></div><br />Notes about the replacement of both fans (CPU/GPU) to an Game computer ASUS TUF FX705G.<p></p><p><br /></p><p>The PC is a game laptop and fans are really a necessity to dissipate the heat generated by the CPU and the embedded GPU.<br />When they fails (not if, when) the system become quite unusable, noisy and incredibly hot even on the keyboard.</p><p><br /></p><p><br /></p><span><a name='more'></a></span><h2 style="text-align: left;">Problem description</h2><p></p><p style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span></span></p><p></p><p style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">The PC in this description has overheating problems, very likely due to too much dust in the fans (they are making too much noise as well) and the heatsink ducts.</p><p style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">The overheating lately become so bad to don't be able to touch the keyboard after a while the PC was running.</p><h2 style="text-align: left;">Critical things to expect</h2><div>After reviewing documentation for the operation, there are few things to pay attention to : </div><div><ul style="text-align: left;"><li>Around the laptop border there are places with there is a "conductive foam" insulation.<br />If for any reason a piece of metal touch the foam and the mobo, is possible to create a short circuit somewhere on the mobo<br />It means that during the opening or closing operations of the back plate is important to DON'T use metallic tools to poke inside and pay very close attention</li><li><span style="color: #cc0000;">First thing to do after removing the back cover is to detach the battery and discharge the circuit turning on the PC! </span></li><li>To remove the fans might be necessary to lift partially the mobo, paying attention to don't damage anything.<br /></li><li>In theory should NOT be necessary to remove the heatsink (the fans are installed in the heatsink) but if it is necessary, then will be necessary to :</li><ul><li>remove the heatsink paste from both heatsink and components</li><li>clean up with alcohol both heatsink and components</li><li>re-paste the components before to reattach the heatsink</li></ul></ul><h2 style="text-align: left;">Shopping list</h2><div>OK, for this operation is necessary to have :</div><div><ul style="text-align: left;"><li>paper towels to protect the area and to be used to clean</li><li>alcohol 90% </li><li>screwdriver with different bits, mainly a Philips bite will be necessary</li><li>plastic tools to pry open the back, the ones used to work on phones are perfect</li><li>small pliers</li><li>container to put screws and other small parts if necessary</li><li>just in case, a thermal paste in case to re-paste the heatsink if removed</li><li><a href="https://www.amazon.com/gp/product/B085L7SF9W/ref=ask_ql_qh_dp_hza" target="_blank">two new fans</a></li></ul></div><h2 style="text-align: left;">Doing it </h2><div><br /></div><div>First of all I prepared few sheets of shop towels to protect the laptop on a table, then started to remove the screws at the bottom.</div><div>It is important to note that there are 3 different size (in length) of these screws.<br />So when is time to reassembly pay attention to what screw goes in a hole :) </div><div><br /></div><div>Since I already opened that specific laptop time ago to clean it up (just remove the dust without disassemble it or change parts) it was relatively clean, of course the fans were a totally different matter.<br />The original fans (one for the CPU and one for the GPU) were quite dirty and very probably damaged, aka they were generating quite a noise without providing enough flow to really cool down the poor machine.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJbYPRwkG48Ex4XW5ZRIOx4wYX-SnVtDQNzFF6kyWInt-OZ1hP3sWWHDBW-0QWhCprrhQsTsmWl-kYcP5RMcbskMnhx5I8vm9SgCWno4dF_5lyxYcI4RuVRPM2aS_HTExSejbjlAvYlkv5LhzOZ1QxvXJZ09mwTJSSVc5XjlQm_b8ZkFUoVWqC3FQL/s4000/20230514_180117.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJbYPRwkG48Ex4XW5ZRIOx4wYX-SnVtDQNzFF6kyWInt-OZ1hP3sWWHDBW-0QWhCprrhQsTsmWl-kYcP5RMcbskMnhx5I8vm9SgCWno4dF_5lyxYcI4RuVRPM2aS_HTExSejbjlAvYlkv5LhzOZ1QxvXJZ09mwTJSSVc5XjlQm_b8ZkFUoVWqC3FQL/w240-h320/20230514_180117.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The computer just opened</td></tr></tbody></table><br /><div>In the picture above, taken after removing the back, is possible to note that the battery (of course) is still connected to the motherboard and there is not much dust visible ... visible is the key word here.</div><div>Anyway, the FIRST thing to do is to disconnect the battery !<br /><span style="color: #cc0000;"><b><i>No need to remove it, but be sure to disconnect it !</i></b></span> <br />Not doing so there is a quite high risk to create a short circuit when removing the fans and fry the mobo.<br />For safety, until the battery is connected, USE ONLY PLASTIC TOOLS !! <br />This limit the possibility to create short circuits.</div><div><br /></div><h3 style="text-align: left;">CPU Fan</h3><div>At this point I started to remove first the fan on the right (CPU fan).<br />There are two screws and one cable (other than the fan one) need to be disconnected. Be careful doing so, the connection is made on a flexible PCB so is quite delicate.</div><div>Then disconnect the fan (remember how is connected or better, do a picture so you can see how to reassemble the new one.</div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeuioyEHcW7UccAs_3881iVF62jHnzud5YZozQs9Y09hXuTk9WuE_KMK8I6X-CLs9GTTTtdmPfauo3-RUDTnvVV2rZfd4G7kW6_UapqXXV-pAXerKdnlX-qFIlMkkgN9LR9eNIc3peSq-iVy4pH53oqvcUky1cK_kcZyndL4dc8iHBPiMjyGI08Yi0/s4000/20230514_180122.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeuioyEHcW7UccAs_3881iVF62jHnzud5YZozQs9Y09hXuTk9WuE_KMK8I6X-CLs9GTTTtdmPfauo3-RUDTnvVV2rZfd4G7kW6_UapqXXV-pAXerKdnlX-qFIlMkkgN9LR9eNIc3peSq-iVy4pH53oqvcUky1cK_kcZyndL4dc8iHBPiMjyGI08Yi0/s320/20230514_180122.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">CPU Fan connections and placement<br /></td></tr></tbody></table><br /><div>Now, after removing the two screws (caution, they have different length) and disconnecting the cables, in order to remove the fan there are two choices :</div><div><ul style="text-align: left;"><li>disconnect the heat sink from the mother board</li><li>lift GENTLY the motherboard enough to slide out the fan</li></ul><div>The first solution would be OK if there was not the need to re-paste the area !<br />SO I opted for the second one and it worked great. <br />Just be VERY VERY gently and don't lift too much, with the risk to crack the mother board.</div></div><div>The fan has a kind of "hook" that helps to keep the fan in the right position.</div><div><br /></div><div>After removing the fan be sure to remove dust, cleaning the ducts with a vacuum cleaner and then using a paper towel with some alcohol, remove all the grime and dust from the fan area.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ZIrzJ6nJZ7TMZzAFdakYeRSPqAR5PC_JSA2l3LY_NmHAZn2EVs2epje4fNIsdOwyDT2jnrgiRjY2xZLkw1TsHQhwij-85c2jkow_HGMj8LdtuuL8dOS4e-x8w9X5vZ3lS_cv1gqeMrefprq_MvafOFVrmGLxtm0RIoxcr_W2Pi7vjmItCH-e_UDl/s4000/20230514_180527.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3ZIrzJ6nJZ7TMZzAFdakYeRSPqAR5PC_JSA2l3LY_NmHAZn2EVs2epje4fNIsdOwyDT2jnrgiRjY2xZLkw1TsHQhwij-85c2jkow_HGMj8LdtuuL8dOS4e-x8w9X5vZ3lS_cv1gqeMrefprq_MvafOFVrmGLxtm0RIoxcr_W2Pi7vjmItCH-e_UDl/s320/20230514_180527.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">CPU Fan area after fan removal<br /></td></tr></tbody></table><div><br /></div><div>To reinsert the new one just do the same, lift gently the mother board enough to slide in the new fan, position it, screw it to the mother board and then reconnect all the cables.</div><div><br /></div><h3 style="text-align: left;">GPU fan</h3><div><br /></div><div>This one is more tricky.</div><div>There are 3 screws (this time all the same length) and there is the need to detach only the fan connection, however mechanically is like a puzzle.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVvRtCfi2N6Ke4fh7gBhXvmhqYMiUtROcsZXYRzCfMb6Ap5dMA0l7IPnbnJwBp-yruDrr92Qul_clLCQDqrJJC0IKpiH-cpRFdWKNRNcnxslOfD1pyY0egBy1EKVaVyGCZ6SQGGsHhijp2AEgyJl-ccwRI6r5354Yev0AlqfhiqIM-DHQd_TIRBVko/s4000/20230514_180127.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVvRtCfi2N6Ke4fh7gBhXvmhqYMiUtROcsZXYRzCfMb6Ap5dMA0l7IPnbnJwBp-yruDrr92Qul_clLCQDqrJJC0IKpiH-cpRFdWKNRNcnxslOfD1pyY0egBy1EKVaVyGCZ6SQGGsHhijp2AEgyJl-ccwRI6r5354Yev0AlqfhiqIM-DHQd_TIRBVko/s320/20230514_180127.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">GPU Fan and connections</td></tr></tbody></table><div><br /></div><div>Without removing the heatsink you need to find a combination of moves that allow to remove the the fan lifting the mobo and and the same time, tilting the fan in order to slide one of the screwed supports below the heatsink !</div><div>In a way would be much easier to remove the heatsink but with some patient (the importance to play tetris :) ) I was able finally to slide it out without touching critical parts of the mother board.</div><div><br /></div><div>As the other one, I vacuumed and cleaned up thoroughly the area and then replaced the fan.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIzG24m3pknptICaNQRVeS92vlt4Po9CNQOfnjpHaSEtp70ocMizvnKZOp4xIq_D5hjo4PMvNRRLBe9LotEva7OWNHuq-yI4eO3moIzu6d5S6jOYrBDWH-DoSqjtv6tnLJLOWCujmfnGN3NDxkeaN4cBsgV6nmHprRLiXZw7mUKvac9u2H2bKcUXW2/s4000/20230514_181822.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIzG24m3pknptICaNQRVeS92vlt4Po9CNQOfnjpHaSEtp70ocMizvnKZOp4xIq_D5hjo4PMvNRRLBe9LotEva7OWNHuq-yI4eO3moIzu6d5S6jOYrBDWH-DoSqjtv6tnLJLOWCujmfnGN3NDxkeaN4cBsgV6nmHprRLiXZw7mUKvac9u2H2bKcUXW2/s320/20230514_181822.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">GPU fan area after removal</td></tr></tbody></table><div><br /></div><div>Again, is very very tricky and you'll need lot of patience.<br />Very very important to avoid to touch components on the mother board when reinserting the fan since one "leg" has to go below the heatsink in the front area and another one goes below the heatsink in the back area.</div><div> </div><h3 style="text-align: left;">Adding 1Tbyte HD</h3><div><br /></div><div>The first picture shows an area where there is a HD bay empty.<br />Having around a 3.5 1 TB HD I just added it.</div><div>Unscrew the HD support, screw in it the HD (needs to be mounted upside down, i.e. the bottom of the HD visible. </div><div><br /></div><div>I did pre-format the HD in NTSC before to install it and it was seen by the OS immediately when the system restarted.</div><div><br /></div><div><br /></div><div><br /></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li>Amazon - <a href="https://www.amazon.com/Z-one-Replacement-FX705GM-FX705GE-Cooling/dp/B082TYDY6B/ref=rvi_sccl_1/130-6857896-0957540?pd_rd_w=7NS0d&content-id=amzn1.sym.f5690a4d-f2bb-45d9-9d1b-736fee412437&pf_rd_p=f5690a4d-f2bb-45d9-9d1b-736fee412437&pf_rd_r=7Z9RC1CJNPGW7R32MKGB&pd_rd_wg=KG4WI&pd_rd_r=100bbf00-d80e-4f08-b94e-b6e147acbefb&pd_rd_i=B082TYDY6B&psc=1" target="_blank">decent pair fans (expensive/slow/with warranty)</a> </li><li>Amazon - <a href="https://www.amazon.com/gp/product/B0993J68GD/ref=ewc_pr_img_1?smid=A3RSJFXEAXTVCW&psc=1" target="_blank">base (cheap/fast/no warranty)</a></li><li>Amazon - <a href="https://www.amazon.com/ask/questions/asin/B085L7SF9W/2/ref=ask_dp_iaw_ql_hza?isAnswered=true#question-Tx2Q8P59JFVGG53" target="_blank">base (very cheap/fast/no warranty)</a></li><li>iFixIt - <a href="https://www.ifixit.com/Guide/Asus+TUF+Gaming+FX705G+Fan+Replacement/127893" target="_blank">FX705G fan replacement</a></li></ul><div><br /></div><div><br /></div><div><br /></div><div><br /></div><p></p></div></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-43308141961134558872023-04-16T14:03:00.000-05:002023-06-01T14:04:25.117-05:00Plex - Management tools<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiAm_50L9YXJ8xsUv3ouy7DAGEJggu10vvUAbm6IcJW5BJANpOLIJ7rw_pclmWxXFCnBpZnjSeZwvQuIHuSJZ564I0bl1uSDE2NPVDHrH2UJHB-raCBRuodW46ovuwtZ6l3pOk9J4Q8dwQDiUdBXfm_oJcmP4Q1kAFZElSpQFP2yggh82lvxvLngK9b" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="24" data-original-width="62" src="https://blogger.googleusercontent.com/img/a/AVvXsEiAm_50L9YXJ8xsUv3ouy7DAGEJggu10vvUAbm6IcJW5BJANpOLIJ7rw_pclmWxXFCnBpZnjSeZwvQuIHuSJZ564I0bl1uSDE2NPVDHrH2UJHB-raCBRuodW46ovuwtZ6l3pOk9J4Q8dwQDiUdBXfm_oJcmP4Q1kAFZElSpQFP2yggh82lvxvLngK9b=s16000" /></a></div>Plex is a great media server, but sometime is necessary to have something extra to perform some operations, like for example extract the list of movies available on the server.<br /><br /><p></p><p>There is something out there, let see some choices.</p><span><a name='more'></a></span><h2 style="text-align: left;">PlexExportCSV</h2><div>This simple python small application does the job nicely.</div><div>Easy to install, can be installed on any computer on the network where the Plex server exists.</div><div>It scan the database and extract information about the media present and save everything in a CSV file that can be viewed with any spreadsheet.</div><div><br /></div><div>Simply :</div><div><ul style="text-align: left;"><li>Open a terminal</li><li>Install library : <span style="font-family: courier;">pip3 install plexapi</span></li><li>Clone repo : <span style="font-family: courier;">git clone https://github.com/creativeWaltz/plexlibrary2CSV.git</span></li><li>go inside the repo : <span style="font-family: courier;">cd plexLibrary2CSV</span></li><li>create the configuration file : <span style="font-family: courier;">nano plexExportCSV_config.py</span><br />Write in :<br /><pre class="notranslate" style="border-radius: 6px; box-sizing: border-box; color: #1f2328; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 13.6px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">PLEX_URL="http://192.168.X.X:32400"
PLEX_TOKEN="xxxxxxxxxxxxxxxxxxxx"</code></pre>(see documentation for details)</li><li>run the app : <span style="font-family: courier;">python3 plexExportCSV.py</span></li><ul><li>follow the instructions</li></ul></ul></div><div><br /></div><h2 style="text-align: left;">WebTools-NG</h2><p>The idea is to have a service that connect with the server to perform some maintenance/inquiry operations.</p><p><a href="https://forums.plex.tv/t/webtools-ng/598539" target="_blank">WebTools-NG</a> is supposed to allow :</p><p></p><ul style="text-align: left;"><li>Download media from your server to permitted users</li><li>Extract information (metadata) from the server (list moviesshows/etc.)</li><li>Plex server settings/management</li><li>Retrieve info on shared users</li></ul><div>It can be installed on any computer, not necessarily the server itself, since need to be connected anyway to the server.</div><div>For Linux for example, is just a appimage that can be installed everywhere.<br />Once started asks to connect with the Plex server using the usual way (user/password)</div><p></p><p>However is still under development, many functionalities are not there yet, among them the export of the movie list. My luck,</p><h2 style="text-align: left;">Plex-export</h2><p>Another small autonomous tool is the Plex-export, written in PHP.<br />Like the WebTools-NG it can be run from another machine.<br />I was able to have it run but again, is not fully functional.<br />It can extract almost all the data in a JS file but the web part is not working, so there is not an easy way to see the list.</p><p>No time and willing to fix it :)</p><h2 style="text-align: left;">Token</h2><p>Most all of these tools use a Plex token to access data.<br />To obtain the toke is enough to go on Plex (website) and select a local content (a movie, an episode, etc.)<br />Going on the item menu (the three vertical dots) select "Get info".<br />On the bottom of the media description there is a "View XTML" button, click on it.</p><p>A new page will open. What we need to have is located in the URL, at the end.<br />Look for : 1&X-Plex-Token=xxxxxxxxxxxxxx</p><p>where obviously xxxxxxxxxxx is the token we need to use.</p><p><br /></p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li><a href="https://www.plex.tv/" target="_blank">Plex</a></li><li>Forum - <a href="https://forums.plex.tv/t/webtools-ng/598539" target="_blank">WebTools-NG</a></li><li>GitHub - <a href="https://github.com/WebTools-NG/WebTools-NG/wiki/Installing-WebTools-NG" target="_blank">WebTools-NG</a></li><li>GitHub : <a href="https://github.com/Dachande663/Plex-Export" target="_blank">Plex-export</a></li><li>GitHub : <a href="https://github.com/creativeWaltz/plexlibrary2CSV" target="_blank">PlexExportCSV</a></li></ul><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-17542816525365292572023-04-09T11:44:00.003-05:002023-10-19T23:56:48.433-05:00Repairs - bread toaster<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2KfXENp0vUbOZYC8QFinlB6PzXvAxL_wRv-LQXe-wXT_VmshV2ro610DVWViC1prWLDEGVmKLQPjnlnAEKW_169gGi7-yIPbJWbQXJlPifSTqqgpJ_g4D8APdSiTiWMLp1R84BzemwhqUoMVQv00O5YxevXX2xeflLTKIRw92QzYOb52iP4IE_1BE/s478/westbend-toaster.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="368" data-original-width="478" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2KfXENp0vUbOZYC8QFinlB6PzXvAxL_wRv-LQXe-wXT_VmshV2ro610DVWViC1prWLDEGVmKLQPjnlnAEKW_169gGi7-yIPbJWbQXJlPifSTqqgpJ_g4D8APdSiTiWMLp1R84BzemwhqUoMVQv00O5YxevXX2xeflLTKIRw92QzYOb52iP4IE_1BE/w200-h154/westbend-toaster.png" width="200" /></a></div><br />Our current bread toaster, a <a href="https://westbend.com/products/4-slice-toaster" target="_blank">West Bend Model 78824</a>, has now 6 years (given or taken) and half of it stopped to work.<p></p><p><br />One of the two levers is not engaging anymore.<br />So ... let's repair it !! </p><p><br /></p><span><a name='more'></a></span><p>Toasters, even with the electronics, are quite simple and cheap appliances.</p><p>And unless to heavily over-engineering them, they are subject to the worse possible conditions ... bread crumbs !<br />It is INCREDIBLE the amount of bead crumbs that one can accumulate in a toaster in few years !<br /></p><p>Furthermore, bread is an organic compound with curious mechanical/electric characteristics.<br /><br /></p><h2 style="text-align: left;">The Problem</h2><p>The problem is that one lever is not engaging.<br />You push it down and is not staying down when you remove the pressure on the lever.</p><p>However forcing it down, the heating element is engaged and LEDs are turning on.</p><p>Typical case of something (bread, duh :) ) that disrupt the current flow somewhere.</p><p>Now, the lever is usually kept down by an electromagnet powered by the electronic.<br />When the lever is down, there is on a PCB a copper contact driven by piece connected to the lever.<br />The contact then bring power to the electronic and the heating element and thus an electromagnet is powered with the purpose to keep the lever down until the electronic decide to release it (because a pushbutton is pressed or because the set time expired).</p><h2 style="text-align: left;">The solution</h2><p>Cleaning.</p><p>Deep cleaning of the toaster is the first thing to try.<br />It is of course possible the electronic is damaged but before to diagnose that, is mandatory to restore the toaster as much as possible to a clean condition, i.e. no bread crumbles around.</p><p>So no choices, it must be opened.<br /><br /><span style="color: red; font-size: medium;"><b><i><u>NEVER EVER EVEN THINK to work on the toaster plugged in !</u></i></b></span></p><p>So disconnect it, bring it outside and start to shake it to remove crumbles.<br />This first phase can bring out already LOT of stuff.</p><p>Then, start to open it.<br />First thing to do to, with a plier remove the lever handlers.<br />Lot of screws on the bottom (triangular head ones), unscrew all of them and remove the screws. <br />Note that the cover has the electronic attached to it.<br />A cable is connecting the electronic to the circuit who control the power.<br /></p><p>Disconnect the cable so that the entire cover can be removed.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQHVCcXcVOqZt8aB3GHiEjMKcv-Hwxl2CT9H-D5rwvIgOUyA4OZ-LKwQePJm6chmys2rz3jTnA8Nr5DHl-WuwogyNPPclORTaajJl9xlgMNQuykkUxVGOv1oug2j07CPhlSbJlLLSQU9LxvuxKIexyHTlpzmBDMlQqQm38FiZd5X7ELt7BWgic0Cr/s4000/20230409_103457.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixQHVCcXcVOqZt8aB3GHiEjMKcv-Hwxl2CT9H-D5rwvIgOUyA4OZ-LKwQePJm6chmys2rz3jTnA8Nr5DHl-WuwogyNPPclORTaajJl9xlgMNQuykkUxVGOv1oug2j07CPhlSbJlLLSQU9LxvuxKIexyHTlpzmBDMlQqQm38FiZd5X7ELt7BWgic0Cr/s320/20230409_103457.jpg" width="320" /></a></div><br /><p>After the cover is removed ... clean like crazy. Better to have some compressed air in order to remove every possible crumbs stuck.</p><p>Gently remove crumbles from the lever piece that make contact with the PCB, usually there is a lot of silicon grease, try to don't remove too much grease, otherwise it will have to be replaced.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNM6g78QOx76nJed-QTAwSNq1pt5GyHb0u2X11yFK6l8Y3NbVH6xJnBtCyZuwHb8GG85npTYPGjQTCJwrRkbxYqYEj5sJEKbrk-Jxpq8YUazQE8wNltXNkDn3Ew8OU6fn5rrFLuvqQzNtWV_S4-hFwWwBPQYB5B6Fv7xZ0tONfVNsO_Bgi9fkJjbWf/s4000/20230409_104021.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNM6g78QOx76nJed-QTAwSNq1pt5GyHb0u2X11yFK6l8Y3NbVH6xJnBtCyZuwHb8GG85npTYPGjQTCJwrRkbxYqYEj5sJEKbrk-Jxpq8YUazQE8wNltXNkDn3Ew8OU6fn5rrFLuvqQzNtWV_S4-hFwWwBPQYB5B6Fv7xZ0tONfVNsO_Bgi9fkJjbWf/s320/20230409_104021.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WrrLQ-VKT5HA3SQIcTymaCXDl-ZjRqelMMSwUJVcQLLk6elcGXOy8twO62jw9drlmMcRJc22E_3dAqKqx4B_J3Vg0Xcwx-DwomsXHba2em9trLYuDD39oFVdvwweyXMZhba_KOgyxiMMDqLdTEN9ihqxQoC3LlY74d3_ZLIQH0t9SL261fNj3Etf/s4000/20230409_104026.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6WrrLQ-VKT5HA3SQIcTymaCXDl-ZjRqelMMSwUJVcQLLk6elcGXOy8twO62jw9drlmMcRJc22E_3dAqKqx4B_J3Vg0Xcwx-DwomsXHba2em9trLYuDD39oFVdvwweyXMZhba_KOgyxiMMDqLdTEN9ihqxQoC3LlY74d3_ZLIQH0t9SL261fNj3Etf/s320/20230409_104026.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKj_jlJJZUMwLCURjGmtXVSyA8fJ9jL6WPrOWMtCHi1W1ivxntPvo1i35QBVyGGMcDjjdM13-7FSF7i065yKFgnz7cVdsuQ37j-fWw0Bn7UWo-9OlXkcY0opp1e9hguOCaNxMArnS1OxKis405Fu94vaTjnxa7ev4qjI5pbrBx_LTU4faNlx9gvpM/s4000/20230409_104047.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqKj_jlJJZUMwLCURjGmtXVSyA8fJ9jL6WPrOWMtCHi1W1ivxntPvo1i35QBVyGGMcDjjdM13-7FSF7i065yKFgnz7cVdsuQ37j-fWw0Bn7UWo-9OlXkcY0opp1e9hguOCaNxMArnS1OxKis405Fu94vaTjnxa7ev4qjI5pbrBx_LTU4faNlx9gvpM/s320/20230409_104047.jpg" width="320" /></a></div><br /><p>(in the pictures note the amount of crumbles attached to lever that make contact, mixed with the silicon grease)</p><p>At this point is good to run some tests. I did check with a multimeter that when the lever is down there is connection for the power (of course the toaster still UNPLUGGED !!).<br />Then I put back the cover, reconnected the cables and run some tests.</p><p>YEAH !!<br />Fixed. It was probably some bread crumble messing up with the connection, so no power to the electromagnet.<br />So this time was easy.</p><p>Just closed everything and the glorious 6 years old toaster is back in service !</p><p><br /></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-10388018519397086402023-04-08T18:18:00.000-05:002023-06-12T18:19:49.940-05:00Home Automation - remotely controlling lights from HA server via ssh<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLlTyX-dtQBtPVx9oLpVxVUzHvUhjF9f4vZk3GR-YBU_81UDIDmyNQ-lcMURdNTt15AfKtSk-aXWNrbrGUMUKClGE3JNhDSXZVNR7xlAsSzsg2-KHzqSJkCbKqlD8fc9WK4YmNdhciDzpqD40MDY7MogJno13frzd5Fx1Xr04xTrUogCMDuG-c4Xd-/s153/raspberry-pi-model-b-300x225.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="115" data-original-width="153" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLlTyX-dtQBtPVx9oLpVxVUzHvUhjF9f4vZk3GR-YBU_81UDIDmyNQ-lcMURdNTt15AfKtSk-aXWNrbrGUMUKClGE3JNhDSXZVNR7xlAsSzsg2-KHzqSJkCbKqlD8fc9WK4YmNdhciDzpqD40MDY7MogJno13frzd5Fx1Xr04xTrUogCMDuG-c4Xd-/s1600/raspberry-pi-model-b-300x225.jpg" width="153" /></a></div>In order to control lights are years I'm using Heyu and HA-Bridge, running on a server.<p></p><p></p><p>Originally (and possible it will return there) was hosted by Opus, my server.</p><p>It is quite a while now is running over a Raspberry Pi.<br />This article is about how to control X10 via Heyu from another computer in the network (hint, the network is not exposed to the outside)</p><span><a name='more'></a></span><p>There are already some articles about HA-Bridge in my blog :</p><p></p><ul><li><a href="https://hanixdiy.blogspot.com/2021/06/home-automation-fixing-ha-bridge.html" target="_blank">Home Automation - fixing Ha-Bridge</a></li><li><a href="https://hanixdiy.blogspot.com/2022/07/ha-temporary-server.html" target="_blank">Server chronicles - HA temporary server</a></li><li><a href="https://hanixdiy.blogspot.com/2016/11/plying-with-alexa-and-echo.html" target="_blank">Playing with Alexa and Echo</a></li></ul><div>Now the goal is to be able to send Heyu commands to the HA server from another computer in the network.<br />Mainly is used to control the server area fans from a script on a computer in the server room.<br />The alternative would be to reinstall the HA server on the main server so that it can control directly X10 via <a href="https://www.heyu.org/" target="_blank">Heyu</a> or try to use the HA-Bridge REST capability.<br /></div><div><br /></div><h2 style="text-align: left;">ssh</h2><div><br /></div><div>It is actually quite straightforward to control X10 via Heyu from another computer.</div><div>Is enough to use ssh to send a single command. For example to tun on a light is possible to open a terminal on the computer who wants to send the command and digit :</div><div><br /></div><div><span style="font-family: courier;">ssh <user>@<HA-server-URL> 'heyu on c5'</span></div><div><br /></div><div>or also using alias if heyu has defined them and the address <i>c5</i> is defined as <i>alias-light-test</i></div><div><br /></div><div><div><span style="font-family: courier;">ssh <user>@<HA-server-URL> 'heyu on alias-light-test'</span></div><div><br /></div></div><div>The problem of course is that the command will stop asking for the HA server password.<br />So it can not be used "as is" in a script.</div><div><br /></div><h3 style="text-align: left;">Trust the machine</h3><div>What we need to do is to create a key between the two machines so that will not be need any password.</div><div>We have two machines.</div><div>Lets define the machine who need to control X10 as <i>machine A</i> and the HA server who actually control the X10 loads, as <i>machine B.</i></div><div><br /></div><div>On the machine A we need to generate a key if not present or use one if exists.</div><div>So on the machine A : </div><div><br /></div><div><ul style="text-align: left;"><li>open a terminal and log in</li><li>check for existing keys : <span style="font-family: courier;">ls -al ~/.ssh/id_*.pub</span></li><li>If nothing returns, we need to generate a key with : <span style="font-family: courier;">ssh-keygen -t rsa -b 4096 -C "your_email@domain.com"</span></li><li>At this point copy the generated key (public key) on the machine B<br />If exists just use the command ssh-copy-id with the user/IP of the machine B :<br /><span style="font-family: courier;">ssh-copy-id <user>@<machine B IP><br /></span>It will ask the password of the machine of course, but after that it will be possible to ssh from the machine A to the machine B without password asking</li></ul><h2 style="text-align: left;">Remote Control X10 via Heyu</h2></div><div><br /></div><div>Now to simply turn on or off a light will be enough to call as before the ssh command but this time no password will be asked since the HA server will trust the control machne.</div><div><br /></div><h2 style="text-align: left;">Notes</h2><div><br /></div><div>It works, however (because the X10 nature) will not be possible to know the status of the operation, i.e. to know the X10 status.</div><div>A way to do so would be to use HA-Bridge API.</div><div><br /></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li>Blog - <a href="https://linuxize.com/post/how-to-setup-passwordless-ssh-login/#:~:text=To%20set%20up%20a%20passwordless,for%20existing%20SSH%20key%20pair." target="_blank">How to Setup Passwordless SSH Login</a></li></ul></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-71203251846536759742023-04-02T14:00:00.001-05:002023-04-14T10:26:36.196-05:00The Old Lady Project - Introduction<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgCiiGUDGmrAMBRde_u8CCMGe1vZ56VvyA--WOuqRtDCn79iVRLRNGPxKTsLu0OE8exOuQuVFk4Z24KzuGCjDm8ItlPH2EkrWKeSJDUvzLOPNsJZ0XR0WcwiQBupLq_Pyj0YxMOitKn-q2GufqgjhtUxFdy-Uh4rXsbOmW1Jw9jLxhmDaCEvxVSnLl/s604/oldlady-front.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="453" data-original-width="604" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgCiiGUDGmrAMBRde_u8CCMGe1vZ56VvyA--WOuqRtDCn79iVRLRNGPxKTsLu0OE8exOuQuVFk4Z24KzuGCjDm8ItlPH2EkrWKeSJDUvzLOPNsJZ0XR0WcwiQBupLq_Pyj0YxMOitKn-q2GufqgjhtUxFdy-Uh4rXsbOmW1Jw9jLxhmDaCEvxVSnLl/w200-h150/oldlady-front.jpg" width="200" /></a></div><p><br /></p><p>Years ago (I think was the 2009) I did buy, with the idea to restore it, an old tube radio, immediately called "The Old Lady".</p><p>The radio is a <a href="https://radioatticarchives.com/radio.htm?radio=5214" target="_blank">Truetone D-1001</a>.</p><p></p><p>However the electronic was really in bad shape and of course, who the heck has time to work on it ?</p><p>So the Old Lady went in a box, waiting.</p><span><a name='more'></a></span><h2 style="text-align: left;">The original</h2><p>Just a couple of pictures to show how the Old Lady was when I found it in an antique mall.</p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Mck6s2zMXqwlm5yZOKVhc8UEwJWXx_XO7yxUU15t_7dEf0H6tDPeXOJNCMpJFekv9V_0iK_JrFTLw2N-HDcVUvat4V8QZDeD3nMwrGtnqni2ARl6Tbr4lNY7-F5SA_0sskRPYHu2jdGNUHcJXEJTLESKocD-OyY5HA52rHx980smQmGuyP6QBpnA/s604/oldlady-inside-down.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="453" data-original-width="604" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Mck6s2zMXqwlm5yZOKVhc8UEwJWXx_XO7yxUU15t_7dEf0H6tDPeXOJNCMpJFekv9V_0iK_JrFTLw2N-HDcVUvat4V8QZDeD3nMwrGtnqni2ARl6Tbr4lNY7-F5SA_0sskRPYHu2jdGNUHcJXEJTLESKocD-OyY5HA52rHx980smQmGuyP6QBpnA/s320/oldlady-inside-down.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Inside down</td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO-HW12iJP_PMr31_Lj3Yx4U7GT23ypN6K_5Cm7jZVlmgqt8onh7GAb-hRB_8tnMx509rkkD6kn6BoGDqydAy0-Cf_D1wkEX5fNB2DX_BbxeghDSKH6OR980Bk3wQp9UcNIXUzC6PRzfqzuiDwSUeVEo8mrz48MNN8mqD_bNPHXovjbvZhFqv6X0Xe/s604/oldlady-inside-up.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="453" data-original-width="604" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO-HW12iJP_PMr31_Lj3Yx4U7GT23ypN6K_5Cm7jZVlmgqt8onh7GAb-hRB_8tnMx509rkkD6kn6BoGDqydAy0-Cf_D1wkEX5fNB2DX_BbxeghDSKH6OR980Bk3wQp9UcNIXUzC6PRzfqzuiDwSUeVEo8mrz48MNN8mqD_bNPHXovjbvZhFqv6X0Xe/s320/oldlady-inside-up.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Inside up</td></tr></tbody></table><h2 style="text-align: left;">The general idea</h2><p>Now is time to do something with it.<br />Ideally would be really nice to rebuild/restore it, but even assuming to have the time (that I don't have), the space to work on it (that I don't have), the motivation to work on tubes (that I don't have) and the ability and money to find all the needed parts (that I don't have), I would say something else is needed.</p><p>So I decided to use the box and build a new radio in it !</p><h2 style="text-align: left;">The goal</h2><p>Initially I was thinking to develop an IP radio, however going around the net I found a very nice chip from Silicon Labs (now sold to Skyworks), the <a href="https://www.skyworksinc.com/-/media/Skyworks/SL/documents/public/data-sheets/Si4730-31-34-35-D60.pdf" target="_blank">Si473x</a> series, controlled via I2C, that contains a full radio receiver for AM/FM/SW.</p><p>Thus the idea now is to retrofit the Old Lady with a new digital radio capable to receive AM/FM and SW, possibly maintaining the old look as much as possible.</p><h2 style="text-align: left;">Proceeding proposal</h2><p>The ideal goal would be to build a AM/FM/SW receiver, controlled by a GUI that mimic the "graphic" of the old lady, i.e. a clock with a underline bar to indicate the frequency.<br />Of course the D-1001 was only AM, so something will be different, not sure yet how to proceed with the GUI design.</p><p>Different activities will follow, here some of them (not necessarily in the chronological order) :</p><p></p><ul style="text-align: left;"><li>select the correct hardware for the project</li><li>set up a development environment for the MCU/system selected (very probably I'll go with a Raspberry Pi in Python)</li><li>start to design a basic GUI based on the Old Lady design</li><li>start to build a received based on the Si43xx (I do have the 72 and 75 available)</li><ul><li>possible to use an ESP86 or WROOM since I have them around</li></ul><li>integrate the receiver control in the Raspberry</li><li>Adapt the electronic to the Old Lady</li><ul><li>3D print adapters/supports</li></ul></ul><div><br /></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-18718983979923090162023-03-26T14:02:00.000-05:002023-06-01T14:03:02.471-05:00Server chronical - Digitemp - reading from DS1490F<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij7qkFMW1mfks5nJMCGgVaV4ViWrko0Pe5ZPPR4quH09a2CqmnKpHwOgaGz8jA15RyZR6UVUrzz3wbEflBFqZgykfdkcbI1KZlDtfUMf85xZrDperxyg9BveUJRIBYTgNmijauQrlrvyzRfUcw9133Y4jv0qBuvsrPOT2F2cPi9bHmGjhFCbAg7pTO/s200/image.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="45" data-original-width="200" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij7qkFMW1mfks5nJMCGgVaV4ViWrko0Pe5ZPPR4quH09a2CqmnKpHwOgaGz8jA15RyZR6UVUrzz3wbEflBFqZgykfdkcbI1KZlDtfUMf85xZrDperxyg9BveUJRIBYTgNmijauQrlrvyzRfUcw9133Y4jv0qBuvsrPOT2F2cPi9bHmGjhFCbAg7pTO/s1600/image.png" width="200" /></a></div>Digitemp is a software capable to read Dallas 1Wire sensors for the temperature, the DS18S20.<br /><br /><p></p><p>It was in use on the old server for years in order to acquire different temperatures and thus control automatically some Fans in the server room.</p><p>Let's see if it can be revived in the new server.</p><p></p><h2 style="text-align: left;"><span><a name='more'></a></span>System information</h2><div>This article assumes to work on a HP ProLiant DL360p Gen8 server running Ubuntu 22.04 LTS.<br />Let see some information about that : </div><div><ul style="text-align: left;"><li>Kernel : 5.19.0-32-generic #33</li><li>Distro : 22.04.1-Ubuntu SMP PREEMPT_DYNAMIC </li><li>USB adapter for 1Wire Dallas : seen as DS1490F <br /><span style="font-family: courier; font-size: x-small;">Bus 001 Device 005: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter</span></li></ul></div><h2 style="text-align: left;">Temperature monitor system</h2><div style="text-align: left;">Because the server position it is important to monitor the temperature in order to avoid extremes, automatically activating fans to bring in fresh air and push out hot air.</div><div style="text-align: left;"><br />There are 3 different areas in my case. The server is located in a small room below the laundry stairs, with the only access from the garage.<br />Thus I set up three main areas to monitor :</div><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><br /><li><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">server area</span></span></li><li><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">garage</span></span></li><li><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">laundry area</span></span></li></ul><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div>The Server area is insulated from the Garage area, but it accessible only from it.<br /><br />The Laundry area is just above the server area. The Laundry area is air conditioned, so it is possible to bring fresh air in the Server area from there (see <a href="https://hanixdiy.blogspot.com/2015/08/cooling-server-area.html" target="_blank">Cooling the server area</a>)<br /><br />Two fans are in place, one blowing air FROM the Server area into the Garage area, and one blowing fresh air from the Laundry Room into the server area.<br /><br />There are some choices to monitor the temperature.<br /><br /><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li><span style="color: black; font-family: Arial;"><span style="font-size: 11pt; white-space: pre;">1Wire sensors</span></span></li><li>USB sensor</li><li>CPU sensor</li></ul><div><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div><h3 style="text-align: left;"><span style="font-family: Arial;"><span style="font-size: 14.6667px; white-space: pre-wrap;">1Wire sensors</span></span></h3><h3 style="text-align: left;"><div><span style="font-weight: normal;"><span style="font-family: inherit; font-size: small;">A network of 3 DS18s20 sensors, handled by a 1Wire <-> USB interface (1490F) are installed to monitor the three area temperatures.</span></span></div><span style="font-weight: normal;"><span style="font-family: inherit; font-size: small;"><br />The temperature can be acquired using the Digitemp program.<br /><br /> Of course nothing is easy, so I soon discovered that the version of Digitemp installed from the distro is not correctly working.<br /><br />So the first step is to build the 1wire network using an USB adapter (DS1490F ) and test it on a machine running a working Digitemp.</span></span></h3><h3 style="text-align: left;"><b>USB </b>settings</h3>It is mandatory to blacklist the DSx490 from the USB tree, otherwise digitemp can not use it.<br /><br /><div>Every time a DSx490 is plugged in some modules are automatically loaded from the kernel, this need to be stopped.<br />In the kernel it is used the name of DS2490 for this type of adapter.<br /><br />To do so :</div><div><br /><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">edit the file </span><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">/etc/modprobe.d/blacklist.conf</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">add the line (at the end) : </span><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">blacklist ds2490</span></span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">save the file</span></p></li><li aria-level="1" dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">reboot</span></p></li></ul><div><br /></div><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">After that, plugging the USB adapter would not cause the installation of the kernel modules for it.<br /><br /></p><h3 style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">Digitemp installation</h3><br />Initially I installed the official version from the repository : <span style="font-family: courier;">sudo apt-get install digitemp<br /></span><br />The version installed was the 3.7.13 and was NOT WORKING !<br />It is necessary to use a patched version capable to address the USB adapter.<br /><br /><br />These the steps I followed:<br /><br /><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px; text-align: left;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">I removed official version of Digitemp: sudo apt-get remove digitemp</p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">Installed support libraries : <br /><span style="font-family: courier;">- sudo apt install libusb-1.0-0-dev<br />- sudo apt install build-essential</span></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">downloaded a patched version from <a href="https://github.com/desto-kluger/digitemp">https://github.com/desto-kluger/digitemp</a></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">extracted/cloned the code in a local directory (in the example is called MyApps)</p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">Compiled : <br /> <span style="font-family: courier;">- make clean; make ds2490</span></p></li><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">run locally to test :<br /><span style="font-family: Courier New;"><span style="white-space: pre;">sudo ./digitemp_DS2490 -i
</span></span><span style="font-family: "Courier New"; white-space: pre;">DigiTemp v3.6.0 Copyright 1996-2009 by Brian C. Lane
</span><span style="font-family: "Courier New"; white-space: pre;">GNU Public License v2.0 - http://www.digitemp.com
</span><span style="font-family: "Courier New"; white-space: pre;">Found DS2490 device #1 at 4/3
</span><span style="font-family: "Courier New"; white-space: pre;">Turning off all DS2409 Couplers
</span><span style="font-family: "Courier New"; white-space: pre;">....
</span><span style="font-family: "Courier New"; white-space: pre;">Searching the 1-Wire LAN
</span><span style="font-family: "Courier New"; white-space: pre;">1098E70F01080027 : DS1820/DS18S20/DS1920 Temperature Sensor
</span><span style="font-family: "Courier New"; white-space: pre;">10FDDD710108008B : DS1820/DS18S20/DS1920 Temperature Sensor</span><span style="font-family: "Courier New"; white-space: pre;">10438CF501080010 : DS1820/DS18S20/DS1920 Temperature Sensor|
</span><span style="font-family: "Courier New"; white-space: pre;">ROM #0 : 1098E70F01080027
</span><span style="font-family: "Courier New"; white-space: pre;">ROM #1 : 10FDDD710108008B
</span><span style="font-family: "Courier New"; white-space: pre;">ROM #2 : 10438CF501080010
</span><span style="font-family: "Courier New"; white-space: pre;">Wrote .digitemprc</span></p></li></ul><div><span style="font-family: Courier New;"><span style="font-size: 10.6667px; white-space: pre;"><br /></span></span></div><ul style="margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;"><li aria-level="1" style="font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline;"><p role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial;">Read the temperatures:<br /></span><span style="font-family: courier;"><span style="color: black;"><span><span style="text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre;">sudo ./digitemp_DS2490 -a</span></span></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">DigiTemp v3.6.0 Copyright 1996-2009 by Brian C. Lane</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">GNU Public License v2.0 - http://www.digitemp.com</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Found DS2490 device #1 at 4/3</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 16:09:00 Sensor 0 C: 28.25 F: 82.85</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 16:09:01 Sensor 1 C: 25.38 F: 77.68</span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span><span style="background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 16:09:02 Sensor 2 C: 31.25 F: 88.25</span></span></p></li></ul><h3 style="text-align: left;">Use Digitemp</h3><p></p><div align="left" dir="ltr" style="margin-left: 0pt;">Before to use Digitemp, it is important to run it with the -i option from the location.<br /><br />Here the sensor assignment and location :<br /><br /><table style="border-collapse: collapse; border: none; table-layout: fixed; width: 468pt;"><colgroup><col></col><col></col><col></col><col></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Num. sensor</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ID</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Location</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Awk number</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1098e70f01080027</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Garage</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">27</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">1</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">10fddd710108008b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">AC area</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">36</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">2</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">10438cf501080010</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Server area</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">45</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><br /></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><br /></td></tr></tbody></table></div><p><br />For example (in home) :<br /><br /><span style="font-family: "Courier New"; font-size: 11pt; white-space: pre;">sudo MyApps/digitemp-master/./digitemp_DS2490 -i</span></p><p><br />This will write the configuration file.<br /><br />Then it will be possible to call (from home):<br /><br /><span style="font-family: "Courier New"; font-size: 11pt; white-space: pre;">sudo MyApp/digitemp-master/./digitemp_DS2490 -a</span></p><p><br /><br />The reading will be for the three sensor :<br /><br /><span style="font-family: courier; white-space: pre;">DigiTemp v3.6.0 Copyright 1996-2009 by Brian C. Lane</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: courier; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">GNU Public License v2.0 - http://www.digitemp.com</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: courier; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Found DS2490 device #1 at 1/4</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: courier; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 23:34:04 Sensor 0 C: 28.50 F: 83.30</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: courier; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 23:34:05 Sensor 1 C: 27.50 F: 81.50</span></p><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: courier; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Jun 28 23:34:06 Sensor 2 C: 28.50 F: 83.30</span></p><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li><a href="https://www.digitemp.com/" target="_blank">Digitemp</a></li><ul><li><a href="https://github.com/desto-kluger/digitemp" target="_blank">Patched version of Digitemp</a> to be used</li></ul><li><a href="https://wiki.spoje.net/doku.php/howto/electro/1-wire" target="_blank">Dallas network adapter</a> (seen on USB as DF1490F)</li></ul></div><p><br /></p></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-52511186548685303552023-03-18T11:01:00.000-05:002023-05-26T11:01:41.815-05:00Server chronicles - Drobo on ProLiant<p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Ce5Qu1eftLyIO6SN9XmodbkVaxHYipJbEqxjUYAqfKvEw6_2jtZo_OGdplz7Gp_FCTPc0P5c-LBx3c4nD5uuoq3nKf68B19HBvMzbWqhX-WDaXmJByDZ1ewwBh1GAADurTtT92Ny0DafnVF3HMNr4zeTa1EN2oU6vstGEQt1rXNETcNYUlvMEB5t/s1266/jackal1u.png" style="clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="285" data-original-width="1266" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Ce5Qu1eftLyIO6SN9XmodbkVaxHYipJbEqxjUYAqfKvEw6_2jtZo_OGdplz7Gp_FCTPc0P5c-LBx3c4nD5uuoq3nKf68B19HBvMzbWqhX-WDaXmJByDZ1ewwBh1GAADurTtT92Ny0DafnVF3HMNr4zeTa1EN2oU6vstGEQt1rXNETcNYUlvMEB5t/w200-h45/jackal1u.png" width="200" /></a>On the old server I used a USB Drobo unit to backup data.</p><p>In theory should be enough to connect the unit to the server to see it .. and in part is true, but there are some unexpected problems.</p><span><a name='more'></a></span><h2 style="text-align: left;">Drobom</h2><p>It is necessary to install the drobom utility (part of the package <a href="https://github.com/petersilva/drobo-utils#try-out-the-gui" target="_blank">Drobo Utils</a>).<br />Because the version of Linux the only reliable way is from GitHub, installing the source and building it.<br />Drobo-utils is not anymore available as package from the distribution.</p><p>Once installed and configured there are mainly two useful commands (it is assumed the drobom command be in the path or be in the directory containing it) :</p><p></p><ul style="text-align: left;"><li>sudo ./drobom status</li><li>sudo ./drobom info</li></ul><h3 style="text-align: left;">Status</h3><div>The status command allows to see if everything is normal and the used capacity of the unit.</div><div>For example :</div><div><br /></div><div><div><span style="font-family: courier;">$ sudo ./drobom status</span></div><div><span style="font-family: courier;">/dev/sdb /media/drobo Drobo 80% full - ([], 0)</span></div></div><div><br /></div><h3 style="text-align: left;">Info</h3><div>The Info command returns information about the unit configuration and status of each hard disk :</div><div><br /></div><div><br /></div><div><div><span style="font-family: courier;">$ sudo ./drobom info</span></div><div><span style="font-family: courier;">---------------------------------------------------------</span></div><div><span style="font-family: courier;">Drobo Name: Drobo Devices: /dev/sdb</span></div><div><span style="font-family: courier;"> Time: Tue May 9 19:04:11 2023</span></div><div><span style="font-family: courier;">---------------------------------------------------------</span></div><div><span style="font-family: courier;">Configuration maxima: slots: 5, luns: 16, lunsize: 68 TB</span></div><div><span style="font-family: courier;">Capacity (in GB): used: 2655, free: 642, total: 3298</span></div><div><span style="font-family: courier;">protocol version: 0.11</span></div><div><span style="font-family: courier;">SCSI emulation information:</span></div><div><span style="font-family: courier;">Vendor: Drobo Model: Gen3B810i Revision: 5.00</span></div><div><span style="font-family: courier;">/dev/sdb: bus=scsi3 channel=0 id=0 lun=0 (vendor=Drobo, version=30527)</span></div><div><span style="font-family: courier;">query slotinfo result: number of slots: 5</span></div><div><span style="font-family: courier;">slot GB Model Status</span></div><div><span style="font-family: courier;"> 0 2000 Hitachi HUA72302SATA green</span></div><div><span style="font-family: courier;"> 1 500 WDC WD5000AADS-0SATA green</span></div><div><span style="font-family: courier;"> 2 1000 ST1000DM003-1CH1SATA green</span></div><div><span style="font-family: courier;"> 3 2000 Hitachi HUA72302SATA green</span></div><div><span style="font-family: courier;"> 4 0 gray</span></div><div><span style="font-family: courier;">Firmware: 3.5.3</span></div><div><span style="font-family: courier;">Revision: 11.48 ( 19122 ) built: Sep 29 2016,21:42:00</span></div><div><span style="font-family: courier;">Features: NO_AUTO_REBOOT,NO_FAT32_FORMAT,USED_CAPACITY_FROM_HOST,DISKPACKSTATUS,ENCRYPT_NOHEADER,CMD_STATUS_QUERIABLE,VARIABLE_LUN_SIZE_1_16,PARTITION_LUN_GPT_MBR,FAT32_FORMAT_VOLNAME,SUPPORTS_NEW_LUNINFO2,feature x0800,feature x2000,SUPPORTS_OPTIONS2,SUPPORTS_SHUTDOWN,feature x10000,feature x40000,feature x80000,SUPPORTS_SINGLE_LUN_FORMAT,leftovers (0x10600000)</span></div><div><span style="font-family: courier;">/dev/sdb /media/drobo Drobo 80% full - ([], 0)</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> YellowThreshold 85</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> RedThreshold 95</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> SpinDownDelayMinutes 14</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> Flags 2</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> DualDiskRedundancy False</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> SpinDownDelay True</span></div><div><span style="font-family: courier;"><span style="white-space: pre;"> </span> UseManualVolumeManagement False</span></div><div><span style="font-family: courier;">hoho! multiple partition types! Brave are we not?</span></div><div><span style="font-family: courier;">lun size (GB) used PTFmt FStype:</span></div><div><span style="font-family: courier;"> 0 70368 2655 GPT [] </span></div><div><span style="font-family: courier;">---------------------------------------------------------</span></div></div><div><br /></div><div>So it is possible to regularly interrogate the unit and extract from the Info if one hard disk has problems and the remaining capacity of the unit.</div><div><br /></div><p><br /></p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li>gitHub - <a href="https://github.com/petersilva/drobo-utils#try-out-the-gui" target="_blank">Drobo Utils</a></li><li>Drobo official - <a href="https://www.drobo.com/docs/start-drobo/" target="_blank">Start Drobo</a></li></ul><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-76940075826977085382022-11-20T17:07:00.000-06:002022-11-22T10:06:39.540-06:00Ubuntu - media, from iso to mp4/mkv<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyPzCVEv_QSdgidYdCqElOvvXI-JiasJvI0Xk9xkiEHRNgQyrpZI2DoD7tOZYrKf6BND-CVxerfGrHdC0ibqtPoReMa8ek5-miPLPOamUga-4pYrHvMKLvn8Qs5AaLTMl3n_73_PGzr5Z5VsASE-JZDOK5A0JukymzhVQb4xWSd15SKHldAM03OCNZ/s2048/linux-clipart-18.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1692" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyPzCVEv_QSdgidYdCqElOvvXI-JiasJvI0Xk9xkiEHRNgQyrpZI2DoD7tOZYrKf6BND-CVxerfGrHdC0ibqtPoReMa8ek5-miPLPOamUga-4pYrHvMKLvn8Qs5AaLTMl3n_73_PGzr5Z5VsASE-JZDOK5A0JukymzhVQb4xWSd15SKHldAM03OCNZ/w165-h200/linux-clipart-18.jpg" width="165" /></a></div><br />This is a brief note to describe how to solve a problem.<p></p><p><br /></p><p>After reinstalling my media server I decided to do some spring cleaning.<br /><br /></p><p>I did find many movies I did record years ago and created as iso image.</p><p>In this way unfortunately is not easy to see them directly on Plex, the best way is to convert them in mp4 (or mkv).</p><span><a name='more'></a></span><p>So how to proceed ?</p><p>Of course all this discussion is Linux centered, specifically using Ubuntu 22.04 LTS<br />I will use two tools :</p><p></p><ul style="text-align: left;"><li><a href="https://handbrake.fr/" target="_blank">HandBrake</a></li><li><a href="https://mkvtoolnix.download/" target="_blank">mkvtoolkit </a></li></ul><div>Let start to install Handsbrake and the Mkvtoolkit if not already done.</div><p></p><p>The first thing is to extract the movie from the iso file, to do so Handbrake is used.</p><p>Open Handbrake and Open Source over the iso image.<br />Depending the way the iso file was prepared, there are usually multiple short blocks.<br />Extract of all them.</p><p>We'll end up with a bunch of mp4 or mkv files.</p><p>The second phase is to join all of them together and the tool to do so is called mkvmerge (from the mvtoolkit)</p><p>From a terminal the better way is to go on the directory where the blocks are stored, then the syntax to use is :</p><p>mkvmerge -o <output_file_name> <input_file_1> \+ <input_file_2> .... \+ <input_file_x></p><p>After some tests I can say that is better to keep the same format of the input.<br />Converting in different format can bring some problems when played the join.</p><p>Here an example of merge of a file stored in 6 blocks, named film0.m4v to film6.m4v, the result in a film called :</p><div style="text-align: left;"><span style="font-family: courier; font-size: x-small;">thefwguy@Milo:~/Videos$ mkvmerge -o lockness.m4v lockNess0.m4v \+ lockNess1.m4v \+ lockNess2.m4v \+ lockNess3.m4v \+ lockNess4.m4v \+ lockNess5.m4v \+ lockNess6.m4v<br /></span><span style="font-family: courier; font-size: x-small;">mkvmerge v45.0.0 ('Heaven in Pennies') 64-bit<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess0.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess1.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess2.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess3.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess4.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess5.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess6.m4v': Using the demultiplexer for the format 'QuickTime/MP4'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess0.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess0.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess1.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess1.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess2.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess2.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess3.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess3.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess4.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess4.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess5.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess5.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess6.m4v' track 0: Using the output module for the format 'AVC/H.264'.<br /></span><span style="font-family: courier; font-size: x-small;">'lockNess6.m4v' track 1: Using the output module for the format 'AAC'.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 1 ('lockNess1.m4v'). A default mapping of 1:0:0:0,1:1:0:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 2 ('lockNess2.m4v'). A default mapping of 2:0:1:0,2:1:1:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 3 ('lockNess3.m4v'). A default mapping of 3:0:2:0,3:1:2:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 4 ('lockNess4.m4v'). A default mapping of 4:0:3:0,4:1:3:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 5 ('lockNess5.m4v'). A default mapping of 5:0:4:0,5:1:4:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">No append mapping was given for the file no. 6 ('lockNess6.m4v'). A default mapping of 6:0:5:0,6:1:5:1 will be used instead. Please keep that in mind if mkvmerge aborts with an error message regarding invalid '--append-to' options.<br /></span><span style="font-family: courier; font-size: x-small;">The file 'lockness.m4v' has been opened for writing.<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 1 ('lockNess1.m4v') to track 0 from file no. 0 ('lockNess0.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 1 ('lockNess1.m4v') to track 1 from file no. 0 ('lockNess0.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 2 ('lockNess2.m4v') to track 0 from file no. 1 ('lockNess1.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 2 ('lockNess2.m4v') to track 1 from file no. 1 ('lockNess1.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 3 ('lockNess3.m4v') to track 0 from file no. 2 ('lockNess2.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 3 ('lockNess3.m4v') to track 1 from file no. 2 ('lockNess2.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 4 ('lockNess4.m4v') to track 0 from file no. 3 ('lockNess3.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 4 ('lockNess4.m4v') to track 1 from file no. 3 ('lockNess3.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 5 ('lockNess5.m4v') to track 1 from file no. 4 ('lockNess4.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 5 ('lockNess5.m4v') to track 0 from file no. 4 ('lockNess4.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 0 from file no. 6 ('lockNess6.m4v') to track 0 from file no. 5 ('lockNess5.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Appending track 1 from file no. 6 ('lockNess6.m4v') to track 1 from file no. 5 ('lockNess5.m4v').<br /></span><span style="font-family: courier; font-size: x-small;">Progress: 100%<br /></span><span style="font-family: courier; font-size: x-small;">The cue entries (the index) are being written...<br /></span><span style="font-family: courier; font-size: x-small;">Multiplexing took 3 seconds.</span></div><div><br /></div><p><br /></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-26323660389044162592022-11-19T10:05:00.003-06:002023-05-26T11:34:15.103-05:00Server chronicles - Plex on ProLiant<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9-VHOCa2EPglFNl1G11yg9IWpHJ4AUHJ_W320B4qdVSBmgkzRz_SXY9MY_0P_lsKMtbdSL17tImDRGrmBHWAUO4aL9FtVsH0DaH23XGoFgvqjOXVHZskFukB62IE-kQnjOO6dxp8jMEO5VppOyUInT6eImwsmOXJ8X6wRrd4WlvX0u4Vc9mRmQWWZ/s1266/jackal1u.png" style="clear: left; float: left; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="285" data-original-width="1266" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9-VHOCa2EPglFNl1G11yg9IWpHJ4AUHJ_W320B4qdVSBmgkzRz_SXY9MY_0P_lsKMtbdSL17tImDRGrmBHWAUO4aL9FtVsH0DaH23XGoFgvqjOXVHZskFukB62IE-kQnjOO6dxp8jMEO5VppOyUInT6eImwsmOXJ8X6wRrd4WlvX0u4Vc9mRmQWWZ/w200-h45/jackal1u.png" width="200" /></a><br /> One of the goals I want to achieve rebuilding the server is to reinstall services in a better way.<p></p><p></p><p>One of the services is my Plex server</p><span><a name='more'></a></span><p>The Plex server allows to stream my multimedia content.</p><p>On the old server was just installed as normal service, this time I wanted to install it in a docker container, to keep separate as much as possible the service.</p><p>I did find a great tutorial to do so, however I ended up mixing up the operations with other tutorials.<br />The installation is relatively clear, however the configuration and setting up was not really clear.</p><h2 style="text-align: left;">Plan</h2><p>This is what I would like to obtain :</p><p></p><ul style="text-align: left;"><li>latest version of Plex server running in docker</li><li>server accessible only on my local network (no outside access allowed)</li><li>streaming of my local content</li><li>streaming from Plex subscriptions</li></ul><p></p><p>Let start (original instructions followed <a href="https://computingforgeeks.com/how-to-run-plex-media-server-in-docker-containers/" target="_blank">here</a> and <a href="https://www.smarthomebeginner.com/install-plex-using-docker/" target="_blank">here</a>)</p><h2 style="text-align: left;">Installation</h2><p>It is implicit to have docker and docker-compose already installed on the server (see <a href="https://hanixdiy.blogspot.com/2022/08/fixing-server-docker.html" target="_blank">Fixing the server - Docker</a>).</p><p>The Plex itself runs in a docker container, however the data must remains somewhere in the server outside docker.</p><p>As suggested, as first thing I did create the Plex data area in the designed docker Persistent storage area</p><p><span style="background-color: #051e30; color: white; font-family: monospace, monospace; font-size: 17px; white-space: pre;">sudo mkdir /dockerPS/plex
sudo mkdir /dockerPS/plex/{database,transcode,media}</span></p><p>Because sudo is used, the directories are basically assigned to root !</p><p>Then I choose to install Plex using docker compose.</p><p>I so created this YML file (using different sources/examples).<br />The chosen way to set up and run Plex under docker is in Bridge mode (the default).<br />Honestly no time/resources/willing to experiment much :)</p><p>I did obtain a claim key from my Plex account and used in the yml file (to attach the instance of the server to my account).</p><h3 style="text-align: left;">The docker compose file</h3><p>Here the yml file used (of course the Claim key is not posted here :) )<br />I did call the file plex-docker-compose.yml, so is necessary to use the -f switch when running docker-compose.</p><blockquote><p><b>cat plex-docker-compose.yml </b></p><div style="text-align: left;"><span style="font-family: courier;">version: '2'<br />services:<br /> plex:<br /> container_name: plex<br /> image: lscr.io/linuxserver/plex:latest<br /> restart: unless-stopped<br /> ports:<br /> - 32400:32400/tcp<br /> - 3005:3005/tcp<br /> - 8324:8324/tcp<br /> - 32469:32469/tcp<br /> - 1900:1900/udp<br /> - 32410:32410/udp<br /> - 32412:32412/udp<br /> - 32413:32413/udp<br /> - 32414:32414/udp<br /> environment:<br /> - PUID=1000<br /> - PGID=1000<br /> - TZ=USA/Chicago<br /> - PLEX_CLAIM=claim-xxxxxxx_xxxxxxxxx<br /> - ADVERTISE_IP=http://192.168.2.61:32400/<br /> hostname: plexserver.thefwguy.com<br /> volumes:<br /> - /dockerPS/plex/database:/config<br /> - /dockerPS/plex/transcode:/transcode<br /> - /dockerPS/plex/media:/data</span></div><div><br /></div></blockquote><p>At that point I just executed docker compose and created the plex docker entity on my server.</p><p>So for example, assuming to be in the directory where the yml file is, to start the server simply issue this command :</p><p><span style="background-color: #051e30; color: white; font-family: monospace, monospace; font-size: 17px; white-space: pre;">docker-compose -f plex-docker-compose.yml up -d</span></p><div>It did work without problems (look here for more detailed <a href="https://computingforgeeks.com/how-to-run-plex-media-server-in-docker-containers/" target="_blank">instruction</a>)</div><p>Of course I did set up the system to run plex docker automatically when the system starts.</p><p>Since the goal is to don't have the server be reachable outside my network I didn't open any port on my router for this.</p><h2 style="text-align: left;">Populating the server</h2><p>Ok, now the server is up and running, time to add content.</p><p>In my case of course was just matter to copy under the directory <span style="font-family: courier;">/dockerPS/plex/media</span> my material (saved in backup) of movies and music and pictures.</p><h2 style="text-align: left;">Configuring Plex for local media</h2><p>The trick is at this point to let the content to be seen by Plex, a part not well covered by the instructions found.</p><p>So, having Plex working and the content copied in the directory, the fastest way to configure Plex is to open a browser and go to the address of the installed Plex.<br />The address is defined in the docker compose yml file :<br /><br /> <span style="font-family: courier;">ADVERTISE_IP=http://<your_local_IP>:32400/</span><br /> </p><p>So the browser will point to : <span style="font-family: courier;"><your-local_IP>:32400/manage</span></p><p>If Plex is not configured, this will allow to enter the configuration mode, later will be enough to go in Settings.</p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li>ComputerGeek - <a href="https://computingforgeeks.com/how-to-run-plex-media-server-in-docker-containers/" target="_blank">How To Run Plex Media Server in Docker Containers</a></li><li>SmartHome beginner - <a href="https://www.smarthomebeginner.com/install-plex-using-docker/" target="_blank">Install Plex using Docker – Media Server to Share and Stream Media</a></li><li><a href="http://192.168.2.61:32400/web/index.html#!/" target="_blank">My Plex</a> (is behind firewall)</li><li>Openmediavault - <a href="https://forum.openmediavault.org/index.php?thread/34287-plex-setup-help-not-seeing-my-local-media/" target="_blank">not seeing my local media</a></li></ul><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-42972679527158072662022-11-06T14:44:00.001-06:002022-11-15T08:29:48.557-06:00PiKVM - a KVM <-> IP on System76<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMOc_oDiBcdQ4LFoh3ArBGZRK5rnkq9UqresIamdi_emi1VtQj-KUzA63aO_BEa3C9CcL9LXx1Qk3uCb52M4dr4zQAAEt3oqXj98wU06sfZ4BIsB8BeFmZXceeps_H5aDDacy8XiekJBMutSFNaTC6eL3CotWVeAo21Yh801oyI8yiEsr8rdhn1UZg/s1266/jackal1u.png" style="clear: left; display: inline; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="285" data-original-width="1266" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMOc_oDiBcdQ4LFoh3ArBGZRK5rnkq9UqresIamdi_emi1VtQj-KUzA63aO_BEa3C9CcL9LXx1Qk3uCb52M4dr4zQAAEt3oqXj98wU06sfZ4BIsB8BeFmZXceeps_H5aDDacy8XiekJBMutSFNaTC6eL3CotWVeAo21Yh801oyI8yiEsr8rdhn1UZg/w200-h45/jackal1u.png" width="200" /></a>Is always better to have a Plan B if the main plan fails.<br />My server has an embedded KVM (with an extra module installed - see the article <a href="https://hanixdiy.blogspot.com/2022/08/fixing-server-kvm-ip.html" target="_blank">Fixing the server - KVM <-> IP</a>) but surprise surprise the actual KVM functionality is not working because the motherboard is not supporting an extension module.<br /><br />This article discuss about the KVM <-> IP solution with a Raspberry Pi on the open source project PiKVM as a way to have the KVM functionality on my server.</p><p></p><span><a name='more'></a></span><h2 style="text-align: left;">The PiKVM </h2><h3 style="text-align: left;">Build it from scratch ?</h3><div>There are many ways to put together the project and USUALLY would make sense to buy the single parts and then assemble everything.</div><div>So I did start to set up the shopping list and, maybe because the current economic situation, in the end buying everything around is not really a saving experience and even worse one have to wait quite a while to receive all the pieces and put everything together.<br /></div><div>IMHO probably buying it already made make more sense, both for the cost and time involved.</div><h3 style="text-align: left;">The shopping list</h3><div>The assembled unit come in a metal container plus the ATX interface and the necessary cables.<br />Better to plan to buy also a power supply.<br /><br />There is not really a good documentation to easy set up a built unit.<br />In the end for my specific needs I would have to have :</div><div><ul style="text-align: left;"><li>the PiKVM unit</li><li>the ATX interface</li><li>the power supply</li><li>a HDMI <-> VGA cable</li><li>a USB-A <-> USB-C adapter</li></ul><h2 style="text-align: left;">Connecting PiKVM to the server</h2></div><div>There are three main connection to do and at least one requires to be done inside the server.</div><div><br /></div><div><ul style="text-align: left;"><li>ATX connection</li><li>Video connection</li><li>USB connection</li></ul><h3 style="text-align: left;">ATX connection</h3></div><div><span style="color: #cc0000;"><b><i>Note ! In this paragraph I did explore the possibility to interface the ATX BUT at the moment I will use the native KVM capability in the server for this since allows me to access to more information, like the RPM of the fans and diagnostics.</i></b></span></div><div><br /></div><div>The PiKVM has the capability also to control the power supply of the server, i.e. will be possible also to turn OFF and ON the server remotely as well as monitor the status of the server power and working.<br />Neat !</div><div>But in order to do is necessary to connect an interface (included in the PiKVM kit) inside the server.</div><div><b><i><br /></i></b></div><div><div>Every server is different so is hard to have a universal guide, the PiKVM project <a href="https://docs.pikvm.org/v3/#atx-connection" target="_blank">gives some suggestions</a>.<br /><br /></div><div>After opening the server the first task is to find a place where to install the interface, inside the server leaving an access for the RJ45 port.</div><div><br /></div><div>The critical part however is to connect the ATX interface of PiKVM with the server.</div><div><br /></div></div><div><b><i>CAUTION !!! </i></b></div><div><b><i>The ATX interface is connected to the PiKVM via a UTP Cat5 cable, however that cable has NOTHING to do with the network connection !!</i></b></div><div><br /></div><div>The ATX interface board allows to connect 2 LED for the status and 2 pushbuttons </div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDN-eX9UeI10tD0GMJA18J9wvGqLwD8xNB_xjcHu1xiTDElPqYkHowqmzaJ_S3X4wL2AY8T1490beRxCmybLFDgLBru_CTD-6NW5gAnb_Qb73nT8TKpB3EdLJaYPvVL4vXaKlzJ_nZIdYkcaS8VA0XGKTJ24SFaY42-S-zoRgtZrq9FXYTzNzBbya4/s1674/atx-board-interface.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="928" data-original-width="1674" height="354" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDN-eX9UeI10tD0GMJA18J9wvGqLwD8xNB_xjcHu1xiTDElPqYkHowqmzaJ_S3X4wL2AY8T1490beRxCmybLFDgLBru_CTD-6NW5gAnb_Qb73nT8TKpB3EdLJaYPvVL4vXaKlzJ_nZIdYkcaS8VA0XGKTJ24SFaY42-S-zoRgtZrq9FXYTzNzBbya4/w640-h354/atx-board-interface.jpg" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Picture taken from the <a href="https://docs.pikvm.org/v3/#io-ports-and-jumpers" target="_blank">PiKVM documentation</a></td></tr></tbody></table><br />Basically the interface acts as pass-through, allowing to maintain the connection between the motherboard and the front panel.<div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjernU_35FPNMGRdCx0egwUZoCq19BFASqQ_oI4o3OKommXelxiRE1lbt326J1XCrlppbTQbfqu33o2pl1aryOoUS8gVh9F8fwDzp19zgLuTUqUd7J5vCTiXg7NvJEIGVWE-5oQ8N8-IUUCHynrD31Dad6zC6cFsAFZnJ_MmA8XX3w-n9TIdf5iIT2F/s1292/atx_led_example.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="576" data-original-width="1292" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjernU_35FPNMGRdCx0egwUZoCq19BFASqQ_oI4o3OKommXelxiRE1lbt326J1XCrlppbTQbfqu33o2pl1aryOoUS8gVh9F8fwDzp19zgLuTUqUd7J5vCTiXg7NvJEIGVWE-5oQ8N8-IUUCHynrD31Dad6zC6cFsAFZnJ_MmA8XX3w-n9TIdf5iIT2F/s320/atx_led_example.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Picture taken from the <a href="https://docs.pikvm.org/v3/#io-ports-and-jumpers" target="_blank">PiKVM documentation</a></td></tr></tbody></table><br /><h4 style="text-align: left;">Cable colors</h4><div>This a legend of the colors used for the connections, to simplify the identification.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGKtbmg4z9HCvR1CP6_meOAVPkM8YuSYu5dpPUeVp7HRjF8ZYweq7vjq_ca30AWLScl7QA0WYBiZhm2AelWFdzB7JRJof9l4KZ9nyKjhExMOTD3zTLy2U855Lt9Htzk7fkX4fMCvV3E28HHyC-GiN5hOUqkH-A6iBUoKkQCbEUL7B2pYbAIxCZ1xzL/s461/PiKVM%20ATX%20connections.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="169" data-original-width="461" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGKtbmg4z9HCvR1CP6_meOAVPkM8YuSYu5dpPUeVp7HRjF8ZYweq7vjq_ca30AWLScl7QA0WYBiZhm2AelWFdzB7JRJof9l4KZ9nyKjhExMOTD3zTLy2U855Lt9Htzk7fkX4fMCvV3E28HHyC-GiN5hOUqkH-A6iBUoKkQCbEUL7B2pYbAIxCZ1xzL/w400-h146/PiKVM%20ATX%20connections.png" width="400" /></a></div><h4 style="text-align: left;">Motherboard connections</h4><div>Now is matter to identify <a href="https://www.intel.com/content/dam/support/us/en/documents/motherboards/server/sb/g84364004_s1200v3rp_tps_r2_0.pdf" target="_blank">on the motherboard</a> the connections.</div><div>The most probable place where to set up the connections is the Front Panel connector (section 8.4 - connector J1E1).</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhESlGcql3laDaovMqovJe97UQy6TpD5zRUXMuFMfKP_KDcll0y3Per18tVEjnu_4sretlDgYDybt2a5yAZAWjaiJ0PeEOJEcZcmqh5YdLzCtQVij2qGVREUtYZjzqHPSVSeBAd-yusXmFYKH_bRqHC9ddLHaFRnk-5fP201HrFfaaqrg1o9xjbKth3/s681/Screen%20Shot%202022-08-12%20at%202.44.45%20PM.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="444" data-original-width="681" height="418" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhESlGcql3laDaovMqovJe97UQy6TpD5zRUXMuFMfKP_KDcll0y3Per18tVEjnu_4sretlDgYDybt2a5yAZAWjaiJ0PeEOJEcZcmqh5YdLzCtQVij2qGVREUtYZjzqHPSVSeBAd-yusXmFYKH_bRqHC9ddLHaFRnk-5fP201HrFfaaqrg1o9xjbKth3/w640-h418/Screen%20Shot%202022-08-12%20at%202.44.45%20PM.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Table from the motherboard datasheet</td></tr></tbody></table><div><br /></div><div>Probably is necessary to build a PCB to port out the necessary signals from this connector, this would be the better way to proceed. </div><div><br /></div><div>This the connection between the ATX board and the J1E1</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsTMOC7BdeHL882Z27emn4CwCgxopDLda2gB1ofgp1VXshcJi9DLnBASLj1V4Hi3lTPcNYPK6aQ7xrKkT2Q17_DvzT1Q0JcpR9B2cXjSS28Inv_b7k_newGIczdCb4WJXrdgFLOwQPD46oQQTabzFu5bbFHdUut0tb7uWf0sBwXfRAxgIuCGzBytCK/s583/PiKVM%20ATX%20connections.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="191" data-original-width="583" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsTMOC7BdeHL882Z27emn4CwCgxopDLda2gB1ofgp1VXshcJi9DLnBASLj1V4Hi3lTPcNYPK6aQ7xrKkT2Q17_DvzT1Q0JcpR9B2cXjSS28Inv_b7k_newGIczdCb4WJXrdgFLOwQPD46oQQTabzFu5bbFHdUut0tb7uWf0sBwXfRAxgIuCGzBytCK/w640-h210/PiKVM%20ATX%20connections.png" width="640" /></a></div><br /><div><br /></div><div>In that case the original double cable set up in the PiKVM ATX card is not necessary.</div><div>Fortunately the connector is on the side of the motherboard so should be plenty of space to work on.</div><div><br /></div><div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ReOIlgXTGYMd4dwugAVTLUsc-sDED3d_WAg5kET684fak9XiPnFYbGzMehTVZJjwC20rPInMH-BOmx9tALPp2tbGWAHtJdtuGXhJcyZlVzLPPAshbrF8rNflj0Z0yNtfE7H3cp34Y7a453BgRLyUtZCE6usw840Gum0IR0hDTEqCGGqbBPVO3CYC/s4000/2022-08-02%2011.31.51.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3000" data-original-width="4000" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ReOIlgXTGYMd4dwugAVTLUsc-sDED3d_WAg5kET684fak9XiPnFYbGzMehTVZJjwC20rPInMH-BOmx9tALPp2tbGWAHtJdtuGXhJcyZlVzLPPAshbrF8rNflj0Z0yNtfE7H3cp34Y7a453BgRLyUtZCE6usw840Gum0IR0hDTEqCGGqbBPVO3CYC/w400-h300/2022-08-02%2011.31.51.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">In the center of the picture is the J1E1 connector (gray flat cable)</td></tr></tbody></table><br /><div>The idea is to design a PCB capable to bring "out" the necessary signals.<br />Note that the proposed connection need to be tested !!! <br />It is possible some pins need to be connected differently !</div><div><br /></div><div><br /></div><h3 style="text-align: left;">Video connection</h3><div> </div><div>The server has an embedded VGA port, not very great for graphics.<br />The previous system based on Ubuntu 16.04 LTS didn't even installed X11 since the graphic card in the server is not supporting very well even the basic GUI.</div><div><br /></div><div>Anyway, the PiKVM has only a HDMI port so a VGA <-> HDMI converter is necessary.<br /><br /></div><div>So in the order, connect the VGA from the server to the converter and then plug the converter in the PiKVM HDMI input port.</div><div><br /></div><h3 style="text-align: left;">Keyboard connection</h3><div><br /></div><div>Then connect a USB-A-USB-C cable between a server USB port and the USB port of the PiKVM</div><div><br /></div><h2 style="text-align: left;">Resources</h2><div><ul style="text-align: left;"><li>Intel - <a href="https://www.intel.com/content/dam/support/us/en/documents/motherboards/server/sb/g84364004_s1200v3rp_tps_r2_0.pdf" target="_blank">Intel motherboard used in the server </a></li><li>PiKVM - <a href="https://pikvm.org/" target="_blank">PiKVM project</a></li><li>PiKVM - <a href="https://cloudfree.shop/?s=pikvm" target="_blank">Buying PiKVM</a></li><li>PiKVM documentation - <a href="https://docs.pikvm.org/first_steps/" target="_blank">PiKVM installation</a></li><li>PiKVM documentation -<a href="https://docs.pikvm.org/v3/#io-ports-and-jumpers" target="_blank"> I/O pins</a></li></ul></div><p></p></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-4641803313917256902022-11-05T14:41:00.000-05:002022-11-22T10:07:30.405-06:00Server chronicles - fan noise problem on System76<p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdLw-UIr1nP6avw1r4qBSYaBXMkw3UX9ZtIUUvbszhWhbulRugtREBvuBsf9trmEbpwsMOTmExu2QQRsQtt4f2Py8HbqH8c0_YVL-YJcUkSXymhTOhMd7iZSA3kD4p4NjGKo8uE4pjvsg_fwAyyiTIqNHGeOZtdF4tCqPiZ_zyEp7g0r6hipUFxSCd/s1266/jackal1u.png" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="285" data-original-width="1266" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdLw-UIr1nP6avw1r4qBSYaBXMkw3UX9ZtIUUvbszhWhbulRugtREBvuBsf9trmEbpwsMOTmExu2QQRsQtt4f2Py8HbqH8c0_YVL-YJcUkSXymhTOhMd7iZSA3kD4p4NjGKo8uE4pjvsg_fwAyyiTIqNHGeOZtdF4tCqPiZ_zyEp7g0r6hipUFxSCd/w200-h45/jackal1u.png" width="200" /></a>The server has 3 high speed industrial grade fan to keep it cool.</p>They are great but are quite noisy.<p></p><p>More understanding about how to control them is needed.</p><span><a name='more'></a></span><div><h2><i><span style="color: red;">Note !</span></i></h2><h2><div style="font-size: medium; font-weight: 400;"><b><i>This article was written for the old System76 server, currently NOT used anymore.</i></b></div></h2><h2 style="text-align: left;">Fan management</h2><div>The fan in the system are controlled by the BMC (Baseboard Management Controller).</div><div><br /></div><div>The server has 3 fans, one generic and 2 high speed industrial grade fans used to keep cool the CPU.</div><div><br /></div><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh84K-eMwoQHnZrN49Jis0z-ec4EE7CShykTRkV96-O7rhmvozozz9C6vY1f-dCw95Op6Jstnk6e0dxSZZvZU1VlDSe9TsaVdignWlkMTHiXKXBxGTNqqI6COukB7YZyDEOigewjRQz5yzaLqQo2eAjwCZJdl-7Jba2IG7F9FVHMWltpE5REVtrFmQ0/s4000/2022-08-11%2013.01.11.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3000" data-original-width="4000" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh84K-eMwoQHnZrN49Jis0z-ec4EE7CShykTRkV96-O7rhmvozozz9C6vY1f-dCw95Op6Jstnk6e0dxSZZvZU1VlDSe9TsaVdignWlkMTHiXKXBxGTNqqI6COukB7YZyDEOigewjRQz5yzaLqQo2eAjwCZJdl-7Jba2IG7F9FVHMWltpE5REVtrFmQ0/s320/2022-08-11%2013.01.11.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><div>Delta electronic Model FFB0412UHN</div><div><br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small; text-align: start;" /></div></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVBu0Y7ueHji9H0HiutyQ8x4NUR5Vo8_Wym6yvo-5xICkUTncZ5n7VfTV3t7l4h0d3vznI8Tlj4m1SUmuTMv0RSJSfnwy5YT44pijq4Af2SdeSB3-VVFDf_K-BScfwHqAieb_CbOmXG8w_Wh-Gh_JyRBZTgvuy8eL3ZtLnWqUGl5i_csQ2mQMtAz3l/s4000/2022-08-11%2013.02.23.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4000" data-original-width="3000" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVBu0Y7ueHji9H0HiutyQ8x4NUR5Vo8_Wym6yvo-5xICkUTncZ5n7VfTV3t7l4h0d3vznI8Tlj4m1SUmuTMv0RSJSfnwy5YT44pijq4Af2SdeSB3-VVFDf_K-BScfwHqAieb_CbOmXG8w_Wh-Gh_JyRBZTgvuy8eL3ZtLnWqUGl5i_csQ2mQMtAz3l/s320/2022-08-11%2013.02.23.jpg" width="240" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><div>Nidec Ultraflow Model V40W12BGA5-07A1</div><div><br /></div></td></tr></tbody></table><div>The fans are controlled by a PWM controller in order to vary the speed depending the temperature (throttling).</div><div>I think the controller is handled via BIOS since there are some settings in the BIOS.</div><div><br /></div><div>This is an example of the noise I'm talking about.</div><div><br /></div><div><br /></div><h2 style="text-align: left;">The problem</h2><div>The fans of the server are running at the maximum speed all the time and they are quite noisy.</div></div><p>When the server starts, the fans are at the maximum speed during the bootstrap, then are throttling down almost to stop, showing that the BIOS control of the fans is working.<br />When the OS takes over, however the fans restart at the maximum speed and apparently ignores the CPU temperature as input since they run full speed at temperatures well below the critical level.</p><p>With the older OS/setting the fans were running almost at the lower speed, so something is missing.</p><p>Poking the BIOS settings didn't bring up any improvement.</p><h3 style="text-align: left;">Solution</h3><div>The ideal solution is to find an utility capable to drive the PWM fans and run it, from a batch or depending about how the utility is built.</div><div>Basically under Linux there are different utilities capable to deal with the sensors and peripherals :</div><div><ul style="text-align: left;"><li>lm-sensors</li><li>pwmconfig</li><li>i8kutils</li><li>system76-firmware</li><li>system76-utils</li></ul><div>Every utilities handle sensors but on some motherboards not all the sensors are handled.<br />For example using sensors (from lm-sensors) is possible to read the CPU temperature but is not possible to control the PWM fans nor reading the feedback from them.</div></div><div>ipmitool seems capable to read my motherboard sensors</div><div>It seems ipmitool is the way to go</div><div><br /></div><h3 style="text-align: left;">Alternatives</h3><div><br /></div><div>As alternative solutions I see other two choices :</div><p></p><ol style="text-align: left;"><li><b>Change the server</b><br />Buying a newer server would allows to install the native Pop!_OS with all the updated drivers and firmware and would also allow to have a GUI in console.<br />But of course the main issue here is the budget. <br />Not sure how much would cost a new server but it could easily be around 2-3000$ at least.<br />And beside, my old server works nicely, is fit for my needs and now with 32 GB RAM instead 4 and 4 TB HD I can do much more !<br />I hate to trash away a nice machine only because ONE problem.<br /><br /></li><li><b>Build a fan controller handled via USB</b><br />Maybe little bit awkward solution, but using a cheap microcontroller I could build up a PWM controller for the fans. The OS can simply measure the CPU temperature and/or other data (Like the server room temperature) and drive the Fans accordingly.<br /><br /></li></ol><p></p><h2 style="text-align: left;">Utilities installed</h2><p>On the Ubuntu 22.04 LTS Server edition these utilities are installed (and working) to monitor some sensors.</p><h3 style="text-align: left;">lm-sensors</h3><p>The utility is capable to read the CPU temperature and the HD temperature via the RAID controller</p><h3 style="text-align: left;">ipmitool</h3><p>The utility like lm-sensors can read the temperatures and also the FAN and other sensors.</p><div>Here some useful commands :</div><div><ul style="text-align: left;"><li>sudo ipmitool sensors<br />Read all the sensors</li><li>sudo ipmitool raw <netfn> <cmd> [data]<br /><br /></li></ul><div><br /></div></div><div><br /></div><div><div>Network Function Codes:</div><div><br /></div><div> VAL<span style="white-space: pre;"> </span>HEX<span style="white-space: pre;"> </span>STRING</div><div>==============================================</div><div> 0<span style="white-space: pre;"> </span>0x00<span style="white-space: pre;"> </span>Chassis</div><div> 2<span style="white-space: pre;"> </span>0x02<span style="white-space: pre;"> </span>Bridge</div><div> 4<span style="white-space: pre;"> </span>0x04<span style="white-space: pre;"> </span>SensorEvent</div><div> 6<span style="white-space: pre;"> </span>0x06<span style="white-space: pre;"> </span>Application</div><div> 8<span style="white-space: pre;"> </span>0x08<span style="white-space: pre;"> </span>Firmware</div><div> 10<span style="white-space: pre;"> </span>0x0a<span style="white-space: pre;"> </span>Storage</div><div> 12<span style="white-space: pre;"> </span>0x0c<span style="white-space: pre;"> </span>Transport</div></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div>This is the first reading from ipmitool (sudo ipmitool sensor):</div><div><br /></div><div><div><span style="font-family: courier; font-size: xx-small;">Pwr Unit Status | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">IPMI Watchdog | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">Physical Scrty | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">FP NMI Diag Int | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">SMI Timeout | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Event Log | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Event | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">Button | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BMC Watchdog | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">VR Watchdog | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">PCH Therm Trip | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BMC FW Health | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Airflow | 50.000 | CFM | ok | na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB EDGE Temp | 31.000 | degrees C | ok | na | 0.000 | 5.000 | 110.000 | 115.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">Front Panel Temp | 30.000 | degrees C | ok | na | 0.000 | 5.000 | 50.000 | 55.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">PCH Temp | 37.000 | degrees C | ok | na | 0.000 | 5.000 | 98.000 | 103.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB BMC Temp | 36.000 | degrees C | ok | na | 0.000 | 5.000 | 110.000 | 115.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB CPU VR Temp | 33.000 | degrees C | ok | na | 0.000 | 5.000 | 110.000 | 115.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">Exit Air Temp | 33.000 | degrees C | ok | na | 0.000 | 5.000 | 80.000 | 85.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Fan 1 | 7742.000 | RPM | ok | na | 392.000 | 588.000 | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Fan 2 | 23128.000 | RPM | ok | na | 392.000 | 588.000 | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">System Fan 3 | 23128.000 | RPM | ok | na | 392.000 | 588.000 | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">PS1 Status | 0x0 | discrete | 0x0100| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">PS1 Power In | 63.000 | Watts | ok | na | na | na | 1533.000 | 1750.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">PS1 Temperature | 32.000 | degrees C | ok | na | na | na | 55.000 | 60.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 Status | 0x0 | discrete | 0x8000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 Therm Margin | -65.000 | degrees C | ok | na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 Therm Ctrl % | 0.000 | percent | ok | na | na | na | 30.000 | 50.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 ERR2 | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">CATERR | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 ICC Mismatch | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">CPU Missing | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 DTS Therm Mgn | -65.000 | degrees C | ok | na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 VRD Hot | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">DIMM Thrm Mrgn 1 | na | degrees C | na | na | na | na | 5.000 | 10.000 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 Mem Thrm Trip | 0x0 | discrete | 0x0000| na | na | na | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +12.0V | 11.883 | Volts | ok | na | 10.635 | 10.947 | 13.027 | 13.391 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +5.0V1 | 4.959 | Volts | ok | na | 4.460 | 4.590 | 5.415 | 5.566 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +3.3V | 3.253 | Volts | ok | na | 2.953 | 3.039 | 3.554 | 3.654 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +5.0V2 | 4.959 | Volts | ok | na | 4.460 | 4.590 | 5.415 | 5.566 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +12.0V V2 | 11.831 | Volts | ok | na | 10.635 | 10.947 | 13.027 | 13.391 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +1.75V Vccp | 1.769 | Volts | ok | na | 1.611 | 1.653 | 1.902 | 1.960 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +1.5 P1DDR | na | | na | na | 1.339 | 1.387 | 1.611 | 1.659 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB VBAT | 3.133 | Volts | ok | na | 2.211 | 2.544 | na | na | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +1.05V PCH | 1.038 | Volts | ok | na | 0.546 | 0.564 | 1.464 | 1.506 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +1.05V AUX | 1.038 | Volts | ok | na | 0.546 | 0.564 | 1.464 | 1.506 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +1.35V MEM | 1.323 | Volts | ok | na | 1.201 | 1.244 | 1.445 | 1.488 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">BB +12.0V V1 | 11.883 | Volts | ok | na | 10.635 | 10.947 | 13.027 | 13.391 | na </span></div><div><span style="font-family: courier; font-size: xx-small;">P1 MTT | 0.000 | percent | ok | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 </span></div></div><div><br /></div><div>The column are :</div><div><ul style="text-align: left;"><li>Sensor name</li><li>Current value</li><li>unit</li><li>status</li></ul></div><div>This is a more detailed list of the Fans characteristics (sudo ipmitool -v sdr type Fan):</div><div><br /></div><div><div>Sensor ID : System Fan 1 (0x30)</div><div> Entity ID : 29.2 (Fan Device)</div><div> Sensor Type (Threshold) : Fan (0x04)</div><div> Sensor Reading : 7252 (+/- 0) RPM</div><div> Status : ok</div><div> Nominal Reading : 12936.000</div><div> Normal Minimum : 980.000</div><div> Normal Maximum : 24990.000</div><div> Lower critical : 392.000</div><div> Lower non-critical : 588.000</div><div> Positive Hysteresis : 196.000</div><div> Negative Hysteresis : 196.000</div><div> Minimum sensor range : Unspecified</div><div> Maximum sensor range : Unspecified</div><div> Event Message Control : Per-threshold</div><div> Readable Thresholds : lcr lnc </div><div> Settable Thresholds : lcr lnc </div><div> Threshold Read Mask : lcr lnc </div><div> Assertion Events : </div><div> Assertions Enabled : lnc- lcr- </div><div> Deassertions Enabled : lnc- lcr- </div><div><br /></div><div>Sensor ID : System Fan 2 (0x31)</div><div> Entity ID : 29.3 (Fan Device)</div><div> Sensor Type (Threshold) : Fan (0x04)</div><div> Sensor Reading : 22344 (+/- 0) RPM</div><div> Status : ok</div><div> Nominal Reading : 12936.000</div><div> Normal Minimum : 980.000</div><div> Normal Maximum : 24990.000</div><div> Lower critical : 392.000</div><div> Lower non-critical : 588.000</div><div> Positive Hysteresis : 196.000</div><div> Negative Hysteresis : 196.000</div><div> Minimum sensor range : Unspecified</div><div> Maximum sensor range : Unspecified</div><div> Event Message Control : Per-threshold</div><div> Readable Thresholds : lcr lnc </div><div> Settable Thresholds : lcr lnc </div><div> Threshold Read Mask : lcr lnc </div><div> Assertion Events : </div><div> Assertions Enabled : lnc- lcr- </div><div> Deassertions Enabled : lnc- lcr- </div><div><br /></div><div>Sensor ID : System Fan 3 (0x32)</div><div> Entity ID : 29.4 (Fan Device)</div><div> Sensor Type (Threshold) : Fan (0x04)</div><div> Sensor Reading : 23912 (+/- 0) RPM</div><div> Status : ok</div><div> Nominal Reading : 12936.000</div><div> Normal Minimum : 980.000</div><div> Normal Maximum : 24990.000</div><div> Lower critical : 392.000</div><div> Lower non-critical : 588.000</div><div> Positive Hysteresis : 196.000</div><div> Negative Hysteresis : 196.000</div><div> Minimum sensor range : Unspecified</div><div> Maximum sensor range : Unspecified</div><div> Event Message Control : Per-threshold</div><div> Readable Thresholds : lcr lnc </div><div> Settable Thresholds : lcr lnc </div><div> Threshold Read Mask : lcr lnc </div><div> Assertion Events : </div><div> Assertions Enabled : lnc- lcr- </div><div> Deassertions Enabled : lnc- lcr- </div></div><div><br /></div><div><div><h2 style="text-align: left;">Resources</h2></div><p></p><ul><li>Intel - <a href="https://www.intel.com/content/dam/support/us/en/documents/motherboards/server/sb/g84364004_s1200v3rp_tps_r2_0.pdf" target="_blank">Server Board S1200V3RP </a>(supposedly the motherboard in the system)</li><li>Nidec - <a href="https://web.archive.org/web/20130511050339/http://www.nidecamerica.com/apps_pwm.htm#" target="_blank">Simple PWM generator for fan speed control</a></li><li>Forum - Overclockers - <a href="https://www.overclockers.com/forums/threads/building-pwm-controller-for-4-wires-pwm-fan.641111/page-2#post-6473318" target="_blank">Building PWM controller for 4 wires PWM fan</a></li><li>Ubuntu - <a href="https://help.ubuntu.com/community/SensorInstallHowto" target="_blank">Sensor Install Howto</a></li><li>github - <a href="https://github.com/ipmitool/ipmitool" target="_blank">ipmitool</a></li><li>Blog - <a href="https://www.defaultroot.com/index.php/2021/02/25/controlling-server-fan-speed-with-ipmitool/" target="_blank">Controlling Server Fan Speed With ipmitool</a></li><li>Blog - <a href="https://blog.lbdg.me/r710-quieter/" target="_blank">R710 quieter (ipmitool fan settings)</a></li><li>Oracle - <a href="https://docs.oracle.com/cd/E19121-01/sf.x4240/820-6413-13/IPMI_Overview.html" target="_blank">Server Management Using IPMI</a></li><li>Alibaba - <a href="https://www.alibaba.com/product-detail/Pwm-Fan-Controller-12V-PWM-PC_1600478895963.html?spm=a2700.7724857.0.0.469a3a304luSiT&s=p" target="_blank">PWM Fan control</a></li></ul></div>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0tag:blogger.com,1999:blog-494791564426013646.post-9373453650510330612022-08-14T23:36:00.004-05:002022-11-15T08:28:19.266-06:00Server chronicles - Docker on ProLiant<p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Ce5Qu1eftLyIO6SN9XmodbkVaxHYipJbEqxjUYAqfKvEw6_2jtZo_OGdplz7Gp_FCTPc0P5c-LBx3c4nD5uuoq3nKf68B19HBvMzbWqhX-WDaXmJByDZ1ewwBh1GAADurTtT92Ny0DafnVF3HMNr4zeTa1EN2oU6vstGEQt1rXNETcNYUlvMEB5t/s1266/jackal1u.png" style="clear: left; display: inline; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="285" data-original-width="1266" height="45" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Ce5Qu1eftLyIO6SN9XmodbkVaxHYipJbEqxjUYAqfKvEw6_2jtZo_OGdplz7Gp_FCTPc0P5c-LBx3c4nD5uuoq3nKf68B19HBvMzbWqhX-WDaXmJByDZ1ewwBh1GAADurTtT92Ny0DafnVF3HMNr4zeTa1EN2oU6vstGEQt1rXNETcNYUlvMEB5t/w200-h45/jackal1u.png" width="200" /></a>At the base of the rebuilding of the services on the server, there is Docker.</p><p></p><p>Docker allows to run services in a dedicated environment.<br />Why ? Well, because different applications/programs can require different settings, like maybe the installation of specific languages or specific versions of them.<br />Instead to clutter the server with 3000 things, a docker image is totally self sufficient.</p><span><a name='more'></a></span><h2 style="text-align: left;">Docker installation</h2><p>When installing the OS, at least the server edition, at a certain point the system asks to install extra packages, among them Docker.<br /></p><p>I did choose that, but anyway I choose to re-install it again and actually some packages were missing, so if I ever re-install from scratch Ubuntu, I'll avoid the initial installation.</p><p>The goal is to install Docker and Docker compose on the server.</p><p>Let start with the usual update :</p><p></p><ul style="text-align: left;"><li><span style="font-family: courier; font-size: x-small;">sudo apt update</span></li><li><span style="font-family: courier; font-size: x-small;">sudo apt upgrade</span></li></ul><div>Then add the certificates for the Docker repo</div><div><ul style="text-align: left;"><li><span style="font-family: courier; font-size: x-small;">sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y</span></li></ul></div><p></p><p>add the Docker repository to the system</p><p></p><ul style="text-align: left;"><li><span style="font-family: courier; font-size: x-small;">curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg</span></li><li><span style="font-family: courier; font-size: x-small;">echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null</span></li></ul><p></p><p>another round of update</p><ul><li><span style="font-family: courier; font-size: x-small;">sudo apt update</span></li><li><span style="font-family: courier; font-size: x-small;">sudo apt upgrade</span></li></ul><p>and finally </p><p></p><ul style="text-align: left;"><li><span style="font-family: courier; font-size: x-small;">sudo apt install docker-ce</span></li></ul><p></p><p>Verify Docker is up and running</p><p></p><ul style="text-align: left;"><li><span style="font-family: courier; font-size: x-small;">sudo systemctl status docker</span></li></ul><p></p><h2 style="text-align: left;">Docker compose installation</h2><p>At this time, having Docker up and running, is possible to install Docker compose.</p><p>Docker compose is an utility that allows to create Docker systems using a YML file.</p><p>To install Docker compose :</p><p></p><ul style="text-align: left;"><li><a href="https://github.com/docker/compose/releases" target="_blank">look at the release page</a> of Docker compose to identify latest/current version to install<br />At the time of this article writing is the 2.9.0</li><li>create directory : <span style="font-family: courier; font-size: x-small;">mkdir -p ~/.docker/cli-plugins</span></li><li>install version in the directory : <span style="font-family: courier; font-size: x-small;">curl -SL https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose</span></li><li>make it executable : <span style="font-family: courier; font-size: x-small;">chmod +x ~/.docker/cli-plugins/docker-compose</span></li><li>verify is installed : <span style="font-family: courier; font-size: x-small;">docker compose version</span></li></ul><p></p><h2 style="text-align: left;">Persistent storage</h2><p>Storing data in the docker image is possible, however in case the image is stopped, all the stored data are lost !</p><p>Since Docker will be used to run services and these services uses data, there will be on the server some areas with the persistent data for all the services.</p><p>From the root filesystem a directory will hold all the persistent storage, in order to facilitate the backup.</p><p><br /></p><h2 style="text-align: left;">Resources</h2><p></p><ul style="text-align: left;"><li>Blog - <a href="https://linuxhint.com/install-docker-compose-ubuntu-22-04/" target="_blank">How to Install Docker Compose on Ubuntu 22.04</a></li></ul><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><p></p>TheFwGuyhttp://www.blogger.com/profile/07741593420288261846noreply@blogger.com0