<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alberto Ruibal</title>
	<atom:link href="http://www.alonsoruibal.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.alonsoruibal.com/</link>
	<description>Telecommunication Engineer</description>
	<lastBuildDate>Sun, 08 Feb 2026 16:46:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Ollama: The easiest way to run local and cloud LLM models</title>
		<link>https://www.alonsoruibal.com/ollama-the-easiest-way-to-run-local-and-cloud-llm-models/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 08 Feb 2026 11:25:28 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=3045</guid>

					<description><![CDATA[<p>I&#8217;ve tried many approaches to run local LLMs, and Ollama is hands-down the easiest way&#160;I&#8217;ve found to get started and actually use local models productively. Installing Ollama is a one-line command: Running a model is also a one liner: It includes a local server service that can be managed with: https://docs.ollama.com/quickstart Open WebUI While you [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/ollama-the-easiest-way-to-run-local-and-cloud-llm-models/">Ollama: The easiest way to run local and cloud LLM models</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve tried many approaches to run local LLMs, and <strong>Ollama is hands-down the easiest way</strong>&nbsp;I&#8217;ve found to get started and actually use local models productively.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><a href="https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247.jpg"><img fetchpriority="high" decoding="async" width="687" height="1024" src="https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247-687x1024.jpg" alt="" class="wp-image-3057" style="aspect-ratio:0.6709146968139774;width:366px;height:auto" srcset="https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247-687x1024.jpg 687w, https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247-201x300.jpg 201w, https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247-768x1144.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2026/02/1000154247.jpg 784w" sizes="(max-width: 687px) 100vw, 687px" /></a></figure>
</div>


<p>Installing Ollama is a one-line command:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">curl -fsSL https://ollama.com/install.sh | sh</code></pre>



<p>Running a model is also a one liner:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash"><code>ollama run gemma3</code></code></pre>



<p>It includes a local server service that can be managed with:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl start ollama
sudo systemctl stop ollama</code></pre>



<p><a href="https://docs.ollama.com/quickstart">https://docs.ollama.com/quickstart</a></p>



<h2 class="wp-block-heading">Open WebUI</h2>



<p>While you can use Ollama from the command line, I prefer the <strong>Open WebUI</strong>&nbsp;interface. It&#8217;s essentially ChatGPT-style interface but fully self-hosted, fully local, and beautifully designed.</p>



<p>If you have non-technical family members or want a quick chat interface, Open WebUI is perfect. It remembers conversation history, handles formatting beautifully, and feels like using a cloud service, except everything stays on your own hardware.</p>



<p>It can be easily run in a Docker container:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main</code></pre>



<p><a href="https://github.com/open-webui/open-webui">https://github.com/open-webui/open-webui</a></p>



<h2 class="wp-block-heading">Home Assistant integration</h2>



<p>Here&#8217;s where Ollama gets really interesting for home automators: <strong>Home Assistant has official integration</strong>&nbsp;with Ollama. I&#8217;ve set up my Home Assistant to use an Ollama model as a conversation agent, part of the voice assistant controlling the devices in my home.</p>



<p><a href="https://www.home-assistant.io/integrations/ollama/">https://www.home-assistant.io/integrations/ollama/</a></p>



<h2 class="wp-block-heading">Local LLMs are improving rapidly</h2>



<p>My current favorite is now <strong>GLM-4.7-flash</strong>. On my mini PC with an integrated GPU, it generates amazing responses in <strong>about one minute</strong>. Models that were unusable six months ago are now competitive with far more expensive options.</p>



<h2 class="wp-block-heading">Cloud LLMs with Ollama</h2>



<p>Here&#8217;s what I didn&#8217;t realize: Ollama added cloud hosting in September<strong>,</strong>&nbsp;with the exact same interface as local models. Same API, same CLI, same simplicity, just running on their infrastructure. They offer:</p>



<ul class="wp-block-list">
<li><strong>Free tier</strong>: Great for evaluation and light use</li>



<li><strong>$20/month tier</strong>: Reasonable for regular personal use</li>



<li><strong>$100/month tier</strong>: For heavier workloads and teams</li>
</ul>



<p>If you have a Raspberry Pi (or any modest device), the cloud option means you can run advanced models that would never fit in 2GB of RAM. The same <code>ollama run</code>&nbsp;command works across both local and cloud.</p>



<h2 class="wp-block-heading">Enterprise-Grade privacy</h2>



<p>Unlike other cloud LLM services, Ollama emphasizes <strong>enterprise-grade privacy</strong>. Your data isn&#8217;t used for training, and they offer compliance features that other services simply don&#8217;t have.</p>



<p>For me as a telecommunication engineer working with sensitive systems, this is a major advantage over alternatives like OpenAI or Anthropic.</p>



<h2 class="wp-block-heading">Launching AI coding agents</h2>



<p>Ollama can launch Claude Code, Codex or OpenCode, i.e.:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ollama launch claude --model qwen3-coder-next:cloud
</code></pre>



<p>Each of these works with any local model or cloud model.</p>



<h2 class="wp-block-heading">OpenClaw integration</h2>



<p>OpenClaw is the newest sensation in the AI agent world: <a href="https://openclaw.ai/">https://openclaw.ai/</a></p>



<p>OpenClaw does not include a setup assistant for Ollama, and the config file is a bit tricky, but you can simply run:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ollama launch openclaw --model kimi-k2.5:cloud</code></pre>



<p>Ollama generates the OpenClaw configuration and starts it.</p>



<p>I&#8217;m running OpenClaw in a Docker environment without access to my personal data, be careful, there are lots of security concerns.</p>



<p><a href="https://openclaw.ai">https://openclaw.ai</a></p>



<h2 class="wp-block-heading">The bottom line</h2>



<p>Ollama is the easiest, most flexible, and most privacy-respecting way&nbsp;to run local and cloud LLMs today. The fact that it offers cloud options without forcing you to use them is amazing.</p>



<p>The downside: You do not have access to the top GPT or Opus closed models.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&amp;linkname=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&amp;linkname=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&amp;linkname=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&amp;linkname=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&amp;linkname=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Follama-the-easiest-way-to-run-local-and-cloud-llm-models%2F&#038;title=Ollama%3A%20The%20easiest%20way%20to%20run%20local%20and%20cloud%20LLM%20models" data-a2a-url="https://www.alonsoruibal.com/ollama-the-easiest-way-to-run-local-and-cloud-llm-models/" data-a2a-title="Ollama: The easiest way to run local and cloud LLM models"></a></p><p>The post <a href="https://www.alonsoruibal.com/ollama-the-easiest-way-to-run-local-and-cloud-llm-models/">Ollama: The easiest way to run local and cloud LLM models</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Installing Thingino on a Vanhua FJZ camera</title>
		<link>https://www.alonsoruibal.com/installing-thingino-on-a-vanhua-fjz-camera/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Wed, 24 Dec 2025 22:20:35 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=3016</guid>

					<description><![CDATA[<p>Two months ago my brother asked me: Which security IP camera should I buy? It seemed a simple question, but I needed some time to find a good solution. I used a Yi Camera for several years, but their mobile app is overloaded with ads constantly pushing their cloud video storage services. I cannot recommend [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/installing-thingino-on-a-vanhua-fjz-camera/">Installing Thingino on a Vanhua FJZ camera</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Two months ago my brother asked me: Which security IP camera should I buy? It seemed a simple question, but I needed some time to find a good solution.</p>



<p>I used a Yi Camera for several years, but their mobile app is overloaded with ads constantly pushing their cloud video storage services. I cannot recommend Yi or any other vendor whose business model relies on selling inexpensive cameras just to lock you into their cloud services. I also played with ESP-CAM (and a ESP32-S3-CAM), but the video quality is not enough (MJPEG, low framerate, no night vision&#8230;).</p>



<p>For devices as senstitive as cameras, I cannot trust closed firmware or Wi-Fi. Both are explotable security holes. I also can’t trust any camera vendor’s cloud service.</p>



<p>So my requirements were:</p>



<ul class="wp-block-list">
<li>Open source firmware.</li>



<li>Ethernet only, no Wi-Fi.</li>



<li>Ceiling mount.</li>



<li>Power over Ethernet (PoE) to simplify the setup in the ceiling.</li>



<li>Night vision.</li>



<li>No vendor cloud service.</li>



<li>RTSP streams for self-hosted recording services (I use <a href="https://frigate.video/">Frigate</a>).</li>



<li>H.265 support to save storage, but I ended up using H.264 because Telegram doesn’t support H.265.</li>



<li>On camera motion detection.</li>
</ul>



<p>It is quite hard to find cameras that clearly show their chipset in the listing. Finally I bought an inexpensive <a href="https://es.aliexpress.com/item/1005004626648688.html">Vanhua FJZ OEM camera from Aliexpress</a>.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera.jpeg"><img decoding="async" width="870" height="478" src="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera.jpeg" alt="" class="wp-image-3020" srcset="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera-300x165.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera-768x422.jpeg 768w" sizes="(max-width: 870px) 100vw, 870px" /></a></figure>



<p>After opening the camera, the board didn&#8217;t match the images of the Aliexpress listing, so I thought it was a scam, but the camera is OK, the listing is outdated.</p>



<h3 class="wp-block-heading">Camera specs</h3>



<ul class="wp-block-list">
<li><strong>Chipset:</strong> Ingenic T31X (should be enough for H.265 and basic motion detection)</li>



<li><strong>Sensor:</strong> GC4653 5 MP (with the resolution for 5 MP the image is distorted, I willl use QHD 2560&#215;1440, 3.6 MP)</li>



<li><strong>Flash:</strong> 16 MB</li>



<li><strong>Connectivity:</strong> Ethernet only</li>



<li><strong>Power:</strong> PoE, 48 V</li>



<li><strong>Storage:</strong> No SD card</li>



<li><strong>Metal housing</strong></li>
</ul>



<h2 class="wp-block-heading">Why switch firmware?</h2>



<p>The camera shipped with an unreliable Chinese firmware. For example, viewing video through a browser required a plugin that didn’t work on Linux or Mac. So I decided to install <strong>Thingino</strong> (<a href="https://thingino.com/">https://thingino.com/</a>).</p>



<p>OpenIPC was another option, but Thingino seemed better maintained and feature-rich. However, Thingino isn’t perfect: There are bugs, and <a href="https://github.com/themactep/thingino-firmware/releases">updates are frequent</a>. Fixing bugs requires SSH access and manual edits.</p>



<h2 class="wp-block-heading">Installing the firmware</h2>



<p>Installing Thingino isn’t straightforward. You need to disassemble the camera and follow <a href="https://github.com/themactep/thingino-firmware/wiki/Camera:-AliExpress-LTIA%E2%80%9037FJZ-(Vanhua-Z55-module)">the steps in the Thingino wiki</a>.</p>



<p>Some notes from my experience:</p>



<ul class="wp-block-list">
<li>I had to make a pogo-pin connector for the serial port.</li>



<li>The camera has two serial ports. I lost a lot of time because I was trying to connect to the wrong one.</li>



<li>The bootloader is locked. There is a clever trick to access it, triggering an error by shorting two pins of the flash chip during the boot sequence, so it fails to read the kernel .</li>



<li>Firmware is uploaded via the serial port using ymodem (it is very slow, it reminded me of the BBS days).</li>
</ul>



<p>The correct serial port and the pins to short during boot:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera_port_pins.jpeg"><img decoding="async" width="870" height="385" src="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera_port_pins.jpeg" alt="" class="wp-image-3019" srcset="https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera_port_pins.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera_port_pins-300x133.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/camera_port_pins-768x340.jpeg 768w" sizes="(max-width: 870px) 100vw, 870px" /></a></figure>



<h2 class="wp-block-heading">Accessing the camera</h2>



<p>By default, the camera obtains an IP via DHCP.</p>



<ul class="wp-block-list">
<li><strong>Web interface:</strong> <code>http://&lt;camera_ip&gt;</code></li>



<li><strong>SSH:</strong> <code>ssh root@&lt;camera_ip&gt;</code> (default password: <code>root</code>, you’ll be prompted to change it on first login)</li>
</ul>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1.png"><img loading="lazy" decoding="async" width="1024" height="751" src="https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1-1024x751.png" alt="" class="wp-image-3021" srcset="https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1-1024x751.png 1024w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1-300x220.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1-768x563.png 768w, https://www.alonsoruibal.com/wp-content/uploads/2025/12/image-1.png 1329w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<h3 class="wp-block-heading">Configuring streams</h3>



<p>In the web interface under <strong>Settings → Streamer/OSD</strong>, you can configure two streams:</p>



<ul class="wp-block-list">
<li><strong>Main:</strong> I&#8217;m using 2560&#215;1440 30 FPS H.264 15000 kbps</li>



<li><strong>Substream:</strong> For previews or motion detection. I set it to 640&#215;360 10 FPS H.264 1000 kbps</li>
</ul>



<p>Stream settings are saved in <code>/etc/prudynt.json</code>.</p>



<p>RTSP URLs:</p>



<ul class="wp-block-list">
<li><strong>Main</strong>: <code>rtsp://thingino:thingino@&lt;camera_ip>:554/ch0</code></li>



<li><strong>Substream</strong>: <code>rtsp://thingino:thingino@&lt;camera_ip>:554/ch1</code></li>
</ul>



<p>These streams can be used from recording apps like Frigate or tested from Linux using <code>ffplay &lt;stream_url></code>.</p>



<h2 class="wp-block-heading">Motion detection</h2>



<p>Motion detection is enabled from the web interface by clicking the <strong>person icon</strong> or from <strong>Services → Motion Guard</strong>. It was not working with the default settings because there were no secondary stream.</p>



<p>Thingino supports simple motion detection with rectangular zones defined in JSON. I think that the original chinese firmware had better detection options. But I will use Frigate for advanced detection options.</p>



<p>On motion detection Thingino has a lot of notification options:</p>



<ul class="wp-block-list">
<li>Email</li>



<li>FTP</li>



<li>MQTT</li>



<li>Telegram</li>



<li>Webhooks</li>



<li>Ntfy.sh</li>
</ul>



<p>Telegram is particularly useful as it sends notifications to the phone and can store video clips (for free!).</p>



<p>Some configuration quirks:</p>



<ul class="wp-block-list">
<li>The file <code>/etc/prudynt.json</code> stores motion detection settings under a &#8220;motion&#8221; object.</li>



<li>The <em>Send to Telegram</em> option sometimes fails to save from the web UI. I needed to manually set <code>"send2telegram": true</code>.</li>



<li>Motion triggers the script <code>/sbin/motion</code>, which has a bug: it starts a video recording and calls <code>/sbin/send2telegram</code>, which tries to start another recording and fails. I needed to comment out the redundant recording call in <code>/sbin/motion</code>.</li>
</ul>



<h2 class="wp-block-heading">Publishing to Telegram</h2>



<p>To enable Telegram notifications:</p>



<ol class="wp-block-list">
<li>Create a bot with <strong>@BotFather</strong>.</li>



<li>Create a channel and make the bot an administrator.</li>



<li>Enter the bot token and channel ID in the Thingino web interface: <strong>Tools → Send to Telegram</strong>.</li>
</ol>



<p>By default, <code>/sbin/motion</code> tries to send a photo and video to Telegram. This did not work in this camera, and I needed to change the call to <code>/sbin/send2telegram clip</code> to send only the video.</p>



<p>Another drawback is that the Telegram app does not support playing H.265 videos, the main stream needs to be set to H.264.</p>



<h3 class="wp-block-heading">Telegram bot</h3>



<p>The bot can also respond to commands from authorized users to send live snapshots or video clips. Enable it in the web interface under <strong>Services → Telegram bot</strong>, and modify the wrong default actions to run binaries in <code>/sbin/</code> instead of <code>/usr/bin/</code>.</p>



<h3 class="wp-block-heading">Final thoughts</h3>



<p>Installing Thingino on this camera is a rewarding but technical process. You gain better control and privacy, but it requires patience and careful troubleshooting. I will need another post to explain the Frigate setup.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&amp;linkname=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&amp;linkname=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&amp;linkname=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&amp;linkname=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&amp;linkname=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Finstalling-thingino-on-a-vanhua-fjz-camera%2F&#038;title=Installing%20Thingino%20on%20a%20Vanhua%20FJZ%20camera" data-a2a-url="https://www.alonsoruibal.com/installing-thingino-on-a-vanhua-fjz-camera/" data-a2a-title="Installing Thingino on a Vanhua FJZ camera"></a></p><p>The post <a href="https://www.alonsoruibal.com/installing-thingino-on-a-vanhua-fjz-camera/">Installing Thingino on a Vanhua FJZ camera</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>2024</title>
		<link>https://www.alonsoruibal.com/2024-2/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Tue, 31 Dec 2024 21:41:59 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2971</guid>

					<description><![CDATA[<p>It has been a year full of decisions—some very difficult, others quite simple. I continue to learn what it means to be a father, and it’s proving to be as complicated as I had imagined. I’m not active on social media, and after the collapse of Twitter, I’ve been trying to revive my activity here [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/2024-2/">2024</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>It has been a year full of decisions—some very difficult, others quite simple.</p>



<p>I continue to learn what it means to be a father, and it’s proving to be as complicated as I had imagined.</p>



<p>I’m not active on social media, and after the collapse of Twitter, I’ve been trying to revive my activity here on the blog.</p>



<p>On the professional front, I made the decision to leave Netcentric, where I worked for the past five years. I had a great time there, and it was a tough decision, but an exciting new opportunity came my way. I left the AEM consultancy world to join Alén Space, a company focused on building satellites. I now work on their Mission Control System software. So, while I’m still pursuing my career as a Java developer, I’m also taking on a more managerial role, leading a developer team.</p>



<p>In another change, after seven years of working with a Mac, I’m back on Linux—and I’m very happy about it. I also replaced my old home lab Dell T3500 workhorse with a sleeker Minisforum UM890 Pro, and it’s been amazing. For my home office setup, I’ve also switched back to OpenWRT with a Xiaomi AX3000T (with WiFi 6). I had forgotten how easy it is to configure OpenWRT.</p>



<p>This has also been a great year for my home automation journey. I started the year by moving Home Assistant to a small and efficient Orange Pi 3B. I’m extremely happy with the combination of Home Assistant and ESPHome. Home Assistant has become an essential part of our daily routine, mainly for climate control and air quality monitoring.</p>



<p>On a personal note, we moved from an apartment in the city back to our country house. This means more commuting, but it also means more comfort and a better school for our little one. I was disappointed by Santiago de Compostela—it’s turning into a theme park focused solely on tourism.</p>



<p>Finally, I replaced my 20-year-old diesel car with an electric one. I would have switched sooner if I had known just how great and affordable electric cars are. I chose a Tesla primarily for its price-to-technology ratio. I’m not a fan of the brand or their CEO, but the car has made living in the country much cheaper.</p>



<p>Happy 2025!</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&amp;linkname=2024" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&amp;linkname=2024" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&amp;linkname=2024" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&amp;linkname=2024" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&amp;linkname=2024" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2F2024-2%2F&#038;title=2024" data-a2a-url="https://www.alonsoruibal.com/2024-2/" data-a2a-title="2024"></a></p><p>The post <a href="https://www.alonsoruibal.com/2024-2/">2024</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Abusing Apple&#8217;s Find My network</title>
		<link>https://www.alonsoruibal.com/abusing-apples-find-my-network/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 23 Jun 2024 10:16:14 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[docker]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2905</guid>

					<description><![CDATA[<p>Some months ago Apple was running a commercial on Spanish TV about the iPhone&#8217;s privacy, mocking users with Android devices. Probably, iPhone users do not know that it is really easy to physically track them. Apple&#8217;s &#8220;Find My&#8221; network was launched in 2019 and the AirTag in 2021. The AirTag emits BLE beacons with a [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/abusing-apples-find-my-network/">Abusing Apple&#8217;s Find My network</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Some months ago Apple was running a commercial on Spanish TV about the iPhone&#8217;s privacy, mocking users with Android devices.</p>



<p>Probably, iPhone users do not know that it is really easy to physically track them.</p>



<p>Apple&#8217;s &#8220;Find My&#8221; network was launched in 2019 and the AirTag in 2021. The AirTag emits BLE beacons with a public key that, when received by another Apple device, are sent along with the location of the device that received them to Apple servers, encrypted with the AirTag public key. The information on the Apple servers needs to be decrypted with the AirTag&#8217;s private key.</p>



<p>However, when the AirTag location is updated, <strong>the owner of the AirTag also knows that there is an Apple device nearby.</strong></p>



<p>In theory it&#8217;s required to have an iPhone/iPad/iPod to activate an AirTag, but it&#8217;s very easy to build an AirTag clone with ESP32.</p>



<p>The <a href="https://github.com/dchristl/macless-haystack">Macless Haystack</a> project, based on the original <a href="https://github.com/seemoo-lab/openhaystack">OpenHaystack</a>, provides:</p>



<ul class="wp-block-list">
<li>The python utility to generate AirTag key pairs</li>



<li>The firmware to flash an ESP32-WROOM-32 and convert it to an AirTag clone</li>



<li>An Android app to check the location of your fake AirTags</li>



<li>Two Docker containers needed to retrieve the info from the Apple servers, they need to be accesible by the Android app</li>
</ul>



<p>And, of course, I built my own one:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/06/airtag-clone.jpeg"><img loading="lazy" decoding="async" width="870" height="590" src="https://www.alonsoruibal.com/wp-content/uploads/2024/06/airtag-clone.jpeg" alt="" class="wp-image-2910" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/06/airtag-clone.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/06/airtag-clone-300x203.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/06/airtag-clone-768x521.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>These ESP clones are much bigger than AirTags but they are ok to track cars, suitcases or bags. There is a PR to the Macless Haystack repo alowing to use an ESP32-C3 Supermini, that makes a smaller device with a better battery duration.</p>



<p>Google launched the &#8220;Find My Device&#8221; network in April 2024, and the tags supporting it (i.e. the Chippolo Point or the Pebblebee) are slowly reaching the market. But the default security option only shares the location information if there are other Android devices nearby. That is much better for the privacy of Android device owners, but much worse for the owners of the tags.</p>



<p>So, if you own an Android device, it is still better to use AirTag clones, abusing the lack of privacy of the Apple devices.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&amp;linkname=Abusing%20Apple%E2%80%99s%20Find%20My%20network" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&amp;linkname=Abusing%20Apple%E2%80%99s%20Find%20My%20network" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&amp;linkname=Abusing%20Apple%E2%80%99s%20Find%20My%20network" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&amp;linkname=Abusing%20Apple%E2%80%99s%20Find%20My%20network" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&amp;linkname=Abusing%20Apple%E2%80%99s%20Find%20My%20network" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fabusing-apples-find-my-network%2F&#038;title=Abusing%20Apple%E2%80%99s%20Find%20My%20network" data-a2a-url="https://www.alonsoruibal.com/abusing-apples-find-my-network/" data-a2a-title="Abusing Apple’s Find My network"></a></p><p>The post <a href="https://www.alonsoruibal.com/abusing-apples-find-my-network/">Abusing Apple&#8217;s Find My network</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Back to OpenWrt</title>
		<link>https://www.alonsoruibal.com/back-to-openwrt/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 08 Jun 2024 16:05:34 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2846</guid>

					<description><![CDATA[<p>Some years ago, my network provider (O2 &#8211; Spain) installed a router for me (Mitrastar HGU GPT-2541GNAC) with much better specs than my old OpenWrt router (TP-Link TL-WDR4300). So, I ditched OpenWrt and started using the company&#8217;s router. But the Mitrastar needed to be factory reset every 6 months because it had some problems with [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/back-to-openwrt/">Back to OpenWrt</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Some years ago, my network provider (O2 &#8211; Spain) installed a router for me (Mitrastar HGU GPT-2541GNAC) with much better specs than my old OpenWrt router (TP-Link TL-WDR4300). So, I ditched OpenWrt and started using the company&#8217;s router.</p>



<p>But the Mitrastar needed to be factory reset every 6 months because it had some problems with the DHCP in my network. Recently, I offloaded the DHCP to an OrangePi 3B, but now my home network was relying too much on the availability of this device. Also, the Mitrastar is starting to show its age without features like WiFi 6&#8230;</p>



<p>A couple of weeks ago I found on Aliexpress a new <a href="https://s.click.aliexpress.com/e/_DdJ3VRH">Xiaomi AX3000T router</a>. It has an amazing set of specs:</p>



<ul class="wp-block-list">
<li>2 ARMv8 cores @ 1.3GHz (MediaTek MT7981B)</li>



<li>128 MB ROM</li>



<li>256 MB RAM</li>



<li>WiFi 6 (AX) in the 2.4 GHz and 5 GHz bands</li>
</ul>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/06/ax3007.jpeg"><img loading="lazy" decoding="async" width="870" height="700" src="https://www.alonsoruibal.com/wp-content/uploads/2024/06/ax3007.jpeg" alt="" class="wp-image-2890" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/06/ax3007.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/06/ax3007-300x241.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/06/ax3007-768x618.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>And it&#8217;s compatible with the lastest snapshot of OpenWrt:</p>



<p><a href="https://openwrt.org/inbox/toh/xiaomi/ax3000t">https://openwrt.org/inbox/toh/xiaomi/ax3000t</a></p>



<p>I was able to get it during the AliExpress ChoiceDay (this happens the first days of each month) for 26 EUR (including a 4 EUR coupon).</p>



<p>When it arrived, I found it a bit smaller than what I expected, and I liked its minimalist look. It has only one button for WPS (+ the reset pinhole), and one LED in the front panel (i.e. it does not have LEDs on the ethernet ports).</p>



<p>Everything was in Chinese, but it&#8217;s easy to read it using the Google Translate camera, only for the steps necessary to set up OpenWrt. I did a simple installation without the U-Boot boot loader.</p>



<p>So, I put again an OpenWrt router back in my home network moving the DHCP and WireGuard services to the router. I had forgotten the beauty and simplicity of OpenWrt.</p>



<p>I also tested <a href="https://github.com/lynxthecat/adblock-lean">adblock-lean</a> and it works quite well on the router with big lists like <a href="https://oisd.nl/">https://oisd.nl/</a>: It&#8217;s able to manage the 660K domains of both oisd big and osid nsfw lists. But at the moment I&#8217;ll continue using the Pi-hole on the OrangePi. I still need the OrangePi to run Home Assistant and the NAS.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&amp;linkname=Back%20to%20OpenWrt" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&amp;linkname=Back%20to%20OpenWrt" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&amp;linkname=Back%20to%20OpenWrt" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&amp;linkname=Back%20to%20OpenWrt" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&amp;linkname=Back%20to%20OpenWrt" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fback-to-openwrt%2F&#038;title=Back%20to%20OpenWrt" data-a2a-url="https://www.alonsoruibal.com/back-to-openwrt/" data-a2a-title="Back to OpenWrt"></a></p><p>The post <a href="https://www.alonsoruibal.com/back-to-openwrt/">Back to OpenWrt</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>CO2 sensor with LCD and ESP32-C3 Supermini</title>
		<link>https://www.alonsoruibal.com/co2-sensor-with-lcd-and-esp32-c3-supermini/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 05 May 2024 14:53:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[esp32]]></category>
		<category><![CDATA[esphome]]></category>
		<category><![CDATA[iot]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2795</guid>

					<description><![CDATA[<p>I wanted to add an LCD screen to my CO2 sensor, so I bought a white LCD 1602 with an I2C controller. The I2C controller needs to be soldered to the LCD, but my basic soldering skills were sufficient for the task. I also wanted to place it in a box, so I purchased this [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/co2-sensor-with-lcd-and-esp32-c3-supermini/">CO2 sensor with LCD and ESP32-C3 Supermini</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/05/enclosure.jpeg"><img loading="lazy" decoding="async" width="870" height="550" src="https://www.alonsoruibal.com/wp-content/uploads/2024/05/enclosure.jpeg" alt="" class="wp-image-2800" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/05/enclosure.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/enclosure-300x190.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/enclosure-768x486.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>I wanted to add an LCD screen to my CO2 sensor, so I bought a <a href="https://es.aliexpress.com/item/1005002804671058.html">white LCD 1602 with an I2C controller</a>. The I2C controller needs to be soldered to the LCD, but my basic soldering skills were sufficient for the task.</p>



<p>I also wanted to place it in a box, so I purchased <a href="https://s.click.aliexpress.com/e/_Dl70p8r">this plastic enclosure</a> but I cannot recommend it. It required a lot of glue from a <a href="https://s.click.aliexpress.com/e/_DkDD4oL">glue gun</a> to install the LCD and the ESP. I also had to use the soldering iron to create space for the ESP and a hole for the USB connector. I installed the plastic buttons but they are only decorative.</p>



<p>I made room for the sensors inside the box, but finally left them outside because they are more precise that way.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-connections.jpeg"><img loading="lazy" decoding="async" width="870" height="566" src="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-connections.jpeg" alt="" class="wp-image-2799" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-connections.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-connections-300x195.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-connections-768x500.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>The ESP32-WROOM-32 was too large for the enclosure, so I used a <a href="https://s.click.aliexpress.com/e/_Dcj0lfl">ESP32-C3 Supermini</a> with an <a href="https://s.click.aliexpress.com/e/_DBYsKkT">expansion board</a>. This is a really amazing board with a 32-bit RISC-V 160MHz microcontroller, WiFi, Bluetooh, I2C and UART. It&#8217;s not as powerful as the ESP32-WROOM-32 with a dual core 32-bit Xtensa 240Mhz, but it&#8217;s more than capable to control the sensors and the LCD.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-supermini.jpeg"><img loading="lazy" decoding="async" width="870" height="450" src="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-supermini.jpeg" alt="" class="wp-image-2798" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-supermini.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-supermini-300x155.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/05/esp32-c3-supermini-768x397.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>This is the ESPHome configuration, which includes a switch to control the LCD backlight and a clock synchronizing the time with Home Assistant:</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml line-numbers">esphome:
  name: co2sensor
  friendly_name: CO2 Sensor

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

logger:
  level: ERROR

api:
  password: ""

ota:
  platform: esphome
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 90s
  ap:
    ssid: ${friendly_name} Hotspot
    password: !secret wifi_password

captive_portal:

web_server:
  port: 80

debug:

time:
  - platform: homeassistant
    id: homeassistant_time
    timezone: "Europe/Madrid"

uart:
  rx_pin: GPIO20
  tx_pin: GPIO21
  baud_rate: 9600

i2c:
  sda: GPIO8
  scl: GPIO9

sensor:
  - platform: uptime
    name: Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

  - platform: wifi_signal
    name: "WiFi signal sensor"
    update_interval: 60s

  - platform: dht
    model: AM2302
    pin: GPIO10
    temperature:
      id: "dht22_temperature"
      name: "DHT22 Temperature"
    humidity:
      id: "dht22_humidity"
      name: "DHT22 Humidity"
    update_interval: 50s

  - platform: mhz19
    co2:
      id: "mhz19_co2"
      name: "MH-Z19 CO2"
    temperature:
      id: "mhz19_temperature"
      name: "MH-Z19 Temperature"
    update_interval: 60s
    automatic_baseline_calibration: false

display:
  - platform: lcd_pcf8574
    dimensions: 16x2
    address: 0x27
    update_interval: 1s
    lambda: |-
        auto time =  id(homeassistant_time).now();
        it.printf(11, 0, "%02d:%02d", time.hour, time.minute);
        it.printf(11, 1, "%02d/%02d", time.day_of_month, time.month);
        auto co2 = id(mhz19_co2).state;
        if (!isnan(co2)) {
          it.printf(0, 0, "%.0fppm", co2);
        }
        it.printf(0, 1, "%.1fC", id(dht22_temperature).state);
        it.printf(6, 1, "%.0f%%", id(dht22_humidity).state);

switch:
  - platform: gpio
    pin: GPIO7
    name: "LED Backlight"
    id: led_backlight
    restore_mode: ALWAYS_OFF</code></pre>



<p>And the full BOM:</p>



<ul class="wp-block-list">
<li><a href="https://s.click.aliexpress.com/e/_Dcj0lfl">ESP32-C3 Supermini</a></li>



<li><a href="https://s.click.aliexpress.com/e/_DBYsKkT">Expansion board</a></li>



<li><a href="https://s.click.aliexpress.com/e/_DePVsNj">MH-Z19B CO2 sensor</a></li>



<li><a href="https://s.click.aliexpress.com/e/_DBs77rh">AM2302 temperature and humidity sensor</a>&nbsp;</li>



<li><a href="https://es.aliexpress.com/item/1005002804671058.html">White LCD 1602 with an I2C controller</a></li>



<li><a href="https://s.click.aliexpress.com/e/_DEdtgSX">10cm female-female Dupont cables</a></li>



<li><a href="https://s.click.aliexpress.com/e/_Dl70p8r">Plastic enclosure</a></li>
</ul>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&amp;linkname=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&amp;linkname=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&amp;linkname=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&amp;linkname=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&amp;linkname=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fco2-sensor-with-lcd-and-esp32-c3-supermini%2F&#038;title=CO2%20sensor%20with%20LCD%20and%20ESP32-C3%20Supermini" data-a2a-url="https://www.alonsoruibal.com/co2-sensor-with-lcd-and-esp32-c3-supermini/" data-a2a-title="CO2 sensor with LCD and ESP32-C3 Supermini"></a></p><p>The post <a href="https://www.alonsoruibal.com/co2-sensor-with-lcd-and-esp32-c3-supermini/">CO2 sensor with LCD and ESP32-C3 Supermini</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>MH-Z19B CO2 sensor</title>
		<link>https://www.alonsoruibal.com/mh-z19b-co2-sensor/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 30 Mar 2024 20:00:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[esp32]]></category>
		<category><![CDATA[esphome]]></category>
		<category><![CDATA[iot]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2724</guid>

					<description><![CDATA[<p>To keep a healthy environment at home or at the workplace, one of the important things to control is the carbon dioxide (CO2) level. It&#8217;s measured in ppm (parts per million), indicating how many parts of CO2 there are in one million parts of air. As a reference: To reduce the CO2 level, we need [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/mh-z19b-co2-sensor/">MH-Z19B CO2 sensor</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>To keep a healthy environment at home or at the workplace, one of the important things to control is the carbon dioxide (CO2) level.</p>



<p>It&#8217;s measured in ppm (parts per million), indicating how many parts of CO2 there are in one million parts of air. As a reference:</p>



<ul class="wp-block-list">
<li>Less than 1000 ppm are healthy levels</li>



<li>Between 1000 ppm and 2000 ppm, we need to reduce the CO2 levels</li>



<li>Levels greater than 2000 ppm are associated with headaches, sleepiness, poor concentration, loss of attention&#8230;</li>
</ul>



<p>To reduce the CO2 level, we need to ventilate the room. It can be manually done (opening the windows) or it can be automated with a ventilation system.</p>



<p>To measure it we need a proper CO2 sensor, and one of the most reliables sensors is the <strong>MH-Z19B</strong>. It is not cheap for the Aliexpress standards (it costs around 20 EUR), but other cheap sensors announced as &#8220;air quality&#8221; sensors or &#8220;eCO2&#8221; sensors are not really measuring the CO2 level (i.e. the MQ135).</p>



<p>I bought <a href="https://s.click.aliexpress.com/e/_DePVsNj">this MH-Z19B from Aliexpress</a> and hooked it to an ESP32-WROOM-32 board. This board is going to be also purposed as a temperature and humidity sensor, so I also attached a DHT22 sensor. I bought <a href="https://s.click.aliexpress.com/e/_DknvlPT">this DHT22 sensor</a> but it is not an original one, and the measures do not seem very correct, so I ordered again <a href="https://s.click.aliexpress.com/e/_DBs77rh">an original AM2302 (=DHT22)</a>. The MH-Z19B includes a temperature sensor, but it&#8217;s mainly used for calibration and it lacks precision, as it does not report decimals. I&#8217;m also using <a href="https://s.click.aliexpress.com/e/_DlIK1Hr">an expansion board</a> to simplify the connections.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/04/co2.jpeg"><img loading="lazy" decoding="async" width="870" height="520" src="https://www.alonsoruibal.com/wp-content/uploads/2024/04/co2.jpeg" alt="" class="wp-image-2729" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/04/co2.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/04/co2-300x179.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/04/co2-768x459.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a><figcaption class="wp-element-caption">The ESP32-WROOM-32 on the expansion board connected to the MH-Z19B (gold) and to the DHT22 (red)</figcaption></figure>



<ul class="wp-block-list">
<li>The jumper in the expansion board needs to be set to 5V (because both of these sensors need 5V).</li>



<li>Connected VCC and  GND of both sensors to the expansion board</li>



<li>Connected the RX and TX of the MH-Z19B to the TX and RX (GPIO1 and GPIO3) of the ESP</li>



<li>Connected GPIO16 to the DAT of the DHT22</li>
</ul>



<p>Finally, I installed ESPHome to the board with this configuration:</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml">substitutions:
  devicename: co2sensor
  friendly_name: CO2 sensor

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}
  platform: ESP32
  board: nodemcu-32s

logger:

api:
  password: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 90s
  ap:
    ssid: ${friendly_name} Hotspot
    password: !secret wifi_password

captive_portal:

web_server:
  port: 80

debug:

time:
  - platform: homeassistant
    id: homeassistant_time

uart:
  rx_pin: GPIO3
  tx_pin: GPIO1
  baud_rate: 9600

sensor:
  - platform: uptime
    name: Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

  - platform: wifi_signal
    name: "WiFi signal sensor"
    update_interval: 60s

  - platform: dht
    model: DHT22
    pin: GPIO16
    temperature:
      id: "dht22_temperature"
      name: "DHT22 Temperature"
    humidity:
      id: "dht22_humidity"
      name: "DHT22 Humidity"
    update_interval: 60s

  - platform: mhz19
    co2:
      id: "mhz19_co2"
      name: "MH-Z19 CO2"
    temperature:
      id: "mhz19_temperature"
      name: "MH-Z19 Temperature"
    update_interval: 60s
    automatic_baseline_calibration: false
</code></pre>



<p>And It&#8217;s working nicely, this is the ESPHome web interface:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/04/image.png"><img loading="lazy" decoding="async" width="870" height="384" src="https://www.alonsoruibal.com/wp-content/uploads/2024/04/image.png" alt="" class="wp-image-2731" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/04/image.png 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/04/image-300x132.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/04/image-768x339.png 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>Keeping the CO2 levels under control is helping me create a healthier workplace environment and improve performance.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&amp;linkname=MH-Z19B%20CO2%20sensor" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&amp;linkname=MH-Z19B%20CO2%20sensor" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&amp;linkname=MH-Z19B%20CO2%20sensor" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&amp;linkname=MH-Z19B%20CO2%20sensor" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&amp;linkname=MH-Z19B%20CO2%20sensor" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fmh-z19b-co2-sensor%2F&#038;title=MH-Z19B%20CO2%20sensor" data-a2a-url="https://www.alonsoruibal.com/mh-z19b-co2-sensor/" data-a2a-title="MH-Z19B CO2 sensor"></a></p><p>The post <a href="https://www.alonsoruibal.com/mh-z19b-co2-sensor/">MH-Z19B CO2 sensor</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Improving WiFi reception with an ESP32-WROOM-32U</title>
		<link>https://www.alonsoruibal.com/improving-wifi-reception-with-an-esp32-wroom-32u/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 17 Mar 2024 21:00:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[My House]]></category>
		<category><![CDATA[esp32]]></category>
		<category><![CDATA[esphome]]></category>
		<category><![CDATA[iot]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2696</guid>

					<description><![CDATA[<p>I&#8217;m using a ESP32 with ESPHome connected to my heating system for climate control, as expained in a previous post. The heating system is in a different builng than the router and I was experiencing some WiFi coverage issues (the WiFi signal needs to cross two metallic window blinds&#8230;). To diagnose the WiFi coverage is [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/improving-wifi-reception-with-an-esp32-wroom-32u/">Improving WiFi reception with an ESP32-WROOM-32U</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;m using a ESP32 with ESPHome connected to my heating system for climate control, <a href="https://www.alonsoruibal.com/climate-control-with-esphome-and-home-assistant/">as expained in a previous post</a>.</p>



<p>The heating system is in a different builng than the router and I was experiencing some WiFi coverage issues (the WiFi signal needs to cross two metallic window blinds&#8230;).</p>



<p>To diagnose the WiFi coverage is very useful the <em>wifi_signal</em> sensor in ESPHome:</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml">sensor:
  - platform: wifi_signal
    name: Wifi Signal
    update_interval: 60s</code></pre>



<p>It was showing a WiFi signal of <em>-95 dBm</em> in the board: This is very low, and it was experiencing some disconnections.</p>



<p>Usually the ESP32 boards have an antenna integrated in the board, but the <em>ESP32-WROOM-32U</em> has an <em>IPEX</em> connector for an external antenna:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-board.jpeg"><img loading="lazy" decoding="async" width="870" height="475" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-board.jpeg" alt="" class="wp-image-2698" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-board.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-board-300x164.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-board-768x419.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>So, I spent less than 10 EUR in Aliexpress buying (affiliate links):</p>



<ul class="wp-block-list">
<li><a href="http://s.click.aliexpress.com/e/_Dkcp2Id">ESP32-WROOM-32U module</a></li>



<li><a href="http://s.click.aliexpress.com/e/_DeyzaD7"><em>IPEX</em> to <em>SMA</em> 2.5 dBi external antenna</a></li>



<li><a href="https://s.click.aliexpress.com/e/_DcgRNNJ">Expansion board</a> that makes screwing the ESP32 to the wood mount much easier and simplifies the connections</li>
</ul>



<p>And replaced the previous <em>ESP32-WROOM-32</em> module with an <em>ESP32-WROOM-32U</em>, installing the external antenna. This is how it looks now:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u.jpeg"><img loading="lazy" decoding="async" width="870" height="560" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u.jpeg" alt="" class="wp-image-2697" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-300x193.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/esp-wroom-32u-768x494.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a><figcaption class="wp-element-caption"><em>ESP32-WROOM-32U</em> mounted on an expasion board connected to the 4 relay module</figcaption></figure>



<p>The WiFi signal shown in ESPHome increased<strong> from <em>-95 dB</em>m to &#8211;<em>75 dBm</em></strong> and it&#8217;s no longer experiencing any interruptions.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&amp;linkname=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&amp;linkname=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&amp;linkname=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&amp;linkname=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&amp;linkname=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-wifi-reception-with-an-esp32-wroom-32u%2F&#038;title=Improving%20WiFi%20reception%20with%20an%20ESP32-WROOM-32U" data-a2a-url="https://www.alonsoruibal.com/improving-wifi-reception-with-an-esp32-wroom-32u/" data-a2a-title="Improving WiFi reception with an ESP32-WROOM-32U"></a></p><p>The post <a href="https://www.alonsoruibal.com/improving-wifi-reception-with-an-esp32-wroom-32u/">Improving WiFi reception with an ESP32-WROOM-32U</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ESPHome in a RTL8710BX smart plug</title>
		<link>https://www.alonsoruibal.com/esphome-in-a-rtl8710bx-smart-plug/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 09 Mar 2024 21:46:27 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[esphome]]></category>
		<category><![CDATA[iot]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2597</guid>

					<description><![CDATA[<p>I bought from a popular chinese store a generic Tuya smart plug with power monitoring. It was extrememly cheap, costing less than 4 EUR. And of course I bought it to play trying to flash ESPHome. The first challenge was to open it without breaking it. I was able to open it by wrapping it [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/esphome-in-a-rtl8710bx-smart-plug/">ESPHome in a RTL8710BX smart plug</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>I bought from a popular chinese store a generic Tuya smart plug with power monitoring. It was extrememly cheap, costing less than 4 EUR. And of course I bought it to play trying to flash ESPHome.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-1.jpeg"><img loading="lazy" decoding="async" width="870" height="375" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-1.jpeg" alt="" class="wp-image-2610" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-1.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-1-300x129.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-1-768x331.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>The first challenge was to open it without breaking it. I was able to open it by wrapping it in cardboard and gently tapping it with a hammer around the body.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-open.jpeg"><img loading="lazy" decoding="async" width="870" height="350" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-open.jpeg" alt="" class="wp-image-2611" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-open.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-open-300x121.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/smartplug-open-768x309.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>You never know what chip you are going to find. In the past ESP8266 was very common but now they switched mainly to Beken chips. This smart switch has a <strong>T102_V1.1</strong> board with a Realtek <strong>RTL8710BX</strong> chip:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/board.jpeg"><img loading="lazy" decoding="async" width="870" height="380" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/board.jpeg" alt="" class="wp-image-2641" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/board.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/board-300x131.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/board-768x335.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>Luckily the support for this chip was developed in the LibreTiny project:</p>



<p><a href="https://github.com/libretiny-eu/libretiny">https://github.com/libretiny-eu/libretiny</a></p>



<p>And now it&#8217;s integrated into ESPHome:</p>



<p><a href="https://esphome.io/components/libretiny">https://esphome.io/components/libretiny</a></p>



<p>This is the board:</p>



<p><a href="https://fcc.report/FCC-ID/2AU7O-T102V11/4540736.pdf">https://fcc.report/FCC-ID/2AU7O-T102V11/4540736.pdf</a></p>



<p>And after investigating the outputs, I reached this conclusion about them:</p>



<figure class="wp-block-table"><table><tbody><tr><td class="has-text-align-center" data-align="center"><strong>Index</strong></td><td class="has-text-align-center" data-align="center"><strong>RTL8710BX</strong></td><td class="has-text-align-center" data-align="center"><strong>Connection</strong></td></tr><tr><td class="has-text-align-center" data-align="center">1</td><td class="has-text-align-center" data-align="center">VDD</td><td class="has-text-align-center" data-align="center">Connected</td></tr><tr><td class="has-text-align-center" data-align="center">3</td><td class="has-text-align-center" data-align="center">GND</td><td class="has-text-align-center" data-align="center">Connected</td></tr><tr><td class="has-text-align-center" data-align="center">5</td><td class="has-text-align-center" data-align="center">GPIO_A18/UART0_RXD</td><td class="has-text-align-center" data-align="center">Connected to the button</td></tr><tr><td class="has-text-align-center" data-align="center">7</td><td class="has-text-align-center" data-align="center">GPIO_A23/UART0_TXD</td><td class="has-text-align-center" data-align="center">Not connected</td></tr><tr><td class="has-text-align-center" data-align="center">9</td><td class="has-text-align-center" data-align="center">GPIO_A14<strong>/</strong>PWM0</td><td class="has-text-align-center" data-align="center"> Power Monitor SEL pin</td></tr><tr><td class="has-text-align-center" data-align="center">11</td><td class="has-text-align-center" data-align="center">GPIO_A15/PWM1</td><td class="has-text-align-center" data-align="center">Connected to the relay</td></tr><tr><td class="has-text-align-center" data-align="center"></td><td class="has-text-align-center" data-align="center"></td><td class="has-text-align-center" data-align="center"></td></tr><tr><td class="has-text-align-center" data-align="center">2</td><td class="has-text-align-center" data-align="center"> GPIO_A12/PWM3</td><td class="has-text-align-center" data-align="center">Power monitor CF1 pin</td></tr><tr><td class="has-text-align-center" data-align="center">4</td><td class="has-text-align-center" data-align="center">GPIO_A0/PWM2</td><td class="has-text-align-center" data-align="center">Power monitor CF pin</td></tr><tr><td class="has-text-align-center" data-align="center">6</td><td class="has-text-align-center" data-align="center">GPIO_A5/PWM4</td><td class="has-text-align-center" data-align="center">Status LED inverted (there is another LED connected to the relay)</td></tr><tr><td class="has-text-align-center" data-align="center">8</td><td class="has-text-align-center" data-align="center">GPIO_A30/DEBUG_LOG_TX</td><td class="has-text-align-center" data-align="center">Not connected, I soldered a cable to the flasher RX</td></tr><tr><td class="has-text-align-center" data-align="center">10</td><td class="has-text-align-center" data-align="center">GPIO_A29/DEBUG_LOG_RX</td><td class="has-text-align-center" data-align="center">Not connected, I soldered a cable to the flasher TX</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">ESPHome</h2>



<p>I created one device this config in the ESPHome dashboard (without power monitoring, read below if you want to enable it):</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml line-numbers">substitutions:
  devicename: smartplug1
  friendly_name: Smart Plug 1

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}

rtl87xx:
  board: wr2
  framework:
    version: 1.5.1

logger:

api:
  password: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: ${friendly_name} Fallback Hotspot
    password: !secret wifi_password

captive_portal:

web_server:
  port: 80

status_led:
  pin:
    number: PA5
    inverted: true

text_sensor:
  - platform: libretiny
    version:
      name: LibreTiny Version

sensor:
  - platform: uptime
    name: Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

  - platform: wifi_signal
    name: Wifi Signal
    update_interval: 60s

binary_sensor:
  - platform: gpio
    device_class: power
    name: Button
    pin:
      number: PA18
      mode: INPUT_PULLUP
      inverted: true
    on_press:
      - switch.toggle: relay

switch:
  - platform: gpio
    id: relay
    name: ${friendly_name}
    pin: PA15
    restore_mode: RESTORE_DEFAULT_OFF</code></pre>



<p>There is currently an open bug in LibreTiny and with the board <strong>t102-v1.1</strong> the PA15 output does not work, so I needed to use the board <strong>wr2</strong> on line 10.</p>



<p>I built it from the ESPHome dashboard and downloaded a .uf2 file.</p>



<h2 class="wp-block-heading">Connecting an USB UART to the chip</h2>



<p>I soldered four dupont cables to VDD, GND, GPIO_A29 and GPIO_A30 connecting them to an <strong>FTDI232</strong> USB UART:</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/flashing.jpeg"><img loading="lazy" decoding="async" width="870" height="200" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/flashing.jpeg" alt="" class="wp-image-2612" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/flashing.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/flashing-300x69.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/flashing-768x177.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>While connected to the FTDI232, the log from the chip can be viewed, i.e. with minicom (but remember to disable hardware flow control):</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">minicom -D /dev/ttyUSB0 -b 115200</code></pre>



<h2 class="wp-block-heading">Flashing</h2>



<p>The official flashing guide does not recomment to power the chip with the USB flasher, but it worked for me:</p>



<p><a href="https://docs.libretiny.eu/docs/platform/realtek-ambz/#flashing">https://docs.libretiny.eu/docs/platform/realtek-ambz/#flashing</a></p>



<p>You need the ltchiptool tool, I installed it in a Python virtualenv:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">python3 -m venv .
source bin/activate
pip install ltchiptool zeroconf</code></pre>



<p>The ltchiptool GUI caused some segmentation fault, so I used it from the commmand line.</p>



<p>To put the chip in flash mode, we need to power it with the TX pin connected to GND.</p>



<p>In flash mode, I created a backup of the previous firmware:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ltchiptool flash read realtek-ambz flash-backup.bin</code></pre>



<p>And to write the ESPHome firmware:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">ltchiptool flash write smartplug1.uf2</code></pre>



<p><br>After the flashing, if I try to power it from USB the WiFi module did not start and it causes a boot loop, but It worked perfectly plugging it into the mains power. A new device appeared in the router and I can connect to the ESPHome web dashboard.</p>



<h2 class="wp-block-heading">Adding power metering</h2>



<p>The plug includes a power metering chip: the BL0936, that is supported by ESPHome:</p>



<p><a href="https://esphome.io/components/sensor/hlw8012.html">https://esphome.io/components/sensor/hlw8012.html</a></p>



<p>However, after configuring and uploading the firmware with the power meter enabled to the board, <strong>the device enters a boot loop</strong>, displaying the following error:</p>



<pre class="wp-block-code"><code class="">[D][switch:016]: 'Smart Plug 1' Turning OFF.
[D][binary_sensor:034]: 'Button': Sending initial state OFF
[C][hlw8012:014]: Setting up HLW8012...
W [      0.109] CHANGE interrupts not supported</code></pre>



<p>Luckily, after 10 reboots, the firmware enters in the &#8220;OTA safe mode&#8221;, disabling all the modules and connecting to the WiFi without the web dashboard but opening a port to allow remote flashing.</p>



<p><a href="https://esphome.io/components/ota.html">https://esphome.io/components/ota.html</a></p>



<p>It is a problem in the combination of the RTL8710 chip and the BL0936 module, there is an open issue about this:</p>



<p><a href="https://github.com/libretiny-eu/libretiny/issues/155">https://github.com/libretiny-eu/libretiny/issues/155</a></p>



<p>It can be fixed with the workaround of SuperXL2023 modifying the <em>.esphome/platformio/platforms/libretiny/cores/realtek-amb/arduino/src/wiring_irq.c</em> file and adding the lines 64 and 65:</p>



<pre class="wp-block-code"><code lang="c" class="language-c">62: #if LT_RTL8720C
63:                        event = IRQ_FALL_RISE;
64: #elif LT_RTL8710B
65:                        event = IRQ_RISE;
66: #else
67:                        LT_W("CHANGE interrupts not supported !!!!!!");</code></pre>



<p>In the ESPHome config I&#8217;m specifying the version of the framework to avoid losing this fix in an automatic update. It works perfectly after rebuilding the image with this fix and uploading it to the device.</p>



<p>This is the complete ESPHome configuration with power metering:</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml line-numbers">substitutions:
  devicename: smartplug1
  friendly_name: Smart Plug 1

  voltage_divider: "1400"
  current_resistor: "0.001"
  current_multiply: "1.0"

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}

rtl87xx:
  board: wr2
  framework:
    version: 1.5.1

logger:

api:
  password: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: ${friendly_name} Fallback Hotspot
    password: !secret wifi_password

captive_portal:

web_server:
  port: 80

status_led:
  pin:
    number: PA5
    inverted: true

text_sensor:
  - platform: libretiny
    version:
      name: LibreTiny Version

sensor:
  - platform: uptime
    name: Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

  - platform: wifi_signal
    name: Wifi Signal
    update_interval: 60s

  - platform: hlw8012
    model: BL0937
    sel_pin:
      number: PA14
      inverted: true
    cf_pin:
      number: PA0
    cf1_pin:
      number: PA12

    current:
      name: Current
      filters:
        - multiply: ${current_multiply}
    voltage:
      name: Voltage
    power:
      name: Power
    energy:
      name: Energy

    update_interval: 30s
    current_resistor: ${current_resistor}
    voltage_divider: ${voltage_divider}

binary_sensor:
  - platform: gpio
    device_class: power
    name: Button
    pin:
      number: PA18
      mode: INPUT_PULLUP
      inverted: true
    on_press:
      - switch.toggle: relay

switch:
  - platform: gpio
    id: relay
    name: ${friendly_name}
    pin: PA15
    restore_mode: RESTORE_DEFAULT_OFF</code></pre>



<p>It needs to calibrate the sensor to obtain the proper values of <em>voltage_divider</em>, <em>current_resistor</em> and <em>current_multiply</em>. It can be done with a multimeter and entering the values in <a href="https://esphome.io/components/sensor/hlw8012.html">the hlw8012 page</a>.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&amp;linkname=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&amp;linkname=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&amp;linkname=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&amp;linkname=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&amp;linkname=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fesphome-in-a-rtl8710bx-smart-plug%2F&#038;title=ESPHome%20in%20a%20RTL8710BX%20smart%20plug" data-a2a-url="https://www.alonsoruibal.com/esphome-in-a-rtl8710bx-smart-plug/" data-a2a-title="ESPHome in a RTL8710BX smart plug"></a></p><p>The post <a href="https://www.alonsoruibal.com/esphome-in-a-rtl8710bx-smart-plug/">ESPHome in a RTL8710BX smart plug</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>WireGuard</title>
		<link>https://www.alonsoruibal.com/wireguard/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 02 Mar 2024 20:58:42 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vpn]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2537</guid>

					<description><![CDATA[<p>I always used OpenVPN in my servers, but now WireGuard is a better option: https://www.wireguard.com/ I&#8217;m using it to remotely access private services in my home server. I setup a star topology, where all the VPN clients connect to the home server and they can only see the server. So I need a dynamic DNS [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/wireguard/">WireGuard</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/wireguard.jpeg"><img loading="lazy" decoding="async" width="870" height="155" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/wireguard.jpeg" alt="" class="wp-image-2539" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/wireguard.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/wireguard-300x53.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/wireguard-768x137.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>I always used OpenVPN in my servers, but now <strong>WireGuard</strong> is a better option:</p>



<p><a href="https://www.wireguard.com/">https://www.wireguard.com/</a></p>



<ul class="wp-block-list">
<li>It&#8217;s simpler</li>



<li>It&#8217;s more efficient</li>



<li>It&#8217;s faster</li>



<li>It uses modern cryptography algorithms</li>
</ul>



<p>I&#8217;m using it to remotely access private services in my home server. I setup a <strong>star</strong> topology, where all the VPN clients connect to the home server and they can only see the server.</p>



<p>So I need a dynamic DNS and an open port in the router, I already have them <a href="https://www.alonsoruibal.com/opening-home-assistant-intenet/">for Home Assistant</a>.</p>



<p><a href="https://acalustra.com/">Eloy Coto</a> recommended <a href="https://tailscale.com/">Tailscale</a>, it is an amazing mesh VPN based in WireGuard. It&#8217;s much simpler to set up, and you do not need to open public ports, but it&#8217;s commercial and a bit overkill for my needs.</p>



<h2 class="wp-block-heading">Generating the WireGuard configurations</h2>



<p>The most tedious part of WireGuard is to generate the configurations, but there are some nice tools to ease that, like:</p>



<p><a href="https://www.wireguardconfig.com/">https://www.wireguardconfig.com/</a></p>



<p>The tool generates the configuration for the server and for the requested number of clients. It does everything in the frontend, so it is not leaking the VPN keys.</p>



<p>As I&#8217;m only acessing the server, I have removed the IP forwarding options in the <em>Post-Up</em> and <em>Post-Down</em> rules.</p>



<h2 class="wp-block-heading">Installing and configuring the WireGuard server</h2>



<p>WireGuard is in the official Ubuntu repos, so to install it in the server it&#8217;s enough to do:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo apt install wireguard</code></pre>



<p>Then I needed to put the config in the<em> /etc/wireguard/wg0.conf</em> file and do:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">sudo systemctl enable wg-quick@wg0.service
sudo systemctl start wg-quick@wg0.service</code></pre>



<h2 class="wp-block-heading">Installing and configuring the clients</h2>



<p>WireGuard has clients for almost any OS:</p>



<p><a href="https://www.wireguard.com/install/">https://www.wireguard.com/install/</a></p>



<p>To setup the client in the phones, the WireGuard Config web tool generates QR codes. In other devices you&#8217;ll need to create a file with it or paste the config contents.</p>



<h2 class="wp-block-heading">Using Pi-hole from the VPN clients</h2>



<p>To use the <strong>Pi-hole</strong> hosted in the same VPN server from the VPN clients, you can specify a <em>DNS</em> property in the client config, i.e. if the server is <em>100.100.1.1</em> and the client is <em>100.100.1.2</em>:</p>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[Interface]
PrivateKey = &lt;client-private-key&gt;
Address = 100.100.1.2/32
DNS = 100.100.1.1

[Peer]
PublicKey = &lt;server-public-key&gt;
PresharedKey = &lt;preshared-key&gt;
Endpoint = &lt;my-home-server&gt;:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25</code></pre>



<p>Every time that you connect the VPN, the DNS server in the client changes to <em>100.100.1.1</em> and it is reverted to the previous DNS server when the VPN is disconnected.</p>



<p>Additionally, Pi-hole needs to be listening in the <em>wg0</em> interface, I explained how to make Pi-hole listen on multiple interfaces <a href="https://www.alonsoruibal.com/pi-hole-as-home-dns-and-dhcp-server/ .">in the Pi-hole post</a>. </p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&amp;linkname=WireGuard" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&amp;linkname=WireGuard" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&amp;linkname=WireGuard" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&amp;linkname=WireGuard" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&amp;linkname=WireGuard" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fwireguard%2F&#038;title=WireGuard" data-a2a-url="https://www.alonsoruibal.com/wireguard/" data-a2a-title="WireGuard"></a></p><p>The post <a href="https://www.alonsoruibal.com/wireguard/">WireGuard</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The LLM revolution</title>
		<link>https://www.alonsoruibal.com/the-llm-revolution/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 24 Feb 2024 13:30:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[llama]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[openai]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2471</guid>

					<description><![CDATA[<p>ChatGPT was launched in November 2022, and it changed our world as we knew it. Since then, Large Language Models (LLMs) have integrated into our daily workflows enhancing our productivity and the quality of our work. Another interesting milestone happened in February 2023, when Meta released the Llama LLM under a noncommercial license: https://llama.meta.com This [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/the-llm-revolution/">The LLM revolution</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llamas.jpeg"><img loading="lazy" decoding="async" width="870" height="425" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llamas.jpeg" alt="" class="wp-image-2479" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llamas.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/llamas-300x147.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/llamas-768x375.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a><figcaption class="wp-element-caption">I took this photo of three Llamas in Machu Picchu some years ago&#8230;</figcaption></figure>



<p><strong>ChatGPT</strong> was launched in November 2022, and it changed our world as we knew it. Since then, Large Language Models (LLMs) have integrated into our daily workflows enhancing our productivity and the quality of our work.</p>



<p>Another interesting milestone happened in February 2023, when Meta released the <strong>Llama</strong> LLM under a noncommercial license:</p>



<p><a href="https://llama.meta.com/">https://llama.meta.com</a></p>



<p>This sparked the enthusiasm among numerous developers dedicated to advancing LLMs, leading to a increase in collaborative efforts and innovation within the field. A good example is the <strong>Hugging Face Model Hub</strong> where new models are constantly published:</p>



<p><a href="https://huggingface.co/models">https://huggingface.co/models</a></p>



<p>Developers started creating improved models and optimizing performance for local execution of LLMs on consumer-grade hardware.</p>



<p><strong>Llama.cpp</strong> is a port of Llama to C++, started in March 2023 with a strong emphasis on performance and portability. It includes a web server and an API:</p>



<p><a href="https://github.com/ggerganov/llama.cpp">https://github.com/ggerganov/llama.cpp</a></p>



<p><strong>Mistral 7B</strong> was released in October 2023, achieving better performance than larger Llama models and demonstrating the effectiveness of LLMs in compressing knowledge.:</p>



<p><a href="https://huggingface.co/papers/2310.06825">https://huggingface.co/papers/2310.06825</a></p>



<p>And now it&#8217;s easier than ever to locally execute LLMs, especially since November 2023, with the <strong>Llamafile</strong> project that packs Llama.cpp and a full LLM into a multi-OS single executable file:</p>



<p><a href="https://github.com/Mozilla-Ocho/llamafile">https://github.com/Mozilla-Ocho/llamafile</a></p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llama-cpp-mistral-7b-instruct.png"><img loading="lazy" decoding="async" width="870" height="350" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llama-cpp-mistral-7b-instruct.png" alt="" class="wp-image-2506" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/llama-cpp-mistral-7b-instruct.png 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/llama-cpp-mistral-7b-instruct-300x121.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/llama-cpp-mistral-7b-instruct-768x309.png 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a><figcaption class="wp-element-caption">The llama.cpp web interface running Mistral 7B Instruct in local via a llamafile</figcaption></figure>



<p>It&#8217;s even possible to run LLMs in a Raspberry Pi 4, like the TinyLlama-1.1B used from a llamafile in this project:</p>



<p><a href="https://github.com/nickbild/local_llm_assistant ">https://github.com/nickbild/local_llm_assistant</a></p>



<p>And about using LLMs for code generation (Github&#8217;s Copilot has been available since 2021), there are IntelliJ plugins like <strong>CodeGPT</strong> (with its first release in February 2023) that now allows you to run the code generation against a local LLM (running under llama.cpp):</p>



<p><a href="https://github.com/carlrobertoh/CodeGPT">https://github.com/carlrobertoh/CodeGPT</a></p>



<p>Google is a bit late to the party. In December 2023 they announced Gemini. In February 2024, they launched the <strong>Gemma</strong> open models, based on the same technology than Gemini:</p>



<p><a href="https://blog.google/technology/developers/gemma-open-models/ ">https://blog.google/technology/developers/gemma-open-models</a></p>



<p>They also released a <strong>gemma.cpp</strong> inference engine:</p>



<p><a href="https://github.com/google/gemma.cpp">https://github.com/google/gemma.cpp</a></p>



<p>And finally, if you are lost among so many LLM models, an interesting resource is the <strong>Chatbot Arena</strong>, released in August 2023. It allows humans to compare the results from different LLMs, keeping a leaderboard with chess-like ELO ratings:</p>



<p><a href="https://chat.lmsys.org/">https://chat.lmsys.org</a></p>



<p>And according to this leaderboard, at the moment GPT-4 is still the king.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&amp;linkname=The%20LLM%20revolution" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&amp;linkname=The%20LLM%20revolution" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&amp;linkname=The%20LLM%20revolution" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&amp;linkname=The%20LLM%20revolution" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&amp;linkname=The%20LLM%20revolution" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-llm-revolution%2F&#038;title=The%20LLM%20revolution" data-a2a-url="https://www.alonsoruibal.com/the-llm-revolution/" data-a2a-title="The LLM revolution"></a></p><p>The post <a href="https://www.alonsoruibal.com/the-llm-revolution/">The LLM revolution</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Opening Home Assistant to Internet</title>
		<link>https://www.alonsoruibal.com/opening-home-assistant-intenet/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Tue, 20 Feb 2024 19:56:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[certbot]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2372</guid>

					<description><![CDATA[<p>To make Google Assistant work with your Home Assistant, you need to provide a public URL with HTTPS access to HA. Here are the full instructions: https://www.home-assistant.io/integrations/google_assistant/ But something that seems trivial, like publicly accessing services in your home server, has some complications, and you usually need to worry about dynamic IPs and security. What [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/opening-home-assistant-intenet/">Opening Home Assistant to Internet</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>To make Google Assistant work with your Home Assistant, you need to provide a public URL with HTTPS access to HA. Here are the full instructions:</p>



<p><a href="https://www.home-assistant.io/integrations/google_assistant/">https://www.home-assistant.io/integrations/google_assistant/</a></p>



<p>But something that seems trivial, like publicly accessing services in your home server, has some complications, and you usually need to worry about dynamic IPs and security.</p>



<p>What do we need:</p>



<ul class="wp-block-list">
<li>An ISP <strong>not</strong> using CG-NAT</li>



<li>Redirect ports in the router</li>



<li>A dynamic DNS provider and a client to update the IP (or a static IP)</li>



<li>An SSL certificate to securely access the HTTP services</li>
</ul>



<h2 class="wp-block-heading">ISP providers with CG-NAT</h2>



<p>Some ISPs use CG-NAT (Carrier-Grade NAT), sharing the same IPv4 among multiple customers. In that case the only way to expose your services is using reverse proxy services such as <a href="http://ngrok.com">ngrok</a>.</p>



<p>Ngrok allows you to generate one static domain and it also automatically generates a SSL certificate, so most steps in this post do not apply.</p>



<p>My ISP (O2 Spain) assigns me a dynamic IP, and I prefer to not rely on these reverse proxy services, so I remotely access my home server redirecting ports in the router.</p>



<h2 class="wp-block-heading">Dynamic DNS provider</h2>



<p>Usually, and unless you have a static IP service (not very common, and not available in my ISP), you need to setup a dynamic DNS service.</p>



<p>I have been using the free Now-DNS service for years:</p>



<p><a href="https://now-dns.com/">https://now-dns.com/</a></p>



<p>And to update the IP in my home server, I setup <em>ddclient </em>with this <em>/etc/ddclient.conf </em>file:</p>



<pre class="wp-block-code"><code lang="properties" class="language-properties">ssl=yes
protocol=dyndns2
daemon=60
mail=root                               # mail all msgs to root
mail-failure=root                       # mail failed update msgs to root
pid=/var/run/ddclient.pid               # record PID in file.
use=web, web=now-dns.com/ip             # get ip from server.
server=now-dns.com                      # default server
login=&lt;your-login&gt;
password=&lt;your-password&gt;
server=now-dns.com,&lt;your-dynamic-domain&gt;</code></pre>



<p>Some of these dynamic DNS domains are blocked in the Pi-hole blocking lists, so, if  you are using Pi-hole or other DNS blocking service, you&#8217;ll probably need to whitelist your domain.</p>



<h2 class="wp-block-heading">SSL certificate</h2>



<p>With the amazing Certbot you can obtain free SSL certificates: </p>



<p><a href="https://certbot.eff.org/">https://certbot.eff.org/</a></p>



<p>There is extensive documentation in the Certbot site about how to use it. I simply install <em>certbot</em> from <em>apt</em> and do a:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">certbot certonly --webroot -w /var/www/html/ -d &lt;your-dynamic-domain&gt; --email &lt;my-email&gt; --non-interactive --agree-tos</code></pre>



<p>But in order to make that work, you need a domain name (available from the dynamic DNS provider in the previous section).</p>



<h2 class="wp-block-heading">HTTP Server</h2>



<p>And to verify that the domain points to your server, Certbot is going to do an HTTP request to that domain, so you also need to have an HTTP server in the port 80 and open the port 80 in the router. This is also needed for the certificate renewals.</p>



<p>You may encounter numerous attacks on this port, so it is crucial to have a reliable web server that is consistently updated and properly configured. I personally use nginx as my HTTP server, and it has never failed me so far.</p>



<h2 class="wp-block-heading">Home Assistant</h2>



<p>To use the SSL certificate from the HA container, we need to share the folder where certificates are stored passing a &#8220;<em>-v /etc/letsencrypt:/etc/letsencrypt</em>&#8221; to the docker command and setting in the HA <em>configuration.yaml</em>:</p>



<pre class="wp-block-code"><code lang="yaml" class="language-yaml">http:
  ssl_certificate: /etc/letsencrypt/live/&lt;your-dynamic-domain&gt;/fullchain.pem
  ssl_key: /etc/letsencrypt/live/&lt;your-dynamic-domain&gt;/privkey.pem</code></pre>



<p>You can also use your public HA URL to remotely access it and to configure in the HA Android application.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&amp;linkname=Opening%20Home%20Assistant%20to%20Internet" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&amp;linkname=Opening%20Home%20Assistant%20to%20Internet" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&amp;linkname=Opening%20Home%20Assistant%20to%20Internet" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&amp;linkname=Opening%20Home%20Assistant%20to%20Internet" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&amp;linkname=Opening%20Home%20Assistant%20to%20Internet" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fopening-home-assistant-intenet%2F&#038;title=Opening%20Home%20Assistant%20to%20Internet" data-a2a-url="https://www.alonsoruibal.com/opening-home-assistant-intenet/" data-a2a-title="Opening Home Assistant to Internet"></a></p><p>The post <a href="https://www.alonsoruibal.com/opening-home-assistant-intenet/">Opening Home Assistant to Internet</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Orange Pi 3B</title>
		<link>https://www.alonsoruibal.com/orange-pi-3b/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Tue, 13 Feb 2024 11:53:28 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[iot]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2375</guid>

					<description><![CDATA[<p>I&#8217;ve never been a fan of the Raspberry Pi. In my opinion, it occupies an intermediate position where it is too underpowered for desktop use and too overpowered for IoT projects: So it&#8217;s place may be TV boxes (where I prefer a Chromecast with Android) or small servers where the power consumtion is important because [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/orange-pi-3b/">Orange Pi 3B</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/orangepi3b.jpg"><img loading="lazy" decoding="async" width="870" height="440" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/orangepi3b.jpg" alt="" class="wp-image-2376" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/orangepi3b.jpg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/orangepi3b-300x152.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/orangepi3b-768x388.jpg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a></figure>



<p>I&#8217;ve never been a fan of the Raspberry Pi. In my opinion, it occupies an intermediate position where it is too underpowered for desktop use and too overpowered for IoT projects:</p>



<ul class="wp-block-list">
<li>To use them as a desktop, there are great X86 alternatives available at about the same price than a RPi 5 but much more powerful, such as the Intel N100.</li>



<li>And for IoT projects, the ESP32 is the king, with amazing boards with Wifi, Bluetooth, etc., all at a price of less than 5 euros.</li>
</ul>



<p>So it&#8217;s place may be TV boxes (where I prefer a Chromecast with Android) or small servers where the power consumtion is important because they are always on.</p>



<p>I bought an Orange Pi 3B: 4 cores, 4GB RAM, 64GB eMMC (~50 euros in Aliexpress) to replace my old X86 home server (Intel N450: 2 cores, 2 GB RAM, 64GB SSD):</p>



<p><a href="http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-3B.html">http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-3B.html</a></p>



<p>The Orange Pi 3B shares the form factor with the Raspberry Pi 3B but it is almost as powerful as the Raspberry Pi 4. Notably, the Orange Pi 3B comes with several advantages over the RPi 4:</p>



<ul class="wp-block-list">
<li>Support for eMMC (much faster and reliable than SD cards)</li>



<li>A power button</li>



<li>A full-size HDMI port</li>



<li>External antenna</li>



<li>And it&#8217;s cheaper</li>
</ul>



<p>I installed the Ubuntu Jammy server image in the eMMC following the OPi manual. It needs to use a USB-A male to USB-A male cable and the RKDevTool (it&#8217;s in Chinese) that runs only in Windows.</p>



<p>And, as this machine is going to be exposed to internet, I hardened a bit the security:</p>



<ul class="wp-block-list">
<li>Changed the APT repositories to <em>ports.ubuntu.com</em></li>



<li>Regenerated SSH server keys</li>



<li>Removed SSH <em>root</em> access</li>



<li>Changed passwords</li>



<li>Renamed the orangepi user</li>



<li>Removed the local autologin</li>
</ul>



<p>To remove the local autologin we need to edit:</p>



<ul class="wp-block-list">
<li><em>/lib/systemd/system/getty@.service.d/override.conf</em>: For the display console autologin</li>



<li><em>/lib/systemd/system/serial-getty@.service.d/override.conf</em>: For the serial console autologin</li>
</ul>



<pre class="wp-block-code"><code lang="properties" class="language-properties">[Service]
ExecStartPre=/bin/sh -c 'exec /bin/sleep 10'
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin orangepi %I $TERM
Type=idle</code></pre>



<p>Removing the <em>&#8220;&#8211;autologin orangepi&#8221;</em>. If you rename the orangepiuser but you want to keep the autologin, you&#8217;ll also need to change the username here.</p>



<p>Then I moved the docker containers and other services from my old X86 server:</p>



<ul class="wp-block-list">
<li>Home Assistant (docker container)</li>



<li>ESPHome dashboard (docker container)</li>



<li>Pi-hole (docker container)</li>



<li>nginx (for certbot and DNS DoT for Pihole)</li>



<li>certbot (to maintain the SSL certificate for Home Assistant)</li>



<li>ddclient (dynamic DNS updater)</li>



<li>NAS (do not expect anything fancy, I access a USB disk via SSH, it&#8217;s enough for Kodi &amp; backups)</li>
</ul>



<p>Everything seems to work smoothly now.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&amp;linkname=Orange%20Pi%203B" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&amp;linkname=Orange%20Pi%203B" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&amp;linkname=Orange%20Pi%203B" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&amp;linkname=Orange%20Pi%203B" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&amp;linkname=Orange%20Pi%203B" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Forange-pi-3b%2F&#038;title=Orange%20Pi%203B" data-a2a-url="https://www.alonsoruibal.com/orange-pi-3b/" data-a2a-title="Orange Pi 3B"></a></p><p>The post <a href="https://www.alonsoruibal.com/orange-pi-3b/">Orange Pi 3B</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Pi-hole as home DNS and DHCP server</title>
		<link>https://www.alonsoruibal.com/pi-hole-as-home-dns-and-dhcp-server/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 04 Feb 2024 20:33:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[ads]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2163</guid>

					<description><![CDATA[<p>I encountered numerous issues with my network provider&#8217;s router DHCP. Since I haven&#8217;t yet decided to acquire another router, I opted to offload the DHCP server to another machine, which is currently running my Home Assistant and NAS. I was in search of a DHCP server with a web UI. During my exploration, I came [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/pi-hole-as-home-dns-and-dhcp-server/">Pi-hole as home DNS and DHCP server</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1.png"><img loading="lazy" decoding="async" width="1024" height="553" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1-1024x553.png" alt="" class="wp-image-2440" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1-1024x553.png 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1-300x162.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1-768x414.png 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/pihole-1.png 1247w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>I encountered numerous issues with my network provider&#8217;s router DHCP. Since I haven&#8217;t yet decided to acquire another router, I opted to offload the DHCP server to another machine, which is currently running my Home Assistant and NAS.</p>



<p>I was in search of a DHCP server with a web UI. During my exploration, I came across Pi-hole, a DNS server specifically designed to block DNS queries to domains that serve ads and do tracking. Interestingly, Pi-hole also incorporates an integrated DHCP server (dnsmasqd) that can be configured through its admin UI.</p>



<p><a href="https://pi-hole.net/">https://pi-hole.net/</a></p>



<p>I presume the integration of the DHCP server aimed to simplify the setup of clients&#8217; DNS servers, yet it proves highly convenient for home networks. And forget about the &#8220;Pi&#8221; in the name, it can be run in any linux server, not necessarily in a Raspberry Pi.</p>



<p>I&#8217;m still an addict to running everything in Docker containers. So I set up the Docker Pi-hole container (<a href="https://github.com/pi-hole/docker-pi-hole">https://github.com/pi-hole/docker-pi-hole</a>) using this script localed at <strong>/usr/local/pihole/docker.sh</strong>:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#!/bin/bash 
cd $(dirname $(readlink -f $0))
docker stop pihole
docker rm pihole
docker pull pihole/pihole:latest
docker run -d \
	--name pihole \
	--privileged \
	--restart=unless-stopped \
	--network=host \
	-e TZ=Europe/Madrid \
        -e FTLCONF_LOCAL_IPV4=192.168.1.2 \
        -e WEB_PORT=8081 \
	-e WEBPASSWORD=admin \
	-e INTERFACE=eth0 \
	-e DNSMASQ_USER=root \
	-v ./etc-pihole:/etc/pihole \
	-v ./etc-dnsmasq.d:/etc/dnsmasq.d \
	--cap-add=NET_ADMIN \
	pihole/pihole:latest
docker image prune --all</code></pre>



<ul class="wp-block-list">
<li>Every time that you run the script, it updates the container with the last Pi-hole version</li>



<li>It didn&#8217;t work without setting <em>FTLCONF_LOCAL_IPV4</em> to the local IP</li>



<li>I needed to set up <em>WEB_PORT</em> to not override with the nginx running in that machine (for Certbot)</li>



<li>Setting <em>WEBPASSWORD</em> is the easiest way to initially setup an admin password</li>



<li>I couldn&#8217;t make the DHCP server work with port mappings, it needed a &#8211;network=host </li>



<li>There is an image prune at the end to save space by removing old docker images</li>
</ul>



<p>I also had some problems because Ubunt&#8217;s <em>systemd-resolved</em> includes a DNS server, and I needed to disable it:</p>



<p><a href="https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu">https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu</a></p>



<p>And of course, you need to disable also the DHCP server on the router, it&#8217;s a very bad idea to have two DHCP servers working in the same network&#8230;</p>



<p>It is now functioning smoothly, and the included ad-blocking feature is a definite plus. Although it doesn&#8217;t currently block ads on YouTube and Twitch, its still great.</p>



<p>I&#8217;m also using it in my phone with a Wireguard VPN (it maybe a topic for another post). To make it listen in multiple interfaces like in the local and the VPN interfaces, I needed to create a <em>/usr/local/pihole/etc-dnsmasq.d/99-interfaces.conf</em> adding there:</p>



<pre class="wp-block-code"><code lang="properties" class="language-properties">interface=lo
interface=wg0</code></pre>



<p>Another similar alternative worth exploring is AdGuard Home, but I haven&#8217;t had the time to test it yet:</p>



<p><a href="https://adguard.com/en/adguard-home/overview.html">https://adguard.com/en/adguard-home/overview.html</a></p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&amp;linkname=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&amp;linkname=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&amp;linkname=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&amp;linkname=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&amp;linkname=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fpi-hole-as-home-dns-and-dhcp-server%2F&#038;title=Pi-hole%20as%20home%20DNS%20and%20DHCP%20server" data-a2a-url="https://www.alonsoruibal.com/pi-hole-as-home-dns-and-dhcp-server/" data-a2a-title="Pi-hole as home DNS and DHCP server"></a></p><p>The post <a href="https://www.alonsoruibal.com/pi-hole-as-home-dns-and-dhcp-server/">Pi-hole as home DNS and DHCP server</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Climate control with ESPHome and Home Assistant</title>
		<link>https://www.alonsoruibal.com/climate-control-with-esphome-and-home-assistant/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Fri, 26 Jan 2024 20:14:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[My House]]></category>
		<category><![CDATA[esp32]]></category>
		<category><![CDATA[esphome]]></category>
		<category><![CDATA[homeassistant]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2128</guid>

					<description><![CDATA[<p>Two years ago I started to need controlling my home heating system while I&#8217;m not at home. I could go the easy way and buy a couple Nest thermostats, but I preferred the DIY way. ESP32 board with ESPHome I connected the boiler to a ESP-WROOM-32 board via a relay module. The box and the [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/climate-control-with-esphome-and-home-assistant/">Climate control with ESPHome and Home Assistant</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Two years ago I started to need controlling my home heating system while I&#8217;m not at home. I could go the easy way and buy a couple Nest thermostats, but I preferred the DIY way.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/caldera.jpeg"><img loading="lazy" decoding="async" width="500" height="568" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/caldera.jpeg" alt="" class="wp-image-2130" style="width:464px;height:auto" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/caldera.jpeg 500w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/caldera-264x300.jpeg 264w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a><figcaption class="wp-element-caption">Connecting the boiler to the ESP32 via the relay module</figcaption></figure>
</div>


<h2 class="wp-block-heading">ESP32 board with ESPHome</h2>



<p>I connected the boiler to a ESP-WROOM-32 board via a relay module. The box and the cables were more expensive than the board (~10 EUR) and the relay module (~5 EUR).</p>



<p>The ESP32 board is running ESPHome: <a href="https://esphome.io/">https://esphome.io/</a>. I think it is a very nice project and very easy to setup. All the configuration is done via YAML files. The board is connected to the home WiFi and it has a fallback hotspot.</p>



<p>My home heating system has two radiating floor zones with two independent pumps. I also decided to automate the boiler&#8217;s &#8220;Winter mode&#8221;, in this mode the boiler heats the water for the heating, and I wanted to disable it when the heating is not working.</p>



<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/03/heating.jpeg"><img loading="lazy" decoding="async" width="870" height="399" src="https://www.alonsoruibal.com/wp-content/uploads/2024/03/heating.jpeg" alt="" class="wp-image-2595" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/03/heating.jpeg 870w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/heating-300x138.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/03/heating-768x352.jpeg 768w" sizes="auto, (max-width: 870px) 100vw, 870px" /></a><figcaption class="wp-element-caption">ESPHome has a nice web UI</figcaption></figure>



<p>In my case I needed to activate the winter mode when any pump is working and keep it working for a period of time after the pump is off.</p>



<p>This is my ESPHome YAML config:</p>



<pre class="wp-block-code has-small-font-size"><code lang="yaml" class="language-yaml">substitutions:
  devicename: heating
  friendly_name: Heating

esphome:
  name: ${devicename}
  friendly_name: ${friendly_name}
  platform: ESP32
  board: nodemcu-32s

logger:

api:
  password: ""

ota:
  platform: esphome
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 90s

  ap:
    ssid: ${friendly_name} Fallback Hotspot
    password: !secret wifi_password

captive_portal:

web_server:
  port: 80

debug:

time:
  - platform: homeassistant
    id: homeassistant_time

sensor:
  - platform: uptime
    name: Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

  - platform: wifi_signal
    name: Wifi Signal
    update_interval: 60s

script:
  - id: keep_winter_mode_on
    mode: restart
    then:
      - logger.log: "Keep Winter mode start"
      - if:
          condition:
            and:
              - switch.is_off: zone1_pump
              - switch.is_off: zone2_pump
          then:
            - logger.log: "Keep Winter mode will stop"
            - delay: 15min
            - switch.turn_off: winter_mode
            - logger.log: "Keep Winter mode stopped"

  - id: zone1_pump_security
    mode: restart
    then:
      - logger.log: "Zone 1 security start"
      - delay: 60min
      - switch.turn_off: zone1_pump
      - logger.log: "Zone 1 security stop"

  - id: zone2_pump_security
    mode: restart
    then:
      - logger.log: "Zone 2 security start"
      - delay: 60min
      - switch.turn_off: zone2_pump
      - logger.log: "Zone 2 security stop"

switch:
  - platform: gpio
    pin: GPIO16
    name: "Winter mode"
    id: winter_mode
    inverted: true
    restore_mode: ALWAYS_OFF

  - platform: gpio
    pin: GPIO17
    name: "Zone 1 pump"
    id: zone1_pump
    inverted: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      then:
        - script.stop: keep_winter_mode_on
        - switch.turn_on: winter_mode
        - script.execute: zone1_pump_security
    on_turn_off:
      then:
        - script.stop: zone1_pump_security
        - script.execute: keep_winter_mode_on

  - platform: gpio
    pin: GPIO18
    name: "Zone 2 pump"
    id: zone2_pump
    inverted: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
      then:
        - script.stop: keep_winter_mode_on
        - switch.turn_on: winter_mode
        - script.execute: zone2_pump_security
    on_turn_off:
      then:
        - script.stop: zone2_pump_security
        - script.execute: keep_winter_mode_on
</code></pre>



<h2 class="wp-block-heading">Thermometers</h2>



<p>To measure the temperature in the rooms, I used two Xiaomi Mi Home Bluetooth Thermometer 2 (~6 EUR each). They transmit the temperature via BLE (Bluetooth Low Energy) beacons.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/image.png"><img loading="lazy" decoding="async" width="134" height="130" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/image.png" alt="" class="wp-image-2129" style="width:153px;height:auto"/></a></figure>
</div>


<p>Their LCD display is very convenient and, as they are battery powered, you can place them in the better part of the room. I flashed them with this custom firmware:</p>



<p><a href="https://github.com/pvvx/ATC_MiThermometer">https://github.com/pvvx/ATC_MiThermometer</a></p>



<p>I&#8217;m still surprised by these small beasts, there are now firmwares to transform them in Zigbee:</p>



<p><a href="https://devbis.github.io/telink-zigbee/">https://devbis.github.io/telink-zigbee/</a>.</p>



<h2 class="wp-block-heading">Home Assistant</h2>



<p>The control, reading the thermometers and activating the pumps, is done via a Home Assistant (HA) running in an old X86 tablet with Ubuntu (this is usually run in a Raspberry Pi or similar&#8230;).</p>



<p>I installed HA in a Docker container, this is my script to update and start the container:</p>



<pre class="wp-block-code"><code lang="bash" class="language-bash">#!/bin/bash
cd $(dirname $(readlink -f $0))
docker stop homeassistant
docker rm homeassistant
docker pull ghcr.io/home-assistant/home-assistant:stable
docker run -d \
	--name homeassistant \
	--privileged \
	--restart=unless-stopped \
	-e TZ=Europe/Madrid \
	-v ./config:/config \
	-v /etc/letsencrypt:/etc/letsencrypt \
	--network=host \
	ghcr.io/home-assistant/home-assistant:stable
docker image prune --all</code></pre>



<p>Home assistant reads the thermometers via the Passive BLE monitor integration: <a href="https://github.com/custom-components/ble_monitor">https://github.com/custom-components/ble_monitor</a> that can be easily installed via HACS (the Home Assistant Community Store). I needed a Bluetooth 5 USB adapter.</p>



<p>Then, I needed to setup two thermostats in HA via the <em>config/configuration.yaml</em> file:</p>



<pre class="wp-block-code has-small-font-size"><code lang="yaml" class="language-yaml">climate:
  - platform: generic_thermostat
    name: "Living Room"
    unique_id: zone_1_thermostat
    heater: switch.zone_1_pump
    target_sensor: sensor.ble_temperature_living_room_thermometer
    min_temp: 15
    max_temp: 20
    ac_mode: false
    target_temp: 17
    cold_tolerance: 0.5
    hot_tolerance: 0
    min_cycle_duration:
      minutes: 30
    keep_alive:
      minutes: 5
    initial_hvac_mode: "off"
    away_temp: 15
    precision: 0.1

  - platform: generic_thermostat
    name: "Bedrooms"
    unique_id: zone_2_thermostat
    heater: switch.zone_2_pump
    target_sensor: sensor.ble_temperature_bedrooms_thermometer
    min_temp: 15
    max_temp: 20
    ac_mode: false
    target_temp: 17
    cold_tolerance: 0.5
    hot_tolerance: 0
    min_cycle_duration:
      minutes: 3
    keep_alive:
      minutes: 5
    initial_hvac_mode: "off"
    away_temp: 15
    precision: 0.1</code></pre>



<p>Home Assistant doubles as temperature and humidity logger, and its easy to configure dashboards:</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57.png"><img loading="lazy" decoding="async" width="1024" height="598" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57-1024x598.png" alt="" class="wp-image-2152" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57-1024x598.png 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57-300x175.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57-768x448.png 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-29-at-10.08.57.png 1497w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>And, of course, now I&#8217;m using HA to control many other things at home.</p>



<p>Another complex parts were:</p>



<ul class="wp-block-list">
<li>Making HA accessible via internet setting up a couple port redirections (one for HA and another for certbot) and a dynamic DNS service</li>



<li>Setup nginx and certbot for HTTPS</li>



<li>Connecting it to Google Home to allow receiving voice commands from my Nest Minis</li>
</ul>



<p>But that is another long story…</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/heating_final.jpeg"><img loading="lazy" decoding="async" width="900" height="506" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/heating_final-edited.jpeg" alt="" class="wp-image-2133" style="width:849px;height:auto" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/heating_final-edited.jpeg 900w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/heating_final-edited-300x169.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/heating_final-edited-768x432.jpeg 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></a><figcaption class="wp-element-caption">The final installation if the ESP board, the relay module and the power adapter inside a box</figcaption></figure>
</div><p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&amp;linkname=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&amp;linkname=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&amp;linkname=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&amp;linkname=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&amp;linkname=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fclimate-control-with-esphome-and-home-assistant%2F&#038;title=Climate%20control%20with%20ESPHome%20and%20Home%20Assistant" data-a2a-url="https://www.alonsoruibal.com/climate-control-with-esphome-and-home-assistant/" data-a2a-title="Climate control with ESPHome and Home Assistant"></a></p><p>The post <a href="https://www.alonsoruibal.com/climate-control-with-esphome-and-home-assistant/">Climate control with ESPHome and Home Assistant</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Apple Vision Pro and why it is going to fail</title>
		<link>https://www.alonsoruibal.com/apple-vision-pro-and-why-it-is-going-to-fail/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Wed, 24 Jan 2024 20:17:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[vr]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2122</guid>

					<description><![CDATA[<p>After the initial hype (with Apple showing some nice fake videos&#8230;), it seems that now things are much more quiet about the Vision Pro. I&#8217;m sure they are going to fail, like all the previous attemps on VR &#8220;failed&#8221;, or at least they failed as a mass consumer product. People do not want immersive experiences, [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/apple-vision-pro-and-why-it-is-going-to-fail/">Apple Vision Pro and why it is going to fail</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-24-at-16.20.45.png"><img loading="lazy" decoding="async" width="952" height="472" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-24-at-16.20.45.png" alt="" class="wp-image-2123" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-24-at-16.20.45.png 952w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-24-at-16.20.45-300x149.png 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot-2024-01-24-at-16.20.45-768x381.png 768w" sizes="auto, (max-width: 952px) 100vw, 952px" /></a></figure>



<p>After the initial hype (with Apple showing some nice fake videos&#8230;), it seems that now things are much more quiet about the Vision Pro. I&#8217;m sure they are going to fail, like all the previous attemps on VR &#8220;failed&#8221;, or at least they failed as a mass consumer product.</p>



<p>People do not want immersive experiences, or they do not want these experiences all the time. Books like &#8220;Neuromancer&#8221; or &#8220;Ready Player One&#8221; portray a society were all the computers use VR interfaces, but I think that is still not possible with the technology we have in 2024. Even if it becomes possible someday, people may not embrace it.</p>



<p>3D interfaces in computers are not comfortable, and all attempts to develop these kinds of interfaces have failed. Humans have been using paper, a &#8220;2D&#8221; medium, for thousands of years; that is why it&#8217;s so easy for us to interact with 2D screens on mobile phones or tablets.</p>



<p>We observed the evolution of past interface design trends, such as skeuomorphism, transforming into clean visual languages characterized by simplified interfaces, as exemplified by material design. The natural environment of these interfaces is 2D.</p>



<p>And additionally, there are other factors like the weight or the low resolution of the screens and the cameras (yes, it&#8217;s one of the biggest in the market, but it still cannot replace a real monitor, and it&#8217;s going to guarantee you dizziness when you try to read text).</p>



<p>There are still some niches where VR is a success, mainly those gaming related (and of course porn), but Apple is not good at any of those.</p>



<p>I remember some VR/AR memorable failures, the Vision Pro will soon join the list:</p>



<ul class="wp-block-list">
<li><a href="https://de.wikipedia.org/wiki/Virtual_Boy">Nintendo Virtual Boy</a></li>



<li><a href="https://en.wikipedia.org/wiki/Sega_VR">Sega VR</a></li>



<li><a href="https://en.wikipedia.org/wiki/Microsoft_HoloLens">Microsoft Hololens</a></li>



<li><a href="https://en.wikipedia.org/wiki/Google_Daydream">Google DayDream</a></li>



<li>&#8230;</li>
</ul>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&amp;linkname=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&amp;linkname=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&amp;linkname=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&amp;linkname=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&amp;linkname=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fapple-vision-pro-and-why-it-is-going-to-fail%2F&#038;title=Apple%20Vision%20Pro%20and%20why%20it%20is%20going%20to%20fail" data-a2a-url="https://www.alonsoruibal.com/apple-vision-pro-and-why-it-is-going-to-fail/" data-a2a-title="Apple Vision Pro and why it is going to fail"></a></p><p>The post <a href="https://www.alonsoruibal.com/apple-vision-pro-and-why-it-is-going-to-fail/">Apple Vision Pro and why it is going to fail</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Slot Racing 10th anniversary</title>
		<link>https://www.alonsoruibal.com/slot-racing-10th-anniversary/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 09:00:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mobialia]]></category>
		<category><![CDATA[mobile]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2111</guid>

					<description><![CDATA[<p>This year marks the 10th anniversary of my Slot Racing Android game. I had initially begun working on a 2.0 version, but I couldn&#8217;t find the time. A few months ago, I decided to merge the changes back into the previous app and prepare the Slot Racing 10th Anniversary edition: In this version, I&#8217;ve removed [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/slot-racing-10th-anniversary/">Slot Racing 10th anniversary</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This year marks the 10th anniversary of my Slot Racing Android game. I had initially begun working on a 2.0 version, but I couldn&#8217;t find the time. A few months ago, I decided to merge the changes back into the previous app and prepare the Slot Racing 10th Anniversary edition:</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_.jpg"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-1024x461.jpg" alt="" class="wp-image-2112" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-1024x461.jpg 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-300x135.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-768x346.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-1536x691.jpg 1536w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-36-29-621_com.mobialia.slot_-2048x922.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>In this version, I&#8217;ve removed the no-longer-functional Facebook integration and replaced it with device IDs for the leaderboard. Users can now choose any username for the times they send from their device.</p>



<p>One significant improvement is not immediately visible. I&#8217;ve upgraded from an old JMini3d (OpenGL 1.1) to the latest version using OpenGL 2.0. This enables the use of bitmap fonts allowing races with more than 5 laps (the old version only had textures for numbers 1 to 5).</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_.jpg"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-1024x461.jpg" alt="" class="wp-image-2116" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-1024x461.jpg 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-300x135.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-768x346.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-1536x691.jpg 1536w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-42-21-320_com.mobialia.slot_-2048x922.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Over the last 10 years, I&#8217;ve learned a lot about development. The code looked horrible for today&#8217;s standards, so I did a major code refactor. It now supports various race types, adding races against the chronometer.</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_.jpg"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-1024x461.jpg" alt="" class="wp-image-2117" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-1024x461.jpg 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-300x135.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-768x346.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-1536x691.jpg 1536w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-45-05-353_com.mobialia.slot_-2048x922.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>A minor physics adjustment has been made to prevent users from taking very tight turns at full throttle, which has rendered all previous leaderboard times invalid. Additionally, the leaderboards now differentiate between each lane and the number of laps completed.</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_.jpg"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-1024x461.jpg" alt="" class="wp-image-2118" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-1024x461.jpg 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-300x135.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-768x346.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-1536x691.jpg 1536w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-46-38-071_com.mobialia.slot_-2048x922.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>During last summer&#8217;s holidays, I added new circuits and seasons, including tracks from the current F1 season and Le Mans. Today, I&#8217;m applying the final touches to the Bluetooth code and I expect to release it soon.</p>



<figure class="wp-block-image size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_.jpg"><img loading="lazy" decoding="async" width="1024" height="461" src="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-1024x461.jpg" alt="" class="wp-image-2115" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-1024x461.jpg 1024w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-300x135.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-768x346.jpg 768w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-1536x691.jpg 1536w, https://www.alonsoruibal.com/wp-content/uploads/2024/01/Screenshot_2023-09-16-22-48-07-833_com.mobialia.slot_-2048x922.jpg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&amp;linkname=Slot%20Racing%2010th%20anniversary" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&amp;linkname=Slot%20Racing%2010th%20anniversary" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&amp;linkname=Slot%20Racing%2010th%20anniversary" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&amp;linkname=Slot%20Racing%2010th%20anniversary" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&amp;linkname=Slot%20Racing%2010th%20anniversary" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fslot-racing-10th-anniversary%2F&#038;title=Slot%20Racing%2010th%20anniversary" data-a2a-url="https://www.alonsoruibal.com/slot-racing-10th-anniversary/" data-a2a-title="Slot Racing 10th anniversary"></a></p><p>The post <a href="https://www.alonsoruibal.com/slot-racing-10th-anniversary/">Slot Racing 10th anniversary</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Avatar and stereoscopic 3D screens</title>
		<link>https://www.alonsoruibal.com/avatar-and-stereoscopic-3d-screens/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 18 Dec 2022 11:41:01 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[tv]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2070</guid>

					<description><![CDATA[<p>Now that the new Avatar movie was released, it&#8217;s time to remember what happened when the first Avatar was released in 2009: It unleashed a craze about stereoscopic 3D movies &#38; TVs. 2010 was declared &#8220;The year of 3D TV&#8221;. Somehow it was assumed that we were going to watch TV with glasses. I remember [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/avatar-and-stereoscopic-3d-screens/">Avatar and stereoscopic 3D screens</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Now that the new Avatar movie was released, it&#8217;s time to remember what happened when the first Avatar was released in 2009: It unleashed a craze about stereoscopic 3D movies &amp; TVs.</p>



<p>2010 was declared &#8220;The year of 3D TV&#8221;. Somehow it was assumed that we were going to watch TV with glasses. I remember &#8220;experts&#8221; saying &#8216;In the future all the TVs will be 3D&#8221;.</p>



<p>I went to the cinema a couple times to watch 3D movies, and at the begining it was fun to try, but I got bored soon. I also bought a TV without 3D.</p>



<p>There was a lack of 3D content, and some movies where converted to 3D with algorithms producing a mediocre result. Also 3D viewing was causing headaches in a lot of people.</p>



<p>Nintendo joined the trend in 2011 launching the 3DS, that was showing 3D without glasses. But almost everybody was using it with the 3D deactivated, and in 2013 they launched the 2DS, without the 3D.</p>



<p>The production of 3D TVs ended in 2016 putting an end to this trend.</p>



<p>I remember this every time that someone says we are going to use VR headsets for work. Glasses, stereoscopic view, trends, headaches&#8230;</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&amp;linkname=Avatar%20and%20stereoscopic%203D%20screens" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&amp;linkname=Avatar%20and%20stereoscopic%203D%20screens" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&amp;linkname=Avatar%20and%20stereoscopic%203D%20screens" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&amp;linkname=Avatar%20and%20stereoscopic%203D%20screens" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&amp;linkname=Avatar%20and%20stereoscopic%203D%20screens" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Favatar-and-stereoscopic-3d-screens%2F&#038;title=Avatar%20and%20stereoscopic%203D%20screens" data-a2a-url="https://www.alonsoruibal.com/avatar-and-stereoscopic-3d-screens/" data-a2a-title="Avatar and stereoscopic 3D screens"></a></p><p>The post <a href="https://www.alonsoruibal.com/avatar-and-stereoscopic-3d-screens/">Avatar and stereoscopic 3D screens</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>OpenAI&#8217;s ChatGPT chatbot</title>
		<link>https://www.alonsoruibal.com/openai-chatgpt/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sat, 03 Dec 2022 06:30:07 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[openai]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2056</guid>

					<description><![CDATA[<p>OpenAI is a research institute that focuses on conducting research in the field of artificial intelligence. The organization was founded in 2015 with the goal of promoting and developing friendly AI, which refers to AI that is aligned with human values and that can be used to improve the lives of people. OpenAI conducts research [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/openai-chatgpt/">OpenAI&#8217;s ChatGPT chatbot</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.alonsoruibal.com/wp-content/uploads/2022/12/openai-logo-F97AAA4254-seeklogo.com_.png"><img loading="lazy" decoding="async" width="300" height="206" src="https://www.alonsoruibal.com/wp-content/uploads/2022/12/openai-logo-F97AAA4254-seeklogo.com_.png" alt="" class="wp-image-2057" style="aspect-ratio:1.4580152671755726;width:311px;height:auto"/></a></figure>
</div>


<p>OpenAI is a research institute that focuses on conducting research in the field of artificial intelligence. The organization was founded in 2015 with the goal of promoting and developing friendly AI, which refers to AI that is aligned with human values and that can be used to improve the lives of people. OpenAI conducts research in areas such as machine learning, robotics, and economics in order to advance the understanding and capabilities of AI. The organization is supported by a number of high-profile investors and has made significant contributions to the field of AI.</p>



<p>GPT is an acronym that stands for &#8220;Generative Pretrained Transformer.&#8221; It is a type of large language model that uses deep learning techniques to generate human-like text. It was developed by the research lab OpenAI, and is designed to be able to generate text that is indistinguishable from text written by a human. GPT models are trained on massive amounts of text data, and can generate responses to questions and prompts in a variety of languages and styles. They are often used for a wide range of applications, including language translation, text summarization, and conversation.</p>



<p>As a large language model trained by OpenAI, this chatbot is a type of artificial intelligence that is designed to generate natural language responses based on the input that it receives. It uses machine learning algorithms to process and analyze the input, and then generates a response based on the information that it has been trained on.</p>



<p>This chatbot does not have access to the internet, so it cannot browse or search for information online. Instead, it relies on the knowledge and information that it has been trained on to generate its responses. It is constantly learning and improving, so its responses may become more accurate and relevant over time.</p>



<p>Users can interact with this chatbot by typing in questions or statements, and the chatbot will generate a response in natural language. The specific capabilities and functionality of this chatbot will depend on its design and training.</p>



<p>And now the most interesting part: <strong>ALL THE ABOVE TEXT WAS GENERATED BY CHATGPT</strong>. It was done by asking it &#8220;What is OpenAI?&#8221;, &#8220;What is GPT?&#8217; and &#8220;Tell me how this chatbot works in third person&#8221;. Surprised? Me too.</p>



<p><a href="https://chat.openai.com/">https://chat.openai.com/</a></p>



<p>Official announcement: <a href="https://openai.com/blog/chatgpt/">https://openai.com/blog/chatgpt/</a></p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&amp;linkname=OpenAI%E2%80%99s%20ChatGPT%20chatbot" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&amp;linkname=OpenAI%E2%80%99s%20ChatGPT%20chatbot" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&amp;linkname=OpenAI%E2%80%99s%20ChatGPT%20chatbot" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&amp;linkname=OpenAI%E2%80%99s%20ChatGPT%20chatbot" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&amp;linkname=OpenAI%E2%80%99s%20ChatGPT%20chatbot" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fopenai-chatgpt%2F&#038;title=OpenAI%E2%80%99s%20ChatGPT%20chatbot" data-a2a-url="https://www.alonsoruibal.com/openai-chatgpt/" data-a2a-title="OpenAI’s ChatGPT chatbot"></a></p><p>The post <a href="https://www.alonsoruibal.com/openai-chatgpt/">OpenAI&#8217;s ChatGPT chatbot</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Fixing an old dehumidifier with Arduino</title>
		<link>https://www.alonsoruibal.com/fixing-an-old-dehumidifier-with-arduino/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 06 Feb 2022 20:24:00 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[c]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=2297</guid>

					<description><![CDATA[<p>I purchased an Arduino UNO board approximately 10 years ago and conducted various experiments with it. Recently, my old Delonghi DEM 10 dehumidifier ceased to function due to a board issue, and the cost of replacing the original board was approximately 60€. Instead, I opted to replace the faulty board with the Arduino UNO and [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/fixing-an-old-dehumidifier-with-arduino/">Fixing an old dehumidifier with Arduino</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://www.alonsoruibal.com/wp-content/uploads/2024/02/dehumidifier-2.jpeg"><img loading="lazy" decoding="async" width="872" height="570" src="https://www.alonsoruibal.com/wp-content/uploads/2024/02/dehumidifier-2.jpeg" alt="" class="wp-image-2529" srcset="https://www.alonsoruibal.com/wp-content/uploads/2024/02/dehumidifier-2.jpeg 872w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/dehumidifier-2-300x196.jpeg 300w, https://www.alonsoruibal.com/wp-content/uploads/2024/02/dehumidifier-2-768x502.jpeg 768w" sizes="auto, (max-width: 872px) 100vw, 872px" /></a></figure>



<p>I purchased an Arduino UNO board approximately 10 years ago and conducted various experiments with it. Recently, my old Delonghi DEM 10 dehumidifier ceased to function due to a board issue, and the cost of replacing the original board was approximately 60€. Instead, I opted to replace the faulty board with the Arduino UNO and a two-relay board (designated for the compressor and fan).</p>



<p>BOM:</p>



<ul class="wp-block-list">
<li>Arduino UNO: 20€</li>



<li>Relay board: 5€</li>



<li>12V transformer: found at home</li>



<li>~1€ in cables and screws</li>



<li>A resistor</li>



<li>Wood recycled from a packaging</li>
</ul>



<p>And a new dehumidifier with the same specs costs ~150€, but I didn&#8217;t do this for the money&#8230;.</p>



<p>I had a lot of fun coding the program to manage the sensors and the timer. I remembered how thermistors work and implemented the defrost and the overheat protection with a state machine, repurposing the leds to show the states. After stopping the compressor we need to wait ~20 seconds before starting it again (because the capacitor needs to be loaded).</p>



<p>This is the source code, it uses the thermistor library.:</p>



<pre class="wp-block-code"><code lang="c" class="language-c">#include "thermistor.h"

const int STATUS_IDLE    = 0;
const int STATUS_WORKING = 1;
const int STATUS_PAUSE   = 2;

const int PIN_FULL        = 6;
const int PIN_HIGRO       = 7;
const int PIN_COMP        = 8;
const int PIN_VENT        = 9;
const int PIN_THERMISTOR  = A0;
const int PIN_LED_ON      = 4;
const int PIN_LED_DEFROST = 3;
const int PIN_LED_PAUSE   = 2;


const long TIME_WAIT               = 50;
const long TIME_BEFORE_PAUSE       = 25 * 60 * 1000L;
const long TIME_PAUSE_TIMER        =  5 * 60 * 1000L;
const long TIME_PAUSE_DEFROST      = 10 * 60 * 1000L;
const long TIME_PAUSE_OVERHEAT     = 10 * 60 * 1000L;
const long TIME_PAUSE_COMP_OFF     = 30 * 1000L;

const int TEMP_DEFROST  =  30; // IN 1/10 ºC
const int TEMP_OVERHEAT = 350; // IN 1/10 ºC

int status = STATUS_PAUSE;

long workingTimer  = TIME_BEFORE_PAUSE;
long pauseTimer = TIME_PAUSE_COMP_OFF;

THERMISTOR thermistor(PIN_THERMISTOR,        
                      10000,          // Nominal resistance at 25 ºC
                      3950,           // thermistor's beta coefficient
                      10000);         // Value of the series resistor

void setup() {
  Serial.begin(9600);
  
  pinMode(PIN_FULL, INPUT_PULLUP);
  pinMode(PIN_HIGRO, INPUT_PULLUP);
  
  pinMode(PIN_COMP, OUTPUT);
  pinMode(PIN_VENT, OUTPUT);
  digitalWrite(PIN_VENT, HIGH);
  digitalWrite(PIN_COMP, HIGH);

  pinMode(PIN_LED_ON, OUTPUT);
  pinMode(PIN_LED_DEFROST, OUTPUT);
  pinMode(PIN_LED_PAUSE, OUTPUT);
  digitalWrite(PIN_LED_ON, HIGH);
  digitalWrite(PIN_LED_DEFROST, HIGH);
  digitalWrite(PIN_LED_PAUSE, HIGH);
}

void loop() {
  long t1 = millis();

  boolean full = digitalRead(PIN_FULL);
  boolean higroOff = digitalRead(PIN_HIGRO);
  uint16_t temp = thermistor.read();

  // Status changes
  switch(status) {
    case STATUS_WORKING: {
      if (full || higroOff) {
        Serial.println("Stopping...");
        status = STATUS_PAUSE;
        pauseTimer = TIME_PAUSE_COMP_OFF;

      } else if (temp &lt; TEMP_DEFROST) {
        Serial.println("Pausing to defrost...");
        status = STATUS_PAUSE;
        pauseTimer = TIME_PAUSE_DEFROST;

      } else if (temp &gt; TEMP_OVERHEAT) {
        Serial.println("Pausing due to overheat ...");
        status = STATUS_PAUSE;
        pauseTimer = TIME_PAUSE_OVERHEAT;

      } else if (workingTimer &lt;= 0) {
        Serial.println("Pausing due to timer...");
        workingTimer = TIME_BEFORE_PAUSE;
        status = STATUS_PAUSE;
        pauseTimer = TIME_PAUSE_TIMER;
      }
      break;
    }

    case STATUS_IDLE: {
      if (!full &amp;&amp; !higroOff) {
        Serial.println("Starting...");
        status = STATUS_WORKING;
      }
      break;
    }

    case STATUS_PAUSE: {
      if (pauseTimer &lt;= 0) {
        status = STATUS_IDLE;
      }
      break;
    }
  }

  // New statuses and timer update
  switch(status) {
    case STATUS_WORKING: {
      Serial.println("Working");
      digitalWrite(PIN_VENT, LOW);
      digitalWrite(PIN_COMP, LOW);

      digitalWrite(PIN_LED_ON, LOW);
      digitalWrite(PIN_LED_DEFROST, HIGH);
      digitalWrite(PIN_LED_PAUSE, HIGH);
      break;
    }

    case STATUS_IDLE: {
      Serial.println("Idle");
      digitalWrite(PIN_VENT, HIGH);
      digitalWrite(PIN_COMP, HIGH);

      digitalWrite(PIN_LED_ON, HIGH);
      digitalWrite(PIN_LED_DEFROST, LOW);
      digitalWrite(PIN_LED_PAUSE, HIGH);
      break;
    }

    case STATUS_PAUSE: {
      Serial.println("Paused");
      digitalWrite(PIN_VENT, LOW);
      digitalWrite(PIN_COMP, HIGH);

      digitalWrite(PIN_LED_ON, HIGH);
      digitalWrite(PIN_LED_DEFROST, HIGH);
      digitalWrite(PIN_LED_PAUSE, LOW);
      break;
    }
  }

  // Pause and timer updates
  Serial.print("Temp in 1/10 ºC : ");
  Serial.println(temp);

  delay(TIME_WAIT);
  long t2 = millis();

  switch(status) {
    case STATUS_WORKING: {
      workingTimer -= t2 - t1;
      Serial.println(workingTimer);
      break;
    }

    case STATUS_PAUSE: {
      pauseTimer -= t2 - t1;
      Serial.println(pauseTimer);
      break;
    }
  }
}</code></pre>



<p>And it feels like if I do not suck at electronics anymore <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&amp;linkname=Fixing%20an%20old%20dehumidifier%20with%20Arduino" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&amp;linkname=Fixing%20an%20old%20dehumidifier%20with%20Arduino" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&amp;linkname=Fixing%20an%20old%20dehumidifier%20with%20Arduino" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&amp;linkname=Fixing%20an%20old%20dehumidifier%20with%20Arduino" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&amp;linkname=Fixing%20an%20old%20dehumidifier%20with%20Arduino" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Ffixing-an-old-dehumidifier-with-arduino%2F&#038;title=Fixing%20an%20old%20dehumidifier%20with%20Arduino" data-a2a-url="https://www.alonsoruibal.com/fixing-an-old-dehumidifier-with-arduino/" data-a2a-title="Fixing an old dehumidifier with Arduino"></a></p><p>The post <a href="https://www.alonsoruibal.com/fixing-an-old-dehumidifier-with-arduino/">Fixing an old dehumidifier with Arduino</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>LaretasGeek AMA</title>
		<link>https://www.alonsoruibal.com/laretasgeek-ama/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Mon, 19 Apr 2021 11:38:41 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[company]]></category>
		<category><![CDATA[mobialia]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=1911</guid>

					<description><![CDATA[<p>Los compañeros de LaretasGeek (https://twitter.com/laretasgeek) están llevando a cabo una iniciativa de entrevistas en cadena &#8220;AMA&#8221; (Ask Me Anything) en la que el entrevistado de cada semana escoge a un invitado y lo entrevista la semana siguiente. En esta cadena de entrevistas, Eloy Coto de Red Hat escogió entrevistarme a mí, y esta fue la [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/laretasgeek-ama/">LaretasGeek AMA</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image is-resized">
<figure class="aligncenter size-large"><a href="https://www.alonsoruibal.com/wp-content/uploads/2021/04/laretasgeek.jpg"><img loading="lazy" decoding="async" width="400" height="400" src="https://www.alonsoruibal.com/wp-content/uploads/2021/04/laretasgeek.jpg" alt="" class="wp-image-1916" srcset="https://www.alonsoruibal.com/wp-content/uploads/2021/04/laretasgeek.jpg 400w, https://www.alonsoruibal.com/wp-content/uploads/2021/04/laretasgeek-300x300.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2021/04/laretasgeek-150x150.jpg 150w" sizes="auto, (max-width: 400px) 100vw, 400px" /></a></figure>
</div>


<p>Los compañeros de LaretasGeek (<a href="https://twitter.com/laretasgeek">https://twitter.com/laretasgeek</a>) están llevando a cabo una iniciativa de entrevistas en cadena &#8220;AMA&#8221; (Ask Me Anything) en la que el entrevistado de cada semana escoge a un invitado y lo entrevista la semana siguiente.</p>



<p>En esta cadena de entrevistas, Eloy Coto de Red Hat escogió entrevistarme a mí, y esta fue la entrevista:</p>



<p><a href="https://www.youtube.com/watch?v=aJkifnWjug0">https://www.youtube.com/watch?v=aJkifnWjug0</a></p>



<p>Una semana después, yo escogí entrevistar a Antón Román, CTO de Quobis, y nos quedó otra entrevista muy chula:</p>



<p><a href="https://www.youtube.com/watch?v=jvFiG1ukAWc">https://www.youtube.com/watch?v=jvFiG1ukAWc</a></p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&amp;linkname=LaretasGeek%20AMA" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&amp;linkname=LaretasGeek%20AMA" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&amp;linkname=LaretasGeek%20AMA" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&amp;linkname=LaretasGeek%20AMA" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&amp;linkname=LaretasGeek%20AMA" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Flaretasgeek-ama%2F&#038;title=LaretasGeek%20AMA" data-a2a-url="https://www.alonsoruibal.com/laretasgeek-ama/" data-a2a-title="LaretasGeek AMA"></a></p><p>The post <a href="https://www.alonsoruibal.com/laretasgeek-ama/">LaretasGeek AMA</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The way of St. James by bike</title>
		<link>https://www.alonsoruibal.com/the-way-of-st-james-by-bike/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Wed, 19 Jun 2019 18:15:40 +0000</pubDate>
				<category><![CDATA[Spare Time]]></category>
		<category><![CDATA[bike]]></category>
		<guid isPermaLink="false">https://www.alonsoruibal.com/?p=1821</guid>

					<description><![CDATA[<p>I just finished my third way of St. James by bike, the french way. This was the first time that I am able to finish without too much incidents, so I&#8217;m telling my experience. My ways In the last years I have done these: I followed always the Eroski guide, but it is in spanish: [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/the-way-of-st-james-by-bike/">The way of St. James by bike</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><img loading="lazy" decoding="async" width="900" height="300" class="wp-image-1829" style="width: 900px;" src="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino1.jpg" alt="" srcset="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino1.jpg 900w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino1-300x100.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino1-768x256.jpg 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>



<p>I just finished my third way of St. James by bike, the french way. This was the first time that I am able to finish  without too much incidents, so I&#8217;m telling my experience.</p>



<h2 class="wp-block-heading">My ways</h2>



<p>In the last years I have done these:</p>



<ul class="wp-block-list">
<li>Northern way (Camino del norte): It is the prettiest but the most difficult, with lots of slopes. I made Irun-Santiago in 13 days, but I had lots of mechanical problems with my bike and I suffered the rain. It was August and hostels were always full, so I made it from camping to camping.</li>



<li>Silver way (Vía de la Plata): I made it in July starting from Seville, it was too hot, and it is very easy to run out of water. I drank 7 liters of water per day. There aren&#8217;t fountains in the way and there are very long sections without bars or shops. I fell ill and I had to go back home from Salamanca.</li>



<li>French way (Camino francés): It is he easiest but it is crowded. I just made Pamplona-Santiago in 8 days. I made it in June and there was enough room in hostels and the climate was pretty favorable.</li>
</ul>



<p>I followed always the Eroski guide, but it is in spanish: <a href="http://caminodesantiago.consumer.es/">http://caminodesantiago.consumer.es/</a>. I also used the GPX Viewer android app with tracks downloaded from Wikiloc to help when I get lost.</p>



<h2 class="wp-block-heading">The bike</h2>



<p><img loading="lazy" decoding="async" width="900" height="258" class="wp-image-1836" style="width: 900px;" src="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino2-1.jpg" alt="" srcset="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino2-1.jpg 900w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino2-1-300x86.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino2-1-768x220.jpg 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>



<p>You do not need a very strong bike to make the way. You can make it with a road bike, but I prefer to go off-road with a mountain bike and make it following the same path than walking pilgrims.</p>



<p>I use pannier bags and a small backpack where I carry less than 2Kg. Trying to carry all the weight in a backpack can be harmful. You will need additional space for the food and for the water, specially when making the Silver way.</p>



<p>The rear wheel may suffer with the additional weight, so it is better to have a rear tyre in good conditions. I suffered lots of punctures in the Northern way due to a tyre in bad conditions.</p>



<p>And install a bell, it is very important to warn walking pilgrims of your presence and to do not frighten them.</p>



<p>Do not try to go with your bike to the starting point by train, RENFE has serious issues carrying bicycles. It is possible to go by bus, most companies allow you to carry your bike in the trunk paying a small plus.</p>



<h2 class="wp-block-heading">What to carry</h2>



<p>Along the years, I optimized the things to carry, I made this last way carrying only 6.5 Kg:</p>



<ul class="wp-block-list">
<li>Bike clothing: a t-shirt, a cycling short, glasses, gloves and cycling shoes. I wash the t-shirt and the short every day just after arriving to the hostel.</li>



<li>A cotton t-shirt: I use it also as pijama</li>



<li>A pair of light trousers</li>



<li>3 x underpants and socks: I also wash my underwear every day</li>



<li>Flip flops: for the shower</li>



<li>Swimsuit: there are lots of beaches in the northern way and some swimming pools in the others, do not miss them!</li>



<li>Rain jacket</li>



<li>Sleeping bag: I also use it to sleep in hostels</li>



<li>Sleeping pad</li>



<li>Tent: I carry a 1 Kg High Peak Minilite, not very resistant to the water <a href="https://www.highpeak-outdoor.com/minilite-1038.html">https://www.highpeak-outdoor.com/minilite-1038.html</a></li>



<li>Bike tools: I carry a very basic set of tools: a small bike multi-tool, a spare tube, a patch kit and a pair of spare braking pads. </li>



<li>A chain lock: I feel safer leaving my bike locked</li>



<li>A power bank: I leave it charging in the hostel (it is a minor loss if stolen) and then, during the day, I charge my phone</li>
</ul>



<p>A pro-trick is to carry your wallet and your electronic devices in a small tupperware. It is an extra protection under the rain. </p>



<h2 class="wp-block-heading">What to eat</h2>



<p>You can find menus for pilgrims by 10 eur. The hostels have kitchen and you can cook there. On the bike, I try to eat the same calories that I am consuming: I carry fruit, sandwiches, cereal bars, cookies, etc. and I stop every hour to eat something.</p>



<h2 class="wp-block-heading">Where to sleep</h2>



<p>Hostels are the best option, I carry a tent as backup, but in my last way it was not necessary. Hostels are cheaper than campings, you can find some hostels by 5 eur/night. Some of the hostels, when they are full, allow you  to sleep on the floor (so it&#8217;s useful to carry a sleeping pad) or outside, in a tent in the garden.</p>



<p>Most hostels ask you for the Credential, you can get it at many hostels by 2 or 3 eur.</p>



<h2 class="wp-block-heading">The experience</h2>



<p><img loading="lazy" decoding="async" width="900" height="211" class="wp-image-1838" style="width: 900px;" src="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino3.jpg" alt="" srcset="https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino3.jpg 900w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino3-300x70.jpg 300w, https://www.alonsoruibal.com/wp-content/uploads/2019/06/camino3-768x180.jpg 768w" sizes="auto, (max-width: 900px) 100vw, 900px" /></p>



<p>It&#8217;s hard to explain, buy the way is a mix of culture, sport, fellowship and religion (not in my case) that make it a unique experience full of hard to forget moments, and, yes, so good and addictive that I made it three times&#8230;</p>



<p>Google Photos album with my French way: <a href="https://photos.app.goo.gl/XMJjDm9ZkCDrtbM49">https://photos.app.goo.gl/XMJjDm9ZkCDrtbM49</a></p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&amp;linkname=The%20way%20of%20St.%20James%20by%20bike" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&amp;linkname=The%20way%20of%20St.%20James%20by%20bike" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&amp;linkname=The%20way%20of%20St.%20James%20by%20bike" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&amp;linkname=The%20way%20of%20St.%20James%20by%20bike" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&amp;linkname=The%20way%20of%20St.%20James%20by%20bike" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fthe-way-of-st-james-by-bike%2F&#038;title=The%20way%20of%20St.%20James%20by%20bike" data-a2a-url="https://www.alonsoruibal.com/the-way-of-st-james-by-bike/" data-a2a-title="The way of St. James by bike"></a></p><p>The post <a href="https://www.alonsoruibal.com/the-way-of-st-james-by-bike/">The way of St. James by bike</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Converting Carballo to Kotlin</title>
		<link>https://www.alonsoruibal.com/converting-carballo-kotlin/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Sun, 02 Apr 2017 19:23:52 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[chess]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[kotlin]]></category>
		<guid isPermaLink="false">http://www.alonsoruibal.com/?p=1610</guid>

					<description><![CDATA[<p>Kotlin is a JVM language developed by JetBrains: http://kotlinlang.org&#160;gaining momentum among Android developers. Kotlin has interesting features like: It can be compiled to bytecode compatible with Java &#62;=6, allowing to use a lot of Java 7-8 features (lambdas&#8230;) &#160;in Java 6 bytecode (=Android) It can be transpiled to Javascript (like Java with GWT) So I [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/converting-carballo-kotlin/">Converting Carballo to Kotlin</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="size-full wp-image-1618 aligncenter" src="http://www.alonsoruibal.com/wp-content/uploads/2017/03/kotlin_250x250.png" alt="" width="250" height="250" srcset="https://www.alonsoruibal.com/wp-content/uploads/2017/03/kotlin_250x250.png 250w, https://www.alonsoruibal.com/wp-content/uploads/2017/03/kotlin_250x250-150x150.png 150w" sizes="auto, (max-width: 250px) 100vw, 250px" />Kotlin is a JVM language developed by JetBrains: <a href="http://kotlinlang.org">http://kotlinlang.org</a>&nbsp;gaining momentum among Android developers. Kotlin has interesting features like:</p>
<ul>
<li>It can be compiled to bytecode compatible with Java &gt;=6, allowing to use a lot of Java 7-8 features (lambdas&#8230;) &nbsp;in Java 6 bytecode (=Android)</li>
<li>It can be transpiled to Javascript (like Java with GWT)</li>
</ul>
<p>So I decided to migrate the Carballo Chess Engine code to Kotlin (and his name is <strong>K</strong>arballo) to make some experiments and having some &#8220;fun&#8221; :)&#8230; but it became a non-trivial task, the converted code is at:&nbsp;<a href="https://github.com/albertoruibal/karballo">https://github.com/albertoruibal/karballo</a>.</p>
<h2 style="text-align: left;">Converting the code</h2>
<p>To start working with Kotlin I&nbsp;installed the Kotlin plugin for Android Studio (=IntelliJ) from:</p>
<pre>File-&gt;Settings-&gt;Plugins-&gt;Install JetBrains Plugin</pre>
<p>Once the Kotlin plugin is installed, it&#8217;s quite easy to convert java source files to Kotlin with: CTRL + SHIFT + ALT + K</p>
<h2><a href="http://www.alonsoruibal.com/developing-with-android-x86-2-3-and-virtualbox/">Conversion problems</a></h2>
<p>The Java to Kotlin&nbsp;code conversion does not work perfectly, the Carballo conversion arose these errors:</p>
<ul>
<li>Kotlin is strong typed, you cannot compare a long against the literal &#8216;0&#8217;, you must use &#8216;0L&#8217;&#8230; I had hundreds of this comparisons</li>
<li>A Long cannot be initialized with an unsigned hex literal if the value does not fit in the signed type, it gives a &#8220;Value out of range&#8221; compilation error , &nbsp;so you cannot do:
<pre>var variable = 0xffffffffffffffffL</pre>
<p>The solution is to convert the literals to a signed decimal:</p>
<pre>var variable = -1</pre>
</li>
<li>Error &#8220;Property must be initialized or be abstract&#8221; with attributes not initialized in the constructor, solved adding the &#8220;lateinit&#8221; modifier to the&nbsp;declaration of the attributes (yes, Kotlin knows if you are initializing the attribute in the constructor)</li>
<li>Strange toInt() insertions:
<pre>pieceNames.indexOf(pieceChar.toInt())</pre>
<p>should be:</p>
<pre>pieceNames.indexOf(pieceChar)</pre>
</li>
<li>Variables of type Byte cannot be used as array indices, I had to manually change many vars from Byte to Int</li>
<li>Kotlin does not allow assignments in expressions, so it&#8217;s impossible to do:
<pre>while ((node.move = node.moveIterator.next()) != Move.NONE) {&nbsp;</pre>
<p>I manually had to change some cases to the&nbsp;more verbose:</p>
<pre>while (true) {
    node.move = node.moveIterator.next()
    if (node.move == Move.NONE) {
       break
    }</pre>
</li>
<li>The binary operators do not work in multi line if they are placed at the beginning of the second line, only if they are at the end of the first, so:
<pre>var myLong : Long = long1
    or long2</pre>
<p>does not compile, it must be:</p>
<pre>var myLong : Long = long1 or
    long2</pre>
</li>
<li>It didn&#8217;t recognize some custom getters and I had to merge&nbsp;them manually, I like a lot how they look in&nbsp;Kotlin (notice the use of the special word &#8220;field&#8221; to avoid calling the getter recursively):
<pre>var lastMoveSee: Int = SEE_NOT_CALCULATED
    get() {
        if (field == SEE_NOT_CALCULATED) {
            field = board.see(move, ai)
        }
        return field
    }</pre>
</li>
<li>The conversion process got hung with two complex classes:&nbsp;CompleteEvaluator and ExperimentalEvaluator&#8230; I had to kill IntelliJ. I converted the CompleteEvaluator class copying to a new class small chunks of code.</li>
<li>Kotlin&#8217;s when() statement do not work like the Java&#8217;s switch-&gt;case, as it hasn&#8217;t breaks, you cannot jump from one option to the next excluding the break: the conversion duplicated a lot of the MoveIterator code and I fixed it manually.</li>
<li>Some other strange errors like wrong expressions and missing parenthesis&#8230;</li>
</ul>
<h2>Some&nbsp;things of Kotlin&nbsp;that I don&#8217;t like (yet)</h2>
<p>Some are part of the claimed Kotlin &#8220;features&#8221;:</p>
<ul>
<li>Kotlin does not has&nbsp;primitive types, but it seems to not affect the performance&#8230;</li>
<li>There is no ternary operator in Kotlin, it&#8217;s replaced with &#8220;if (&#8230;) &#8230; else &#8230;&#8221; expressions: This increases a lot the verbosity, al least in my code</li>
<li>Kotlin&#8217;s crusade against NullPointerExcepcions: It a type allows null, it must be explicitly indicated appending a question mark to the type:
<pre>var myString : String? = null</pre>
<p>To convert a nullable&nbsp;var/val to a non-nullable, you should use the !! operator, this forces a NullPointerException if the value is null (and it seems that you are shouting to the IDE&#8230;):</p>
<pre>var myString : String? = "hello"
var myStringNotNull : String = myString!!</pre>
</li>
<li>Static fields and methods are grouped in a &#8220;Companion Object&#8221;</li>
<li>Compilation is slower than pure Java</li>
<li>Many bugs running from Android Studio non-android projects (IntelliJ worked better for me)</li>
<li>Couldn&#8217;t get the JS compilation working yet</li>
</ul>
<h2>And other things that I like</h2>
<ul>
<li>The full interoperability with Java</li>
<li>Type inference, normally I continue to specify the types, but in some cases it saves a bit of code</li>
<li>Data classes, they will save you hundreds of lines of boilerplate code&nbsp;<a href="https://kotlinlang.org/docs/reference/data-classes.html">https://kotlinlang.org/docs/reference/data-classes.html</a></li>
<li>Array initialization with lambdas
<pre>nodes = Array(MAX_DEPTH, {i-&gt;Node(this, i)})</pre>
</li>
<li>The singleton pattern is embedded in the language: using &#8220;object&#8221; instead &#8220;class&#8221; assumes that the class is a singleton</li>
<li>Visibility is &#8220;public&#8221; by default, with the access modifier &#8220;internal&#8221; it can be accessed only from the same module</li>
<li>Implicit getters / setters</li>
<li>No need for &#8220;new&#8221; to call constructors</li>
<li>And much more&#8230;</li>
</ul>
<h2>Performance</h2>
<p>I&#8217;m my first tests, I&#8217;m not noticing any performance downgrade (or upgrade) over the Carballo Java version.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&amp;linkname=Converting%20Carballo%20to%20Kotlin" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&amp;linkname=Converting%20Carballo%20to%20Kotlin" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&amp;linkname=Converting%20Carballo%20to%20Kotlin" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&amp;linkname=Converting%20Carballo%20to%20Kotlin" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&amp;linkname=Converting%20Carballo%20to%20Kotlin" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fconverting-carballo-kotlin%2F&#038;title=Converting%20Carballo%20to%20Kotlin" data-a2a-url="https://www.alonsoruibal.com/converting-carballo-kotlin/" data-a2a-title="Converting Carballo to Kotlin"></a></p><p>The post <a href="https://www.alonsoruibal.com/converting-carballo-kotlin/">Converting Carballo to Kotlin</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Improving Carballo Chess Engine the hard way</title>
		<link>https://www.alonsoruibal.com/improving-carballo-the-hard-way/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Tue, 01 Nov 2016 12:05:29 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[chess]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mobialia]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">http://www.alonsoruibal.com/?p=1566</guid>

					<description><![CDATA[<p>One year ago my Carballo Chess Engine (https://github.com/albertoruibal/carballo) was stuck: all the improvements that I was trying were not working, and I detected the main problem: I am a poor chess player so I will never be a good chess engine developer. I thought that the main chess programming skill was statistical analysis and not [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/improving-carballo-the-hard-way/">Improving Carballo Chess Engine the hard way</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="500" height="360" src="http://www.alonsoruibal.com/wp-content/uploads/2016/11/torneo_ajedrez.jpeg" alt="torneo_ajedrez" class="wp-image-1575" srcset="https://www.alonsoruibal.com/wp-content/uploads/2016/11/torneo_ajedrez.jpeg 500w, https://www.alonsoruibal.com/wp-content/uploads/2016/11/torneo_ajedrez-300x216.jpeg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></figure>
</div>


<p>One year ago my Carballo Chess Engine (<a href="https://github.com/albertoruibal/carballo">https://github.com/albertoruibal/carballo</a>) was stuck: all the improvements that I was trying were not working, and I detected the main problem: I am a poor chess player so I will never be a good chess engine developer. I thought that the main chess programming skill was statistical analysis and not chess knowledge, but I was wrong.</p>



<p>So, I took the decision of starting to learn and play chess. I joined the local chess club Xadrez Ramiro Sabell (<a href="http://www.xadrezramirosabell.com">http://www.xadrezramirosabell.com</a>) and I was so lucky that in this club teaches chess the International Master <a href="https://es.wikipedia.org/wiki/Yudania_Hern%C3%A1ndez_Est%C3%A9vez">Yudania Hernández Estevez</a>. It&#8217;s quite curious the amazing people that you can find in a small city like Ponteareas. I also try to help the club in the tournaments organization and with a small Mobialia sponsorship. Now I am playing the Galician Chess League (in third division) and all the tournaments that I can.</p>



<p>My chess level is improving fast (ok, I&#8217;m under 1600 ELO yet:&nbsp;<a href="http://ratings.fide.com/card.phtml?event=24597015">http://ratings.fide.com/card.phtml?event=24597015</a>), but the real deal is that the Carballo Chess Engine strength is improving much faster, climbing&nbsp;positions in the CCRL list (<a href="http://www.computerchess.org.uk/ccrl/4040/">http://www.computerchess.org.uk/ccrl/4040/</a>). Learning chess helps me to diagnose the flaws and to understand better what&#8217;s going on under the hood.</p>



<p>Finally, &nbsp;playing chess also helps me to detect&nbsp;the chess player needs, so I realized the main missing feature from Mobialia Chess: a chess database to review historic games and to analyze your own games searching statistics for each&nbsp;position. This year I worked to implement this feature and starting&nbsp;today you can access a Beta version of the database&nbsp;in Mobialia Chess Web (<a href="http://chess.mobialia.com">http://chess.mobialia.com</a>).</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&amp;linkname=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&amp;linkname=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&amp;linkname=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&amp;linkname=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&amp;linkname=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fimproving-carballo-the-hard-way%2F&#038;title=Improving%20Carballo%20Chess%20Engine%20the%20hard%20way" data-a2a-url="https://www.alonsoruibal.com/improving-carballo-the-hard-way/" data-a2a-title="Improving Carballo Chess Engine the hard way"></a></p><p>The post <a href="https://www.alonsoruibal.com/improving-carballo-the-hard-way/">Improving Carballo Chess Engine the hard way</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Benchmarking Java to native compilers</title>
		<link>https://www.alonsoruibal.com/benchmarking-java-to-native-compilers/</link>
		
		<dc:creator><![CDATA[rui]]></dc:creator>
		<pubDate>Tue, 03 May 2016 07:45:13 +0000</pubDate>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">http://www.alonsoruibal.com/?p=1544</guid>

					<description><![CDATA[<p>Java to native compilers have been around for some years, and I was&#160;curious about if one of this solutions could improve the performance of my Carballo Chess Engine. I ran a tournament between binaries of the Carballo development version (1.5) compiled with different solutions to compare&#160;the performance.&#160;I used&#160;cutechess-cli to run a 3000 game tournament with [&#8230;]</p>
<p>The post <a href="https://www.alonsoruibal.com/benchmarking-java-to-native-compilers/">Benchmarking Java to native compilers</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-image">
<figure class="aligncenter"><img loading="lazy" decoding="async" width="256" height="205" src="http://www.alonsoruibal.com/wp-content/uploads/2016/05/ThumbsUp.svg.png" alt="Java Duke" class="wp-image-1556"/></figure>
</div>


<p>Java to native compilers have been around for some years, and I was&nbsp;curious about if one of this solutions could improve the performance of my <a href="http://github.com/albertoruibal/carballo"><em>Carballo Chess Engine</em></a>.</p>



<p>I ran a tournament between binaries of the Carballo development version (1.5) compiled with different solutions to compare&nbsp;the performance.&nbsp;I used&nbsp;<a href="https://github.com/cutechess/cutechess"><em>cutechess-cli</em></a> to run a 3000 game tournament with time control 5&#8243; + 0.1&#8243; per move by side and with&nbsp;the <em>Noomen Test Suite</em> as the starting positions.</p>



<h2 class="wp-block-heading">The compared binaries</h2>



<ul class="wp-block-list">
<li><strong>The Pure Java Version:&nbsp;</strong>This is the <em>carballo-1.5.jar</em> ran with the Oracle&nbsp;<em>JDK 1.8.0_73</em>&nbsp;VM under my 64bit linux (Debian Sid).</li>



<li><strong>GCJ:&nbsp;</strong>The GNU&#8217;s Java compiler, incomplete and unfinished, but it works for Carballo. This binary was compiled with <a href="https://github.com/albertoruibal/carballo/blob/develop/scripts/build_gcj.sh">this script</a>.</li>



<li><strong>Excelsior Jet:&nbsp;</strong>A classic proprietary Java to native converter at&nbsp;<a href="http://www.excelsiorjet.com">http://www.excelsiorjet.com</a>. I used Excelsior Jet 11 32bit for Linux (evaluation) to generate this binary. The 64bit version had worse results.</li>



<li><strong>RoboVM:</strong>&nbsp;(<a href="https://robovm.com">https://robovm.com</a>) A solution to run Java apps on iOS. Recently it was bought by Xamarin, and after the Microsoft acquisition of Xamarin, RoboVM was discontinued. RoboVM also has the option to compile Java apps to desktop binaries. I built this binary with the last RoboVM free version (1.8). Now RoboVM is forked in BugVM, but I was not able to build the binary with BugVM.</li>



<li><strong>C# compiled with Mono: </strong>There is a <a href="https://github.com/albertoruibal/carballo_cs">C# version of Carballo converted with the Sharpen tool</a>. I compiled this binary&nbsp;with MonoDevelop 5.10. The converted code is sub-optimal but it is a good solution if you need a native version (or if you need to integrate Java code in a C# project).</li>
</ul>



<h2 class="wp-block-heading">Test results</h2>



<pre class="wp-block-preformatted">Rank Name                          ELO   Games   Score   Draws
   1 carballo-1.5-gcj               89    1200     62%     28%
   2 carballo-1.5                   37    1200     55%     27%
   3 carballo-1.5-mono              -5    1200     49%     30%
   4 carballo-1.5-jet              -33    1200     45%     28%
   5 carballo-1.5-robovm           -88    1200     38%     27%
</pre>



<h2 class="wp-block-heading">Conclusions</h2>



<p>The JVM performance is very good, better than almost all the Java to native solutions.</p>



<p>The exception is GCJ, but it&#8217;s incomplete and it will not work for all the Java apps.</p>



<p>I expected better results from Excelsior Jet, as some time ago Carballo Jet binaries where available an used for testing. </p>



<p>The C# version is a bit worse but acceptable.</p>
<p><a class="a2a_button_x" href="https://www.addtoany.com/add_to/x?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&amp;linkname=Benchmarking%20Java%20to%20native%20compilers" title="X" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_mastodon" href="https://www.addtoany.com/add_to/mastodon?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&amp;linkname=Benchmarking%20Java%20to%20native%20compilers" title="Mastodon" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&amp;linkname=Benchmarking%20Java%20to%20native%20compilers" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&amp;linkname=Benchmarking%20Java%20to%20native%20compilers" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&amp;linkname=Benchmarking%20Java%20to%20native%20compilers" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.alonsoruibal.com%2Fbenchmarking-java-to-native-compilers%2F&#038;title=Benchmarking%20Java%20to%20native%20compilers" data-a2a-url="https://www.alonsoruibal.com/benchmarking-java-to-native-compilers/" data-a2a-title="Benchmarking Java to native compilers"></a></p><p>The post <a href="https://www.alonsoruibal.com/benchmarking-java-to-native-compilers/">Benchmarking Java to native compilers</a> appeared first on <a href="https://www.alonsoruibal.com">Alberto Ruibal</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
