Philips Dynalite - official component - updating states

Hi

I have an issue which started with transition to official component. Before it worked OK.
Issue is that component and with it HA is showing wrong light states.
It looks to be easily confused, after some time and few dimming/switching it will show wrong state.
Mostly, it shows on or ~60% dimmed (even though i use my light On/Off so 0 or 100%, nothing in between) when they are off.
Now when i think about it, some lights are worse than others, mostly one of them is very often showed like 90% even though that one is 0 or 100% allways.

Where to look, what log file can show what is happening ?

Thanks

if you have in the logger configuration in configuration.yaml the ā€˜dynalite_devices_lib: debugā€™ line and give me the homeassistant log file (potentially grep dynalite_devices_lib so it doesnā€™t show your full setup), I can perhaps better understand what is happening. This doesnā€™t happen in my setup

Iā€™ve uploaded it, it is raw, problems are still happening so would be grateful if you solve it.
Thanks

I looked in the logs. It seems that you have a few Dynet codes that it does not handle: FADE_CHANNEL_AREA_TO_PRESET, PRESET_OFFSET, RAMP_ALL_CHANNELS, START_FADING_FAST, and TURN_ALL_AREAS_ON.
FADE_CHANNEL_AREA_TO_PRESET is handled in the newest version, which hopefully will make it back to the main stream soon. I can make you a custom component if you want to see if it solves the issue. The problem with the other Dynet codes is that they do not happen in my environment, so implementing them would be purely from theory with no way to test it. Are you familiar with these codes?
PRESET_OFFSET is the only one that doesnā€™t seem straightforward. In any case, would love to have you try it with the FADE_CHANNEL_AREA_TO_PRESET handled, either with a custom component or the production one when it will be in the mainstream, probably a few weeks from now.

Iā€™m familiar with task commands, what i dont know is explained in manual so can take a look :).
PRESSET_OFFSET is command which will shift presets by some offset.
At my home, after 21h some presets are shifted to +10, so whenever some keypad/device sets preset 1, it will really set preset 11.

If I can be out of any other help, let me know.

I have a new version that also sends events on every packet, so you can monitor the network. if you install Ha on a venv, you can create a temporary HA for this with a private version.

In your separate venv (donā€™t use the productionā€¦), simply install HA from my branch:
pip3 install --upgrade git+git://github.com/ziv1234/home-assistant.git@dyn_events

then we can work together on adding any functionality. I just donā€™t want to add code that just runs ā€œin the darkā€

I have one and only HA :).
Can add another one over weekend to see how it goes with new branch.
Will let you know.

Thanks!

Hi,
Very new to HA (Started yesterday)
Trying to connect my Dynalite PDEG to HA
Have tried all sorts and whilst the integration seems fine and shows up in integrations the lights in any dashboard show as unavailable. Have used the following very simple for now in my configuration.yaml:

dynalite:
  bridges:
    - host: 192.168.86.121
      port: 80
      area:
        '2':
          name: Kitchen
          channel:
            '1': 
              name: Cupboards
            '2': 
              name: Hob
        '3':
          name: Living
          channel:
            '1':
              name: TV Wall
            '2':
              name: Mirror Wall
      preset:
        '1':
          name: 'On'
          fade: 0
        '4':
          name: 'Off'
          fade: 0

I am using a PDEG with v.3.44 firmware. I can reach it with CGI commands with the IP and port to areas 2 & 3, get the following in the logs:
Logger: dynalite_devices_lib
Source: /usr/local/lib/python3.8/site-packages/dynalite_devices_lib/dynalite.py:58
First occurred: 7:00:34 (858 occurrences)
Last logged: 7:45:17

  • Could not connect to Dynet ([Errno 110] Connect call failed (ā€˜192.168.86.121ā€™, 80))
  • Could not connect to Dynet ([Errno 113] Connect call failed (ā€˜192.168.86.121ā€™, 80))

Perhaps it is something very stupid, hoping one of you can help?

Thanks

The integration does show up in the ā€œIntegrationsā€ page including devices/entities. In the UI they switch between on/off and do nothing

Try without any manual config.
Just add it in integrations and see if discovery is working.

@uzelac unfortunately not, not got the autodiscover to work and show any channels.

I did the original to work though, a lot of resetting of the gateway and now on port 12345. Great to have this working!

Hi

Sorry to get back to you just now, life was ā€¦ complicatedā€¦ few past months.
I have some time for HA now and have been updating version and config.
Hope dynalite component will be better but unfortunately found out that nothing changed with my issue :slight_smile:

If i can help with this or whatever else related to Dynalite let me know.

Thanks

Iā€™m afraid Iā€™m also having issues with updating states in HA.

This is a pair of messages from my Antumbra to my dining room light

{ // Turn light off
    "event_type": "dynalite_packet",
    "data": {
        "host": "10.0.0.190",
        "packet": [
            28,
            6,
            0,
            107,
            3,
            100,
            255,
            13
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-02-09T04:07:43.716024+00:00",
    "context": {
        "id": "c2f2ccde6fea26e33aa8b658deac8611",
        "parent_id": null,
        "user_id": null
    }
}
{ // Turn light on
    "event_type": "dynalite_packet",
    "data": {
        "host": "10.0.0.190",
        "packet": [
            28,
            6,
            0,
            107,
            0,
            100,
            255,
            16
        ]
    },
    "origin": "LOCAL",
    "time_fired": "2021-02-09T04:07:36.630239+00:00",
    "context": {
        "id": "6bc2568e839c586cd5c950431a1eb693",
        "parent_id": null,
        "user_id": null
    }
}

Home assistant doesnā€™t update or see these as preset changes, but it does see the packets (As evidenced by the packets here in front of you :D)

(edit: spelling)

Edit: Iā€™ve figured it out, donā€™t mix template: room with channels if you actually want to receive device updates.

Edit: still hit and missā€¦ I guess Iā€™m writing my own.

I have the same issues. State dont update from Dynalite.
This is my config.

# Philips Dynalite
dynalite:
  bridges:
    - host: 192.168.10.52
      port: 50000
      active: on
      autodiscover: false
      polltimer: 2.0
      area:
        '3':
          name: KjĆøkken
          template: room
          channel:
            '1':
              name: Pendel
              type: light
              fade: 2.0
        '5':
          name: TV-stue
          template: room
          channel:
            '1':
              name: Pendel
              type: light
              fade: 2.0
        '6':
          name: Utelys
          template: room
          channel:
            '1':
              name: Inngang
              type: light
              fade: 2.0
        '15':
          name: Nisje
          template: room
          channel:
            '1':
              name: Varme
              type: switch
              fade: 0.0
        '16':
          name: VVB
          template: room
          channel:
            '1':
              name: VVB
              type: switch
              fade: 0.0
        '19':
          name: Grov
          template: room
          channel:
            '2':
              name: Varme
              type: switch
              fade: 0.0
      template:
        room:
          room_on: 1
          room_off: 4

This is for Ziv and anyone else who wants to get the Dynalite integration right.

Have used a simple setup DDLE801 (already configured by someone else) and an IP/RS485 gateway.

As of Jan 2022 / core-2021.12.7 / supervisor-2021.12.2 / Home Assistant OS 7.1

  1. Autodiscover does not work
  2. Active does not work
  3. Philips Dynalite: Request area preset, runs with no errors, but does not return anything
  4. Philips Dynalite: Request channel level, runs with no errors, but does not return anything
  5. If you get 3 or 4 wrong and you get an error only way to recover is to restart the HAcore
  6. Setting the channels manually in the config.yaml works for both switch on/off and dimming
  7. The HA light entity works for the channels configured manually (on/off/dim), but as others reported it does not update when the change at the Dynalite side.

My question is if others experience same issues and if either a workaround is known or someone is working on a fix.

Ziv, I assume everyone would appreciate an update and if there is something I can personally do to help with testing, etc.

I can also assist in the documentation where a couple more examples and walkthroughs might be valuable to people trying this for the first time.

Ziv, please let me know how I can assist. If this requires posting somewhere else please let me know as well.

Was this fixed for you ?

Finally, I think found a way around to automatically update the state of channels level by creating automation. So basically, if you trigger area preset on (preset1), off (preset4), scenes (other preset#) and dimming it does not send request channel level to update the individual channels levels. So, by creating based on this condition, you can get the accurate channel level value using the call service on automation to be triggered by any changed in state or any attributes and it will automatically have a correct state of the individual channels.
Same also if you trigger an individual channels level to sync feedback with (preset1), off (preset4), create an automation with individual channel as our trigger and then do test confirm brightness if 0 then action send area to off (preset4), if brightness is 254 then action send area to on (preset1).
Let me know if this works for you.

1 Like

Hi Shairo,
I have the unsynchrnoized brightness issue as well, could you please explain more how you solved it? can you show an example?
Many thanks

Ok, so far what I came up with:

alias: Office Ceiling Request Channel Level
description: ""
trigger:
  - platform: state
    entity_id:
      - light.office_ceiling
condition: []
action:
  - delay: "00:00:02"
  - service: dynalite.request_channel_level
    metadata: {}
    data:
      area: 16
      channel: 1
  # below part to set default value when turning on to 100%, in this case set to 60%
  - delay: "00:00:01"
  - condition: state
    entity_id: light.office_ceiling
    state: "on"
  - condition: template
    value_template: "{{ state_attr('light.office_ceiling', 'brightness') | int > 250 }}" # max is 254
  - service: light.turn_on
    target:
      entity_id: light.office_ceiling
    data:
      brightness_pct: 60
mode: single

Itā€™s not the best, since when you turn on, it has a delay until it dims to the default brightness. But itā€™s good enough for me.

Hope it helps anyone