If you want to run it get yourself Full JDK Liberica 20
This app was done for purpose to switch pc light on or off. App it's able to store configuration file where server config is kept, so you can modify and try on your own!
See some of my notes which i've made during the development.
- Open it enter your mqtt server credentials
- Press save ( app should create and modify config.properties files)
- Press Connect If connected you can close and reopen app.
- Since initial config app by default's tries to connect to the known MQTT server
- App sends a topic ("java/light/status") with value of 1.
- App minimize itself to try
- When pc is shutting down there is hook added to the app, so it will send another mqtt message this time with value of 0
Main window:
Tray icon:
Now you can handle the logic in Node-Red or somewhere where you like to.