node-red-contrib-state-machine
node-red-contrib-state-machine copied to clipboard
State machine makes use of a deprecated function
I'm running Node RED 7.2.6 and since then i'm getting the following log message:
"[RED.events] Deprecated use of "nodes-started" event from "/opt/node_modules/node-red-contrib-state-machine/state-machine.js:98:20". Use "flows:started" instead."
I am facing exactly the same issue on the same version of Node RED.
@DeanCording I don't think changing it is a lot of work (one line of code). I have no idea how to do it and get it back into node-red so your help is highly appreciated
Mate, can you please react on this issue? I can see in GitHub you are actively working on other issues so why are you ignoring this? Please help out the user of this nice peace of code you made for Node-Red.
Yet another try...
Hello, first of all, thank you very much for the work. It saved me from a lot of headache. I see the same message in my logs and I am worried that the flows will not work in the future.
"[RED.events] Deprecated use of "nodes-started" event from "/opt/node_modules/node-red-contrib-state-machine/state-machine.js:98:20". Use "flows:started" instead."
Thanks again, stay healthy and kind regards
This repo appears to be abandoned. Some others have created their own repos with the deprecated usage removed. I have opted to create an entirely new node based off of this repo and one other. I have also added a few other new features. It is available in the Node-RED palette as node-red-contrib-persistent-fsm
. Or see the repo at https://github.com/hufftheweevil/node-red-contrib-persistent-fsm. Many thanks to DeanCording for his open-source work.
Thanks for the work! Any idea how to get the old one removed from Home Assistant's Node-RED add on and get yours @hufftheweevil 's added? I added this one as an npm-package in the config and it seems to work, but I'm getting a conflict error with the old FSM.
npm un node-red-contrib-state-machine --save
in your node-red directory should do it.
Thanks! I added:
npm_packages:
- node-red-contrib-persistent-fsm
init_commands:
- npm un node-red-contrib-state-machine --save
To my configuration for the Hass add-on and it appears to work fine.
Thanks for the tip! I'm also going to try this.
@hufftheweevil - First, nice job on the new module. I love the visualizer!
Your node module works just fine save for one thing (really noticable when used with Home Assistant)... the "Persist state on redeploy" option fires a message out during node.startup... which sends a message down the flow before the flow signals flow:started.
This will often bypass other nodes that haven't enabled themselves yet (queue or break nodes) or error out on nodes that are awaiting a service connection on redeployment (the Home Assistant call-service node). At any rate, it'd be better to fire it after flows:started (or at least onTimeout delay a bit) because the alternative is unpredictable.
@hufftheweevil - sent you a pull request with a simple async delay fix. I've tested it and it works with switch-break, queue-nodes, and Home Assistant API call-state.
Thanks! I can't take credit for the visualizer, though. That is from https://github.com/lutzer/node-red-contrib-finite-statemachine
Sorry I forgot to enable Issues on my repo. Enabled now.
And conversation continues at https://github.com/hufftheweevil/node-red-contrib-persistent-fsm/pull/1