merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
388 stars 61 forks source link

New Device: Mi Computer Monitor Light Bar #166

Closed Geezle27 closed 2 years ago

Geezle27 commented 2 years ago

Hey @merdok just wanted to say that I really appreciate your plugin. Makes it very easy to get things set up.

Was wondering if it would be possible to add the Mi Computer Monitor Light Bar. I believe it to connect in the same way that the Yeelight Monitor Bar does (actually connect in the Mi app as the Yeelight Monitor Bar. Here is the link to the global description - https://www.mi.com/global/product/mi-computer-monitor-light-bar/

The bar currently works using the default light so it can be turned on and off, but it would be great to be able to adjust the brightness and the colour temperature. I understand you are in the middle of rebuilding the plugin but hoping this can get added in the future.

Thanks again for the plugin.

merdok commented 2 years ago

Hi, from what you said, you already added the lamp to the plugin and right now only On/Off works, right? That means it is definitely a miot device and full support can be added.

I can add support for that device, but like you already know i am currently rebuilding the plugin and my local code base is a big construction site right now 😅 Hopefully after the rebuild is done many devices will work without any additional code, but yeah till then i still have quite some work to do... Anyway, i also highly encourage you to try to add support for the device by yourself and submit a pull request. This process is actually straight forward and pretty simple. Just have a look at some closed pull requests to have an idea what is needed.

merdok commented 2 years ago

Hi, can you tell me the model of your device? If you do not know it then you can use my plugin to retrieve it, else add the device and check the log output or use homebridge-ui.

Geezle27 commented 2 years ago

Hi @merdok The actual model number of the lamp is MJGJD02YL but it is currently connecting to the plugin as yelling.light.lamp22.

It is the second generation light bar https://xiaomipedia.com/en/p/mijia-smart-display-hanging-light-1-s/

As I mentioned it works for on and off but can't control temperature and brightness.

Sorry for not being able to do a pull request. Tried looking at the past examples and couldn't figure it out.

Thanks for all the work.

merdok commented 2 years ago

yelling.light.lamp22 is the one I was looking for! Thanks!

No worries🙂 Will take a couple more weeks till I can release the update so please be patient...

merdok commented 2 years ago

Support is now added in version 1.0.0!