Additional z-wave requests

If I know a device supports additional command classes, is it possible to use them either via lua code or somehow in the device UI?

Hi @tinman,

If this is on Vera, yes, you should be able to send raw Zwave data with the specific command class and command with a simple luup call

luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='56', Data='112 4 3 1 2'}, 1)

The structure of the Data key calls for the command class either in hex or dec format and the data holders that the command class supports. For instance, turning on device 50 with command class 0x20 BASIC_SET, would look like

luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData',{Node='50', Data='x20 1 xFF'}, 1)

As always, the Zwave command class reference comes in handy.

1 Like

The old wiki had information about using the actions of the ZwaveNetwork device. It probably had some detail about what should be in the ‘Data’ parameter. But the old wiki isn’t really available and searching MiCasaVerde
Doesn’t really work. I assume the data starts with the command class followed by the command. Do the remaining number of bytes and values depend upon the command class and command?
Im trying to accomplish two things:

  1. The thermostat has and uses an outdoor temperature sensor but it’s data isn’t displayed anywhere and it doesn’t show up in the device advanced tab anywhere. The thermostat supports the COMMAND_CLASS_SENSOR_MULTILEVEL so I should be able to use it to discover everything it has.
  2. The thermostat, when controlling a system with a heat pump and fossil fuel backup, will automatically switch to emergency heat when the outdoor temp falls below a user setting or when the heat pump is unable to reach a set temp using the heat pump. There doesn’t seem to be a way to recognize when this happens by monitoring the existing thermostat variables. The thermostat also supports COMMAND_CLASS_MANUFACTURER_SPECIFIC. I may be able to find what I’m looking for by using this command class.

So right now I just want to get to the point where I can use the
luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1','SendData'
method to investigate what I can find from the thermostat. BTW this is a Honeywell T6 Pro ZWave thermostat. I tried searching for anything online and even contacted Honeywell tech support. They blew me off.

OK, tried sending a COMMAND_CLASS_SENSOR_MULTILEVEL, SENSOR_MULTILEVEL_GET. The

local resultCode, resultString, job, returnArguments = luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘22’, Data=‘0x31 4’}, 1)

returned a resultCode of 0, an empty resultString, a job number and no returnArguments. I suppose this means that a job had to be run since job number was returned.
Some log data:

28 12/23/22 12:45:45.371 JobHandler_LuaUPnP::HandleActionRequest testing Bluetooth urn:micasaverde-com:serviceId:HomeAutomationGateway1, urn:micasaverde-com:serviceId:BluetoothNetwork1, (nil) <0x73515520>
08 12/23/22 12:45:45.372 JobHandler_LuaUPnP::HandleActionRequest device: 1 service: urn:micasaverde-com:serviceId:ZWaveNetwork1 action: SendData <0x73515520>
08 12/23/22 12:45:45.372 JobHandler_LuaUPnP::HandleActionRequest argument Node=22 <0x73515520>
08 12/23/22 12:45:45.372 JobHandler_LuaUPnP::HandleActionRequest argument Data=0x31 4 <0x73515520>


01 12/23/22 12:46:01.782 ZWaveSerial::Send m_iFrameID 96904 type 0x0 command 0x13 expected 3 got ack 1 response 27036392 request 0 failed to get at time 158135781 start time 158115770 wait 20000 ack 1 m_iSendsWithoutReceive 0 <0x76794520>
01 12/23/22 12:46:01.782 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x17a58b8 type 12 id 115108 param=(nil) entry->when: 1671817543 time: 1671817561 tnum: 1 slow 0 tardy 18 <0x76794520>
01 12/23/22 12:46:01.783 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x19061d8 type 52 id 115329 param=(nil) entry->when: 1671817546 time: 1671817561 tnum: 1 slow 0 tardy 15 <0x76794520>
01 12/23/22 12:46:01.783 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x1a31a68 type 15 id 115281 param=(nil) entry->when: 1671817550 time: 1671817561 tnum: 1 slow 0 tardy 11 <0x76794520>
01 12/23/22 12:46:01.783 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x19c6cd0 type 51 id 115282 param=(nil) entry->when: 1671817554 time: 1671817561 tnum: 1 slow 0 tardy 7 <0x76794520>
01 12/23/22 12:46:01.784 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x1b34060 type 73 id 115272 param=(nil) entry->when: 1671817557 time: 1671817561 tnum: 1 slow 0 tardy 4 <0x76794520>
02 12/23/22 12:46:01.785 ZWaveJobHandler::AlarmCallback skipping check because of jobs <0x76794520>
01 12/23/22 12:46:01.785 AlarmManager::Run callback for alarm 0xf5fd30 entry 0x1d5e180 type 301 id 115273 param=(nil) entry->when: 1671817557 time: 1671817561 tnum: 1 slow 0 tardy 4 <0x76794520>
02 12/23/22 12:46:01.919 JobHandler::Run job#5394 :childcmd node 22 dev:1691 (0x1baf5d0) N:22 P:35 S:0 Id: 5394 is 16.519258000 seconds old <0x76194520>
04 12/23/22 12:46:01.985 <Job ID=5394 Name=childcmd node 22 Device=1691 Created=2022-12-23 12:45:45 Started=2022-12-23 12:46:01 Completed=2022-12-23 12:46:01 Duration=16.584703000 Runtime=0.65493000 Status=Successful LastNote=SUCCESS! Transmit was OK Node=22 NodeType=ZWaveThermostat NodeDescription=Honeywell Thermostat/> <0x76794520>
01 12/23/22 12:46:02.015 got CAN <0x75d94520>
02 12/23/22 12:46:02.016 ZWaveSerial::Send m_iFrameID 96911 got a CAN – Dongle is in a bad state. Wait 1 second before continuing to let it try to recover. <0x76194520>

I’ve successfully run some lua code to use the two command classes requesting reports of multilevel sensors and manufacturer proprietary info. I had logging set to log z-wave activity. I’ve attached a zip of the pertinent log data (plus other stuff - but not too much). I did the manufacturer proprietary request first, then the multilevel sensor request. I see that a job was started for each but I don’t know how to interpret the resulting log data. If anyone is knowledgeable about z-wave communication in a Vera Plus I’d appreciate a look at this log data. Let me know if I’m approaching this in the right way and if the responses are meaningful.
Here is the lua code I used:
For manufacturer proprietary

local resultCode, resultString, job, returnArguments = luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘22’, Data=‘0x91 4’}, 1)
luup.log("resultCode: "…resultCode)
luup.log("resultString: "…resultString)
luup.log("job: "…(job or ‘nil’))
for i,v in ipairs(returnArguments) do
luup.log("i,v: “…i…”, "…v)
end

For multilevel sensor

local resultCode, resultString, job, returnArguments = luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘22’, Data=‘0x31 4’}, 1)
luup.log("resultCode: "…resultCode)
luup.log("resultString: "…resultString)
luup.log("job: "…(job or ‘nil’))
for i,v in ipairs(returnArguments) do
luup.log("i,v: “…i…”, "…v)
end

luaupnp log.zip (13.3 KB)