Related to this issue I've played a bit around with the openzwave-shared library.
As stated as well on Github https://github.com/OpenZWave/node-openzwave-shared/issues/358
I make use of the following script in order to try to send the external temperature:
var OZW = require('./lib/openzwave-shared.js');
const Buffer = require('buffer').Buffer;
var zwave = new OZW({
Logging: true, // enable file logging (OZWLog.txt)
ConsoleOutput: true // enable console logging
});
zwave.connect('/dev/ttyACM0');
zwave.on('scan complete', function(){
console.log('Buffer will be written now............................');
const buffer1 = Buffer.from([
0x31 // COMMAND_CLASS_SENSOR_MULTILEVEL
,0x05 // SENSOR_MULTILEVEL_REPORT
,0x01 // Sensor type: TEMPERATURE
,0x42 // 0010 0010: 001=Decimal - 00=Celsius - 010=2 Byte
,0x04,0xB0 // 0AF0 --> 2800 --> 28.00°C.04B0 --> 12°C.
]);
console.log('sendRawData will be run now...........................');
zwave.sendRawData(
6 //nodeID
,'sendTemperature:' //logText
,49 //Sensor Multilevel Command Class 0x31
,false //sendSecure
,buffer1 //content
,6 //length bei > 5 ermittelt das Modul automatisch die Length
);
console.log('sendRawData run completed.............................')
setTimeout(function(){
console.log('Start to disconnect now............................');
zwave.disconnect('dev/ttyACM0');
console.log('ZWAVE disconnect has been run......................')
}, 15000);
});
Is anybody aware of a plan to integrate the sendRawData() function into iobroker.zwave?