Turning a Tuya device into a Bluetooth Proxy

A Tuya IR and RF bridge that has been flashed with new firmware using tuya-cloudconverter and can now act as a Bluetooth Proxy

A couple of years back, I bought an M5Stack Atom Lite to act as a Bluetooth Proxy for Home Assistant. Last month, an update to the ESPHome firmware meant that more devices could become a Bluetooth Proxy, including Tuya devices, and so I’ve now got another Bluetooth Proxy in my home.

The device in question is a Tuya Infrared and RF bridge, which I bought cheaply from AliExpress. This runs on a Beken BK7231N chip, which I’ve been running ESPHome on for some time having used Tuya-Cloudcutter to flash it. Since April, it has been running as an Infrared proxy in Home Assistant, but as yet I haven’t got it working as an RF proxy. Although, to be fair, I haven’t got any RF devices that I need to bridge into Home Assistant, so it’s not a priority.

BLE on more chips

Bluetooth Low Energy (BLE) hasn’t been supported by ESPHome on Beken devices until last month’s update. Indeed, back in January, BLE was fully removed from ESPHome on these devices to save RAM and storage, as it didn’t work at the time. So this is quite the turnaround.

It’s not just Beken chips that have gained BLE support. By making BLE in ESPHome generic, devices with Raspberry Pi Pico and Lightning LN882H chips can also become a Bluetooth Proxy as well, making it available across most of the chips supported by ESPHome.

Better Bluetooth Proxy performance

Something else that’s worth noting about ESPHome’s Bluetooth Proxy support is that there has been a lot of optimisation work over the years. When I first set up my m5Stack Atom Lite two years ago, if you tried to add anything else in ESPHome to the device, such as a web server, you would get a warning when compiling the firmware. This is despite the Atom Lite having an ESP32 chip, which is amongst the more powerful chips that ESPHome supports.

That’s not a problem nowadays, and so an ESPHome device can comfortably act as a Bluetooth Proxy and something else. That means my device can be both an Infrared Proxy and a Bluetooth Proxy – and potentially an RF Proxy as well if I get that working. That means it’ll be capable of doing more with the ESPHome firmware than with the stock Tuya firmware that it came with, as well as no longer being reliant on the cloud.

The Bluetooth Proxy YAML code

If you use a recent version of the ESPHome Device Builder, then you just need to add these Components to your device:

  • Bluetooth Proxy
  • BK72xx Bluetooth Low Energy Tracker Hub
  • BK72xx Bluetooth Low Energy

That’s it – you don’t even need to set any Advanced Settings as the defaults will work fine. However, if you’re old school and want the YAML code, here it is:

bluetooth_proxy:

bk72xx_ble_tracker:

bk72xx_ble:

Then all you need to do is recompile your device firmware, and once it has restarted, Home Assistant should recognise it as a Bluetooth Proxy.

I’ll be keeping my m5Stack Atom Lite for now, but having a second Bluetooth Proxy at home means wider coverage of the house. I may even be able to do things like track the approximate location of BLE devices, based on which proxy/dongle they are closest to. And it’s great to be able to take an existing device that I already own, and give it new features.

Theoretically, if you have other Tuya devices like smart light bulbs with a Beken chip, and can use Tuya-Cloudcutter to get ESPHome onto them, then you could also make these act as a Bluetooth Proxy as well as being a light bulb. It certainly opens up some interesting possibilities.

A return visit to the People’s History Museum

A banner stating 'Murdoch is Bad News' encouraging people to boycott The Sun and The Times, at the People's History Museum in Manchester

Between returning from Wales, and our ten-year-old starting four weeks at summer holiday club, we had a fallow week where Christine and I took turns to look after them during the daytime. So, I took them for their first visit to the People’s History Museum in Manchester.

Christine and I have been before, back in 2013 before we got married, but neither of us have been since. The People’s History Museum was also in the news in June, as Andy Burnham, then newly-elected as the MP for Makerfield, essentially set out his vision for becoming Prime Minister. By the time we visited, he had indeed become Prime Minister.

Compared to 2013, the two main galleries remain similar. What has changed is the addition of some overlays, which give the experiences of recent migrants to the UK in relevant places. As part of my work in higher education, I found the section about migrants trying to get their professional qualifications recognised particularly interesting. Overall, the museum remains a very left-wing view of British history, with particular focus on the Labour Party, trade unions and the changing legislation to give different groups of people the vote. It’s a reminder of how far we have progressed over the years.

100 Years of Strikes and Solidarity

The current exhibition at the People’s History Museum is 100 Years of Strikes and Solidarity, which marks the 100th anniversary of the 1926 General Strike. As you would expect, the Miner’s Strike is a major focus but it includes more recent industrial action such as the Resident Doctors’ strikes and walkouts by Amazon workers. Indeed, until the end of this month, there’s a build-a-bot activity for kids where they can make their own paper model of a robot costume used by Amazon strikers that is on display in the exhibition.

Accessibility

The People’s History Museum is a model of good practice when it comes to accessibility, with lift access to all floors, more than one disabled toilet (offering a choice of left- or right-side transfer) and a Changing Places toilet. There are also Braille and large print guides to borrow and sensory packs.

It’s in Manchester city centre; we arrived by train and it was simply a case of walking out the main entrance to Manchester Victoria station and then following the River Irwell until we reached the museum, which took 15-20 minutes. It’s also not far from Manchester Piccadilly station either. I personally wouldn’t park in Manchester city centre and would instead recommend Park and Ride.

Entry to the museum is free, but a £10 donation is encouraged. There is free Wi-Fi if you ask for the password at reception, and there’s a café and gift shop.

Sliding into September

We’re into the final third of the year. As I work at a university, September is a busy month as new students arrive to enrol and returning students come back after the long summer break, so campus is going to be busy again after a quiet few months. This month also sees my employer adopting a consistent hybrid working policy at long last, which means I’ll be working three days a week in the office from now on. Previously it was just two days a week in the office, but there were times when I would work an additional day in the office and so I’m not too fussed about the change.

I’m also off to visit one of the universities in Leeds this month for a meeting, as part of a collaborative project that I’m involved in across several northern universities. We normally meet online, so it’ll be the first time I’ve met some of these people in person, which is nice.

Schools

Our ten-year-old goes back to school this week, to start their final year at primary school. They’ve put on a growth spurt recently and so we’ve had to buy all new school uniform in recent weeks, even though they’ll only need it for a year.

In the coming weeks, we’ll be heading along to open evenings at the local secondary schools. Whilst all three of us are pretty sure which school will be their first choice, we’ll investigate the alternatives as well. The application has to be submitted by the end of next month, and then we find out the outcome in March next year.

Railcards and birthdays

My disabled person’s railcard is up for renewal this month; I’m hoping the renewal process is straightforward and I won’t have to provide evidence that my hearing hasn’t somehow magically improved. That being said, the fact that I have an epilepsy diagnosis and have been deemed medically unfit to drive are also valid eligibility criteria. I’ll be purchasing a three year railcard, as over three years it’s cheaper than a standard annual railcard. And as I can use it for commuting, it saves me quite a bit of money – especially with me being in the office more often now.

Christine has her birthday next week; as with last year, it’s not a round number, but we both have the day off work and so will probably go somewhere for a nice lunch.

Bathroom renovation

Following our new kitchen in 2022, the next big renovation project on our house is our upstairs bathroom. Work probably won’t start this month, but we have had the majority of the new bathroom furniture delivered. Indeed, there is currently a brand new bath sat in its packaging in our living room, and we had to move half a tonne of tiles into the house last week. I’ll post more when work starts; most likely in November but we’ll see.

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.