<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://www.robertmarkoski.net/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.robertmarkoski.net/" rel="alternate" type="text/html" /><updated>2021-12-27T22:07:54+08:00</updated><id>https://www.robertmarkoski.net/feed.xml</id><title type="html">Robert Markoski</title><subtitle>A website about mining, engineering, and home automation.</subtitle><author><name>Robert Markoski</name></author><entry><title type="html">Raspberry Pi Bluetooth Tracker</title><link href="https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-bluetooth-tracker/" rel="alternate" type="text/html" title="Raspberry Pi Bluetooth Tracker" /><published>2019-05-29T00:00:00+08:00</published><updated>2019-05-29T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-bluetooth-tracker</id><content type="html" xml:base="https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-bluetooth-tracker/">&lt;h1 id=&quot;bluetooth-device-tracking-with-rasberry-pis&quot;&gt;Bluetooth Device Tracking with Rasberry Pi’s&lt;/h1&gt;

&lt;p&gt;Hot on the heels of my post on using &lt;a href=&quot;https://github.com/robmarkoski/pi-motion-mqtt-sensor&quot;&gt;a raspberry pi as a motion sensor&lt;/a&gt; is another script that uses &lt;a href=&quot;http://mqtt.org&quot;&gt;MQTT&lt;/a&gt; to integrate with &lt;a href=&quot;https://www.home-assistant.io/&quot;&gt;Home Assistant&lt;/a&gt; and use it as a device tracker with bluetooth.&lt;/p&gt;

&lt;p&gt;This can help with presence detection, especially if you got a bunch of bluetooth capable Raspberry Pi devices around the place.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/robmarkoski/bt-mqtt-tracker&quot;&gt;Check it out here&lt;/a&gt;&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="python" /><category term="Home Assistant" /><category term="IOT" /><category term="Pi" /><category term="python" /><category term="IOT" /><category term="Home Assistant" /><category term="module" /><category term="Github" /><category term="Bluetooth" /><category term="Raspberry Pi" /><summary type="html">A short python script that turns a Raspberry Pi with Bluetooth as a device tracker.</summary></entry><entry><title type="html">Raspberry Pi Motion Detection MQTT Device</title><link href="https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-pir-sensor-mqtt/" rel="alternate" type="text/html" title="Raspberry Pi Motion Detection MQTT Device" /><published>2019-05-13T00:00:00+08:00</published><updated>2019-05-13T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-pir-sensor-mqtt</id><content type="html" xml:base="https://www.robertmarkoski.net/python/home%20assistant/iot/pi/raspberrypi-pir-sensor-mqtt/">&lt;h1 id=&quot;pir-motion-sensing-mqtt-device&quot;&gt;PIR Motion Sensing MQTT Device&lt;/h1&gt;

&lt;p&gt;MQTT is an &lt;a href=&quot;http://mqtt.org&quot;&gt;excellent protocol&lt;/a&gt; for simple device communication. Even better is how well it integrates with &lt;a href=&quot;https://www.home-assistant.io/&quot;&gt;Home Assistant&lt;/a&gt; to create useful sensors using cheap gear.&lt;/p&gt;

&lt;p&gt;Here is a short python script to turn a PIR mounted on a PI as a communicating motion sensor.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/robmarkoski/pi-motion-mqtt-sensor&quot;&gt;Check it out here&lt;/a&gt;&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="python" /><category term="Home Assistant" /><category term="IOT" /><category term="Pi" /><category term="python" /><category term="IOT" /><category term="Home Assistant" /><category term="module" /><category term="Github" /><category term="Raspberry Pi" /><summary type="html">A short python script to use a PIR sensor connected to a Rasberry Pi as a Motion Sensing MQTT Device</summary></entry><entry><title type="html">AS4130 - HDPE Pipe Dimensions</title><link href="https://www.robertmarkoski.net/engineering/imec/dewatering/AS4130-HDPE-Pipe-Dimensions/" rel="alternate" type="text/html" title="AS4130 - HDPE Pipe Dimensions" /><published>2019-03-07T00:00:00+08:00</published><updated>2019-03-07T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/engineering/imec/dewatering/AS4130-HDPE-Pipe-Dimensions</id><content type="html" xml:base="https://www.robertmarkoski.net/engineering/imec/dewatering/AS4130-HDPE-Pipe-Dimensions/">&lt;h1 id=&quot;asnzs-4130-hdpe-pipe-data&quot;&gt;AS/NZS 4130 HDPE Pipe Data&lt;/h1&gt;
&lt;p&gt;We have released the internal datasheets used for sizing HDPE Pipe and completing Dewatering Designs at &lt;a href=&quot;https://www.imeconsultants.com.au&quot;&gt;IMEC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It provides the sheet in PDF, CSV as well as xslx Format.&lt;/p&gt;

