<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Roughly How To...]]></title><description><![CDATA[Roughly how to do various things 🤔]]></description><link>https://roughlyhow.com/</link><image><url>https://roughlyhow.com/favicon.png</url><title>Roughly How To...</title><link>https://roughlyhow.com/</link></image><generator>Ghost 5.88</generator><lastBuildDate>Mon, 20 Apr 2026 01:11:20 GMT</lastBuildDate><atom:link href="https://roughlyhow.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Allow microphone access to Open Web UI across local network]]></title><description><![CDATA[Openweb-ui's chat to AI works great but local network IP addresses aren't trusted by default by Firefox, Chrome etc. Here is roughly how to tell the browser you trust the local address of the machine running Openwebui so that microphone access is enabled.]]></description><link>https://roughlyhow.com/allow-microphone-access-to-open-web-ui-across-local-network/</link><guid isPermaLink="false">669fd4797884260b7b092970</guid><category><![CDATA[ai]]></category><category><![CDATA[tech]]></category><category><![CDATA[browsers]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Tue, 23 Jul 2024 16:12:05 GMT</pubDate><media:content url="https://roughlyhow.com/content/images/2024/07/owuichat-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://roughlyhow.com/content/images/2024/07/owuichat-2.png" alt="Allow microphone access to Open Web UI across local network"><p><a href="https://github.com/open-webui/open-webui?ref=roughlyhow.com">Openweb-ui</a> doesn&apos;t let you record voice as an input when accessing the web UI from a different computer on the local network because local network IP addresses aren&apos;t trusted by default by Firefox, Chrome etc. </p><p>Access via http://localhost:3000 does however, because most browser trust localhost, unlike other local IP addresses. Most solutions involve setting up a reverse proxy like Traefik, Caddy etc.</p><p>But an easier way to get around this on a known, finite list of devices is to tell the browser you trust the local address of the machine running Openwebui:</p><h2 id="in-chrome">In Chrome:</h2>
<ol>
<li>Navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure in Chrome.</li>
<li>Find and enable the <code>Insecure origins treated as secure</code> section.</li>
<li>Add any addresses you want to ignore the secure origin policy for. Remember to include the protocol and port number too e.g. <a href="http://192.168.1.11:3000/?ref=roughlyhow.com">http://192.168.1.11:3000</a></li>
<li>Save and restart Chrome.</li>
</ol>
<h2 id="in-firefox">In Firefox:</h2>
<ol>
<li>go to about:config</li>
<li>search for <code>dom.securecontext.allowlist</code></li>
<li>Change to string</li>
<li>Add only the local IP of the openwebui server (no http/s, no port). Browser restart not required, it should just work next time you visit the address.</li>
</ol>
<p></p><h3 id="references">References</h3><p><a href="http://devdoc.net/web/developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.html?ref=roughlyhow.com">http://devdoc.net/web/developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.html</a></p><p><a href="https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339?ref=roughlyhow.com">https://medium.com/@Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339</a></p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://docs.openwebui.com/features?ref=roughlyhow.com#%EF%B8%8F-voice--accessibility"><div class="kg-bookmark-content"><div class="kg-bookmark-title">&#x2B50; Features | Open WebUI</div><div class="kg-bookmark-description">Key Features of Open WebUI &#x2B50;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://docs.openwebui.com/img/favicon.png" alt="Allow microphone access to Open Web UI across local network"><span class="kg-bookmark-author">Open WebUI</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://docs.openwebui.com/ads/pipelines-banner.png" alt="Allow microphone access to Open Web UI across local network"></div></a></figure>]]></content:encoded></item><item><title><![CDATA[Fix bluetooth headphones that crackle or jitter on Debian Linux with pulseaudio.]]></title><description><![CDATA[<h3 id="symptoms">Symptoms:</h3><ul><li>Bluetooth headphones were jittery and produced crackled audio on Debian. </li><li>However bluetooth speakers with the same machine had no problem.</li><li>Headphones were also fine on other devices. &#x1F914;</li><li>Turns out the bluetooth mouse (Logitech) when moved worsened the interference.</li></ul><h3 id="solution">Solution:</h3><ol><li>Install pulse audio system icon (sudo apt install pulseaudio)</li></ol>]]></description><link>https://roughlyhow.com/fix-bluetooth-headphones-that-crackle-or-jitter-on-debian-linux-pulseaudio/</link><guid isPermaLink="false">6626d6055f2d470884b9b8aa</guid><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Mon, 22 Apr 2024 21:30:39 GMT</pubDate><content:encoded><![CDATA[<h3 id="symptoms">Symptoms:</h3><ul><li>Bluetooth headphones were jittery and produced crackled audio on Debian. </li><li>However bluetooth speakers with the same machine had no problem.</li><li>Headphones were also fine on other devices. &#x1F914;</li><li>Turns out the bluetooth mouse (Logitech) when moved worsened the interference.</li></ul><h3 id="solution">Solution:</h3><ol><li>Install pulse audio system icon (sudo apt install pulseaudio) and the gui (apt install (sudo apt install pavucontrol).</li><li>In the Configuration tab of the pulse audio app, changing the codec for the headphones from LDAC (high quality) to SBC XQ 552kbps made the issue 95% better without any noticeable drop in audio quality.</li></ol><figure class="kg-card kg-image-card"><img src="https://roughlyhow.com/content/images/2024/04/image.png" class="kg-image" alt loading="lazy" width="1025" height="471" srcset="https://roughlyhow.com/content/images/size/w600/2024/04/image.png 600w, https://roughlyhow.com/content/images/size/w1000/2024/04/image.png 1000w, https://roughlyhow.com/content/images/2024/04/image.png 1025w" sizes="(min-width: 720px) 720px"></figure><p>Seems that Sony Headphones / Logitech Mouse quite frequently cause problems when used together.</p><h3 id="references">References:</h3><p><a href="https://itslinuxfoss.com/install-pulseaudio-ubuntu-22-04/?ref=roughlyhow.com">https://itslinuxfoss.com/install-pulseaudio-ubuntu-22-04/</a><br>https://forums.linuxmint.com/viewtopic.php?t=399161 </p>]]></content:encoded></item><item><title><![CDATA[Run Open-WebUI for Ollama in a docker container]]></title><description><![CDATA[<p>These notes are based on:</p><ul><li>Running ollama directly on the host</li><li>Running a docker container with <a href="https://github.com/open-webui/open-webui?ref=roughlyhow.com">open-webui</a></li></ul><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/open-webui/open-webui?ref=roughlyhow.com"><div class="kg-bookmark-content"><div class="kg-bookmark-title">GitHub - open-webui/open-webui: User-friendly WebUI for LLMs (Formerly Ollama WebUI)</div><div class="kg-bookmark-description">User-friendly WebUI for LLMs (Formerly Ollama WebUI) - open-webui/open-webui</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.com/fluidicon.png" alt><span class="kg-bookmark-author">GitHub</span><span class="kg-bookmark-publisher">open-webui</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://opengraph.githubassets.com/e647c75157f0362e4c895bf5cbe8fefb710b20a033208f3c594813a331d3ce0f/open-webui/open-webui" alt></div></a></figure><h2 id="steps">Steps</h2><ol><li>Make sure ollama is running by opening terminal and</li></ol>]]></description><link>https://roughlyhow.com/run-open-webui-docker/</link><guid isPermaLink="false">6620e86301c037036609f573</guid><category><![CDATA[ai]]></category><category><![CDATA[tech]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Thu, 18 Apr 2024 09:41:50 GMT</pubDate><media:content url="https://roughlyhow.com/content/images/2024/04/owui.gif" medium="image"/><content:encoded><![CDATA[<img src="https://roughlyhow.com/content/images/2024/04/owui.gif" alt="Run Open-WebUI for Ollama in a docker container"><p>These notes are based on:</p><ul><li>Running ollama directly on the host</li><li>Running a docker container with <a href="https://github.com/open-webui/open-webui?ref=roughlyhow.com">open-webui</a></li></ul><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/open-webui/open-webui?ref=roughlyhow.com"><div class="kg-bookmark-content"><div class="kg-bookmark-title">GitHub - open-webui/open-webui: User-friendly WebUI for LLMs (Formerly Ollama WebUI)</div><div class="kg-bookmark-description">User-friendly WebUI for LLMs (Formerly Ollama WebUI) - open-webui/open-webui</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.com/fluidicon.png" alt="Run Open-WebUI for Ollama in a docker container"><span class="kg-bookmark-author">GitHub</span><span class="kg-bookmark-publisher">open-webui</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://opengraph.githubassets.com/e647c75157f0362e4c895bf5cbe8fefb710b20a033208f3c594813a331d3ce0f/open-webui/open-webui" alt="Run Open-WebUI for Ollama in a docker container"></div></a></figure><h2 id="steps">Steps</h2><ol><li>Make sure ollama is running by opening terminal and running:</li></ol><pre><code class="language-sudo">sudo systemctl start ollama</code></pre><p>	Check it&apos;s running at: http://localhost:11434/</p><p>2. Open terminal in open-webui directory and start it with the following command: </p><pre><code>docker run -d -p 3000:8080 --network=host --add-host=host.docker.internal:host-gateway -v open-webui
:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main</code></pre><p>3. Login at localhost:8080. </p><p>4. Make sure it can connect to ollama in settings of open-webui. You might need to change the Ollama URL from the default if connection fails:</p><p>Ollama URL = <a href="http://localhost:11434/?ref=roughlyhow.com">http://localhost:11434/</a></p><h3 id="references"><br>References:</h3><p>https://medium.com/@quicky316/ollama-with-ollama-webui-with-a-fix-334180915ef4<br></p>]]></content:encoded></item><item><title><![CDATA[Integrate MyEnergi Zappi and Harvi units with Home Assistant]]></title><description><![CDATA[<p>You need:</p><ul><li>A myenergi hub and harvi device (and optionally Zappi / Eddi devices)</li><li>Home Assistant running locally</li></ul><p>I chose to run Home Assistant in Docker using the <a href="https://docs.linuxserver.io/images/docker-homeassistant?ref=roughlyhow.com">LinuxServer.io image</a> rather than the official image provided by HA.</p><p>Use the following docker compose file:</p><!--kg-card-begin: markdown--><pre><code>---
version: &quot;2.1&quot;</code></pre>]]></description><link>https://roughlyhow.com/integrate-myenergy-zappi-harvi-home-assistant/</link><guid isPermaLink="false">61cb29e17286f40eb506ee68</guid><category><![CDATA[APIs]]></category><category><![CDATA[home]]></category><category><![CDATA[tech]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Sun, 14 Jan 2024 22:51:39 GMT</pubDate><content:encoded><![CDATA[<p>You need:</p><ul><li>A myenergi hub and harvi device (and optionally Zappi / Eddi devices)</li><li>Home Assistant running locally</li></ul><p>I chose to run Home Assistant in Docker using the <a href="https://docs.linuxserver.io/images/docker-homeassistant?ref=roughlyhow.com">LinuxServer.io image</a> rather than the official image provided by HA.</p><p>Use the following docker compose file:</p><!--kg-card-begin: markdown--><pre><code>---
version: &quot;2.1&quot;
services:
  homeassistant:
    image: lscr.io/linuxserver/homeassistant
    container_name: homeassistant
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - /home/dockeruser/appdata/homeassistant/config:/config
      # change the first part of the line above - it should point to an existing folder on your docker host where homeassistant can store its config files.
    ports:
      - 8123:8123 
    restart: unless-stopped
