home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.41k stars 29.9k forks source link

Limitless LED Not responding #1459

Closed matthewcky2k closed 7 years ago

matthewcky2k commented 8 years ago

Home Assistant release (hass --version): 14.2

Python release (python3 --version): 3.4.4

Component/platform: Limitlessled

Description of problem: Platform no longer responds to changes/commands in HA to certain groups Bulbs still respond with their own APP

Expected: All groups to be controlled as expected log shows no limitless LED pipeline events after commands sent in HA ( see log snippet below) 16-03-01 22:00:00 limitlessled.pipeline: Starting a new pipeline on group 2 (Bedroom) @ 192.168.0.36 16-03-01 22:00:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-125> 16-03-01 22:00:00 limitlessled.pipeline: -> Running stage 'on()' on group 2 (Bedroom) @ 192.168.0.36 16-03-01 22:00:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-124> 16-03-01 22:00:01 limitlessled.pipeline: -> Running stage 'white()' on group 2 (Bedroom) @ 16-03-01 22:00:01 limitlessled.pipeline: -> Running stage 'transition(0, brightness=1.0, color=Color(R=255, G=255, B=255))' on group 2 (Bedroom) @ 192.168.0.36 16-03-01 22:00:02 limitlessled.pipeline: Finished pipeline on group 2 (Bedroom) @ 192.168.0.36

Problem-relevant configuration.yaml entries and steps to reproduce:

light:
  platform: limitlessled
  bridges:
    - host: 192.168.0.36
      version: 5
      port: 8899
      groups:
      - number: 1
        type: rgbw
        name: Living Room
      - number: 1
        type: white
        name: Dinning Room
      - number: 2
        type: rgbw
        name: Bedroom
      - number: 3
        type: rgbw
        name: Man Cave
      - number: 2
        type: white
        name: Porch
      - number: 3
        type: white
        name: Rear Porch
script:
 bedroomwakeup:
    alias: bedroom light on wakeup
    sequence:
      - alias: bedroom light on low
        service: light.turn_on
        data:
          entity_id: light.bedroom
          brightness: 1
          rgb_color: [255,255,255]
      - alias: bedroom light on bright
        service: light.turn_on
        data:
          entity_id: light.bedroom
          brightness: 255
          rgb_color: [255,255,255]
          transition: 360
      - delay:
          # supports seconds, milliseconds, minutes, hours, etc.
          minutes: 15
      - alias: Bedroom transition Off
        service: light.turn_on
        data:
          entity_id: light.bedroom
          brightness: 120
          rgb_color: [255,255,255]
          transition: 120
scene:
  - name: Bedroom Normal
    entities:
        light.bedroom:
            state: on
            transition: 2
            brightness: 120
            rgb_color: [255,255,255]
  - name: Bedroom Playing media
    entities:
        light.bedroom:
            state: on
            transition: 2
            brightness: 20
            rgb_color: [255,255,255]

Seems to be random sometimes it works fine othertimes it does not

Traceback (if applicable):

Additional info: log entry with no limitless pipeline events.

16-03-02 07:30:00 homeassistant.components.automation: Executing bedroom light on at 7:30 16-03-02 07:30:00 homeassistant.components.device_tracker.fritz: Scanning 16-03-02 07:30:00 requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.63 16-03-02 07:30:00 requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.65 16-03-02 07:30:00 requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.64 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event logbook_entry[L]: name=bedroom light on at 7:30, domain=automation, message=has been triggered> 16-03-02 07:30:00 requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.254 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event call_service[L]: domain=homeassistant, service_data=entity_id=['script.bedroomwakeup'], service_call_id=55456040-140, service=turn_on> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event call_service[L]: domain=script, service_data=entity_id=['script.bedroomwakeup'], service_call_id=55456040-141, service=turn_on> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event call_service[L]: domain=script, service_data=None, service_call_id=55456040-142, service=bedroomwakeup> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-141> 16-03-02 07:30:00 homeassistant.components.script: Executing script bedroom light on wakeup 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-140> 16-03-02 07:30:00 homeassistant.components.script: Executing script bedroom light on wakeup step bedroom light on low 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event call_service[L]: domain=light, service_data=entity_id=light.bedroom, brightness=1, rgb_color=[255, 255, 255], service_call_id=55456040-143, service=turn_on> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=light.bedroom, old_state=<state light.bedroom=off; friendly_name=Bedroom @ 23:05:00 01-03-2016>, new_state=<state light.bedroom=on; brightness=1, friendly_name=Bedroom, rgb_color=[255, 255, 255] @ 07:30:00 02-03-2016>> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-143> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=group.all_lights, old_state=<state group.all_lights=off; entity_id=('light.living_room', 'light.rear_porch', 'light.man_cave', 'light.bedroom', 'light.dinning_room', 'light.porch'), auto=True, order=1, hidden=True, friendly_name=all lights @ 23:05:00 01-03-2016>, new_state=<state group.all_lights=on; entity_id=('light.living_room', 'light.rear_porch', 'light.man_cave', 'light.bedroom', 'light.dinning_room', 'light.porch'), auto=True, order=1, hidden=True, friendly_name=all lights @ 07:30:00 02-03-2016>> 16-03-02 07:30:00 homeassistant.components.script: Executing script bedroom light on wakeup step bedroom light on low 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event call_service[L]: domain=light, service_data=entity_id=light.bedroom, brightness=255, transition=360, rgb_color=[255, 255, 255], service_call_id=55456040-144, service=turn_on> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=light.bedroom, old_state=<state light.bedroom=on; brightness=1, friendly_name=Bedroom, rgb_color=[255, 255, 255] @ 07:30:00 02-03-2016>, new_state=<state light.bedroom=on; brightness=255, friendly_name=Bedroom, rgb_color=[255, 255, 255] @ 07:30:00 02-03-2016>> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-144> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event state_changed[L]: entity_id=script.bedroomwakeup, old_state=<state script.bedroomwakeup=off; friendly_name=bedroom light on wakeup, can_cancel=False, hidden=True @ 17:56:47 01-03-2016>, new_state=<state script.bedroomwakeup=on; friendly_name=bedroom light on wakeup, can_cancel=False, last_action=bedroom light on low, hidden=True @ 07:30:00 02-03-2016>> 16-03-02 07:30:00 homeassistant.core: Bus:Handling <Event service_executed[L]: service_call_id=55456040-142> 16-03-02 07:30:00 requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): 192.168.0.254

