Skip to content

Global Context #29

Description

@spidgrou

I'm trying to use one Global Context but with bad result.

Here my simple flow
[{"id":"c41d9687.a88a88","type":"inject","z":"cbaa198.a6875e8","name":"","props":[{"p":"payload","v":"ON","vt":"str"},{"p":"topic","v":"sensors/sensor1","vt":"string"}],"repeat":"","crontab":"","once":false,"topic":"sensors/sensor1","payload":"ON","payloadType":"str","x":170,"y":1580,"wires":[["6d6765c0.1c92ac"]]},{"id":"6d6765c0.1c92ac","type":"function","z":"cbaa198.a6875e8","name":"With Global","func":"var count=global.get('gcount') || 0;\ncount +=1;\nmsg.payload=\"global= \"+count;\nglobal.set('gcount',count);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":427,"y":1566,"wires":[["6e8f0590.7cb51c"]]},{"id":"6e8f0590.7cb51c","type":"debug","z":"cbaa198.a6875e8","name":"","active":true,"console":"false","complete":"false","x":650,"y":1580,"wires":[]}]

After I injected the variable not appear and after few seconds Node_red and SignalK stop working and I need to restart the Pi4.
I'm using the Node-red plugin 2.11.0

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions