This project contains a microservice that acts as a gateway for RFXtrx devices.
The gateway allows for streaming messages (read / write) using a websocket interface (/ws/rfxtrx
).
Commands can also be written using a rest endpoint (POST /api/rfxtrx
).
Currently the server only recognizes a small subset of the RFXtrx messages ("lighting2" and transmit responses). Since I couldn't find any documentation regarding the RFXtrx messages, all (de)serialization is based on the following open source projects:
Use the following steps to add support for extra messages:
- Create the message class in the
net.novazero.rfxtrxgateway.rfxtrxmessages
package. The new message class should extend theRfxtrxMessage
class. - Add the message class to the deserializer map in the
RfxtrxMessageDeserializer
class. - Create the DTO class for the message in the
net.novazero.rfxtrxgateway.rfxtrxmessages.dto
package. It should implement theRfxtrxMessageDto
interface. - Add
toDto
andfromDto
overload functions for the new message type in theRfxtrxMessageConverter
class. - Extend the generic
toDto
andfromDto
functions in theRfxtrxMessageConverter
class. - Extend the
@JsonSubTypes
annotation of theRfxtrxMessageDto
interface (so Jackson knows how to handle the polymorphic type).