Skip to content
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: support start stop commands for multilevel switch #40

Merged
merged 18 commits into from
Dec 1, 2020

Conversation

robertsLando
Copy link
Member

Fixes #30

@coveralls
Copy link

coveralls commented Dec 1, 2020

Pull Request Test Coverage Report for Build 394221574

  • 24 of 235 (10.21%) changed or added relevant lines in 5 files are covered.
  • 9 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.7%) to 28.061%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app.js 0 6 0.0%
lib/ZwaveClient.js 0 71 0.0%
lib/Gateway.js 8 142 5.63%
Files with Coverage Reduction New Missed Lines %
lib/Gateway.js 9 19.79%
Totals Coverage Status
Change from base Build 393927154: -0.7%
Covered Lines: 1830
Relevant Lines: 6654

💛 - Coveralls

@robertsLando robertsLando mentioned this pull request Dec 1, 2020
2 tasks
@ODINServ
Copy link

ODINServ commented Dec 1, 2020

Hi,

I've tested it but it does not work but it does respond with an error.
I don't have HASS integration enabled, do i need to enablet hat?

The request: zwavejs2mqtt/maarten_left/switch_multilevel/endpoint_1/targetValue/set value: STOP or stop, which seems to be translated to stopLevelChange

 z2m:Mqtt Message received on zwavejs2mqtt/maarten_left/switch_multilevel/endpoint_1/targetValue/set +2s
  z2m:Zwave Error while writing stop on 5-38-1-targetValue: stopLevelChange failed +2s
  z2m:Zwave Unable to write stop on 5-38-1-targetValue +0ms

I've enabled HASS discovery but that seems not to matter.

Thnx!

@robertsLando
Copy link
Member Author

Stoplevelchange failed is the error from zwavejs, it means that "stopLevelChange" has thrown, @AlCalzone do I made something wrong?

isNaN(value)
) {
if (/stop/i.test(value)) {
await zwaveNode.commandClasses['Multilevel Switch'].stopLevelChange()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlCalzone here is where I call it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you get any specific error? Lots of things can go wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stopLevelChange failed that's the error 🤷‍♂️

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive attached logging to the issue: #30 (comment)

14:31:50.571 DRIVER » [Node 004] [REQ] [SendData]
                      │ transmit options: 0x25
                      │ callback id:      73
                      └─[SupervisionCCGet]
                        │ session id:      10
                        │ request updates: false
                        └─[MultilevelSwitchCCStopLevelChange]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I have made something wrong becasue from the logs seems the call is done correctly but something else has failed

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!! 😃

Your are my heroes! 💪
I found in the mean time more users that want this, so your there heroes as well.
(https://community.home-assistant.io/t/fibaro-roller-shutter-3-fgr-223-cannot-get-it-to-work-properly/97577/115 )

🍻 🥂

If you are interested in the logs: #30 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlCalzone So based on this I think you will have to remove the check and just send the command? Can I revert to the previous version and use start/stopLevelChange?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll need to figure out why I used Supervision for those commands in the first place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ODINServ start spam hass forums with zwavejs so 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, fuck past me.
I changed this here but I no longer know why...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Ability to send a stop value to the same topic as position request
4 participants