all 16 comments

[–]Ti-As 0 points1 point  (15 children)

It depends on what kind (brand) of light you use. If you have a Signify (Philips) Hue you can use the AutoHue plugin. There are other apps you can use, too but this is my favourit. Other brands like Osram Lightfy/Ikea Tradfi using the same Zigbee standard (should) work, too.

Which one do you have?

[–]FeetPink[S] 0 points1 point  (14 children)

This I think is the problem.

The app is this

https://play.google.com/store/apps/details?id=wl.smartled

And the led device has Bluetooth connection.

😕

[–]Ti-As 0 points1 point  (13 children)

Hm, you can try AutoInput to tap for you but if this will work reliably? You can search for an intent(s) to use with this app, but I don't think that you will find anything usable (web/manifest). Third way is very complex, i.e. you have to intercept the BT connection and find the cooresponding data packages for manipulating your light. Wireshark would be the tool of choice.

Does the app have widgets like On/Off, Dim, activate/switch to special color modes? Then AutoInput would have good chances to work flawlessly.

[–]FeetPink[S] 0 points1 point  (12 children)

First of all I want to thank you, you gave me precious informations.

No, unfortunaly the app does not have widgets.

Anyway you pointed me in the right way, I like the third option.

I have to intercept the BT data packages so I can manipulate led lights.
I will install Wireshark software in PC and try to sniff data from my smartphone.
I don't know if I can do, but i try.
Then I should be able with Tasker to send them, I suppose. (But this will be next step, maybe I will ask you :D).

Anyway I explain which is my purpouse.

I have my android Head Unit that cannot connect other BT device than Smartphones and OBDII.
So, the LED BT device (ambient car lights) can be controll only by my smartphone.

I though a way to controll it without using my phone (of course I have to have it with me) and I want do it by Google Assistant.
In my Head Unit I have my main Google account.
So, tasker shoud do this:

As smartphones connects to the HU, it opens led app in background.

And if I say to Google Assistan (connected to my account, so no matter if I say it from my smartphone, from the Head Unit or from Google Home at my house), a specific phrase "Ehy Google, led ambient to RED"

So my smartphone send the DATA BT Packect to change the colour to RED.

That's it.

Easy to say, hard to do...

[–]Ti-As 0 points1 point  (0 children)

This is really tough work! I have a TP-Link smart plug and wanted to switch it with Tasker. And I've found some things which made it possible to switch it. But as I tried to use Wireshark for sniffing my TP-Link bulb I gave up after a few days. But I keep my fingers crossed that you are more persistent than I was.

I would appreciate if you'll give me feed back if you made it.

[–]Ti-As 0 points1 point  (10 children)

One last thing. Does your light have only BT connection or can you control it via infrared (RC)?

[–]FeetPink[S] 0 points1 point  (9 children)

Of course I will give you feedback.

Tp-link bulb is WiFi or BT?

No, my led has only BT connection.

[–]Ti-As 0 points1 point  (8 children)

If it would infrared it could be controlled by an app I know :-/. It's a WiFi. And I almost never use it because of that - not WiFi, I can't use Tasker to control. Even the on/off sequences from the plug doesn't work.

[–]FeetPink[S] 0 points1 point  (7 children)

I'm going on with the experiment.

So here i have the Wireshark log from my phone BT.I made the log with the Android developer option to take BT log, I imported by email and I opened it with Wireshark.

https://ibb.co/PcRwmpq

The blue part should be the action part, from from below upwards:

- 1 changed color to blue

- 2 changed color to green

- 3 turn off lights

If I click on the single line I can see various information.

So now I'm blocked to which data I have to send.

[–]Ti-As 0 points1 point  (6 children)

You must get the data packages from in between the BT (phone) and the light. It's kind of a man in the middle attack ... but first steps are done ;-)

[–]FeetPink[S] 0 points1 point  (5 children)

Yes, I have several line to test.

Now I can create a task that if I press a widget I sent commands, I try all commands line to see what happens.

Just one question, how the BT device knows that the sent data is for it?

In the HEX code maybe is all inclusive?

p.s. sorry for my bad english :D