Buggy code:
@ XStreamAlias ( "thermostatModeCommandClass" ) public class ZWaveThermostatModeCommandClass extends ZWaveCommandClass implements ZWaveBasicCommands , ZWaveCommandClassDynamicState , ZWaveCommandClassInitialization { @ XStreamOmitField private static final Logger logger = LoggerFactory . getLogger ( ZWaveThermostatModeCommandClass . class ) ; private static final byte THERMOSTAT_MODE_SET = 1 ; private static final byte THERMOSTAT_MODE_GET = 2 ; private static final byte THERMOSTAT_MODE_REPORT = 3 ; private static final byte THERMOSTAT_MODE_SUPPORTED_GET = 4 ; private static final byte THERMOSTAT_MODE_SUPPORTED_REPORT = 5 ; private final Set < ZWaveThermostatModeCommandClass . ModeType > modeTypes = new HashSet < ZWaveThermostatModeCommandClass . ModeType > ( ) ; @ XStreamOmitField private boolean initialiseDone = false ; @ XStreamOmitField private boolean dynamicDone = false ; private boolean isGetSupported = true ; public ZWaveThermostatModeCommandClass ( ZWaveNode node , ZWaveController controller , ZWaveEndpoint endpoint ) { } @ Override public CommandClass getCommandClass ( ) { } @ Override public int getMaxVersion ( ) { } @ Override public void handleApplicationCommandRequest ( SerialMessage serialMessage , int offset , int endpoint ) { } protected void processThermostatModeReport ( SerialMessage serialMessage , int offset , int endpoint ) { } @ Override public Collection < SerialMessage > initialize ( boolean refresh ) { } @ Override public Collection < SerialMessage > getDynamicValues ( boolean refresh ) { } @ Override public SerialMessage getValueMessage ( ) { if ( ( isGetSupported ) == false ) { ZWaveThermostatModeCommandClass . logger . debug ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Node<seq2seq4repair_space>doesn't<seq2seq4repair_space>support<seq2seq4repair_space>get<seq2seq4repair_space>requests" , this . getNode ( ) . getNodeId ( ) ) ; return null ; } ZWaveThermostatModeCommandClass . logger . debug ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Creating<seq2seq4repair_space>new<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>application<seq2seq4repair_space>command<seq2seq4repair_space>THERMOSTAT_MODE_GET" , this . getNode ( ) . getNodeId ( ) ) ; <START_BUG> SerialMessage result = new SerialMessage ( this . getNode ( ) . getNodeId ( ) , SerialMessageClass . SendData , SerialMessageType . Request , SerialMessageClass . SendData , SerialMessagePriority . Get ) ; <END_BUG> byte [ ] payload = new byte [ ] { ( ( byte ) ( this . getNode ( ) . getNodeId ( ) ) ) , 2 , ( ( byte ) ( getCommandClass ( ) . getKey ( ) ) ) , ZWaveThermostatModeCommandClass . THERMOSTAT_MODE_GET } ; result . setMessagePayload ( payload ) ; return result ; } @ Override public void setGetSupported ( Boolean supported ) { } public SerialMessage getSupportedMessage ( ) { } @ Override public SerialMessage setValueMessage ( int value ) { } @ XStreamAlias ( "modeType" ) public enum ModeType { OFF ( 0 , "Off" ) , HEAT ( 1 , "Heat" ) , COOL ( 2 , "Cool" ) , AUTO ( 3 , "Auto" ) , AUX_HEAT ( 4 , "Aux<seq2seq4repair_space>Heat" ) , RESUME ( 5 , "Resume" ) , FAN_ONLY ( 6 , "Fan<seq2seq4repair_space>Only" ) , FURNANCE ( 7 , "Furnace" ) , DRY_AIR ( 8 , "Dry<seq2seq4repair_space>Air" ) , MOIST_AIR ( 9 , "Moist<seq2seq4repair_space>Air" ) , AUTO_CHANGEOVER ( 10 , "Auto<seq2seq4repair_space>Changeover" ) , HEAT_ECON ( 11 , "Heat<seq2seq4repair_space>Econ" ) , COOL_ECON ( 12 , "Cool<seq2seq4repair_space>Econ" ) , AWAY ( 13 , "Away" ) ; private static Map < Integer , ZWaveThermostatModeCommandClass . ModeType > codeToModeTypeMapping ; private int key ; private String label ; private ModeType ( int key , String label ) { } private static void initMapping ( ) { } public static ZWaveThermostatModeCommandClass . ModeType getModeType ( int i ) { } public int getKey ( ) { } public String getLabel ( ) { } } }

Fix:
SerialMessage result = new SerialMessage ( this . getNode ( ) . getNodeId ( ) , SerialMessageClass . SendData , SerialMessageType . Request , SerialMessageClass . ApplicationCommandHandler , SerialMessagePriority . Get ) ;