Replies: 8 comments 6 replies
-
Are you asking about an obstruction? Or, the position, or something else? I'm not sure what status you're referring to exactly. Using the |
Beta Was this translation helpful? Give feedback.
-
Hello, sorry for my poor english. Yes I'm writing of "obstruction detection". In the HOME application is a button for this. In the YAHKA iobroker adapter the boolean field is indeed named "ObstructionDetected" as part of the service "WindowCovering". So I like to send this boolean information by webhook to the homebridge-blinds adapter (same as "pos"). Thanks Bernhard |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm not sure what you need. This is my configuration:
I control the opening in the morning and evening by a JS/BLOCKLY program and update the position with the webhook command 192.168.177.yz is my homebridge server Closed - http://192.168.177.yz:51829/?pos=0 or Opened - http://192.168.177.yz:51829/?pos=100 |
Beta Was this translation helpful? Give feedback.
-
Thats the output: {
"val": 0,
"ack": true,
"ts": 1614705448144,
"q": 0,
"from": "system.adapter.zwave.0",
"user": "system.user.admin",
"lc": 1614867563936,
"common": {
"name": "Level",
"type": "number",
"role": "level.dimmer",
"read": true,
"write": true,
"min": 0,
"max": 255
},
"native": {
"value_id": "5-38-1-0",
"node_id": 5,
"class_id": 38,
"type": "byte",
"genre": "user",
"instance": 1,
"index": 0,
"label": "Level",
"units": "",
"help": "The Current Level of the Device",
"read_only": false,
"write_only": false,
"min": 0,
"max": 255,
"is_polled": false
},
"type": "state",
"_id": "zwave.0.NODE5.SWITCH_MULTILEVEL.Level_1"
} Well, I don't have this with obstruction but from the logic point of view an obstruction situation is obvious if the actual level is higher than the target level because blind try to reach the target level and after 2 trys it goes a step in the open direction (the case in the other direction isn't necessary in my case but may be also possible in other cases, don't know). So it isn't very diffcult to generate a boolean value for obstruction use this as a status in HOME. The function has to look if target position is lower than final feedbackof the actual position from the blind motor with a tolerance of x (accurancy of the blind motor for reaching the target position) => This is the obstruction situation. A second possibility are the alarm codes from the blind motor. But until now I don't have this from the company. Alarm Codes are available in a separate ZWAVE field calles Alarms. Thats was the orginal idea and I have an open request to the MOBILUS company to get those codes. With a small programm it is possible to generate a boolean value for obstruction and send this by webhook to you adapter. The curl get this: {
"val": "Z�}�`��Ȋ�0\u0001����",
"ack": true,
"ts": 1614705445124,
"q": 0,
"from": "system.adapter.zwave.0",
"user": "system.user.admin",
"lc": 1614867312541,
"common": {
"name": "Error Code",
"type": "string",
"role": "state",
"read": true,
"write": false
},
"native": {
"value_id": "5-113-1-266",
"node_id": 5,
"class_id": 113,
"type": "string",
"genre": "user",
"instance": 1,
"index": 266,
"label": "Error Code",
"units": "",
"help": "The Error Code returned by the device",
"read_only": true,
"write_only": false,
"min": 0,
"max": 0,
"is_polled": false
},
"type": "state",
"_id": "zwave.0.NODE5.ALARM.Error_Code_1"
} |
Beta Was this translation helpful? Give feedback.
-
Hello, sorry for late answer but I was very busy. Yes the value has a range of 0-255 but only 100 is used for opening. So that works perfect.
Shutting down means going from high value (e.g. 100) to low value (e.g. 0). Crash means actual value > target value (crashes normally occur by hut down operations). So example Start position = 100 Target = 0 So 0 < 30 thats the condition for a crash situation. -1 Okay, that could be a try. Regards Bernhard |
Beta Was this translation helpful? Give feedback.
-
hi, I don't need $round((val/255)*100). The target was that I got the possibilty to send an obstruction detection information to the homekit adapter, so that in the home application the status "Obstruction Detection" is activated. I'm now not sure if this is possible because I don't understand the relationsship between the "position_jonata" term and the status (true/false) for obstruction. Today I configured my VELUX Roof blinds and they have a status for obstruction. The request // http://192.168.177.xy:8082/get/klf200.0.products.2.runStatus?value {
"val": 1,
"ack": true,
"ts": 1615310021620,
"q": 0,
"from": "system.adapter.klf200.0",
"user": "system.user.admin",
"lc": 1615315195347,
"type": "state",
"common": {
"name": "runStatus",
"role": "value",
"type": "number",
"read": true,
"write": false,
"min": 0,
"max": 255,
"desc": "Current run status",
"states": {
"0": "ExecutionCompleted",
"1": "ExecutionFailed",
"2": "ExecutionActive"
}
},
"native": {
},
"_id": "klf200.0.products.2.runStatus"
} Deliveres 1 for "Execution Failed" in the case of an obstruction also the value of state is "1 for ERROR" / 20210309194700 {
"val": 1,
"ack": true,
"ts": 1615310021637,
"q": 0,
"from": "system.adapter.klf200.0",
"user": "system.user.admin",
"lc": 1615315195348,
"type": "state",
"common": {
"name": "state",
"role": "value",
"type": "number",
"read": true,
"write": false,
"min": 0,
"max": 255,
"desc": "Operating state",
"states": {
"0": "NonExecuting",
"1": "Error",
"2": "NotUsed",
"3": "WaitingForPower",
"4": "Executing",
"5": "Done",
"255": "Unknown"
}
},
"native": {
},
"_id": "klf200.0.products.2.state"
} In addition to this the Blinds deliver the value 100 for open position and 0 for closed position. Any ideas how I can work with this situation ? Blinds in HOME show "closed" if the VELUX blind is open. I'm using here also the %%POS%% function: "name": "Velux Viki",
"up_url": "http://192.168.177.xy:8082/set/klf200.0.products.2.targetPosition?value=%%POS%%",
"down_url": "http://192.168.177.xy:8082/set/klf200.0.products.2.targetPosition?value=%%POS%%",
"position_url": "http://192.168.177.xy:8082/get/klf200.0.products.2.currentPosition?value",
"position_jsonata": "\"val\"",
"http_options": {
"method": "GET"
},
"webhook_port": 51830,
"webhook_http_auth_user": "admin",
"webhook_http_auth_pass": "admin-password",
"verbose": true,
"accessory": "BlindsHTTP" Thanks Bernhard |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the quick answer. I no understand your logic and I will try the -1 value for obstruction in the position value tomorrow. My other problem with the VELUX blinds: Only calculating the position by "position_jsonata": ""$round((1-(val/255))*100)"", doesn't work, because I have to send 0 to close it and 100 to open it. This is my opening command: http://192.168.177.xy:8082/set/klf200.0.products.2.targetPosition?value=100 I can do it with IOBROKER and use self calculated values but having a button in your adapter to configure "0=open/100=close" or "0=close/100=open" could by a solution also for other users. Thanks again Bernhard |
Beta Was this translation helpful? Give feedback.
-
@BS-GIFHUB did the approach of setting -1 work? Also, regarding the
In this case, sudo npm install -g [email protected]
# restart homebridge |
Beta Was this translation helpful? Give feedback.
-
Hi,
is there any possibility to control the shutter status "Blockade entdeckt" ? My blinds (Z-Wave) can generate messages for blockades.
Thanks
Bernhard
Beta Was this translation helpful? Give feedback.
All reactions