Thereβs just one set of mesh networks; migration to edge drivers doesnβt directly change anything about the network topology.
My bad! You know what they say about assumingβ¦
Awesome stuff. So what seems to be the issue for scenes not running ?
Hi ,
Iβm having two zigbee curtain modules:
deviceLabel: Lonsonho QS-Zigbee-C01
manufacturer: _TZ3000_vd43bbfq
model : TS130F
and:
deviceLabel: Lonsonho QS-Zigbee-C01
manufacturer: _TZ3000_fccpjz5z
model : TS130F
Both have an ability for Reverse Shutter motor Polarity and Percentage calibration
tuyaCalibration: {Cluster: 0x0102 , Atrrib_ID: 0xf001, type: DataType.enum8}, β0β: βPerform Calibrationβ β1β: βRun Modeβ
tuyaMotorReversal: {Cluster: 0x0102 , Atrrib_ID , ID: 0xf002, type: DataType.enum8}, "0": "Normal"
"1": "Reverse"
I tried to make my own driver using your instructions but something didnβt worked. Can you please create a profile like window-treatment-profile-calibration and the add the fingerprints I mentioned to your driver. Iβm from HW world and it is very difficult for me to debug.
Thanks β¦
Hi @dotan_shai
I have added a new calibration profile with two preferences:
- One to run the calibration and then leave it in normal operation, I guess
- Another to select normal or reverse motor operation
name: window-treatment-profile-calib
components:
- id: main
capabilities:
- id: windowShade
version: 1
- id: windowShadePreset
version: 1
- id: windowShadeLevel
version: 1
- id: firmwareUpdate
version: 1
- id: refresh
version: 1
categories:
- name: Blind
preferences:
- preferenceId: presetPosition
explicit: true
- name: "performCalibration"
title: "Perform Calibration"
description: "Perform Calibration- (default: Run Mode)"
required: false
preferenceType: enumeration
definition:
options:
"0": "Perform Calibration"
"1": "Run Mode"
default: "1"
- name: "motorReversal"
title: "Tuya Motor Reversal"
description: "Tuya Motor Reversal. (default: Normal)"
required: false
preferenceType: enumeration
definition:
options:
"0": "Normal"
"1": "Reverse"
default: "0"
- I have added the code to write the attributes when the value in preferences is changed
--- Configure calibration cluster 0x0102, attributte 0xF001 data type "Enum8"
if id == "performCalibration" then
print("<<< Write perform Calibration >>>")
local value_send = tonumber(newParameterValue)
local data_value = {value = value_send, ID = 0x30}
local cluster_id = {value = 0x0102}
local attr_id = 0xF001
write.write_attribute_function(device, cluster_id, attr_id, data_value)
--- Configure motorReversal cluster 0x0102, attributte 0xF002 data type "Enum8"
elseif id == "motorReversal" then
print("<<< Write motor Reversal >>>")
local value_send = tonumber(newParameterValue)
local data_value = {value = value_send, ID = 0x30}
local cluster_id = {value = 0x0102}
local attr_id = 0xF002
write.write_attribute_function(device, cluster_id, attr_id, data_value)
end
When you make the change of value in preferences you will be able to see in the CLI the value sent to write in the device and the response of the device to that attribute writing
This is the driver version
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Name Zigbee Window Treatment Mc
Version 2022-10-06T19:39:08.090789119
βββββββββββββββββββββββββββββββββββββββββββββββββββ
- id: "TS130F/_TZ3000_vd43bbfq"
deviceLabel: Lonsonho QS-Zigbee-C01
manufacturer: _TZ3000_vd43bbfq
model: TS130F
deviceProfileName: window-treatment-profile-calib
- id: "TS130F/_TZ3000_fccpjz5z"
deviceLabel: Lonsonho QS-Zigbee-C01
manufacturer: _TZ3000_fccpjz5z
model: TS130F
deviceProfileName: window-treatment-profile-calib
Sorry,
Another two modules with same behavior in terms of calibration and reverse polarity with slightly change in Device label:
- id: "Lonsonho/TZ3000/_TZ3000_4uuaja4a"
deviceLabel: Lonsonho QS-Zigbee-C03
manufacturer: _TZ3000_4uuaja4a
model : TS130F
and
- id: "Lonsonho/TZ3000/_TZ3000_zirycpws"
deviceLabel: Lonsonho QS-Zigbee-C03
manufacturer: _TZ3000_zirycpws
model : TS130F
10Xβ¦
Sorry Mariano,
I Didnβt have chance to testβ¦
I donβt have the modules , Iβm helping some friendsβ¦
Added to this driver version
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Name Zigbee Window Treatment Mc
Version 2022-10-07T19:05:50.205299079
βββββββββββββββββββββββββββββββββββββββββββββββββββ
- id: "TS130F/_TZ3000_4uuaja4a"
deviceLabel: Lonsonho QS-Zigbee-C03
manufacturer: _TZ3000_4uuaja4a
model: TS130F
deviceProfileName: window-treatment-profile-calib
- id: "TS130F/_TZ3000_zirycpws"
deviceLabel: Lonsonho QS-Zigbee-C03
manufacturer: _TZ3000_zirycpws
model: TS130F
deviceProfileName: window-treatment-profile-calib
Hi,
Just checked and both function works fine !!
10X as usualβ¦
BTW you should also receive
exposes.numeric(βcalibration_timeβ, ea.STATE).withUnit(βSβ).withDescription(βCalibration timeβ)],
This info is nice to have and not critical
Sorry, I donβt quite understand what this is
Not expert as you but we should be able to receive a message after calibration is done with
Calibration Time is seconds. I will try to to send you some logs.
Also a minor mistake in deviceLabel should be Lonsonho QS-Zigbee-CP03 should be corrected for both
Device label is used only for show It after pairing.
Can be changed with app device edit
I will change tomorrow
Hi ,
Another one:
- id: "Moes/MS-108ZR"
deviceLabel: MS-108ZR
manufacturer: _TZ3000_1dd0d5yi
model : TS130F
Have an ability for Reverse Shutter motor Polarity and Percentage calibration - but not as before regarding calibration
moes_cover_calibration: {Cluster: 0x0102 , Atrrib_ID: 0xf003, type: DataType.uint16}, When CalibrationMin=0 CalibrationMax=100 , CalibrationData = ValueEnteredInSettings*10 (allow entering in setting XX.X)
tuyaMotorReversal: {Cluster: 0x0102 , Atrrib_ID , ID: 0xf002, type: DataType.enum8}, "0": "Normal", "1": "Reverse"
I hope this is not too complicated
Here are some logs from calibration.
https://drive.google.com/file/d/1c2LVOWTNh6QaBabNmRe0IG1Iu6BF9gxl/view?usp=sharing
All works , but some improvements .
moesCalibrationTime: {ID: 0xf003, type: DataType.uint16},
if (msg.data.hasOwnProperty('moesCalibrationTime')) {
const value = parseFloat(msg.data['moesCalibrationTime']) / 10.0;
result[postfixWithEndpointName('calibration_time', msg, model, meta)] = value;
also:
tuyaMovingState: {ID: 0xf000, type: DataType.enum8},
if (msg.data.hasOwnProperty('tuyaMovingState')) { const value = msg.data['tuyaMovingState']; const movingLookup = {0: 'UP', 1: 'STOP', 2: 'DOWN'};
Hi @dotan_shai
I donβt quite understand what you mean by this.
What do you want to see in the app the calibration process?, which is the same thing that you can see physically in the blind when you calibrate.
These attributes only inform that the shutter goes up, down or is stopped and how long the calibration has taken since you changed from 1 to 0 in the preference calibration until you put a 1 again.
Thatβs what you see in the CLI looking for the messages with 0xF000 and 0xF003
You are right this only gives the information you mentioned. It will be nice to know in the settings how long the calibration took.
Regarding the window status, I just wanted to let you know that this information exist you can display it or not. Iβm leaving that to your decision
@Mariano_Colmenarejo
Can you please help with that oneβ¦
Hi ,
Another one:
- id: "Moes/MS-108ZR"
deviceLabel: MS-108ZR
manufacturer: _TZ3000_1dd0d5yi
model : TS130F
Have an ability for Reverse Shutter motor Polarity and Percentage calibration - but not as before regarding calibration
moes_cover_calibration: {Cluster: 0x0102 , Atrrib_ID: 0xf003, type: DataType.uint16}, When CalibrationMin=0 CalibrationMax=100 , CalibrationData = ValueEnteredInSettings*10 (allow entering in setting XX.X)
tuyaMotorReversal: {Cluster: 0x0102 , Atrrib_ID , ID: 0xf002, type: DataType.enum8}, "0": "Normal", "1": "Reverse"
Hi @dotan_shai
Try this version.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Name Zigbee Window Treatment Mc
Version 2022-10-16T09:56:48.077339864
βββββββββββββββββββββββββββββββββββββββββββββββββββ
I added a custom capability to see the calibration steps and final total time.
Can see in device history too.
According tuya documentation cluster F003 can use as quick calibration , but is not % is time too.
Please, try with the accurate calibration F001 attribute too
DP3 and DP6 Accurate calibration 1 and 2
Direction | Cluster ID | Command/Attribute ID | Value |
---|---|---|---|
Client to server | 0x0102: Window Covering | 0xF001: Accurate calibration (Tuya-specific attribute) | / |
Server to client | 0x0102: Window Covering | 0xF001: Accurate calibration (Tuya-specific attribute) | Value |
- 0: Calibration started.
- 1: Calibration finished.|
DP10 and DP11 Quick calibration 1 and 2
Direction | Cluster ID | Command/Attribute ID | Value |
---|---|---|---|
Client to server | 0x0102: Window Covering | 0xF003: Travel (Tuya-specific attribute) | / |
Server to client | 0x0102: Window Covering | 0xF003: Travel (Tuya-specific attribute) | Valid values range from 30 to 9000, in units of 0.1 seconds. |