Sengled specific clusters definition

Hello,

Trying to add Sengled specific clusters definition in general.xml, I found something that looked promising : EmberZNet5.3.0-GA/custom_zigbee_cluster.xml at ce8eb024f2ea536832a0d849c3808c6f21131155 · YuhangZho/EmberZNet5.3.0-GA · GitHub

All clusters are not described (ie FC11 that I can see on my E1C-NB7 smart plug is not described) but that’s a beginning :wink:

I made this but not very sure of my “translation” into deCONZ ZLDB syntax. And I don’t know how to adapt the 0xFD00 cluster part that provides diagnose code interface through a broadcast cmd.

Can someone have a look at it please ?

		<!-- SENGLED -->
	        <!-- Inspired from https://github.com/YuhangZho/EmberZNet5.3.0-GA/blob/ce8eb024f2ea536832a0d849c3808c6f21131155/em35x/tool/appbuilder/sengled_cluster.xml -->
		<cluster id="0xfc01" name="Sengled control specific" mfcode="0x1160">
			<description>Sengled specific cluster for control</description>
			<server>
				<attribute id="0x0000" name="Illumination threshold" type="u8" mfcode="0x1160" access="rw" required="o" default="0x01" range="0,1"> </attribute>
				<attribute id="0x0001" name="Automatic lights enable" type="bool" mfcode="0x1160" access="rw" required="o" default="0x01"> </attribute>
				<attribute id="0x0002" name="Save enable" type="bool" mfcode="0x1160" access="r" required="m" default="0x01"> </attribute>
				<attribute id="0x0003" name="comm Occupancy" type="u8" mfcode="0x1160" access="rw" required="o" default="0x0" range="0,1"> </attribute>
			        <attribute id="0x0004" name="comm PIR occupied to unoccupied delay" type="u16" mfcode="0x1160" access="rw" required="o" default="0x005a" range="0,14400"> </attribute>
			</server>
			<client>
			</client>
	       </cluster>
	       <cluster id="0xfc02" name="Sengled Mobile Control specific" mfcode="0x1160">
			<description>Sengled specific cluster for mobile control</description>
			<server>
			</server>
			<client>
			<command id="00" dir="recv" name="MobileControl" required="m" mfcode="0x1160">
				<description>Command description for zcl Mobile Control.</description>
				<payload>
					<attribute id="0x0000" type="u16" name="control_type"> </attribute>
				        <attribute id="0x0001" type="u16" name="control_data"> </attribute>
				        <attribute id="0x0002" type="u16" name="transition_time"> </attribute>
				</payload>
			</command>
			</client>
	       </cluster>
	       <cluster id="0xfc03" name="Sengled RGB calibration specific" mfcode="0x1160">
			<description>Sengled specific cluster for RGB calibration</description>
			<server>
				<attribute id="0x0000" name="Temp adc data" type="u16" mfcode="0x1160" access="rw" required="o" default="0x01ff" range="0,65535" > </attribute>
				<attribute id="0x0001" name="Red cali coeff" type="u32" mfcode="0x1160" access="rw" required="o" default="0x2710" range="0,4294967295" > </attribute>
				<attribute id="0x0002" name="Green cali coeff" type="u32" mfcode="0x1160" access="rw" required="o" default="0x2710" range="0,4294967295" > </attribute>
				<attribute id="0x0003" name="Blue cali coeff" type="u32" mfcode="0x1160" access="rw" required="o" default="0x2710" range="0,4294967295" > </attribute>
			</server>
			<client>
			<command id="00" dir="recv" name="rgb_calibration" required="m" mfcode="0x1160">
				<description>Sengled TEST control</description>
				<payload>
					<attribute id="0x0000" type="u8" name="cali_cmd"> </attribute>
				        <attribute id="0x0001" type="u16" name="cali_data"> </attribute>
				</payload>
			</command>			   
			</client>
	       </cluster>
		<cluster id="0xfc04" name="Sengled light auto reset specific" mfcode="0x1160">
			<description>Auto reset for Shangrui light</description>
			<server>
				<attribute id="0x0000" name="AUto reset" type="u8" mfcode="0x1160" access="rw" required="o" default="0x00"> </attribute>
			</server>
			<client>
			</client>
	       </cluster>	       

There is perhaps some mistake with on his side optional="false" and deconz side required="m"
But I m not sure it make a difference

Else for me it’s fine, I haven’t see problem, but better to test it to be sure.

And IDK how to make broadcast request using the XML file neither.
But it can’t work using unicast one ? This request can be done on a device instead of the whole network ?

Agree but I already had trouble in the past with a buggy general.xml thus trying to get some advice first :wink:

Yes the logical seems to be inversed between the initial information and ZCLDB syntax. But not quite sure …