Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Support of openzwave-shared function "sendRawData" #102

Open
KevinK4711 opened this issue Dec 14, 2019 · 2 comments
Open

Support of openzwave-shared function "sendRawData" #102

KevinK4711 opened this issue Dec 14, 2019 · 2 comments

Comments

@KevinK4711
Copy link

Hi all,

For the automation of my Eurotronic Spirit Z thermostats using ioBroker I want to feed the current measured temperature to the Spirit since its own measurement is incorrect.

Therfore I'd like to make use of the openzwave-shared function sendRawData():

NAN_METHOD(OZW::SendRawData)
	// ===================================================================
	{
		Nan::HandleScope scope;
		CheckMinArgs(5, "nodeid, logText<str>, msgType<uint8>, sendSecure<bool>, content<Buffer> (,length)");
		uint8 nodeid     = Nan::To<Number>(info[0]).ToLocalChecked()->Value();
		::std::string logText(*Nan::Utf8String( info[1] ));
		uint8 msgType    = Nan::To<Number>(info[2]).ToLocalChecked()->Value();
		bool sendSecure  = Nan::To<Boolean>(info[3]).ToLocalChecked()->Value();
		checkType(Buffer::HasInstance(info[4]));
		uint8 *content   = (uint8*)Buffer::Data(info[4]);
		double buflength =  Buffer::Length(info[4]);
		uint8 length    = 0;
		// can either deduce length from JS buffer, or use the length provided
		if (info.Length() > 5) {
			length = ::std::min<double>( Nan::To<Number>(info[5]).ToLocalChecked()->Value(), buflength );
		} else {
			length = buflength;
		}
		OZWManager( SendRawData, homeid, nodeid, logText, msgType, sendSecure, content, length );
	}

Could you please provide an option to invoke this function on a zwave device using iobroker.zwave?

More background:
https://forum.iobroker.net/topic/22396/eurotronic-spirit-z-wave-ist-temperatur-extern-setzen
OpenZWave/node-openzwave-shared#358

@KevinK4711 KevinK4711 changed the title Support of openzwave-share function "sendRawData" Support of openzwave-shared function "sendRawData" Dec 14, 2019
@cburghardt
Copy link
Contributor

According to the issue on openzwave-shared the device did not accept the input so why would it help when iobroker sends the same?

@KevinK4711
Copy link
Author

That's something I'm working on. As soon as I know how to transmit the value correctly I'd appreciate it if the function would be included in iobroker.zwave.
I think the function might be of value for other occasions as well?

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

No branches or pull requests

2 participants