Latest blog entries

From stream back to broadcast

Thursday, March 21st, 2024 at 07:55pm

This tangle of wires is my new morning alarm:

The parts in this picure are:

  • Cheap set of computer speakers (that run from 5V)
  • An unbranded Si4703 FM Tuner Breakout Board
  • D1 mini arduino board (runs from 5V and has built in wifi)
  • Relay (to control power to the speaker amplifier)
  • Momentary switch (to give it local commands)

It has been a bit more than five years since I switched to using a Chromecast speaker playing the internet stream for a radio station as my alarm clock. It has mostly been fine, except when not…

The first major issue was not that long after I set this up, the radio station I had chosen decided to change their main stream over to HLS which it turns out my speaker does not support. I tried to work out if there was a proxy I could use (or make) to covert HLS back to the older style, but then managed to locate an alternate stream for the same radio station.

An intermittent issue, but happening more in recent weeks, is that sometimes the stream doesn’t start, or the stream will start but then after a time will stop. I can see from the Home Assistant logs that it does start but then falls back to “buffering” and then off. I’m thinking that this is a network timeout or other issue.

I have also been looking out for a new speaker for the kitchen, but here it is not for streaming the radio, but for playing podcasts from my phone via bluetooth. The cheap speaker I have now doesn’t always connect to my phone and I want something mains powered so I don’t have to remember to turn it off to make the battery last as long as possible between recharges.

As I was struggling to find a non-portable bluetooth speaker for the kitchen I started thinking about a cheap mini hifi that had bluetooth. That thought evolved into what able using that for my alarm because I now have an IR blaster to control my AC unit, that could also send commands to a mini hifi.

Looking though parts I have picked up over the years I came across the Si4703 FM tuner board, what if I revisited that idea? It would better integrate into Home Assistant as it could give current status that an IR blaster cannot do. These thoughts felt familiar, so I looked back at my post from five years ago. Huh. These are all options I looked into back then…

Instead of spending money on a mini hifi I realised that already had the parts I needed. The FM tuner board and a spare set of computer speakers could be the alarm, then the current chromecast speaker could be moved to the kitchen and used directly with bluetooth. What really made this come together is this video from two months ago:

Old-School Radio: Integrating an FM Receiver into Home Assistant

It is looking like the example code from the video will do almost what I want. I might go through and strip out the serial control and OTA update functionality that I’m not going to use, but apart from tweaking some of the defaults and adding in control of a relay I think the software side might be sorted, including a panel within Home Assistant that I have updated with local station presets.

I have been using this for around two weeks now, it is working quite well so I should get around to tidying it up into a project box.

Tagged with:

Four years?

Saturday, March 16th, 2024 at 05:24pm

Yes, another year has gone by which means it is four years since I started working from home. It still doesn’t feel like it has been that long, but the calendar does not lie…

There are still some things that I don’t like about working from home, but all of them are vastly outweighed by not having a daily commute. Of course I could be doing more productive things with those two hours a day, but I prefer to take it easy.

That said, over the past six months I have started crossing things off my long todo list. Many of them have been tasks around the house that I have neglected, but others are investments in things like going all electric with solar panels, heat pump hot water and air conditioners for cooling and heating.

The house projects will continue, but after another lull last year I plan on making more of an effort in getting out with my camera…

Tagged with: ,

First full month with solar configured

Friday, March 8th, 2024 at 07:02pm

It has been a month since I last mentioned my solar panels and this time the significant thing is that I have received my electricity bill for the first full month since everything has been set up. No partial feed-in tariff and no admin charges.

It is pretty much as I expected with what I get paid for the solar balancing out what I am charged for pulling from the grid, leaving the daily charge:

I can’t compare the reported usage against what Enlighten reports because my Envoy gateway has been a bit broken (but now replaced). After the long power outage earlier in February it failed to report to the cloud, although the Home Assistant integration was able to pull data from it just fine. Even then Home Assistant data isn’t complete as the Envoy would at times drop off the network, but llowing for some missing data the usage values do line up.

So how does this compare against a time before I got the solar installed. That would be October 2023:

It is nice that my monthly bill is now a quarter of what it used to be, although I expect it to rise as we head into the colder months when there is less sun and I will be using electricity for heating. No more gas bill though :)

Tagged with: , ,

How to reflash a Sensibo Sky with ESPHome

Wednesday, February 28th, 2024 at 08:24pm

A few days ago I mentioned how I had reflashed two Sensibo Sky devices with ESPHome as I prefer that arrangement for controlling my AC units. As there were some gaps in the instructions I found on reddit I decided to fully document my steps here. This may not be the best or only method, but it is what I did.

The reddit post that I started from:

Once I picked up the devices my first challenge was actually opening them up. The reddit post didn’t have any information, I couldn’t see any obvious way and a quick search didn’t turn up anything. I briefly considered just trying to use the exposed pins, but I didn’t know what type of connector and didn’t want to wait, so I turned to my iFixit toolkit, using a couple of the plastic picks to wedge open the white casing from the USB port side.

It turns out this was unnecessary and the case is very easy to open.

The translucent part of the case has a hook that clips into the white part, so if you push down on the Sensibo logo you can slide the white part down slightly and it will then lift off. The translucent part can then be unclipped.

This is the diagram from the reddit post:

This is the pinout of the style of USB to TTL UART I used:

Per the instructions I connected:

  • UART GND to Sensibo GND
  • UART TX to Sensibo RX
  • UART RX to Sensibo TX
  • UART GND to Sensibo pins 0 and 15 (though apparently only 0 is required)