</code></pre>
<!--kg-card-end: markdown--><p>1) Install Home Assistant</p><p>2) Find your myEnergi hub serial number (located on the hub) and your password (provided to you when you got the hub installed). You will need this later.</p><p>3) Install the <a href="https://github.com/CJNE/ha-myenergi?ref=roughlyhow.com">ha-myenergi</a> custom component - by Johan Isacsson</p><ul><li>wget the files from the github repo</li><li>copy the custom_components folder into your HA config directory</li></ul><p>4) Restart home assistant</p><p>5) install the component - integrations &gt; add &gt; search: energi. Configure with password and serial from step 1</p><p>If you have forgotten your hub password, you need to contact myenergi to reset it. Unfortunately there is no automated password reset for this yet! (<a href="https://myenergi.info/forgotten-password-t1327.html?ref=roughlyhow.com">Yes, really.</a>)</p>]]></content:encoded></item><item><title><![CDATA[Install Nvidia RTX 3090 drivers on Debian 12]]></title><description><![CDATA[<p>First tried udpating linux amd64 headers and downloading nvidia-drivers but this resulted in an error when booting with the RTX3090 plugged in. This is the recommended way on Debian&apos;s website but it didn&apos;t work for me.</p><p>First purge all nvidia drivers I had installed so far:</p>]]></description><link>https://roughlyhow.com/install-nvidia-rtx-3090-drivers-on-debian-12/</link><guid isPermaLink="false">65a46287b4efef0367468e5a</guid><category><![CDATA[tech]]></category><category><![CDATA[hardware]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Sun, 14 Jan 2024 22:46:39 GMT</pubDate><media:content url="https://roughlyhow.com/content/images/2024/01/letsgo.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://roughlyhow.com/content/images/2024/01/letsgo.jpg" alt="Install Nvidia RTX 3090 drivers on Debian 12"><p>First tried udpating linux amd64 headers and downloading nvidia-drivers but this resulted in an error when booting with the RTX3090 plugged in. This is the recommended way on Debian&apos;s website but it didn&apos;t work for me.</p><p>First purge all nvidia drivers I had installed so far: <code>sudo apt purge nvidia*</code></p><p>Then download the RTX3090 driver from Nvidia (a .run file) <a href="https://www.nvidia.com/en-us/drivers/?ref=roughlyhow.com" rel="noreferrer">here</a>.</p><p>This solution walks trough the install process in more detail: </p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://askubuntu.com/questions/1023036/how-to-install-nvidia-driver-with-secure-boot-enabled?ref=roughlyhow.com"><div class="kg-bookmark-content"><div class="kg-bookmark-title">How to install nvidia driver with secure boot enabled?</div><div class="kg-bookmark-description">I found this post:
nvidia-smi command not found Ubuntu 16.04 | Ask Ubuntu
Which says that with UEFI secure boot enabled nvidia-smi could not be found in Ubuntu:
$ nvidia-smi
nvidia-smi: command not...</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://cdn.sstatic.net/Sites/askubuntu/Img/apple-touch-icon.png?v=e16e1315edd6" alt="Install Nvidia RTX 3090 drivers on Debian 12"><span class="kg-bookmark-author">Ask Ubuntu</span><span class="kg-bookmark-publisher">2017561-1</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://cdn.sstatic.net/Sites/askubuntu/Img/apple-touch-icon@2.png?v=c492c9229955" alt="Install Nvidia RTX 3090 drivers on Debian 12"></div></a></figure><p>In brief, the process looks like this:</p><ul><li>Enter advanced Debian recovery mode (just a command line, no desktop environment) and wrote the commands there. This is required so X server is not running - a prerequisite for installing these display drivers.</li><li>Create a private/public key pair (in .key and .der format) using openssl req -new -x509...</li><li>Enrolled the key using mokutil.</li><li>On reboot the EFI&apos;s mokutil interface loaded and clicking sign it recognised which key i wanted to use</li><li>Disabling the nouveau kernel driver took a few attempts but you can check if it has worked by running the .run file from nvidia - it will tell you if the driver is disabled but the machine has not been restarted.</li><li>Installing the driver with a regular bash command, no need to pass the parameters, the driver asks for the public and private key file locations during installation.</li></ul><p>Mounting the USB stick with the driver was done by: <code>run lsblk</code> to figure out the identifier of the USB stick.</p><p>Then mount with: <br><code>mkdir ~/UsbStick <br>sudo mount /dev/PATH_TO_YOUR_STICK ~/UsbStick</code></p>]]></content:encoded></item><item><title><![CDATA[Get more data out of your solar panels]]></title><description><![CDATA[A guide to find out how much energy you are generating, importing, exporting and using with your myenergi Zappi and Harvi.]]></description><link>https://roughlyhow.com/to-get-more-data-out-of-your-solar-panels/</link><guid isPermaLink="false">61cc39a67286f40eb506eed3</guid><category><![CDATA[home]]></category><category><![CDATA[tech]]></category><category><![CDATA[n8n]]></category><category><![CDATA[APIs]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Mon, 03 Jan 2022 11:39:00 GMT</pubDate><media:content url="https://images.unsplash.com/flagged/photo-1566838616631-f2618f74a6a2?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fHNvbGFyJTIwcGFuZWwlMjBob21lfGVufDB8fHx8MTY0MDc3Nzc3OQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/flagged/photo-1566838616631-f2618f74a6a2?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fHNvbGFyJTIwcGFuZWwlMjBob21lfGVufDB8fHx8MTY0MDc3Nzc3OQ&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" alt="Get more data out of your solar panels"><p>I wanted to find out how much energy my solar panels produced, how much of it we used in the house and how much we exported/imported with the grid.</p><p>Overall I wanted to crunch the numbers on whether it could be cost effective to install a battery at home*. </p><p>The method below will apply to most solar panels with an app but the specifics will vary. In my case I am using a myenergi Hub with Zappi EV charger to get my data. I typically access this data through the myenergi app, but short of writing down the figures for each day or week, there&apos;s no way to get a bulk export of my own data via the app. So if you&apos;re in a similar situation, this is what you&apos;ll need to do:</p><ul><li>Find a way to get data out of your system - in my case I found an excellent unoffical API documentation courtesy of <a href="https://github.com/twonk/MyEnergi-App-Api?ref=roughlyhow.com">twonk on GitHub</a>.</li><li>I made the API request via a visual tool called n8n. You can self host it or pay &#x20AC;20 for <a href="https://n8n.io/cloud?ref=roughlyhow&amp;utm_source=affiliate">n8n.cloud</a> to get started right away.</li><li>I saved the raw data into a google sheet and ran some further analyses using it.</li></ul><p>The first point is the most challenging, you will likely have to search GitHub to see if solutions exist. Or you might try Home Assistant and see if an <a href="https://www.home-assistant.io/integrations/?ref=roughlyhow.com">integration</a> exists for your panels software.</p><p><em>*The answer is &quot;not really&quot; on purely economic terms - but perhaps it can be justified on environmental / self sufficiency reasons.</em></p><hr><p>These are the exact steps I followed:</p><ol><li>Understand the API - what is the base URL to query, what are the end points etc. For myenergi/zappi devices it&apos;s all laid out here:</li></ol><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://github.com/twonk/MyEnergi-App-Api?ref=roughlyhow.com"><div class="kg-bookmark-content"><div class="kg-bookmark-title">GitHub - twonk/MyEnergi-App-Api: Investigation of the MyEnergi App</div><div class="kg-bookmark-description">Investigation of the MyEnergi App . Contribute to twonk/MyEnergi-App-Api development by creating an account on GitHub.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://github.com/fluidicon.png" alt="Get more data out of your solar panels"><span class="kg-bookmark-author">GitHub</span><span class="kg-bookmark-publisher">twonk</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://opengraph.githubassets.com/0fda137668616915e74b93b1b12addbb29096f85671d5b64f3f43fe140351471/twonk/MyEnergi-App-Api" alt="Get more data out of your solar panels"></div></a></figure><p>2. You&apos;ll need something to make a HTTP Request. For this I used n8n but you could write your own script or use another tool like n8n to make it easier. I configured my HTTP Request node in n8n as shown:</p><!--kg-card-begin: markdown--><p>URL:<br>
<code>https://s8.myenergi.net/cgi-jdayhour-Z1111111-{{$node[&quot;SplitInBatches&quot;].json[&quot;Dates&quot;]}}</code></p>
<!--kg-card-end: markdown--><p>The API host is sX.myenergi.net (see twonk&apos;s guide for how to figure out your number). We are getting data from the cgi-jdayhour endpoint which returns energy consumption per hour during a given day. The curly brackets are specific for n8n - they allow me to feed in a list of dates from a spreadsheet and make a API request for each individual date in turn. Each request gets me data for one specific day. The day is specified is in the format yyyy-mm-dd. </p><p>You will also need your Zappi&apos;s serial number (not the hub&apos;s). So if you want data for <em>1st Jan 2022</em>, your API host (also called ASN) is <em>s8.myenergi.net</em> and your hub serial number is <em>Z1111111, </em>your<em> </em>URL will look like this:</p><!--kg-card-begin: markdown--><p><code>https://s8.myenergi.net/cgi-jdayhour-Z1111111-2022-1-1</code></p>
<!--kg-card-end: markdown--><p>Digest Auth Credentials: </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://roughlyhow.com/content/images/2021/12/Screenshot-2021-12-29-at-10-52-51-n8n------Zappi-Data-Retrieval.png" class="kg-image" alt="Get more data out of your solar panels" loading="lazy" width="1972" height="658" srcset="https://roughlyhow.com/content/images/size/w600/2021/12/Screenshot-2021-12-29-at-10-52-51-n8n------Zappi-Data-Retrieval.png 600w, https://roughlyhow.com/content/images/size/w1000/2021/12/Screenshot-2021-12-29-at-10-52-51-n8n------Zappi-Data-Retrieval.png 1000w, https://roughlyhow.com/content/images/size/w1600/2021/12/Screenshot-2021-12-29-at-10-52-51-n8n------Zappi-Data-Retrieval.png 1600w, https://roughlyhow.com/content/images/2021/12/Screenshot-2021-12-29-at-10-52-51-n8n------Zappi-Data-Retrieval.png 1972w" sizes="(min-width: 720px) 720px"><figcaption>n8n HTTP Request Digest Auth Credentials</figcaption></figure><p>Finally your HTTP node configuration should look like this - don&apos;t forget to enable the &quot;Split Into Items&quot; option to output cleaner data. It&apos;s found in the &quot;Add Option&quot; dropdown button.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://roughlyhow.com/content/images/2021/12/Screenshot-2021-12-29-at-10-56-39-n8n------Zappi-Data-Retrieval-3.png" class="kg-image" alt="Get more data out of your solar panels" loading="lazy" width="664" height="1208" srcset="https://roughlyhow.com/content/images/size/w600/2021/12/Screenshot-2021-12-29-at-10-56-39-n8n------Zappi-Data-Retrieval-3.png 600w, https://roughlyhow.com/content/images/2021/12/Screenshot-2021-12-29-at-10-56-39-n8n------Zappi-Data-Retrieval-3.png 664w"><figcaption>n8n HTTP Request node set up</figcaption></figure><p>3. We want to make a series of requests - one for each day that we want data for. And that&apos;s where n8n is very powerful because it makes it easy and visual. You can use other ways to do this too -- I find n8n works well for me.</p><p>You need to structure a workflow that does the following:</p><!--kg-card-begin: markdown--><ol>
<li>From a list of dates which are in Google Sheets, take each date in turn (this  is what the Split In Batches module does).</li>
<li>Make a HTTP request to the myenergi API using the correct URI structure based on your ASN/URI, Zappi serial number and the date from the first step.</li>
<li>This returns a long list of data containing the data fields: imp for imported joules per hour, exp for exported joules per hour and gep for &quot;generated positive&quot;  joules per hour.</li>
<li>We need to save these figures (returned on an hourly basis for the day) somewhere we can work with them. In my case, I saved to a Google sheet. gen (&quot;generated negative&quot;) can likely be ignored as it&apos;s irrelevant data for our purposes. I also saved the h1b and h1d figures in case they come in useful later. &#x1F937;&#x200D;&#x2642;&#xFE0F;<br>
<img src="https://roughlyhow.com/content/images/2021/12/Screenshot-2021-12-29-at-11-18-22-Solar.png" alt="Get more data out of your solar panels" loading="lazy"></li>
<li>Let the workflow run for each date you want to retrieve data for. In the end you should have thousands of lines of data. Each day is 24 lines of data so if you wanted to get data for 100 days, you would have 24*100 = 2400 rows of data.</li>
</ol>
<!--kg-card-end: markdown--><p>4. Now you have all your raw data in a spreadsheet you can do what you like with it. I wanted to know the following:</p><ul><li>What does my solar generation curve look like throughout the day - i.e. during what hours are my panels making the most/least energy.</li><li>How much of the solar that I generate do I use up? </li><li>During what hours are the biggest surpluses? &#x2013;&gt; So I can try to run energy hungry appliances during those hours.</li><li>Sense check my annual consumption costs and generation income from feed in tariffs.</li></ul><p>All this is quite straightforward in sheets. Leave a comment with specific questions. Otherwise enjoy pretty graphs like this one &#x1F447;</p><!--kg-card-begin: html--><iframe width="600" height="371" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRPxc-JyVtk9Di0PeORwjxcgBrOXvHhzrBEgSuuqjynQ3kxJarubGkq9vg-49zT4X1PgZmyZ0jXAXwt/pubchart?oid=330343863&amp;format=interactive"></iframe><!--kg-card-end: html-->]]></content:encoded></item><item><title><![CDATA[Delete or Migrate Google Apps Gmail accounts]]></title><description><![CDATA[Google Apps (or GGsuite as it's now called) is expensive. The instructions below delete sent attachments to reduce the account's storage size (standard accounts are capped at 30GB) which makes it quicker to migrate and prevents your main account breaching it's storage limit.]]></description><link>https://roughlyhow.com/delete-or-migrate-google-apps-gmail-accounts/</link><guid isPermaLink="false">619c22647286f40eb506ee44</guid><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Wed, 24 Nov 2021 23:14:00 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1557200134-90327ee9fafa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fGdtYWlsfGVufDB8fHx8MTYzNzYyMjQzOA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1557200134-90327ee9fafa?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8c2VhcmNofDV8fGdtYWlsfGVufDB8fHx8MTYzNzYyMjQzOA&amp;ixlib=rb-1.2.1&amp;q=80&amp;w=2000" alt="Delete or Migrate Google Apps Gmail accounts"><p>In Gsuite (or Google Workspace as it&apos;s now called), you pay per user and we had some dormant accounts that contained emails useful enough to archive but not useful enough to keep paying for an unused user account. We deleted attachments to drastically reduce the disk size of those dormant accounts and backed them up in the following way. This was done in 2020 - the exact steps may have changed since then.</p><p>1) Identify user / inbox to be deleted</p><p>2) Turn off conversation view in that inbox so that conversations are not grouped and emails are always displayed individually. You do not want to delete a whole group of emails - it is better to work on single emails to avoid making mistakes.</p><p>3) Run this search in the inbox to be delete:</p><p>larger_than:2mb -Re -Fwd from:usertobedeleted@email.com</p><p><em>This will run a search returning all messages that were sent by the user you are deleting greater than 2mb in size and that aren&apos;t sent in reply to (or forwarded from) another message.</em></p><p>4) Scan through the messages to make sure you aren&apos;t deleting anything you would want to keep. Once you are satisfied you&apos;ve got the right messages, select all (check the box to select all messages on all pages, not just the ones displayed) and delete.</p><p>5) Empty your trash folder. This account&apos;s storage space usage should now be less than it was before.</p><p>6) Once the account is sufficiently trimmed, start data migration following the instructions provided via Google Admin Console: <a href="https://admin.google.com/ac/dms?ref=roughlyhow.com">admin.google.com</a></p><p>7) The migration will take 1 - 3+ days from my experience. Once it is complete you can delete the user account that was migrated without losing any emails.</p>]]></content:encoded></item><item><title><![CDATA[Understand Data Structures in n8n]]></title><description><![CDATA[n8n is a super powerful workflow automation tool that is fair-code and can be deployed on your own server. Once you understand its data structures as outlined in this post, you'll be able to do a lot with it.]]></description><link>https://roughlyhow.com/understand-n8n-data-structures/</link><guid isPermaLink="false">619c20557286f40eb506ee30</guid><category><![CDATA[n8n]]></category><category><![CDATA[tech]]></category><dc:creator><![CDATA[roughly how]]></dc:creator><pubDate>Mon, 22 Nov 2021 23:04:02 GMT</pubDate><media:content url="https://roughlyhow.com/content/images/2021/11/n8n-screenshot.png" medium="image"/><content:encoded><![CDATA[<h2 id="basics"><strong>Basics</strong></h2><ul><li>All data passed between nodes is an array of objects</li><li>To manipulate data, n8n needs this data structure:</li></ul><img src="https://roughlyhow.com/content/images/2021/11/n8n-screenshot.png" alt="Understand Data Structures in n8n"><p><code>[items array: {json:obj}, {json:obj}, {json:obj}]</code></p><ul><li>But often our data will be in the format:</li></ul><p><code>[items array: [ json array: {obj}, {obj}, {obj} ] ]</code></p><ul><li>Each n8n node runs its operations on <u>each item</u> in the array</li><li>So in the first data structure it operates 3 times on {json:obj}</li><li>But in the second data structure it operates just once on the json array.</li></ul><h2 id="unbundling"><strong>Unbundling</strong></h2><p>When you have the second type of data structure, you need to:</p><p>1) First unbundle the json array into items</p><p>2) Then run operations on each individual item.<br>To do this, use a function node:</p><p><code>return items[0].json.map( item =&gt; ( { json : item } ));</code></p><h2 id="nested-items"><strong>Nested Items</strong></h2><p>Sometimes (e.g. with external APIs returning data in a different format), you will encounter nested items. This usually means the data we are interested in is its own object nested within the JSON response from the API.</p><p>Where &quot;results&quot; is the object/array of interest, we would modify our function above as so:</p><p><code>return items[0].json.results.map(item =&gt; ( { json : item } ));</code></p><h2 id="recap"><strong>Recap</strong></h2><ul><li>You always have an items array in every n8n node</li><li>In the items array are one or more JSON object arrays</li><li>Usually if there is just one JSON object in the items array, we will be interested in the objects within the JSON array.</li><li>This is where unbundling as above is required.</li><li>If there are multiple JSON objects in the items array, we are interested in unbundling the JSON object into separate items - using the function for nested items.</li><li>When there are multiple items - that&apos;s ideal because it&apos;s what we usually want. It is the level n8n performs operations on.</li></ul><h2 id="bonus"><strong>Bonus</strong></h2><p>To bundle up data (e.g. when we want to export the output of our operations to another service):</p><p>1. Start by declaring: const = data</p><p>2. End with: return [ { json: {data} }];</p><p>3. Fill up the data constant as so:</p><p><code>const data = items.map ( items =&gt; &apos;Name: ${item.json.name}, URL: ${item.json.url}&apos;).toString();</code></p>]]></content:encoded></item></channel></rss>