15

I have a number of Philips Hue bulbs at home, but they are only used pretty much like classic on/off-no-color light bulbs today, mainly because I do find electric switches more useful than pulling out my iPhone or correct HueTap just to turn the light on/off. - Every time the Hue bulb is switch off, it forgets its state and always comes back on at 100% brightness in white color.

After lots of googling (and not finding any solutions) I wonder whether I am missing the point and why others do not have this problem.

I am certainly not keen on doing software or even hardware work here, but if I had a reasonable idea I'd love to evaluate such path:

  • is there anything planned from Philips to fix this? The last firmware update did not help and Philips product support explained that this is not a bug, it is just the way it is designed.
  • any new "stateful" bulbs?
  • any work-arounds like patched / custom bulb or bridge firmware?
  • any recommendation on how to tackle this problem?
  • Assuming the Hue bulbs themselves do not have any memory installed, I guess they always switch on at 100% brightness and then register with the bridge? And this would be the earliest possible moment to restore the previous state?
  • Can this problem be solved using Hue SDK? (how long does it take for a turned on bulb to be controllable by the Hue Bridge? What is the quickest way for a Java program to get notified of a bulb being electrically turned on?)
  • any chance to get the previous state restored in a quicker way if using some ZigBee protocol/techniques directly?

Any hints are much appreciated.

Best regards, Christian

4

1 回答 1

11

我同意没有保留灯泡的最后状态可能会令人恼火。Hue 的开发者网站上有一个线程,它提供了一些见解:

  • 显然,有关于这个话题的内部讨论。由于“安全原因” ,飞利浦的团队犹豫是否要恢复之前的状态:如果用户使用电气开关,但之前的状态是“关闭”,她可能会被蒙在鼓里。这一观点已在一条推文中得到重申。话题中还没有明确的结论。
  • 您可以采取一种变通方法并连续记录每个灯泡的状态,并在必要时进行恢复。GitHub 上有一个Node.JS 脚本似乎就是这样做的。如果您想将其作为独立解决方案运行,请购买 Raspberry Pi(或类似产品)。

基于 SDK 的解决方案的一个问题是延迟:在我的设置中,识别灯泡打开需要 3-9 秒,识别灯泡关闭需要大约 20-30 秒。

这是我使用python-hue-client监控灯泡可达性的 Python 代码:

from hueclient.api import hue_api
from hueclient.models.light import Light
from datetime import datetime
from subprocess import call


if __name__ == '__main__':
    my_ids = (1, 4, 5) # IDs of my light bulbs

    def handle(resource, field, previous, current):
        print "{} {}: changed reachability from {} to {}".format(datetime.now().isoformat(), resource.name, previous, current)

    hue_api.authenticate_interactive(app_name='test-app')

    # register my light bulbs
    for id in my_ids:
        light = Light.objects.get(id=id)
        print "{}: reachability is {}".format(light.name, light.state.reachable)
        # Monitor only the reachability of the light
        light.monitor(field=lambda l: l.state.reachable, callback=handle, poll_interval=0.1)

    print("Starting monitoring. Control-c to exit.")

    # Start the monitoring loop
    hue_api.start_monitor_loop()
于 2015-10-24T21:44:27.783 回答