State machine changes from "I/O to I" upon pressing "done"

Hey all, I am having some trouble with the state machines. I am curious if this is something that I am doing, or if it is a bug. Here is the state machine node. I have modified the node red settings to allow for persistent variable storage. That is a crucial part of my flows, because I cannot lose the state upon redeploy.

Anyways, the rest of the flow is trivial. It's a switch that changes the variable used within the state machine. So getting to the issue at hand, when I click on the state machine node and go into the "edit" mode. Upon pressing "done", the state machine node changes. The output square goes away upon pressing this and will persist through redeploys. However, once I refresh the page it comes back, which has me very confused on what is going on with this node.

image

Welcome to the forum @SupportStation

Which state machine node are you using? Possibly node-red-contrib-something.

What do you mean by 'output square'?
Can you create a simple flow just using inject nodes and state machine node to show the problem? If so then export that and paste it here.

See this post for how to post a flow - How to share code or flow json

Colin,

By output square I mean the box in which you can link to other nodes. Upon pressing "done" it is no longer outputting. Here is a copy of a mockup flow.

[{"id":"e9ddac5a2b2b3066","type":"tab","label":"Flow 1","disabled":false,"info":"","env":},{"id":"01d271721edd47f2","type":"ha-switch","z":"e9ddac5a2b2b3066","name":"","version":0,"debugenabled":false,"inputs":0,"outputs":2,"entityConfig":"","enableInput":false,"outputOnStateChange":false,"outputProperties":[{"property":"outputType","propertyType":"msg","value":"state change","valueType":"str"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":290,"y":320,"wires":[["f5da37bb74cbf3e4"],["43f3fd06928fd495"]]},{"id":"f5da37bb74cbf3e4","type":"change","z":"e9ddac5a2b2b3066","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":260,"wires":[["40851d3422ca7013"]]},{"id":"43f3fd06928fd495","type":"change","z":"e9ddac5a2b2b3066","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":360,"wires":[["40851d3422ca7013"]]},{"id":"40851d3422ca7013","type":"state-machine","z":"e9ddac5a2b2b3066","name":"","triggerProperty":"status","triggerPropertyType":"flow","stateProperty":"status","statePropertyType":"flow","initialDelay":"0","persistOnReload":true,"outputStateChangeOnly":false,"throwException":false,"states":["start"],"transitions":,"x":740,"y":300,"wires":}]

You didn't do this:

Consequently some of your code gets rendered as squares
image
People trying to help could laboriously search for these places in your code, or you could make it easier by putting a line containing three back ticks before and after your block of code. Like this
image

You did not answer this question

Apologies,

The state machine is from node-red-contrib-persistent-fsm.

I have downloaded the code and will try to format it this time.

[
    {
        "id": "e9ddac5a2b2b3066",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "01d271721edd47f2",
        "type": "ha-switch",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "version": 0,
        "debugenabled": false,
        "inputs": 0,
        "outputs": 2,
        "entityConfig": "",
        "enableInput": false,
        "outputOnStateChange": false,
        "outputProperties": [
            {
                "property": "outputType",
                "propertyType": "msg",
                "value": "state change",
                "valueType": "str"
            },
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "x": 290,
        "y": 320,
        "wires": [
            [
                "f5da37bb74cbf3e4"
            ],
            [
                "43f3fd06928fd495"
            ]
        ]
    },
    {
        "id": "f5da37bb74cbf3e4",
        "type": "change",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 260,
        "wires": [
            [
                "40851d3422ca7013"
            ]
        ]
    },
    {
        "id": "43f3fd06928fd495",
        "type": "change",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 360,
        "wires": [
            [
                "40851d3422ca7013"
            ]
        ]
    },
    {
        "id": "40851d3422ca7013",
        "type": "state-machine",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "triggerProperty": "status",
        "triggerPropertyType": "flow",
        "stateProperty": "status",
        "statePropertyType": "flow",
        "initialDelay": "0",
        "persistOnReload": true,
        "outputStateChangeOnly": false,
        "throwException": false,
        "states": [
            "start"
        ],
        "transitions": [],
        "x": 740,
        "y": 300,
        "wires": [
            []
        ]
    }
]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.