sonntam / node-red-contrib-xstate-machine

A xstate-based state machine implementation using state-machine-cat visualization for node red.
MIT License
22 stars 8 forks source link

Provide means to show state-machine visualization within node-red dashboard #4

Open sonntam opened 4 years ago

sonntam commented 4 years ago

All instances of smxstate nodes should be able to create an animated state-chart on the node-red dashboard if installed.

This is a much wanted feature.

soeffi commented 2 years ago

Wow, this node is great! And +1 for this feature :-)

It seems that most of the work (creating the visualization in the first place) is already there. Admittedly, I have no clue about node-red internals - would it be possible to access the existing state-chart rendering (SVG graphics?) via some "deeplink"? That would allow to manually embedded the state machine into almost any kind of dashboard, maybe even external ones...

Thanks as lot for this great work

sonntam commented 2 years ago

@soeffi Thanks, I‘m glad you like the node!

It is absolutely doable. I think it would involve creating a dedicated dashboard node so that the animations work. The visualization is nothing more than a SVG manipulated by javascript using node-red comms to get state updates from the server.

I’m afraid I won’t be able to work on that feature anytime soon as I’m focusing on other projects currently.

Maybe sometime someone comes around who can help with the implementation ;-)