Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add L&S Emotion Home Base #2081

Merged
merged 5 commits into from
Jul 8, 2023
Merged

Add L&S Emotion Home Base #2081

merged 5 commits into from
Jul 8, 2023

Conversation

nordish1
Copy link
Contributor

No description provided.

@nordish1 nordish1 changed the title Added L&S Emotion Home Gateway Add L&S Emotion Home Gateway Jun 10, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 12, 2023

Could you also make a PR to add support for this device? (https://github.com/Koenkk/zigbee-herdsman-converters)

@nordish1
Copy link
Contributor Author

Yes, but I'm on holiday till next week. Then I will make a PR.

@87insane
Copy link

I also own an L&S Homebase. What exactly is missing here to integrate them?

@nordish1
Copy link
Contributor Author

nordish1 commented Jun 29, 2023

@87insane You can help with the PR @ Koenkk/zigbee-herdsman-converters#5908

@87insane
Copy link

87insane commented Jun 29, 2023

@nordish1 404.. right Link?
But whats the problem? Did you have created a local converter and it works?

EDIT: If i copy the Text of the Link, its okay and works. I try your LS on my zigbee2mqtt and try to help...

@Koenkk
Copy link
Owner

Koenkk commented Jun 30, 2023

Could you rename the picture to A319463.jpg?

@87insane
Copy link

87insane commented Jun 30, 2023

Hello everyone,

I've done a lot of testing and reading. The Home Base is also RGB capable and can also receive multiple end devices.
I myself have connected two cold and warm white devices to different masters.
If there is only one receiver, ls.js would work. But not as soon as several receivers are connected behind the home base.
Only circuit 1 is ever switched on or controlled. Circuit 2 doesn't work at all.

All devices behind the bridge are displayed individually via Deconz.

What is the best way to continue testing here?

PS: I adjusted the file:

const exposes = require('zigbee-herdsman-converters/lib/exposes');
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const ota = require('zigbee-herdsman-converters/lib/ota');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['Emotion'],
    model: 'Emotion',
    vendor: 'L&S Deutschland GmbH',
    description: 'L&S Emotion Home Base',
    // Note that fromZigbee, toZigbee and exposes are missing here since we use extend here.
    // Extend contains a default set of fromZigbee/toZigbee converters and expose for common device types.
    // The following extends are available:
    // - extend.switch
    // - extend.light_onoff_brightness
    // - extend.light_onoff_brightness_colortemp
    // - extend.light_onoff_brightness_color
    // - extend.light_onoff_brightness_colortemp_color
    extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
};

module.exports = definition;

@Koenkk
Copy link
Owner

Koenkk commented Jun 30, 2023

Can you provide the data/database.db entry of this device after pairing multiple devices and re-pairing the bridge?

@87insane
Copy link

