This is a simple rest interface for Busylight Driver. The application has a built-in basic
authentication. The documentation of the rest service is available via the Open Api Console.
- Make sure you have Busylight plugged into your computer or wherever you wish to run this server on. Otherwise you will get this error:
Caused by: java.lang.UnsupportedOperationException: Unable to open the device, is the device connected?
at com.fyayc.essen.busylight.core.Driver.<init> (Driver.java:43)
at com.fyayc.essen.busylight.core.Driver.<init> (Driver.java:20)
at com.fyayc.essen.busylight.core.Driver$DriverHelper.<clinit> (Driver.java:206)
at com.fyayc.essen.busylight.core.Driver.tryAndAcquire (Driver.java:103)
at com.fyayc.essen.busylight.server.ServerConfig.driver (ServerConfig.java:14)
at com.fyayc.essen.busylight.server.ServerConfig$$EnhancerBySpringCGLIB$$b8283b75.CGLIB$driver$0 (<generate
Once, the device is connected, you can either build and run it or directly run using maven spring:boot
goal.
- Make sure the driver is already installed. Follow the instructions in the driver page.
# quick
$ cd busylight_rest
$ mvn spring-boot:run -Dspring.security.user.name=busylight -Dspring.security.user.password=busylight
# quick
$ cd busylight_rest
$ mvn clean package
$ java -jar target/busylight-server-1.1.jar --spring.security.user.name=busylight --spring.security.user.password=busylight
Once the above command is run successfully, the console is available at port 8080. For more details, consult the application.properties
Please check the service tempate here