Domi04151309 / HomeApp

HomeApp is a small and easy to use smart home app with a simple framework.
https://f-droid.org/packages/io.github.domi04151309.home/
GNU General Public License v3.0
106 stars 24 forks source link

[Feature Request] Support for Yeelight devices #3

Open slicciardello opened 4 years ago

slicciardello commented 4 years ago

I use several Yeelight devices, they are widely used devices. The proprietary application does not seem very privacy-friendly... It would be really great if they were supported by this application!

There are several repos available on github, maybe some can be useful https://github.com/topics/yeelight

Domi04151309 commented 4 years ago

I found a python script that looks very promising and a Java API that could be useful. The Java API is pretty old but it should be possible to rewrite or implement it.

Domi04151309 commented 4 years ago

Also, a detailed specification can be found on the Yeelight website.

slicciardello commented 4 years ago

I found a python script that looks very promising and a Java API that could be useful. The Java API is pretty old but it should be possible to rewrite or implement it.

Nice, I can try if they work if you can implement them into the application. When you have test builds tell me and I'll try them right away.

My devices where I can test are: Mi Led Desk Lamp Yeelight LED Ceiling Light If there's something I need to do by code, tell me what to do step by step, I'm still not very good at it.

Domi04151309 commented 4 years ago

I have implemented some basic functionality now and would need you to test it. Do you know how to build the application from source using Android Studio?

slicciardello commented 4 years ago

I have implemented some basic functionality now and would need you to test it. Do you know how to build the application from source using Android Studio?

I've never tried, if you show me a guide on how to do it I can try. I use linux

Domi04151309 commented 4 years ago

Long Version

First, you have to install Android Studio and download the source from the yeelight branch. After you have done that you should be able to open the project using Android Studio. There you have to select your device in the top bar and allow debugging from this computer if you haven't done already. Then you can click the "Run" button (green play button) and it should build and install the app.

Short Version

Things That Should Work

slicciardello commented 4 years ago

Long Version

First, you have to install Android Studio and download the source from the yeelight branch. After you have done that you should be able to open the project using Android Studio. There you have to select your device in the top bar and allow debugging from this computer if you haven't done already. Then you can click the "Run" button (green play button) and it should build and install the app.

Short Version

* Install Android Studio

* Clone the yeelight branch

* Open the project in Android Studio

* Connect your device and allow debugging

* Build and install the app

Things That Should Work

* On/Off buttons

* Changing properties after releasing the sliders

Thanks i will try soon

slicciardello commented 4 years ago

Long Version

First, you have to install Android Studio and download the source from the yeelight branch. After you have done that you should be able to open the project using Android Studio. There you have to select your device in the top bar and allow debugging from this computer if you haven't done already. Then you can click the "Run" button (green play button) and it should build and install the app.

Short Version

* Install Android Studio

* Clone the yeelight branch

* Open the project in Android Studio

* Connect your device and allow debugging

* Build and install the app

Things That Should Work

* On/Off buttons

* Changing properties after releasing the sliders

image

Domi04151309 commented 4 years ago

image

https://stackoverflow.com/questions/54273412/failed-to-install-the-following-android-sdk-packages-as-some-licences-have-not

slicciardello commented 4 years ago

image

https://stackoverflow.com/questions/54273412/failed-to-install-the-following-android-sdk-packages-as-some-licences-have-not

Thanks now works. But i tried to add Mi Lamp, it can't connect. image image image image

Domi04151309 commented 4 years ago

Have you tried pressing the buttons and using the sliders?

slicciardello commented 4 years ago

Have you tried pressing the buttons and using the sliders?

yes, they didn't work. It is a connection problem. I must unistall yeelight application first?

Domi04151309 commented 4 years ago

No I think you have to enable a setting in the yeelight app.

slicciardello commented 4 years ago

No I think you have to enable a setting in the yeelight app.

No setting to enable.. Maybe i need to reset lamp, pressing is reset button?

Domi04151309 commented 4 years ago

Maybe the library doesn't work or is misconfigured

slicciardello commented 4 years ago

Maybe the library doesn't work or is misconfigured

Pressing reset button address change?

Domi04151309 commented 4 years ago

Oops accidentally closed the issue.

No I think that the implementation isn't correct.

slicciardello commented 4 years ago

image

It asked me to enable location and bluetooth for paring after resetting the lamp. I think that your implementation is correct for some bulb, but not for newer desk lamp and other. I will try my ceiling when i can mount hit.

slicciardello commented 4 years ago

image

It asked me to enable location and bluetooth for paring after resetting the lamp. I think that your implementation is correct for some bulb, but not for newer desk lamp and other. I will try my ceiling when i can mount hit.

Maybe it need mac adress and not ip adress?

Domi04151309 commented 4 years ago

It needs the IP address

slicciardello commented 4 years ago

It needs the IP address

Ok, let me know when there's any news

trmendes commented 1 year ago

I'm trying this branch but it does not connect to the device.

Domi04151309 commented 1 year ago

That's because the implementation is incorrect. It doesn't work yet.

trmendes commented 1 year ago

I see. Thanks. Please let me know in case you need any help with testing