<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.3">Jekyll</generator><link href="https://kuamka.com//feed.xml" rel="self" type="application/atom+xml" /><link href="https://kuamka.com//" rel="alternate" type="text/html" /><updated>2023-09-18T17:21:05+01:00</updated><id>https://kuamka.com//feed.xml</id><title type="html">Kuamka Ltd</title><subtitle>Company site for Kuamka Ltd</subtitle><entry><title type="html">MacBook Pro battery replacement</title><link href="https://kuamka.com//blog/blog/macbook-pro-battery-replacement/" rel="alternate" type="text/html" title="MacBook Pro battery replacement" /><published>2020-12-05T16:00:00+00:00</published><updated>2020-12-05T16:00:00+00:00</updated><id>https://kuamka.com//blog/blog/macbook-pro-battery-replacement</id><content type="html" xml:base="https://kuamka.com//blog/blog/macbook-pro-battery-replacement/">&lt;p&gt;One of the older MacBook Pros in the Kuamka fleet has started to misbehave. First the battery life declined, then it wouldn’t
charge at all and finally macOS was showing “needs service” for the battery. Even when plugged into mains power this machine had become very
slow, probably because the CPU was being throttled to save power.&lt;/p&gt;

&lt;p&gt;After a bit of research we concluded that the battery was probably faulty, and ordered a replacement battery kit from &lt;a href=&quot;https://store.ifixit.co.uk/products/macbook-pro-13-retina-late-2013-mid-2014-battery?variant=31670663970865&quot;&gt;iFixIt&lt;/a&gt;. This arrived a few days later and I set to work.&lt;/p&gt;

&lt;p&gt;The iFixIt instructions are truly superb. In no time at all the innards of the MacBook were exposed.&lt;/p&gt;

&lt;figure&gt;
    &lt;a href=&quot;/assets/images/macbook-pro-battery-1.jpg&quot;&gt;&lt;img src=&quot;/assets/images/macbook-pro-battery-1.jpg&quot; /&gt;&lt;/a&gt;
    &lt;figcaption&gt;Naked MacBook Pro&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It’s pretty clear now that the battery is at fault - the third cell from the left has a bulge in it, and there are scorch marks on the inside of the casing.&lt;/p&gt;

&lt;p&gt;The hardest bit was removing the glue that holds the batteries in place. I used both the solvent that comes in the iFixIt kit, and the “dental floss” technique
where you get a piece of dental floss under each cell and use it to saw through the adhesive. After about half an hour the cells were removed.&lt;/p&gt;

&lt;figure&gt;
    &lt;a href=&quot;/assets/images/macbook-pro-battery-2.jpg&quot;&gt;&lt;img src=&quot;/assets/images/macbook-pro-battery-2.jpg&quot; /&gt;&lt;/a&gt;
    &lt;figcaption&gt;Sans battery&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It took a while longer to remove all the left over adhesive, then I plugged the new battery in, reassembled the MacBook and powered it up. It booted fine but…
the keyboard and mouse had stopped working. This was a bit of a disaster.&lt;/p&gt;

&lt;p&gt;After a bit more research it turns out that the track pad and keyboard ribbon cables are very sensitive to being pulled.&lt;/p&gt;

