homebridge-mi-philips-light icon indicating copy to clipboard operation
homebridge-mi-philips-light copied to clipboard

TableLamp2

Open acc-ua opened this issue 6 years ago • 25 comments

Thanks for your time doing the plugin. Waiting for the next update to make TableLamp2 working as well.

acc-ua avatar Sep 13 '17 12:09 acc-ua

This is a gewag plug-in, i really hope you can update it with the table lamp 2 support! And idea when you can fix this ? I am really gratefull for all your efforts!

hwgverbeek avatar Oct 09 '17 19:10 hwgverbeek

I have plans to develop it, But I don't have this device, so I haven't developed it yet. I bought a second-hand one the day before yesterday, but the seller hasn't shipped it yet. So it should be come soon.

YinHangCode avatar Oct 10 '17 06:10 YinHangCode

Really cool :) Thank you for your reply and effort.

Best regards Harm

Op 10 okt. 2017 om 08:09 heeft Mr.Yin <[email protected]mailto:[email protected]> het volgende geschreven:

I have plans to develop it, But I don't have this device, so I haven't developed it yet. I bought a second-hand one the day before yesterday, but the seller hasn't shipped it yet. So it should be come soon.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/YinHangCode/homebridge-mi-philips-light/issues/1#issuecomment-335370670, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfI57pAAfe4no_25hBu-cGW5cEkMX676ks5sqwn6gaJpZM4PWDNR.

hwgverbeek avatar Oct 10 '17 06:10 hwgverbeek

Actually, Philips Eyecare lamp works with SmartBulb interface as well. But of course, it has no Eyecare level/Ambient light properties and Brightness doesn't work for it. This is strange since Brightness is defined as valid property in https://github.com/aholstenson/miio/blob/master/lib/devices/eyecare-lamp2.js

acc-ua avatar Oct 10 '17 08:10 acc-ua

Hmm, is there a solution possible you think ?

Best regards Harm

Op 10 okt. 2017 om 10:25 heeft acc-ua <[email protected]mailto:[email protected]> het volgende geschreven:

Actually, Philips Eyecare lamp works with SmartBulb interface as well. But of course, it has no Eyecare level/Ambient light properties and Brightness doesn't work for it. This is strange since Brightness is defined as valid property in https://github.com/aholstenson/miio/blob/master/lib/devices/eyecare-lamp2.js

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/YinHangCode/homebridge-mi-philips-light/issues/1#issuecomment-335398789, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfI57vBuDWLxbynBm_d6DJBdR6KgikXUks5sqynYgaJpZM4PWDNR.

hwgverbeek avatar Oct 10 '17 09:10 hwgverbeek

well, you can turn on/off using Smartbulb interface at the moment.

But, for other functions we probably will need to wait for plugin update.

I planned to add some code, but stucked with some HomeKit specific issues and have no time to figure out how to implement everything correctly.

acc-ua avatar Oct 10 '17 19:10 acc-ua

I tested the tablelamp2 under lightbulb mode, funny enough it gives an error when you want to change the brightness, but it does work. It says error, but it does exactely as you want. I really hope you can fix it later on, would be awesome for this cool lamp.

hwgverbeek avatar Oct 11 '17 09:10 hwgverbeek

@acc-ua @hwgverbeek updated 0.1.0, add support for Philips Table Lamp 2.

YinHangCode avatar Oct 12 '17 15:10 YinHangCode

fantastic, thanks a lot!

acc-ua avatar Oct 12 '17 16:10 acc-ua

I tried it out, it doesnt seem to work yet

