Replies: 11 comments 31 replies
-
Sensors:(value is always the default value and could be different from what is shown here)
|
Beta Was this translation helpful? Give feedback.
-
Outputs
|
Beta Was this translation helpful? Give feedback.
-
|
Simple sensor device with analog input cluster and all mandatory attributes except for the description string working. Assuming that support for strings is still broken on the zigbee_esphome side and not investigating this any further. |
Beta Was this translation helpful? Give feedback.
-
|
Water flow meter: - device_type: SIMPLE_SENSOR
num: 1
clusters:
- id: FLOW_MEASUREMENT
attributes:
- attribute_id: 0x0 # Actual value, m^3/h
type: U16
report: true
value: 100
device: water_meter_total
scale: 100
- attribute_id: 0x1 # MinMeasuredValue, required
type: U16
value: 0xffff # == Not specified
- attribute_id: 0x2 # MaxMeasuredValue, required
type: U16
value: 0xffff # == Not specifiedHave gotten it to appear once, but my esp32-c6 boards dont seem to like to reconnect on reboot, so cant be sure it works correctly. |
Beta Was this translation helpful? Give feedback.
-
|
Occupancy sensor that I attached to - id: OCCUPANCY_SENSING
attributes:
- id: zb_occupancy # actual state as bit. 0 -> empty; 1 -> occupied
attribute_id: 0x000
type: 8BITMAP
report: true
value: 0
device: sensor_occupancy
lambda: !lambda "return x ? 1 : 0;" # perhaps not needed
- attribute_id: 0x0001
type: 8BIT_ENUM
report: true
value: 0x02 #0x00 -> PIR; 0x01 -> sonic; 0x02 -> PIR & sonicAttribute definitions as well as optional attributes can be found here [page 4-19] |
Beta Was this translation helpful? Give feedback.
-
|
Hacked this together to create an on/off sensor from a photodiode ( endpoints:
- num: 1
device_type: TEMPERATURE_SENSOR
clusters:
- id: BINARY_INPUT
attributes:
- attribute_id: 0x0055
id: led_attr
type: bool
report: true
device: led_input |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Including a bit more than just the clusters. This config is tested and working with a Shelly 1 Gen4, but see the note on the first cluster: |
Beta Was this translation helpful? Give feedback.
-
|
Hello, @luar123, |
Beta Was this translation helpful? Give feedback.
-
|
Hello, and sorry for using this topic for help (above). Anyway, I will share the gist to my currently working config to my Shelly 2PM gen4 (custom ESP32C6 with 8MB flash). It still is a work in progress and I'll re-enable zigbee functions in the next few changes (I wanted a fresh stable firmware installed so I could gain OTA and rollback functions) |
Beta Was this translation helpful? Give feedback.
-
MH-Z16 Carbon Dioxide sensor from Seeedhttps://wiki.seeedstudio.com/Grove-CO2_Sensor/ zigbee:
id: "zb"
router: true
endpoints:
- device_type: TEMPERATURE_SENSOR
num: 1
clusters:
# I have it under the endpoint of some other device's clusters, but this shouldn't matter
- id: CARBON_DIOXIDE_MEASUREMENT
attributes:
- attribute_id: 0x0000
id: zb_co2
type: SINGLE
report: true
device: co2_sensor
scale: 0.000001
- attribute_id: 0x0001
type: SINGLE
value: 0.0
- attribute_id: 0x0002
type: SINGLE
value: 0.01
uart:
rx_pin: GPIO17 # connect to MH-Z16 TX
tx_pin: GPIO16 # connect to MH-Z16 RX
baud_rate: 9600
sensor:
- platform: mhz19
id: mhz16
co2:
name: CO2
id: co2_sensor
update_interval: 60s
automatic_baseline_calibration: falseThis config with the scaling, which I inferred from other discussions in this repo, correctly creates a CO² sensor in ZHA, Home Assistant. Thanks for this project ❤️ ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The correct setup of clusters is not always trivial and requires careful reading of the Zigbee cluster library
So lets collect endpoint/cluster/attribute definitions that are know to work. With this we can help each other to get working setups and it would help me to finally implement an automated setup of the definitions.
Device types have two purposes:
device type = HA_TEMPERATURE_SENSOR_DEVICEin oder to bind and read the temperature cluster.Available device types can be found here, clusters that are included here and the full definitions are in the ZigBee Home Automation Application Profile
In the end it is up to you how you want to implement multiple devices. You can add all to one endpoint or setup many endpoints. If no device type is fitting you can always use
TESTorCUSTOM_ATTR. (SIMPLE_SENSORshould only be used for a binary switch.)Beta Was this translation helpful? Give feedback.
All reactions