What do these log entries mean?


(Bruce) #1

I’m attempting to find a bug in an app, hence tracing certain events in device logs. Most events for the device in question have Source of APP_COMMAND, obviously coming from the app. But there are two other sources: DEVICE /physical and DEVICE /digital. DEVICE/physical comes from physically operating the switch.

What throws DEVICE/digital??


(James Pansarasa) #2

I think (strong emphasis on think… maybe just believe) that this is the difference between the device’s response to the BasicSet versus the SwitchBinarySet commands. I encoded my device type over here to differentiate between the two.


/**	COMMAND_CLASS_BASIC (0x20)
 *	Short		value	0xFF for on, 0x00 for off
 */
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) 
{
	[name: "switch", value: cmd.value ? "on" : "off", type: "physical", displayed: true, isStateChange: true]
}

/**	COMMAND_CLASS_SWITCH_BINARY (0x25)
 *	Short		value	0xFF for on, 0x00 for off
 */
def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinarySet cmd)
{
	[name: "switch", value: cmd.value ? "on" : "off", type: "digital", displayed: true, isStateChange: true]
}

WebCore Piston - Programmatically not working?
(Bruce) #4

OK, I found the answer in the device type: “digital” is set by SwitchMultilevelReport, while “physical” is set by SwitchMultilevelSet. Onwards…