This features adds the ability to host a websocket server that will publish sensor/config info over the network. This allows users to create custom clients to interface with the application, and the data that it publishes.
- Ensure you have atleast version 1.5 software
- Edit config.properties file
- To enable set
websocket = 1 - To disable set
websocket = 0 - Set
ipv4ServerAddressvalue to the address you desire default is localhost - If you want the server functionality, but do not want the local GUI set
headless = 1
- To enable set
- Run application with desired settings
Configuration data sent over JSON contains most of the fields in the config.properties file so that a client can know what sensors are enabled, and the preferred units for values.
- send 'units' to get a one time reply integer value of 0 or 1
- send "config" to get all the available config information
- send "temp" to get a one time reply integer value for temp
- send "humid" to get a one time reply humidity value 0-100
- send "airQuality" to get a one time reply integer value
- send "subscribe" to get a response every 100ms with all sensor data
For more information on usage you can view the client page that exists within this project. There are examples in JavaScript on how to connect to the server, and parse the varies JSON messages. The client page is located here. Additionally you can view the example client actively running here.