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(config): add config file for Nice IBT4 BusT4 #2525

Merged
merged 4 commits into from
May 10, 2021

Conversation

zwave-js-bot
Copy link
Collaborator

@zwave-js-bot zwave-js-bot commented May 3, 2021

fixes: #2518

TODO:

  • Change PR title to be more specific

@zwave-js-assistant
Copy link

🚧 It seems like this PR has lint errors 🚧

I should be able to fix them for you. If you want me to, just comment
@zwave-js-bot fix lint

@AlCalzone AlCalzone changed the title feat(config): import config files from zwa feat(config): import config file for Nice IBT4 BusT4 May 3, 2021
Copy link
Member

@AlCalzone AlCalzone left a comment

Choose a reason for hiding this comment

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

These alarm configurations need to be partial parameters

@AlCalzone AlCalzone added the help wanted Extra attention is needed label May 3, 2021
@AlCalzone AlCalzone removed the request for review from robertsLando May 3, 2021 13:00
@cdnninja
Copy link
Contributor

cdnninja commented May 5, 2021

@AlCalzone I may need a hand with this one. Maybe just some pointers would be great on partials. I have started here focused around slot one since they are a clone. https://github.com/cdnninja/node-zwave-js/blob/master/packages/config/config/devices/0x0441/ibt4zwave.json

  1. I think my masks are wrong considering values could be up to 255? Otherwise could you check if my partial parameter approach is correct.
  2. Partials 1,2 and 3 state it follows zwave spec. I have found this spec for Notification Type but not for Notification Status or Event/State Parameters. I have used the few examples in the manual for this as a start. If you have anything to point me to let me know.

@AlCalzone
Copy link
Member

As you suspected, your bitmasks are wrong.

This parameter determines to which alarm frames and how the device should react. the parameters consist of 4 bytes, three most significant bytes are set according to the official Z-Wave protocol specification.

Looking at the manual

[MSB] – Notification Type
– Notification Status
– Event/State Parameters
[LSB] – action: 0x00 – no action, 0x01 – open, 0x02 – close

the high byte (3) is the Notification type, byte (2) the status and (1) the notification event. Byte 0 is the "action" of the device itself

In the documentation for partial params, we have a bitmask calculator to help you figure out the bitmask. Here's what it spits out for the notification type byte:
grafik

I have found this spec for Notification Type but not for Notification Status or Event/State Parameters

Notification status has possible values 0 and 255. Since 255 means "Unsolicited transmissions are enabled for the specified Notification Type", I'm not even sure if allowing 0 makes sense.
The Event/State Parameters (we should call that "Notification Event") depend on the selected notification type, so we won't be able to model that in the config files. Just make that a free entry between 0-254.

@AlCalzone
Copy link
Member

Actually, reading the manual confuses me more. They call the bytes Notification Type, Notification Status, and Event/State Parameters, but the explanations next to the values treat Notification Status as if it were the Notification Event...
The example in the submitted file does the same:

Example: Event: Home Security (0x07) Status: Motion Detected (0x08) Parameter: None (0x00) Action: Open (0x01) = 0x07080001 which is 117964801 decimal to be entered in the gateway.

So maybe byte 2 is actually the notification event (0-255) and byte 1 a single-byte event parameter (0-255).

@yuvalmesika
Copy link

Actually, reading the manual confuses me more. They call the bytes Notification Type, Notification Status, and Event/State Parameters, but the explanations next to the values treat Notification Status as if it were the Notification Event...
The example in the submitted file does the same:

Example: Event: Home Security (0x07) Status: Motion Detected (0x08) Parameter: None (0x00) Action: Open (0x01) = 0x07080001 which is 117964801 decimal to be entered in the gateway.

So maybe byte 2 is actually the notification event (0-255) and byte 1 a single-byte event parameter (0-255).

@AlCalzone @cdnninja Can I help in some way?
currently when the gate is closed the target value is 0,
when it`s open the value is 99
There is another mode to the gate (when operating from the remote control and not from the ibt4zwave device) which is partially open (the device shows a value of 99, but I not sure why, when I used openZwave it was showing 255 or 254 I think).

If you want me to test something let me know.
Thanks for your work.
Yuval

@AlCalzone
Copy link
Member

Sorry, but that info has nothing to do with the configuration parameters that influence which notification events are sent.

@cdnninja
Copy link
Contributor

cdnninja commented May 6, 2021

@AlCalzone I have updated with your feedback. I left 0 as available for notification status as the manual states 0 is the default of disabled for a few of the slots. If the first slot looks good I will clone this to the others reflecting defaults and such. I think we start with following the documentation and see if it works as intended.

@cdnninja
Copy link
Contributor

#2576 2576

@AlCalzone AlCalzone changed the title feat(config): import config file for Nice IBT4 BusT4 feat(config): add config file for Nice IBT4 BusT4 May 10, 2021
@zwave-js-assistant
Copy link

🚧 It seems like this PR has lint errors 🚧

I should be able to fix them for you. If you want me to, just comment
@zwave-js-bot fix lint

1 similar comment
@zwave-js-assistant
Copy link

🚧 It seems like this PR has lint errors 🚧

I should be able to fix them for you. If you want me to, just comment
@zwave-js-bot fix lint

@AlCalzone
Copy link
Member

@zwave-js-bot fix lint

@zwave-js-assistant
Copy link

🚧 It seems like this PR has lint errors 🚧

I should be able to fix them for you. If you want me to, just comment
@zwave-js-bot fix lint

@zwave-js-bot
Copy link
Collaborator Author

🐌 Please wait for the lint check to complete, then try again.

@zwave-js-assistant
Copy link

🚧 It seems like this PR has lint errors 🚧

I should be able to fix them for you. If you want me to, just comment
@zwave-js-bot fix lint

@AlCalzone
Copy link
Member

@zwave-js-bot fix lint

@AlCalzone AlCalzone merged commit 66add1d into master May 10, 2021
@AlCalzone AlCalzone deleted the import-config-1620023644 branch May 10, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config ⚙ Configuration issues or updates help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing device configuration 0x0441:0x2400:0x1000
6 participants