UncleSamSwiss / ioBroker.loxone

ioBroker adapter for Loxone Miniserver
Apache License 2.0
27 stars 25 forks source link

Lumitech is not shown in LightController #150

Closed rasbilly closed 3 months ago

rasbilly commented 3 years ago

"Lumitech" values are not displayed via the LightController (First red box). The output via the individual module is possible (2. red box). In addition, the individual module is read only.

For the future, a conversion between Lumitech <--> eg. Hex, rgb,.. values can also be carried out. An example implementation can be seen here: https://github.com/Aircoookie/WLED/blob/master/wled00/lx_parser.cpp

I can gladly provide further information if necessary :)

Screenshots
Loxone Config iobroker LichtControler

Lichtsteuerung: Lumitech Light

{
  "type": "channel",
  "common": {
    "name": "Lichtsteuerung: Lumitech Light",
    "role": "light.color.rgb"
  },
  "native": {
    "control": {
      "name": "Lichtsteuerung: Lumitech Light",
      "type": "ColorPickerV2",
      "uuidAction": "1776250c-0209-4c52-ffff26fb50034232/AI1",
      "defaultRating": 0,
      "isFavorite": false,
      "isSecured": false,
      "details": {
        "pickerType": "Lumitech"
      },
      "states": {
        "color": "1776250c-0209-4c3b-ffff0d1b7025587c",
        "sequence": "17761cd5-03d6-34af-ffff3ce43fa9aec5",
        "sequenceColorIdx": "17761cd5-03d6-34b0-ffff3ce43fa9aec5"
      }
    }
  },
  "from": "system.adapter.loxone.0",
  "user": "system.user.admin",
  "ts": 1624387349228,
  "_id": "loxone.0.1776250c-0209-4c52-ffff26fb50034232.AI1",
  "acl": {
    "object": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

WLED: value

{
  "type": "state",
  "common": {
    "name": "WLED: value",
    "read": true,
    "write": false,
    "type": "number",
    "role": "value"
  },
  "native": {
    "uuid": "17762589-00b0-b812-ffff26fb50034232"
  },
  "from": "system.adapter.loxone.0",
  "user": "system.user.admin",
  "ts": 1624387349256,
  "_id": "loxone.0.17762589-00b0-b812-ffff26fb50034232.value",
  "acl": {
    "object": 1636,
    "state": 1636,
    "owner": "system.user.admin",
    "ownerGroup": "system.group.administrator"
  }
}

Versions:

Edit: improved formatting

UncleSamSwiss commented 3 years ago

Thanks for your bug report!

There were a few bugs in the Lumitech handling (e.g. values were read-only) which I could already fix.

But it also seems like the Lumitech colors are coming in a wrong format. To figure out what is wrong, I would like you to do the following:

rasbilly commented 3 years ago

The colors and brightness are right! Red: "hsv (350,100,100)" Warm and cold white too.

This is probably due to the regex. 'match' is always 'null'.

const match = value.match(/lumitech\((\d+),(\d+)\)/i);

loxone.0 | 2021-06-30 18:17:43.971 | info | (5896) lumitechColorToBrightnessTemperature: "temp(76,5930)" loxone.0 | 2021-06-30 18:16:53.750 | info | (5896) lumitechColorToBrightnessTemperature: "hsv(61,91,76)"