-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Ability to send a stop value to the same topic as position request #30
Comments
@ODINServ YOu can do such things by using custom send/receive functions provided in gateway values table. You can write a function that parse the payload as you want |
I see i will give it a try, maybe the docs can be updated with an example? I will figure it out and try to update them my self, that would be my first commit on github. |
@ODINServ The function will be like:
this is what you need to write inside the parse send function of gateway value, the This will return |
I'm not sure if this is what i want, but i can indeed use that for something else. So when i press the stop button on the openhab interface, it should stop the movement of the blinds. So from your example and what is on the gateway values table. So that would than be:
But what would the something than because i guess the only accepted values are 0-99. |
If you need to parse the received commad from openhab and the command is "stop" the function will do the opposite of the one I have wrote:
But wait don't you have the other stop switch? You are working with the dimmer, you can't stop it in this way I think |
Yes currently im using the dimmer as a work around which indeed has no stop button. When i press the STOP button it send STOP to the targetValue topic. But what it should do is stop the movement of the shutters. Is that possible?, if not it would be nice, since also openhab an home-assistant is using this approach. |
I have this python script now running in the background as a man in the middle and handles this model:
|
Is there another valueId that could handle the stop? |
I guess, the answer could be yes? I found a spec but not sure if it is still valid, and if i look at the right versions of things. I found a/some zwave spec (not sure of this is still a valid one?): https://www.silabs.com/documents/login/miscellaneous/SDS13781-Z-Wave-Application-Command-Class-Specification.pdf It seems that 255 is a thing to set in the targetValue which means "Restore most recent (non-zero) level." -> Paragraph 4.69.1 table 81 And it seems that stop is a complete different command: (Chapter 4.69.5)
But i guess if you want to implement that generic that it would a stop topic right, which i personally don't like if i want to use the existing (openhab / hass) models. I would like to send that STOP string to targetValue which then sends the actual "SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE". So i'm not sure if i look at the right things here. |
You mean that if you send 255 it will stop it? Could you try to send 255 using the web ui and tell me if that works? |
Nope, When sending 255 via mqtt it should also send 255 to the device, the device will (should) then return according to that spec it's previous position. I would like to send the "STOP" string to targetValue, and then it would be nice that zwave-js is sending the "SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE" command to the device. |
This is something that cannot (and shouldn't) be handled by zwave-js, is that valueId showing on ui? I mean the SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE ? |
I looked in the node-zwave-js code i want to be able to call this: https://github.com/zwave-js/node-zwave-js/blob/master/packages/zwave-js/src/lib/commandclass/MultilevelSwitchCC.ts#L215 When "STOP" is received on the targetValue topic HASS "cover" model stop button on UI: https://community-assets.home-assistant.io/original/3X/a/7/a734d7af96795576ddd092345f84e3f78971fe07.png Why should this than not be handled by zwavejs? |
Let's see what @AlCalzone think about this |
Stopping should be possible with stopLevelChange, which is a different command. @robertsLando You are already exposing this as a switch (perform a level change) so it should just be a matter of setting the correct value. The value 255 can be used to turn a light that was at 60 for example and then was turned off back on to 60. |
@AlCalzone could you show me an example of how I could trigger a stopLevelChange command? |
e.g. by setting the value for value ID
to false. Or:
|
I will try later today |
I seem only to be able to add logging here: zwave-1979.txt |
@ODINServ I have closed this for now but just to let you know I have reverted the change on code to use the |
Hi,
Im am slowly integrating into openhab, i want to use the openhab model "RollerShutter" to control my shutters.
It has 3 buttons -> up (value 99) -> stop ( value stop / or custom) -> down (value 0), i can also send a level in the form of a number between 0 - 100 (which is than mapped the openhab mqtt config to 0-99).
What is does is sending a request to the
zwavejs2mqtt/study/switch_multilevel/endpoint_1/targetValue/set
In there model i cannot select a other topic to send the stop command to.
It would be nice that i can send the "stop" word or any other value op the targetValue/set topic to use the build in openhab model, i think home assistant is using the same approach.
Currenly i am using the "dimmer" model to send values and use a openhab switch to send stop (by means of sending false) the Up or Down topic.
Thnx!
The text was updated successfully, but these errors were encountered: