Where is MessageSend?

Hi,

I’m trying to work out how the Z-Wave command COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE operates (to get a Danfoss Living Connect radiator thermostat working).

Surprisingly I can’t find any public information about how that command class is structured (any pointers would be appreciated here).

I thought I would try to send the Living Connect node some commands and take a look at the responses. The documentation on debugging refers to a /usr/bin/MessageSend command which is missing on my Vera 2

http://wiki.micasaverde.com/index.php/ZWave_Debugging

Can somebody tell me where I can get a copy of this please? I have a niggling suspicion that the LuaUPnP changes might have obsoleted it?

Thx, Alex

I’ve managed to work out that I can use the following GET request to turn off the heating on my boiler actuator:

http://x.x.x.x:49451/data_request?id=lu_action&DeviceNum=1&serviceId=urn:micasaverde-com:serviceId:ZWaveNetwork1&action=SendData&Node=2&Data=x40-x1-x0-x5

Similar to turn on

http://192.168.1.116:49451/data_request?id=lu_action&DeviceNum=1&serviceId=urn:micasaverde-com:serviceId:ZWaveNetwork1&action=SendData&Node=2&Data=x40-x1-x1-x5

This corresponds to the protocol implementation in Open-ZWave

http://open-zwave.googlecode.com/svn-history/r185/trunk/cpp/src/command_classes/ThermostatMode.cpp

Next I want to test out the climate control schedule command implemented here

http://open-zwave.googlecode.com/svn-history/r185/trunk/cpp/src/command_classes/ClimateControlSchedule.cpp

The SendData command seems to prefix my data bytes with 0x03 as it thinks I want to perform a set (if I am reading this right)

To perform a RequestState, which is what I want to start with, to see what response I get, I need to have a 0x02 rather than a 0x03

Looking at the action definitions in S_ZWaveNetwork1.xml there doesn’t seem to be an alternative action I can use, other than SendData

Can anybody advise here on how I control the Z-wave bytes that are written more fully?

Thanks,

Alex

[tt]PutByte[/tt]?

Edit:
Well, after reading [tt]S_ZWaveNetwork1.xml[/tt] it looks more like [tt]PutByte[/tt] is meant to flash the Z-Wave dongle …
If true, an attacker on the local LAN would be able to modify/erase the Z-Wave dongle …

No I agree, PutByte doesn’t look like it. I think I either need control over that 0x03 that’s prefixed (preferably) or I need some kind of ReadData command that sends a 0x02 in its place…

Patching LuaUPnP or intercepting the communication with the Z-Wave dongle?

Either is good. If I could lay my hands on the MessageSend utility then presumably I could stop LuaUPnP and use that to access the dongle directly?

I did have a look at some of the threads on LuaUPnP but no idea how to go about patching it though. Can you point me to any docs?

Thx, Alex

[tt]http://wiki.micasaverde.com/index.php/Source_Code[/tt] ?

Intercepting the communication with the dongle on OS level might be easier.

I did have a look at that page but the “OBSOLETE” at the top made me think maybe it wasn’t worth too much of my time…

I could recreate tools to access the dongle I suppose but as they must already exist I’d much rather “stand on the shoulders of giants”… :slight_smile:

A/

Has anybody got any further thoughts or information on how to interact with the Z-Wave dongle in a more flexible way? I seem to have ground to a halt on this one and I’d really like to get these Danfoss thermostats working with a schedule before I have to replace all the batteries…

Thx, Alex

What about searching the output of [tt]strings LuaUPnP[/tt] for hidden functionality? :slight_smile:

[tt]http://forum.micasaverde.com/index.php/topic,7541.msg48372.html#msg48372[/tt]

Heh. I did have a quick look just now. Can’t spot anything obvious in the way of hidden action requests. I guess I prefer my development a little more documented nowadays :wink:

Any thoughts on the API for the internal Z-wave device on the Vera 2?

I’m at the point where I’ll just shut down LuaUPnP and put together a noddy command line utility to write to and read from the device if I can find the protocol for it

Cheers, Alex

I’m not a Linux guru, but wouldn’t it be possible to [tt]interceptty /dev/tts/1[/tt] - well, you’d have to (cross)compile the utility first …

Yes probably, but I’d have to find the source (btw. where is the source to the Linux kernel running on Vera 2?) setup a cross-compilation environment, figure out how the bootloader on the board works, risk bricking the unit to update, etc. etc. which is all a pain.

It’d probably be easier to run strace on the LuaUPnP application and log what it is up to.

That said these are easy questions leading to what seems like standard, needed, Z-Wave command support for device classes,
so I was rather hoping somebody in the know at MicasaVerde could answer them rather than me having to spend lots of time
reverse-engineering the system :slight_smile:

A/

Trying to clean up my rather scatter-gun approach to posting (apologies).

I had misunderstood how the SendData action works. McFlorin and the MicasaVerde chaps have been kind enough to help me understand that we can write any Z-Wave packets we want using their SendData action (which is accessible via a web-browser for testing).

I’ve posted some notes on my testing here

[url=http://forum.micasaverde.com/index.php/topic,8596.0.html]http://forum.micasaverde.com/index.php/topic,8596.0.html[/url]

And more specific notes on any progress I make with the Danfoss Living Connect will be here

[url=http://forum.micasaverde.com/index.php/topic,6332.30.html]http://forum.micasaverde.com/index.php/topic,6332.30.html[/url]