&lt;figure&gt;
    &lt;a href=&quot;/assets/images/macbook-pro-battery-3.jpg&quot;&gt;&lt;img src=&quot;/assets/images/macbook-pro-battery-3.jpg&quot; /&gt;&lt;/a&gt;
    &lt;figcaption&gt;Ribbon cables&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;On each of these, flip the lock on the connector up to release the cable, push the cable back in and push the lock down again (there are good
instructions for this in step 42 of &lt;a href=&quot;https://www.ifixit.com/Guide/MacBook+Pro+13-Inch+Retina+Display+Late+2013+Trackpad+Replacement/27413#s67888&quot;&gt;this iFixIt article&lt;/a&gt;).
Once I had done this I powered the MacBook up and the keyboard and track pad were working again.&lt;/p&gt;

&lt;p&gt;With this done, both performance and battery life both seem back to normal. We will hopefully get a few more years of use out of this MacBook!&lt;/p&gt;</content><author><name>Steve Baxter</name></author><category term="blog" /><category term="fixing-stuff" /><summary type="html">One of the older MacBook Pros in the Kuamka fleet has started to misbehave. First the battery life declined, then it wouldn’t charge at all and finally macOS was showing “needs service” for the battery. Even when plugged into mains power this machine had become very slow, probably because the CPU was being throttled to save power.</summary></entry><entry><title type="html">Running Home Assistant on a Raspberry Pi</title><link href="https://kuamka.com//blog/blog/home-assistant-on-a-raspberry-pi/" rel="alternate" type="text/html" title="Running Home Assistant on a Raspberry Pi" /><published>2020-11-22T00:00:00+00:00</published><updated>2020-11-22T00:00:00+00:00</updated><id>https://kuamka.com//blog/blog/home-assistant-on-a-raspberry-pi</id><content type="html" xml:base="https://kuamka.com//blog/blog/home-assistant-on-a-raspberry-pi/">&lt;p&gt;&lt;a href=&quot;https://www.home-assistant.io/&quot;&gt;Home Assistant&lt;/a&gt; is now all set up and working at Kuamka HQ. It’s currently running in a Docker container on a Mac Mini - this isn’t ideal as it
means the relatively power-hungry Mac needs to be on all the time and can’t sleep. It would be much better to run Home Assistant on something much smaller that uses almost no
power, for instance a &lt;a href=&quot;https://www.raspberrypi.org/products/raspberry-pi-4-model-b/?resellerType=home&quot;&gt;Raspberry Pi&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We ordered an 8 GB Raspberry Pi 4 - in retrospect this is probably overkill and the 2 GB version would have been fine. We also ordered a &lt;a href=&quot;https://thepihut.com/products/flirc-raspberry-pi-4-case&quot;&gt;really nice case&lt;/a&gt;
that will double as a heat sink, and the official Pi power adapter.&lt;/p&gt;

&lt;p&gt;Installing Home Assistant on the Pi is very straightforward. Instead of using the standard Raspberry Pi OS and then running Home Assistant as a Docker container, we can instead use
&lt;a href=&quot;https://www.home-assistant.io/hassio/installation/&quot;&gt;Hass.io&lt;/a&gt;. This is an integrated OS image available for many machines (including the Pi) that uses Docker to manage Home Assistant
and other services with a nice UI. Transferring our Home Assistant config from the Mac Docker instance to the Pi was less straightforward. Hass.io has a built-in backup and restore system, however this isn’t available on the
standalone Docker image. In the end, some manual copying and pasting of config files between the two was required to get it working.&lt;/p&gt;

&lt;p&gt;Hass.io can do much more than just run Home Assistant. Now we have the Raspberry Pi set up as a server, we can run other services on it including:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Unifi controller - we use Unifi access points for our network, we can now move the controller software off the Mac and into a Docker image running on the Pi (managed completely by Hass.io)&lt;/li&gt;
  &lt;li&gt;DuckDNS - this allows us to access Home Assistant from outside our home network, using Lets Encrypt to generate SSL certificates so we get a secure connection&lt;/li&gt;
  &lt;li&gt;NGINX reverse proxy - this uses NGINX to proxy the connection to Home Assistant for additional security (NGINX is a hardened web server)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now we can access Home Assistant securely from anywhere using a phone, and also manage our Unifi network.&lt;/p&gt;

&lt;figure class=&quot;half &quot;&gt;
  
    
      &lt;a href=&quot;/assets/images/home-assistant-android.png&quot;&gt;
          &lt;img src=&quot;/assets/images/home-assistant-android.png&quot; alt=&quot;&quot; /&gt;
      &lt;/a&gt;
    
  
    
      &lt;a href=&quot;/assets/images/unifi.png&quot;&gt;
          &lt;img src=&quot;/assets/images/unifi.png&quot; alt=&quot;&quot; /&gt;
      &lt;/a&gt;
    
  
  
    &lt;figcaption&gt;Home Assistant running on Android
&lt;/figcaption&gt;
  
&lt;/figure&gt;</content><author><name>Steve Baxter</name></author><category term="blog" /><category term="hacking" /><category term="home-assistant" /><category term="hass.io" /><summary type="html">Home Assistant is now all set up and working at Kuamka HQ. It’s currently running in a Docker container on a Mac Mini - this isn’t ideal as it means the relatively power-hungry Mac needs to be on all the time and can’t sleep. It would be much better to run Home Assistant on something much smaller that uses almost no power, for instance a Raspberry Pi.</summary></entry><entry><title type="html">Getting started with Home Assistant</title><link href="https://kuamka.com//blog/blog/getting-started-with-home-assistant/" rel="alternate" type="text/html" title="Getting started with Home Assistant" /><published>2020-11-20T00:00:00+00:00</published><updated>2020-11-20T00:00:00+00:00</updated><id>https://kuamka.com//blog/blog/getting-started-with-home-assistant</id><content type="html" xml:base="https://kuamka.com//blog/blog/getting-started-with-home-assistant/">&lt;p&gt;Kuamka HQ is in an old Victorian house in the UK. One challenge with old houses is controlling heating and humidity levels in the building.
We have recently installed a &lt;a href=&quot;https://www.nuaire.co.uk/residential/positive-input-ventilation&quot;&gt;“positive input ventilation” system&lt;/a&gt;
to try and reduce humidity in the house and prevent condensation forming on the windows. This seems to be working quite well, however being
hackers we also wanted to collect some data to see what was really happening.&lt;/p&gt;

&lt;p&gt;The starting point was to get some sensors. We ordered a &lt;a href=&quot;https://www.itead.cc/sonoff-zbbridge.html&quot;&gt;Sonoff ZBBridge&lt;/a&gt; and 8 &lt;a href=&quot;https://www.itead.cc/smart-home/sonoff-snzb-02-zigbee-temperature-and-humidity-sensor.html&quot;&gt;SNZB-02 temperature and humidity sensors&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot; &quot;&gt;
  
    
      &lt;a href=&quot;/assets/images/sonoff-sensors.jpg&quot;&gt;
          &lt;img src=&quot;/assets/images/sonoff-sensors.jpg&quot; alt=&quot;&quot; /&gt;
      &lt;/a&gt;
    
  
  
    &lt;figcaption&gt;Sonoff sensors
&lt;/figcaption&gt;
  
&lt;/figure&gt;

&lt;p&gt;Using Zigbee sensors allows us to put them wherever we like without worrying about power (they should run for months off a small “button” cell battery).&lt;/p&gt;

&lt;p&gt;The sensors are great, however the problem is that the Sonoff “eWeLink” software is very limited - you can see the temperature and humidity, however you can’t graph that information or use it with non-Sonoff devices.
This is where &lt;a href=&quot;https://www.home-assistant.io/&quot;&gt;Home Assistant&lt;/a&gt; comes in. Home Assistant is available as a Docker image, we pulled that and started it on one of our Macs. To integrate with the Sonoff devices as they are, we can use the
&lt;a href=&quot;https://github.com/AlexxIT/SonoffLAN&quot;&gt;SonoffLAN&lt;/a&gt; custom Home Assistant component to talk to the Sonoff server. After a little bit of tinkering, we have live information and graphing from our sensors.&lt;/p&gt;

&lt;figure class=&quot;half &quot;&gt;
  
    
      &lt;a href=&quot;/assets/images/hassio-sonoff-sensors.png&quot;&gt;
          &lt;img src=&quot;/assets/images/hassio-sonoff-sensors.png&quot; alt=&quot;&quot; /&gt;
      &lt;/a&gt;
    
  
    
      &lt;a href=&quot;/assets/images/hassio-history.png&quot;&gt;
          &lt;img src=&quot;/assets/images/hassio-history.png&quot; alt=&quot;&quot; /&gt;
      &lt;/a&gt;
    
  
  
    &lt;figcaption&gt;Home Assistant
&lt;/figcaption&gt;
  
&lt;/figure&gt;

&lt;p&gt;We use a Nest thermostat to control our heating. This also has humidity and temperature sensors - we don’t really want to have two sensors next to each other measuring the same thing, so we can also integrate the Nest
sensors (and thermostat control) into Home Assistant. This was actually quite complex - you have to &lt;a href=&quot;https://www.home-assistant.io/integrations/nest/&quot;&gt;set up the “Smart Device Management” API and Google’s Cloud Pubsub&lt;/a&gt; to get a feed of data into Home Assistant.
Once this is done however, it works perfectly and we can report the sensor data from the Nest alongside our other sensors in a seamless way.&lt;/p&gt;

&lt;p&gt;Finally we also want to know the outside temperature and humidity. Instead of using a sensor for this, we instead use the &lt;a href=&quot;https://www.home-assistant.io/integrations/metoffice/&quot;&gt;Met Office&lt;/a&gt; integration to get data from the
local Met Office weather station (which will be much more accurate than any sensor we would purchase).&lt;/p&gt;

&lt;p&gt;We now have monitoring and some basic data logging to show the humidity and temperature changes in the house.&lt;/p&gt;</content><author><name>Steve Baxter</name></author><category term="blog" /><category term="hacking" /><category term="home-assistant" /><category term="hass.io" /><summary type="html">Kuamka HQ is in an old Victorian house in the UK. One challenge with old houses is controlling heating and humidity levels in the building. We have recently installed a “positive input ventilation” system to try and reduce humidity in the house and prevent condensation forming on the windows. This seems to be working quite well, however being hackers we also wanted to collect some data to see what was really happening.</summary></entry></feed>