On Windows, calling the flush() method of the serialport object causes the serial device to disconnect immediately (serialport issue #1409 - ReadIOCompletion error closes port after flush on Windows). This prevents all communication with the RFXCOM device. This
This issue is the underlying cause of #70 - Error - "Writing to COM port" in package node-red-contrib-rfxcom.