&lt;p&gt;Find the repository &lt;a href=&quot;https://github.com/IMEConsultants/AS4130-HDPE-PIPE&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="engineering" /><category term="IMEC" /><category term="dewatering" /><category term="github" /><category term="dewatering" /><category term="fluid mechanics" /><summary type="html">A Github Repository which provides AS4130 HDPE Pipe Dimensions in Various Formats.</summary></entry><entry><title type="html">Python Library for Using Colebrook Approximations of Darcy Friction Factor</title><link href="https://www.robertmarkoski.net/python/module/imec/Colebrook-python-module/" rel="alternate" type="text/html" title="Python Library for Using Colebrook Approximations of Darcy Friction Factor" /><published>2019-03-01T00:00:00+08:00</published><updated>2019-03-01T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/python/module/imec/Colebrook-python-module</id><content type="html" xml:base="https://www.robertmarkoski.net/python/module/imec/Colebrook-python-module/">&lt;h1 id=&quot;colebrookpy&quot;&gt;Colebrook.py&lt;/h1&gt;

&lt;p&gt;The colebrook.py python module is one I have released which we use internally at &lt;a href=&quot;https://www.imeconsultants.com.au&quot;&gt;IMEC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It includes a bunch of functions which use various Colebrook-White approximations to calculate the Darcy Friction factor using the flows reynolds number and pipes relative roughness.&lt;/p&gt;

&lt;p&gt;Find the repository &lt;a href=&quot;https://github.com/IMEConsultants/colebrook&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="python" /><category term="module" /><category term="IMEC" /><category term="python" /><category term="dewatering" /><category term="fluid mechanics" /><category term="module" /><summary type="html">A python library for using a bunch of different Colebrook approximations for determining the Darcy Friction Factor in full pipe flows</summary></entry><entry><title type="html">How to upgrade Ubuntu WSL to 18.10</title><link href="https://www.robertmarkoski.net/wsl/nix/wsl-update-to-1810/" rel="alternate" type="text/html" title="How to upgrade Ubuntu WSL to 18.10" /><published>2019-02-17T00:00:00+08:00</published><updated>2019-02-17T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/wsl/nix/wsl-update-to-1810</id><content type="html" xml:base="https://www.robertmarkoski.net/wsl/nix/wsl-update-to-1810/">&lt;h1 id=&quot;upgrading-to-ubuntu-1810-on-wsl&quot;&gt;Upgrading to Ubuntu 18.10 on WSL&lt;/h1&gt;

&lt;p&gt;Although not officially released you can upgrade to Ubuntu 18.10 on WSL&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;go&quot;&gt;sudo apt update &amp;amp;&amp;amp; sudo apt dist-upgrade -y
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next edit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/update-manager/release-upgrades&lt;/code&gt; and change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Prompt=lts&lt;/code&gt; to change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Prompt=normal&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now run:&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;go&quot;&gt;sudo do-release-upgrade
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This may take a while.&lt;/p&gt;

&lt;p&gt;You may get an LXD Error when upgrading. Purge it (I haven’t found any issues yet) via the following:&lt;/p&gt;

&lt;div class=&quot;language-console highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;dpkg &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt; depends &lt;span class=&quot;nt&quot;&gt;-P&lt;/span&gt; lxd
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;span class=&quot;gp&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;dpkg &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt; depends &lt;span class=&quot;nt&quot;&gt;-P&lt;/span&gt; lxd-client
&lt;span class=&quot;c&quot;&gt;...
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then run the upgrade again.&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="WSL" /><category term="Nix" /><category term="WSL" /><category term="Ubuntu" /><summary type="html">Upgrading to Ubuntu 18.10 on WSL</summary></entry><entry><title type="html">How to install Xfce4 on Ubuntu 18.04 WSL</title><link href="https://www.robertmarkoski.net/wsl/nix/xfce4-on-wsl/" rel="alternate" type="text/html" title="How to install Xfce4 on Ubuntu 18.04 WSL" /><published>2019-02-15T00:00:00+08:00</published><updated>2019-02-15T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/wsl/nix/xfce4-on-wsl</id><content type="html" xml:base="https://www.robertmarkoski.net/wsl/nix/xfce4-on-wsl/">&lt;h1 id=&quot;installing-xfce4-on-wsl&quot;&gt;Installing xfce4 on WSL&lt;/h1&gt;