"platforms": [

{
    "platform": "MiPhilipsLightPlatform",
    "type": "TableLamp2",
    "ip": "192.168.01.36",
    "token": "the correct one",
    "lightName": "Bureaulamp",
    "secondLightName": "Burealamp achter",
    "secondLightDisable": false
 },

I only added this because i dont own a normal bulb just tablelamp2 what is going wrong ?

hwgverbeek avatar Oct 12 '17 17:10 hwgverbeek

@hwgverbeek

"platforms": [{
    "platform": "MiPhilipsLightPlatform",
    "deviceCfgs": [{
        "type": "TableLamp2",
        "ip": "192.168.1.36",
        "token": "ur token",
        "mainLightName": "Bureaulamp",
        "secondLightName": "Burealamp achter",
        "secondLightDisable": false
    }]
}]

YinHangCode avatar Oct 12 '17 17:10 YinHangCode

"platforms": [

{
    "platform": "MiPhilipsLightPlatform",
    "deviceCfgs": [{
    "type": "TableLamp2",
    "ip": "192.168.01.36",
    "token": "9e3ef6894ef0395706bef3dfb7efb66a",
    "mainLightName": "Bureaulamp",
    "mainLightDisable": false,
    "secondLightName": "Burealamp achter",
    "secondLightDisable": false
    }]

}]

No mainLightDisable line needed ? It seems it is hard to control the brightness of the 2 lamps individually, perhabs that is an option for the future together with eyecare ?

It works btw, dont know what the effect is of mainLightDisable added or not?

hwgverbeek avatar Oct 12 '17 17:10 hwgverbeek

Just tested the plugin - works fine. Thanks again.

mainLightDisable or lightDisable seems to be unused, but secondLightDisable works correctly.

acc-ua avatar Oct 12 '17 18:10 acc-ua

@acc-ua @hwgverbeek
it's not need mainLightDisable or lightDisable, mainLight must enable, because of secondLight can't control all the lights. mainLight swtich almost equal to 1 in the following picture. secondLight swtich almost equal to 2 in the following picture. mainLight brightness almost equal to 3 in the following picture. secondLight brightness almost equal to 4 in the following picture.

1

2

3

YinHangCode avatar Oct 13 '17 03:10 YinHangCode

Thank you for your feedback!, is it possible to make a switch 3 for the eyecare ? Perhabs you can set the example

{ "platform": "MiPhilipsLightPlatform", "deviceCfgs": [{ "type": "TableLamp2", "ip": "192.168.01.36", "token": "9e3ef6894ef0395706bef3dfb7efb66a", "mainLightName": "Bureaulamp", "mainLightDisable": false, "secondLightName": "Burealamp achter", "secondLightDisable": false }]

on the frontpage as an extra for those who dont have xaomi lightbulbs ? I am really gratefull you found the time to fix and support this!

hwgverbeek avatar Oct 13 '17 04:10 hwgverbeek

@hwgverbeek updated 0.1.1, add Philips Table Lamp 2 eyecare mode switch accessory.

YinHangCode avatar Oct 13 '17 16:10 YinHangCode

Eyecare mode works good. Just curious, are there any ways to group such switches into a single one with HomeKit?

acc-ua avatar Oct 13 '17 17:10 acc-ua

It works really well, thank you for such fast implementing this, great work! It works perfectly, now it is possible to use it also with iftt or other homekit accessoiries!

I only find a problem with siri, i seem to only give a command targeted at the whole lamp instead of the different sub-switches. Is there anything what can be done to solve this?

hwgverbeek avatar Oct 13 '17 18:10 hwgverbeek

unfortunally with the new version i get [MiPhilipsLightPlatform][ERROR]TableLamp2 - MainLight - setPower Error: Error: Call to device timed out You have any idea what the problem might be ?

hwgverbeek avatar Nov 03 '17 07:11 hwgverbeek

@hwgverbeek make sure ur ip and token is right.

YinHangCode avatar Nov 03 '17 07:11 YinHangCode

both are right, i double checked

hwgverbeek avatar Nov 03 '17 07:11 hwgverbeek

hmmm strange sorry, somehow the token got different without me resetting or doing anything. Tried to find it again with discover. thx for your help

hwgverbeek avatar Nov 03 '17 07:11 hwgverbeek

@hwgverbeek
you can try use miio2.db get token. Get MiIo Tokens By DataBase File

YinHangCode avatar Nov 03 '17 09:11 YinHangCode

Hi!

I have a problem. My TableLamp2 its working but now don't work and I don't change they token. I can see the same error of @hwgverbeek

[MiPhilipsLightPlatform][ERROR]TableLamp2 - MainLight - setPower Error: Error: Call to device timed out

I extract the file miio2.db from an Android unlocked device and test with Get MiIo Tokens By DataBase File. The token its the same on past. I don't know why not working.

My config.json its this:

{
     "platform": "MiPhilipsLightPlatform",
     "deviceCfgs": [{
         "type": "MiPhilipsSmartBulb",
         "ip": "192.168.1.122",
         "token": "06f5510636b05b32d6279f9d2ad2c74f",
         "lightName": "Bombilla del salon",
         "lightDisable": false
     }, {
         "type": "MiPhilipsTableLamp2",
         "ip": "192.168.1.109",
         "token": "7069734fd6f1684fcfffa3e694b4ff49",
         "mainLightName": "living room table lamp",
         "secondLightName": "living room table lamp amb",
         "secondLightDisable": false,
         "eyecareSwitchName": "living room table lamp eyecare model",
         "eyecareSwitchDisable": false
     }]
   }

I clear the cache, delete my house on iOS App Home and add it again all devices and still not work. Others devices like MiPhilipsSmartBulb works perfectly. The IP its right too.

Have you got any ideas? I hope yours news

Thanks in advance!

Regards! Jose Manuel

jmramirezpro avatar Jan 23 '18 08:01 jmramirezpro

@YinHangCode Have you got any idea of my problem? Thanks!!

jmramirezpro avatar Jan 25 '18 10:01 jmramirezpro