happyleavesaoc commented 8 years ago

Related to https://github.com/balloob/home-assistant/issues/1409

matthewcky2k commented 8 years ago

Anyone have an idea what the problem is here? The issue persists until I restart HA.

happyleavesaoc commented 8 years ago

Try disabling your transitions as a quick fix.

matthewcky2k commented 8 years ago

It seems to behave better now without transitions but i would like to get this fixed. The odd thing is HA doesn't throw up any errors related to the pipeline they simply don't appear in the log after the event/new state? At some point i'm sure I have seen a 'division by zero error' related to limitless module but I can't find it now..

PhyberApex commented 8 years ago

This issue still persists. I'll try disabling transitions but this should be addressed. I'd like to help out finding the cause for this. If there's anything you need for information let me know.

matthewcky2k commented 8 years ago

Indeed unfortunately I dont have the knowledge to fix this myself. But I can provide whatever logs/resource needed to get it fixed.

cr4zyg047 commented 8 years ago

I too experienced this behavior - but only when triggering from MQTT events via automation. I would merely be setting brightness levels via automation commands - and maybe 1 out of 10 times, the bulb group would go unresponsive in HA.

Using the Milight/EasyBulb app could still control the lights. Restarting HA would clear the fault.

I have since moved to HAASKA and have set the brightness at least 60 times without a single such issue.

nbittmann commented 7 years ago

No sure if my issue is related or if it's normal but my milights react very slow especially if you dimm them it can take 4-5 seconds until do start dimming turning off and on seems to work faster?

Anyone experienced that as well?

vadimbz commented 7 years ago

...and it persists. Many months and many major versions later, while native and third party apps just work. Not that I am complaining, but... perhaps there are workarounds that would mimic those apps? Like command line switch sending out UDP requests? Is there a chance that someone "adopts" the issue? Thanks

shaikh3 commented 7 years ago

Same issue here. Strangely, it was working perfectly until I upgraded to .35

I have a ton of these bulbs in my apt and would be willing to put in a donation if someone is able to sort it out for good...

vadimbz commented 7 years ago

I'd pinch in

vadimbz commented 7 years ago

If anyone is still following, I found the workaround. Example below is for white group 1. 100% reliable so far.

platform: command_line
  switches:
     living_room:
       friendly_name: Living Room
       command_on: 'echo -n -e "\x38\00\x55" > /dev/udp/192.168.1.208/8899'
       command_off: 'echo -n -e "\x3b\00\x55" > /dev/udp/192.168.1.208/8899'

If you use HA in the docker, you'll need to set SSH without password between docker and host system, and modify commands.

platform: command_line
    switches:
      living_room:
        friendly_name: Living Room
        command_on: ssh user@host 'echo -n -e "\x38\00\x55" > /dev/udp/192.168.1.208/8899'
        command_off: ssh user@host 'echo -n -e "\x3b\00\x55" > /dev/udp/192.168.1.208/8899'

Command reference: https://github.com/stoman/MilightAPI/blob/master/doc/limitlessled-documentation.txt Bittersweet discovery, given that my first Yeelight group arrived days ago.

aneisch commented 7 years ago

FYI: These might be related to https://github.com/home-assistant/home-assistant/issues/6295. Pipeline never finishes with certain transition.

dale3h commented 7 years ago

Closing this because it appears to be fixed by #6334.