&lt;p&gt;Amazingly, you can run a Window environment with WSL. This lets you run nix based GUI applications on Windows. Not officially supported, but I personally haven’t had any issues.&lt;/p&gt;

&lt;p&gt;I am running this on Ubuntu 18.04&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;First off update your system and install xfce4&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt update &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;xfce4 &lt;span class=&quot;nt&quot;&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next on Windows go ahead download and install &lt;a href=&quot;https://sourceforge.net/projects/vcxsrv/files/latest/download&quot;&gt;VcXsrv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next you need to set the default display in WSL, so in your bash prompt set it as follows:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;DISPLAY&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;:0.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you would like to make the change permanent, add that line to the end of your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s it! Installation is complete.&lt;/p&gt;

&lt;h2 id=&quot;running&quot;&gt;Running&lt;/h2&gt;

&lt;p&gt;Now lets get VcXsrv up and running. Run VcXsrv and then select the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;One Window without titlebar&lt;/code&gt; option&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/xfcewsl/vcxsrv1.jpg&quot; alt=&quot;Select One Window Without Titlebar&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Start no client&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/xfcewsl/vcxsrv2.jpg&quot; alt=&quot;Select Start no Client&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Disable Access Control&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/xfcewsl/vcxsrv3.jpg&quot; alt=&quot;Select Disable Access Control&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally you can save the configuration and Finish up&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/xfcewsl/vcxsrv4.jpg&quot; alt=&quot;Save Configuration&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You should have a blank VcXsrv screen now open. Open up your bash prompt and type:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;xfce4-session &amp;amp;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Your Desktop should now show up on in the VcXsrv window.&lt;/p&gt;

&lt;h2 id=&quot;bonus-automation&quot;&gt;Bonus: Automation&lt;/h2&gt;

&lt;p&gt;To automate the entire process if you like, you can create a VBS script that will automatically run VcSrv with the correct configuration and then launch and xfce4-session as follows.&lt;/p&gt;

&lt;p&gt;Create a new bash script called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;launch.sh&lt;/code&gt; as follows:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# This script checks if another xfce4-session is running first.&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;pidof xfce4-session&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
    &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt; ~/.bashrc
    xfce4-session

&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ensure the script is executable via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod +x launch.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next on the windows side create a new VBS Script &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wslgui.vbs&lt;/code&gt; and then add the following code. Obviously update the install and script locations to wherever they are for you&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-vbs&quot;&gt;' Script to Automatically Run and Xfce4 Session
' It opens a single window/no-decoration VcXsrv window
' Then runs your WSL Launch Script
' Update file locations accordingly

Set shell = CreateObject(&quot;WScript.Shell&quot; )
shell.Run &quot;&quot;&quot;C:\Program Files\VcXsrv\vcxsrv.exe&quot;&quot; :0 -screen 0 @1 -nodecoration -wgl&quot;
shell.Run &quot;bash -c &quot;&quot;~/launch.sh&quot;&quot;&quot;, 0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now Run the Script and you should automatically get a running desktop environment.&lt;/p&gt;

&lt;p&gt;From here you can go ahead and try a few themes and other customisations to get working.&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="WSL" /><category term="Nix" /><category term="WSL" /><category term="Ubuntu" /><category term="Development" /><summary type="html">Installing xfce4 on WSL</summary></entry><entry><title type="html">Welcome to RobertMarkoski.net</title><link href="https://www.robertmarkoski.net/rob/the-first/" rel="alternate" type="text/html" title="Welcome to RobertMarkoski.net" /><published>2018-10-24T00:00:00+08:00</published><updated>2018-10-24T00:00:00+08:00</updated><id>https://www.robertmarkoski.net/rob/the-first</id><content type="html" xml:base="https://www.robertmarkoski.net/rob/the-first/">&lt;p&gt;Welcome to RobertMarkoski.net&lt;/p&gt;</content><author><name>Robert Markoski</name></author><category term="Rob" /><category term="rob" /><summary type="html">Welcome to RobertMarkoski.net</summary></entry></feed>