Ciao @kennethjiang, great plugin, you did a really good job.
Looking through all the plugin files, I could not find any yaml events related to the connection or disconnection of a client.
I was wondering if it was possible to implement this feature.
I use events to automate the lighting of leds when a client connects to the Octoprint server.
I bring the code below:
in config.yaml I entered this and it works great
events:
enabled: True
subscriptions:
- event: ClientOpened #client connected to octoprint
command: M42 P4 S255 # turn the light on
type: gcode
- event: ClientClosed #client disconnected from octoprint
command: M42 P4 S0 # turn off the light
type: gcode
I made this small automation referring to the examples on this official page:
http://docs.octoprint.org/en/master/configuration/config_yaml.html#events
I would like to do the same thing when a client or guest has logged in or disconnected from the web page of the anywhere plugin.
Example:
event: ClientOpenedAnywhere
command: M42 P4 S255 # turn the light on
type: gcode
- event: ClientClosedAnywhere
command: M42 P4 S0 # turn off the light
type: gcode
Do you think it is possible? I thank you in advance.
Ciao @kennethjiang, great plugin, you did a really good job. Looking through all the plugin files, I could not find any yaml events related to the connection or disconnection of a client. I was wondering if it was possible to implement this feature. I use events to automate the lighting of leds when a client connects to the Octoprint server. I bring the code below: in config.yaml I entered this and it works great
events: enabled: True subscriptions: - event: ClientOpened #client connected to octoprint command: M42 P4 S255 # turn the light on type: gcode - event: ClientClosed #client disconnected from octoprint command: M42 P4 S0 # turn off the light type: gcode I made this small automation referring to the examples on this official page: http://docs.octoprint.org/en/master/configuration/config_yaml.html#events
I would like to do the same thing when a client or guest has logged in or disconnected from the web page of the anywhere plugin.
Example:
Do you think it is possible? I thank you in advance.