Automatic timer to switch TV on and off (via Bluetooth)

Hi,
I am looking into the idea to use an arduino as a timer for our Xiaomi Mi TV Q1 to turn them on and off.
We want to use these TV as information screens in our school, but the problem is, that the TVs only have a timer to turn them off.
So my idea is, to use an arduino which sends every morning a signal to turn the TV on, and in the afternoon a Signal to turn them off again. The problem is, that they have a bluetooth remote control, and not an IR, which would be relatively easy to construct.

So my question is, if you have an idea if this would be possible and what would be the smartest way to start.

Thanks a lot for your help,
Achim

Do you know exactly what commands need to be sent to the TV ? If so, then it is possible to send the commands using Bluetooth

Is the TV really going to be turned off or will it just be entering standby and thus able to receive the commands ?

Hello
Use a timer switch from next local dealer for electrics.

No, unluckily I don't know the commands. Can the commands as easily be recorded and replayed as with a normal IR?

Ideally, the TV will be turned off aditionally to save the standby consumption, but this is not as important. And the TV is also back to standby, when it is cut from the power consumption and the power is turned back on. The problem is, that either way, with or without power cut, the TV is in standby and needs to be turned on automatically every morning. Therefore my hope is, to use an arduino to send the turn on command via bluetooth.

Hi,
that was also my first thought, but the problem is, that it stays then in standby. And I could not find any Android TV app, which can work from the standby to turn the TV on.

Yes, you could use the Arduino to receive the commands from the remote control and print them to put into your sketch

Before you go any further you need to define your requirements with respect to power control. Unless you are going to leave the TVs on standby when "off" then things are going to get very complicated

How many TVs are you aiming to control and will they each have their own dedicated Arduino or are you aiming to control several with the sane Arduino ?

That sounds good.
We will leave it standby - the total shutdown is really just an extra add on, as the most important thing is to turn it on and off.

We will have 5 TV in 5 different locations spread out over two bulidings, so that we need in the end 5 seperate arduinos to control all the different TVs.

That's possible, but not trivial. Since the communication is by BLE, you'll have to first sniff the pairing sequence and then assuming they don't change the keys (they probably won't), then sniff the communications as you press the ON/OFF button.

It's doable, but ISTR that it can be a frustrating procedure. I haven't done it, but working at a company that made a lot of BLE devices, I remember a co-worker trying this and it was a royal pain in the a**

Yes much better than using the insane Arduinos.

There was a similar project I was working on as part of a team, but the TV on and off was being done by someone else. I warned against this problem but was told that the person had tested it all. Turned out he had not tested it enough and there were problems with getting out of standby when the power returned, and even then the powering down removed the power saving settings set to ignore the power down feature when no input was received from the remote in three hours.

That was an IR remote and they were generating that in software. In the end the programming of the wake up sequence was a lot more complex than just the odd command.

So whatever solution you come up with make sure you test it for at least a week and two weekends before hoisting the TVs 40 ft in the air.

Do we actually know that ?

I don't know, what kind of bluetooth standard the TV is using. But it communicates with the supplied remote control with bluetooth.

If you have an Arduino and a Bluetooth module then rig up a test to see whether you receive anything

Do you have a hint for a good bluetooth module and corresponding arduino?

And do you have by any chance a good link for a script for recording, sending and coupling bluetooth.

I have to figure out, what kind of boards we already have in school.

Thanks a lot for all your quick responses and help.

Any Arduino will allow you to run the test. If you have an ESP32 then you will not need an external module for the test

As to a Bluetooth module, you could use an HC05 or HC06 either of which will communicate with the Arduino via a serial link

Once you know whether you can read the signals from the remote control and make sense of them you may want to review your hardware requirements to meet your needs going forward

If you cannot read and understand the signals with standard Bluetooth then I am afraid that I can offer no further help

As to a sketch to read the signals from the remote, first find out what hardware you have and let us know

Unfortunately we don't because people use the terms Bluetooth and BLE interchangeably even though they are completely different. These days when I hear "Bluetooth" I assume BLE: "Bluetooth Low Energy."

First you need to determine if your remote uses Classic Bluetooth or Bluetooth Low Energy (BLE). If it's BLE, see the links I posted previously on how to intercept a signal. If it's Classic, then an HC05 is probably enough.

Edit. The TV uses Bluetooth 5 which is a version of BLE. Good luck!!!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.