I then powered up the device using the USB port, previously the LED would flash when turned on, now it was on solid.

To confirm that I had a connection I used esptool:

$ esptool flash_id v2.8
Found 1 serial ports
Serial port /dev/ttyUSB0
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: c8:c9:a3:a5:d7:16
Enabling default SPI flash mode...
Manufacturer: eb
Device: 6015
Detected flash size: 2MB
Hard resetting via RTS pin...

Satisfied I was able to connect I now went into the ESPHome Dashboard and created a new device, this didn’t have any sensors yet, just enough configuration to connect to my wifi (with a static IP because I find that easier than hoping mDNS will work).

As I was doing this from my main desktop and not the machine the TTL UART was connected to I opted for the Manual Download of the firmware. After doing its thing the dashboard gave me an image file to flash.

As I had used esptool to check the connection, I used it again but now to flash the new image. I didn’t keep a copy of the output but the command was:

$ esptool write_flash 0x0 bedroom_ac.bin

The flashing said that it had completed successfully so I disconnected all the wires from the Sensibo and then powered it up from just the USB connector. I breathed a sign of relief when the ESPHome Dashboard showed the device was ONLINE and I could look at its logs.

On the reddit post are two main ESPHome configs, one from the original author and then another linked in a comment. I used a mix of both of those to end up with my current configuration:

  name: "bedroom-ac"
  friendly_name: Bedroom AC

  board: esp_wroom_02

# Enable logging

# Enable Home Assistant API
    key: "...."


  ssid: !secret wifi_ssid
  password: !secret wifi_password


# see for more info

# sensibo i2c pins
  sda: 02
  scl: 14
  scan: true
  id: bus_a

  id: ir_tx
  pin: 15
  carrier_duty_percent: 50%

  id: ir_rx
   number: 4
   inverted: true
    input: true
    pullup: true

  - platform: hdc1080
      id: dht_temp
      name: Temperature
      - offset: -2.0  # hdc1080 is reading about 2C above ambient so reduce by this offset
      id: dht_humidity
      name: Humidity
    update_interval: 60s
  - platform: wifi_signal
    name: "WiFi Signal"
    id: wifi_dbm
    update_interval: 60s

  - platform: uptime
    name: "Uptime"
    id: device_uptime
    update_interval: 10s

  - platform: gpio
    id: button
    name: Button
      number: 13
      mode: INPUT_PULLUP
      inverted: true

  - id: light_output
    platform: esp8266_pwm
    frequency: 1000 Hz
    pin: 12

  - platform: status_led
    name: LED
    id: led
    output: light_output

  - platform: fujitsu_general
    id: controller
    name: Controller
    receiver_id: ir_rx
    transmitter_id: ir_tx
    sensor: dht_temp
    supports_cool: true
    supports_heat: true
      - lambda: |-
          if (x.mode != CLIMATE_MODE_OFF) {
            auto call = id(led).turn_on();
          } else {
            auto call = id(led).turn_off();

One big difference was that I used friendlyname and that I configured the LED to be on when the climate platform is also on and also be the statusled. The button currently has no action (I need to drill out the case and extend the physical button so it can be used) and I also like having uptime and wifi diagnostics.

With one device converted for use in my bedroom, I then repeated the process for the one in my study.

Tagged with: , ,

Removing the cloud from a Sensibo Sky

Sunday, February 25th, 2024 at 10:21pm

In addition to thinking about a housing for my dishwasher panel I have been looking into a housing for my AC controllers which currently look like:

(yes I know I should have cleaned off the dust before taking the photo, but that was a quick photo taken for a talk at work)

What could the housing be? Do I base it around another wall plate? Do I get a wall mounted project box? Do I buy my first 3d printer?

After my experience with the dishwasher panel I also realised that as this is based on ESPHome, so I could add an indicator LED (red for heating, blue for cooling?) and a button (to quickly switch between a standard preset such as 24°C cooling and turning it off). These would also need to be incorporated into the housing.

In my looking around I found that the housing I wanted does exist, in the form of the Sensibo Sky. While there is Home Assistant integration I prefer a non-cloud solution and I already had that up and running.

I don’t know exactly how I came across it but I found a reddit thread showing how the Sensibo Sky is based on an ESP and had instructions on how to flash ESPHome onto it. This was an intriguing idea, but I wasn’t going to buy two Sensibo Sky units just to reflash them.

But there is eBay and Gumtree

(yes, it is always appropriate to spend 20 minutes watching Randy describe buying a bookshelf on Gumtree, 46:25 into Randy Writes a Novel)

eBay was no help, but on Gumtree I found something. While I was looking for used or broken units, what I found was someone not that far away selling two unused units for less than the price of a single unit. Sold! I picked them up the next day and thanks to the reddit instructions (I will make a separate post with my full steps) I was able to flash them with ESPHome.

A bit of reconfiguring within Home Assistant and these are now my AC controllers. I even have them mounted to the wall so they don’t take up desk or bedside table space.

While the built in LED is only blue I did configure it to indicate if the AC was currently on and I think I have a plan for the button. Normally this button is used to reset the Sensibo Sky to factory defaults which means that you use a pin through a small hole in the casing, but I think I could drill out that hole and then glue an extension onto the button, giving me the shortcut action trigger.

Could I go further with some of the pins that are exposed. Is is possible to replace or supplement the LED with an RGB version? Could I mount a button on the face of the unit instead of the side? These are all options opened up by the flexibility of running ESPHome ;)

Another idea relates to some issues I have been having the chromecast speaker I use as my alarm clock and the fact that I now have an IR blaster in my bedroom…

Tagged with: , ,