local byteValue = 0x55 -- hex 55
local cmdString = string.format("\x1D\x0D\x01\xFF%c", byteValue)
-- cmdString should now contain the string (shown as embedded escaped bytes) '\x1D\x0D\x01\xFF\x55'
zw.Command(0x91, 0x00, cmdString)
Use the %c conversion to output the character byte from the input directly
You can’t leave a hanging \x in your string, as there is no value after it when the string is interpreted
I didn’t test this but I think it gets what you want.
I would use symbol names for things like command class ID’s. I might even create a define for the 0x00 command value, whatever it maps to with your specific device you’re working with. Symbols are always better than magic numbers.
local cc = require "st.zwave.CommandClass"
zw.Command(cc.MANUFACTURER_PROPRIETARY, 0x00, cmdString)
zw.Command won’t actually send anything on the radio - you’ll have to use the :send() functions for that of course. zw.Command just creates a command formatted zwave object.