ioBroker / ioBroker.zwave

Legacy Z-Wave integration using OpenZWave
Other
24 stars 7 forks source link

Associations for group #50

Closed Anzic23 closed 4 years ago

Anzic23 commented 5 years ago

is it possible to assign associations to groups? the fibaro relay has 2 groups of associations, in the adapter it turns out to bind only to the first group. Is there a way to do that would be to bind to the second? if I run the script #17 . in response, I get this error message: javascript.0 ReferenceError: group is not defined at Object.sendTo [as cb] (script.js.Z-Wave.associations:5:22) at Object.change (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:3666:71) at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:52:30) at Socket.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20) at Socket.onevent (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:270:10) at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:228:12) at Manager.<anonymous> (/opt/iobroker/node_modules/component-bind/index.js:21:15) at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20) at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:332:8) at Decoder.<anonymous> (/opt/iobroker/node_modules/component-bind/index.js:21:15)

AlCalzone commented 5 years ago

That script has an error. Replace ${group} in the 2nd to last line with the actual group number and you should see the result.

Anzic23 commented 5 years ago

thank you! now impossible to read of the Association. Assign one sensor through addAssociation. The script looks like this (and returns OK):

sendTo("zwave.0", "addAssociation", {nodeID: 23, group: 1, target_nodeid: 22}, (obj) => {
    if (obj.error) {
        log(obj.error, "error");
    } else {
        log(`associations set: ` + obj.result);
    }
});

And what would the second relay look like for fibaro FGS-222? And a gave curtain controller that has a zwave.0.NODE30.SWITCH_MULTILEVEL.Bright_1 and zwave.0.NODE30.SWITCH_MULTILEVEL.Dim_1 how designate the Association with each of the actions? Is that possible?

AlCalzone commented 5 years ago

I'm not sure. You need to look in the devices' manuals to see which association group controls which command classes. Maybe it's easier to do so with the admin UI?

Anzic23 commented 5 years ago

this script does the job:

sendTo("zwave.0", "addAssociation", {nodeID: 21, group: 1, target_nodeid:22.2}, (obj) => {
    if (obj.error) {
        log(obj.error, "error");
    } else {
        log(`Результат: ` + obj.result);
    }
});
arteck commented 5 years ago

same problem with ozw 1.6 and zwave 1.5 .. i can not add any node to association

cburghardt commented 5 years ago

@Anzic23 please close

cburghardt commented 4 years ago

@Apollon77 can be closed I think