{"id":10,"type":"Router","ieeeAddr":"0xb43a31fffe773548","nwkAddr":23119,"manufId":4686,"manufName":"LS Deutschland GmbH","powerSource":"DC Source","modelId":"Emotion","epList":[1,2,3,4,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":"","zclVersion":3}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00212effff0555de","endpointID":1}],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"3":{"profId":260,"epId":3,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"4":{"profId":260,"epId":4,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000","zclVersion":3,"interviewCompleted":true,"meta":{"configured":88764544},"lastSeen":1688143220949,"defaultSendRequestWhen":"immediate"}

@Koenkk
Copy link
Owner

Koenkk commented Jun 30, 2023

Is this with 4 devices paired to it?

@87insane
Copy link

87insane commented Jun 30, 2023

No. I have paired 2 (CCT)

But i think, the reason is the 4 channel remote control. You can add different remote controls or no remote control.
Its a Master/Slave Construct... I have 1 four Channel Remote, and 2 one Channel Remotes. The 1 Channel Remotes are synced with the 4 Channel Remote.

image

For Information:
You have to add the light hit to the Home Base. After that you see in Alexa or ... this Master as single light. If you have more Masters, you can see more lights. But with the actual ls.js you can conrtoll only the first Channel.

image

The Home Base displays the status. With zigbee2mqtt it often shows "not connected" (crazy red led). Meanwhile, I can switch via zigbee. In addition, the status of the lamp is not displayed correctly. If I switch via zigbee2mqtt it is correct. Not always when using the remote control.

IMG20230630192538

A picture of the Manufactor:
image

(Sry for my eng)

@nordish1 nordish1 changed the title Add L&S Emotion Home Gateway Add L&S Emotion Home Base Jul 1, 2023
@nordish1
Copy link
Contributor Author

nordish1 commented Jul 1, 2023

Could you rename the picture to A319463.jpg?

Done

@Koenkk
Copy link
Owner

Koenkk commented Jul 2, 2023

Can you do the following:

  • Force remove device through z2m frontend
  • Restart z2m
  • Pair the home base with 1 light bulb paired to it
  • Provide the data/database.db entry here
  • Now do the same but then pair 2 bulbs (so force remove, restart, pair 2 bulbs, and then data/database.db here)

@87insane
Copy link

87insane commented Jul 2, 2023

Can you do the following:

  • Force remove device through z2m frontend
  • Restart z2m
  • Pair the home base with 1 light bulb paired to it
  • Provide the data/database.db entry here
  • Now do the same but then pair 2 bulbs (so force remove, restart, pair 2 bulbs, and then data/database.db here)

Hey and good Morning,

1 Light Hit:
{"id":10,"type":"Router","ieeeAddr":"0xb43a31fffe773548","nwkAddr":26551,"manufId":4686,"manufName":"LS Deutschland GmbH","powerSource":"DC Source","modelId":"Emotion","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"Emotion","manufacturerName":"LS Deutschland GmbH","powerSource":4,"zclVersion":3,"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000","zclVersion":3,"interviewCompleted":true,"meta":{"configured":88764544},"lastSeen":1688287164819,"defaultSendRequestWhen":"immediate"}

2 Light Hits:
{"id":10,"type":"Router","ieeeAddr":"0xb43a31fffe773548","nwkAddr":26550,"manufId":4686,"manufName":"LS Deutschland GmbH","powerSource":"DC Source","modelId":"Emotion","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"Emotion","manufacturerName":"LS Deutschland GmbH","powerSource":4,"zclVersion":3,"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000","zclVersion":3,"interviewCompleted":true,"meta":{"configured":88764544},"lastSeen":1688287415965,"defaultSendRequestWhen":"immediate"}

INFO:
To Paair you need a Remote. I used the 4 Channel Remote.

This are 2 Light Hits with an 1 Channel Remote:
{"id":10,"type":"Router","ieeeAddr":"0xb43a31fffe773548","nwkAddr":33191,"manufId":4686,"manufName":"LS Deutschland GmbH","powerSource":"DC Source","modelId":"Emotion","epList":[1,2,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"appVersion":0,"stackVersion":0,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":16,"colorTempPhysicalMin":153,"colorTempPhysicalMax":454}}},"binds":[],"configuredReportings":[],"meta":{}},"2":{"profId":260,"epId":2,"devId":268,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":0,"stackVersion":0,"hwVersion":1,"dateCode":"","swBuildId":"1.0.0_r00000","zclVersion":3,"interviewCompleted":true,"meta":{"configured":88764544},"lastSeen":1688288140025,"defaultSendRequestWhen":"immediate"}

@Koenkk
Copy link
Owner

Koenkk commented Jul 4, 2023

Please try with the following ext converter: https://gist.github.com/Koenkk/ed28269d960403a32b2d9b0054de1437

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

@87insane
Copy link

87insane commented Jul 5, 2023

Please try with the following ext converter: https://gist.github.com/Koenkk/ed28269d960403a32b2d9b0054de1437

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

Hey @Koenkk,

if i save and activate this converter i cant see my other devices in zigbee2mqtt. In the DB they´re still there. I restarted the Service and see this in the Log:
Zigbee2MQTT:error 05: Failed to call 'Bridge' 'start' (TypeError: e.light_onoff_brightness_colo at /opt/zigbee2mqtt/data/extension/externally-loaded.js:23:22 at Array.map (<anonymous>) at Object.exposes (/opt/zigbee2mqtt/data/extension/externally-loaded.js:22:63) at Device.exposes (/opt/zigbee2mqtt/lib/model/device.ts:33:36) at Bridge.getDefinitionPayload (/opt/zigbee2mqtt/lib/extension/bridge.ts:705:29) at /opt/zigbee2mqtt/lib/extension/bridge.ts:661:34 at Array.map (<anonymous>) at Bridge.publishDevices (/opt/zigbee2mqtt/lib/extension/bridge.ts:620:47) at Bridge.start (/opt/zigbee2mqtt/lib/extension/bridge.ts:109:20) at processTicksAndRejections (node:internal/process/task_queues:96:5))

i tried to find the typo but cant.

@Koenkk
Copy link
Owner

Koenkk commented Jul 5, 2023

Did you copy the file correctly? e.light_onoff_brightness_colo should be e.light_onoff_brightness_colortemp

@87insane
Copy link

87insane commented Jul 5, 2023

Yep. Do you need a Screenshot? I tried more than one Times. I have searched in the File for this Point. That was okay. Its a Typo or an Syntax Error, in my eyes

This ist a Test with more {}, because i thougt that are the Problem. But isnt
image

@Koenkk
Copy link
Owner

Koenkk commented Jul 6, 2023

I made a mistake indeed, updated https://gist.github.com/Koenkk/ed28269d960403a32b2d9b0054de1437

@87insane
Copy link

87insane commented Jul 6, 2023

No Problem. THANKS!

For me its works. But i have no RGB LED. CCT is okay for me. But i can see the Options for color. Is there a way to show the options only if the device supports the respective option? If i check a color (without to have a colored LED) i see an error message. "no converter available for color".

I also think that a single device per connected master is better. Otherwise you get e.g. in FHEM only one device with two lights and you still have to disassemble it. What do you think? I can also adjust this in FHEM, but in general it would be easier in my opinion.

An availability Info does not exist at this moment. This is the MQTT Output:

{
  "brightness_l1": 254,
  "brightness_l2": 254,
  "color_mode": "xy",
  "color_mode_l1": "color_temp",
  "color_mode_l2": "color_temp",
  "color_temp_l1": 370,
  "color_temp_l2": 370,
  "color_temp_startup_l1": 370,
  "color_temp_startup_l2": 370,
  "last_seen": "2023-07-07T07:43:13.510Z",
  "linkquality": 167,
  "state": "ON",
  "state_l1": "OFF",
  "state_l2": "OFF"
}

INFO: For Description: It is a "Emotion Home Base"

image

@Koenkk
Copy link
Owner

Koenkk commented Jul 7, 2023

Both things are currently hard to do, especially the separate devices so I propose to merge this as is for now.

@87insane
Copy link

87insane commented Jul 7, 2023

OK. I have separated the devices in fhem and can use them. but can you possibly give some kind of indicator? if multiple devices, then change topic path? something like color_temp_l1/l2 is not so easy to handle. for automatic creation of devices it would be good to have at least another path or at least something like device counters.

@Koenkk
Copy link
Owner

Koenkk commented Jul 8, 2023

@87insane for this to work some changes to the z2m code base have to be made, I think this is good enough for now.

I've integrated the device.

Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants