iPhone 6s Battery Replacement

Hi, 👋

I usually write about technical stuff and tutorials, but this article is more about repair and the right to repair.

It’s important for companies to offer their customers the ability to repair devices that they bought. I’m not saying that they should make all parts and tools available, but they should at least try to offer some help for common repair operations, like storage change, broken screen change, battery change and so on. Perhaps some upgrades as well.

My old Apple iPhone 6s got a new life yesterday thanks to iFixit’s tools and guides.

The phone is ~5 years old at the time of me writing this and it works flawlessly on the latest iOS 15.2.

I thought that once the battery dies, I need to get a new phone and that felt normal to me.

In my country there’s no Apple Store. Getting a battery replacement may involve shipping my phone to a third-party shop in a different city and waiting for it to come back, even though the price of a battery replacement is affordable compared to getting a new phone, for some reason, the idea of fixing my phone instead of getting a new one felt a bit weird. And even if I pay a third-party repair shop, I don’t have any guarantee that the battery is quality. I’m imagining that most of the shops sell old low-quality batteries to make more money.

Thanks to Louis Rossman, (this guy has some incredible and entertaining videos) I was motivated to repair the phone by myself! And thanks to iFixit I found a step-by-step guide and all the tools necessary for me to do the repair.

I’m a software guy, I did not receive repair training and if there weren’t any guides or tools available, I’ll probably never figure how to do the battery change repair by myself without breaking the phone.

The repair was a success and even though I’m not going to use the phone, I’m going to gift to someone that will be very happy to use it for a few more years.

Read more about the right to repair:

BME680 Home Assistant Integration

Hi 👋,

In this short article I will highlight how to use the BME680 Home Assistant integration with a BME680 Sensor.

Please note that I’m running Home Assistant core on Raspbian OS.

Raspberry Pi Setup

Before connecting the sensor, you will need to enable the I2C interface on your Raspberry Pi and install some additional tools that are useful for debugging.

To enable the I2C interface execute:

sudo raspi-config

Then go to Interfacing options->I2C and select yes.

Next, install the following packages:

sudo apt-get install build-essential libi2c-dev i2c-tools python-dev libffi-dev

Sensor Setup

The first step is to buy the sensor, get one with headers already soldered if you can otherwise, you’ll need to solder them.

I got mine from Pimoroni and I’ve never was disappointed by them, they deliver to EU.

BME680 sensor. Pimoroni screen capture 2022-01-16

Next depending on which headers you’ve chosen; you will need four male-to-female jumper wires to connect the BME680 to the Raspberry Pi.

To connect the sensor to the Raspberry PI, refer to the following diagram:

You will need to connect the wires to the following buses:

  • Sensor Power -> Raspberry PI 3.3V
  • Sensor GND -> Raspberry PI GND
  • Sensor SCL -> Raspberry PI SCL
  • Sensor SDA -> Raspberry PI SDA

Check that the sensor is detected using the following command on the Raspberry Pi.

/usr/sbin/i2cdetect -y 1

You should get an ouput like this:

0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 76

The sensor’s I2C address can be 0x76 or 0x77. According to the above output, the sensor address in our case is 0x76, keep this in mind.

Home Assistant Setup

Add your homeassistant user to the I2C group by running:

sudo addgroup homeassistant i2c

Next, open configuration.yaml and modify the sensor and homeassistant.customize sections according to:

Don’t forget to replace i2c_address : 0x76 with your i2c address if it’s different.

  name: HomeKit NucuLabs
  unit_system: metric
  time_zone: Europe/Bucharest
      icon: mdi:thermometer
      friendly_name: Temperature
      icon: mdi:water
      friendly_name: Humidity
      device_class: humidity
      unit_of_measurement: "%"
      icon: mdi:gauge
      friendly_name: Pressure
      icon: mdi:blur
      friendly_name: Air Quality
      device_class: pm25
      unit_of_measurement: "%"

  - platform: bme680
    i2c_address: 0x76
      - temperature
      - humidity
      - pressure
      - gas
      - airquality

Reboot the device after you’ve modified configuration.yaml by running sudo reboot.

Note: The customize section sensor.bme680_sensor_air_quality sets the device class of BME680 air quality measurement to pm25, but this isn’t a pm25 measurement, it’s a proprietary algorithm according BME680 Datasheet. High values indicate good air quality while low values indicate low air quality. On the other hand, in pm25 measurements high values indicate bad air quality and low values good air quality.

This is a hack and it’s up to you if you want to keep it. If you don’t set the device class to pm25 then the measurement won’t be visible in Apple Homekit because Homekit is not aware of this kind of measurement. If you know any other way of making it visible in Homekit let me know. 😀

After home assistant reboots, the following entities should be available in the Lovelace UI:

Thanks for reading! 🍻