baum1234
(Baum1234)
January 3, 2020, 5:59pm
21
Okay now I got some logs:
Jan 03 18:56:52 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:52: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x0017880104566645"}}'
Jan 03 18:56:52 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:52: Starting interview of '0x0017880104566645'
Jan 03 18:56:52 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:52: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x0017880104566645"}}'
Jan 03 18:56:54 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:54: Successfully interviewed '0x0017880104566645', device has successfully been paired
Jan 03 18:56:54 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:54: Device '0x0017880104566645' is supported, identified as: Philips Hue white ambiance E26/E27 (8718696548738)
Jan 03 18:56:54 openhab npm[24178]: zigbee2mqtt:info 2020-01-03 18:56:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x0017880104566645","model":"8718696548738","vendor":"Philips","description":"Hue white ambiance E26/E27","supported":true}}'
It it still doesn’t give me the answer for my question.
H102
(CM6.5 H102)
January 3, 2020, 6:25pm
22
Sorry about delay.
In your things file add the hue bulb switch like below using your device ID and names. Just the switch for now will do dimmer after ON/OFF is working.
Thing topic zigbee2mqtt "Bedroom Light" @ "Bedroom" {
Channels:
Type switch : power "Power" [ stateTopic="zigbee/0xb0ce1814030ac279/state",
commandTopic="zigbee/0xb0ce1814030ac279/set/state", on="ON", off="OFF" ]
Type dimmer : dimmer "Dimmer" [ stateTopic="zigbee/0xb0ce1814030ac279",
commandTopic="zigbee/0xb0ce1814030ac279/set", transformationPattern="JSONPATH:$.brightness", formatBeforePublish="{\"brightness\":%s}" ]
}
Also make sure to add this to bottom of ymal file:
experimental:
output: attribute
baum1234
(Baum1234)
January 3, 2020, 6:33pm
23
I already know what I have to put in my .things file. This is still not my question.
How does the person know, that brightness is a function/parameter? What are others? How can I discover them by myself?
I tried this, the output on reset is equal.
H102
(CM6.5 H102)
January 3, 2020, 6:36pm
24
Subscribe to the topic with a wildcard.
From the command line use: mosquitto_sub -h Your IP -p your port -u username -P password -t*
You may find this link helpful for topics as well http://mqtt-explorer.com/
1 Like
baum1234
(Baum1234)
January 3, 2020, 6:47pm
25
This helps a bit. *
works for bulbs, but my bulb can change the color temperature like white light or warm light. I don’t get the key for that.
Is there another way to get all this information e.g. for Xiaomi devices?
H102
(CM6.5 H102)
January 3, 2020, 6:51pm
26
Is both brightness and color_temp : true in ymal file?
baum1234
(Baum1234)
January 3, 2020, 6:53pm
27
Which ymal file? And how do you know that it is called color_temp
?
H102
(CM6.5 H102)
January 3, 2020, 6:56pm
28
I don’t b/c I’m not sure what Xiaomi bulb you have. I just picked one on the list from github docs. but most are the same.
baum1234
(Baum1234)
January 3, 2020, 6:57pm
29
You miss understand me. My hue bulb can change the brightness and color temperature.
The Xiaomi questions is just besides the bulbs.
H102
(CM6.5 H102)
January 3, 2020, 7:07pm
30
You get the info from the device page for zigbee2mqtt. If the device is not supported then you need to use a wild card publish command, use a mqqt tool, contact the manufacture, etc…
Do you have a specific device or just asking in general?
baum1234
(Baum1234)
January 3, 2020, 7:11pm
31
I have this: https://www.amazon.de/gp/product/B0748MZ3Y6 and this https://www.amazon.de/gp/product/B074PWJ61J
Both supports color temperature. Here is the zigbee2mqtt documentation for the second bulb innr: https://www.zigbee2mqtt.io/devices/RS_128_T.html
It says, that it supports brightness and color temperature, but there is no documentation for how to call the functions.
H102
(CM6.5 H102)
January 3, 2020, 7:16pm
32
For the second bulb if you stop zigbee2mqtt and add
brightness: true
color_temp: true
to the ymal file (for this bulb), restart zigbee2mqtt and then use the wildcard (*) like above it does not give you all the topics like color and brightness?
baum1234
(Baum1234)
January 3, 2020, 7:19pm
33
right at the bottom? it looks like there is a main group over it.
Also the configuration says nothing about it: https://www.zigbee2mqtt.io/information/configuration.html
H102
(CM6.5 H102)
January 3, 2020, 7:22pm
34
For a wildcard use # instead of * at the end and see what you get.
baum1234
(Baum1234)
January 3, 2020, 7:22pm
35
I mean this, where in the yaml file I have to put them?
H102
(CM6.5 H102)
January 3, 2020, 7:25pm
36
Above the device friendly name.
If you can post your ymal file to view it may be easier.
baum1234
(Baum1234)
January 3, 2020, 7:26pm
37
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://localhost:1883'
user: user
password: password
client_id: Zigbee
reject_unauthorized: false
include_device_information: true
serial:
port: /dev/ttyACM0
disable_led: false
experimental:
output: attribute
brightness: true
color_temp: true
devices:
'0x00158d00045065dd':
friendly_name: '0x00158d00045065dd'
now they are unter experimental
. Or should I remove the spaces?
#edit
just tried both, didn’t work. still doesn’t geht color_temp
H102
(CM6.5 H102)
January 3, 2020, 7:32pm
38
Place it under include_device_information: true
Then use this topic:
mosquitto_sub -h Your IP -p your port -u username -P password -t zigbee/0x00158d00045065dd/#
or
mosquitto_sub -h Your IP -p your port -u username -P password -t zigbee/0x00158d00045065dd/*
EDIT:
Use sub not pub, I changed it above.
baum1234
(Baum1234)
January 3, 2020, 7:39pm
39
Okay I put it under include_device_information
, but I still get brightness but not color_temp
H102
(CM6.5 H102)
January 3, 2020, 7:41pm
40
Can you post the output of mosquitto_sub -h Your IP -p your port -u username -P password -t zigbee/0x00158d00045065dd/#