klali / ha-plejd

Plejd component for Home Assistant
Apache License 2.0
69 stars 15 forks source link

DIM-01 New FW not discovered correctly #53

Closed ElbilsChrippe closed 2 years ago

ElbilsChrippe commented 2 years ago

I just bought a new DIM-01 unit and it has (called Plejd support to confirm this) a new FW version 0.0.4 (the old is 3.1.8). The discovery script does not seem to recognize this unit. Debug print 2021-09-21 10:38:40 INF [plejd-mqtt] Discovered -unknown- (light) named Belysning Stora Sovrum (35 : E096970F8DF5_0)

it does not get included. Support said that there should be no interface changes with the new FW, but its sure is different.

The problems seem to originate in, master/plejd/PlejdApi.js: ` // eslint-disable-next-line class-methods-use-this _getDeviceType(plejdDevice) { // Type name is also sometimes available in device.hardware.name // (maybe only when GWY-01 is present?)

switch (parseInt(plejdDevice.hardwareId, 10)) {
  case 1:
  case 11:
    return {
      name: 'DIM-01',
      type: 'light',
      dimmable: true,
      broadcastClicks: false,
    };`

Havent had time to debug further at this point in time. Will try to pull master to look. I'm currently using Current version: 0.8.0-beta.

Best regards, /Christer

klali commented 2 years ago

You're running https://github.com/icanos/hassio-plejd not this project, so you'll have to talk with them. But very interesting nonetheless..

ElbilsChrippe commented 2 years ago

Sorry posted on wrong repo :)