Comments (4)
at the moment we can only use msg.topic
I assume you mean that only msg.topic
can be used to control the open or closed state of the gate
. That is true, but I do not see it as a problem, since control messages (msg.topic
= Control Topic
) do not pass through the gate in any case, and this would be true even if topic
were replaced by some other message property. Your flow will always have to generate control messages separately from the main stream of messages being controlled.
If I have missed your point, and you can post a flow that would benefit from using a different property for gate control, I will be happy to take a look.
from node-red-contrib-simple-gate.
ah clear. in my case i use msg.topic to hold the id's of lights which are used to control lights with google. i could replace my complete flow to use something else like msg.id but it still has to pass the gate and i believe you stated that this is not the case.
for now i solved the issue by the use of a flow variable which i use as a variable to block/pass things.
it would be nice if the gate could use a user defined msg but still the complete msg needs to pass the gate and not only the payload
from node-red-contrib-simple-gate.
i use msg.topic to hold the id's of lights
That's fine. The gate
node will pass those messages when it is open and block them when it is closed. No problem there and no need to change topic
to some other property.
i solved the issue by the use of a flow variable which i use as a variable to block/pass things
Lots of people used this method before I wrote the gate
node, and some still do. The only issue is that if you need many independent gates, then each needs its own flow variable. You have to do the bookkeeping and remember where the variable is set for each gate.
the complete msg needs to pass the gate and not only the payload
When the gate is open it passes the complete message object with all its properties entirely unchanged. The only exception is when msg.topic = Control Topic
. Then it tries to interpret msg.payload
as a command that it can execute, and it sends no output. I'm not sure how you got the idea that only the payload is passed.
It might help if you could post a simple flow that does not behave the way that you would like and describe what you would like it to do.
from node-red-contrib-simple-gate.
ok . i thought you mentioned that nothing passed so if everything passes when the gate is open it is ok.
at the moment i changed my complete flow and do not need the gate anymore
from node-red-contrib-simple-gate.
Related Issues (16)
- OPEN and CLOSED are backwards HOT 1
- small issue with the documentation: "Control Topic" HOT 1
- Request: set close state on first message HOT 7
- Request: release info HOT 6
- closed gate not blocking all payloads HOT 8
- Request. HOT 6
- I seem to be sending the correct commands, but the gate is saying "Invalid command"
- Bug: status message does not work HOT 5
- Indirect control HOT 5
- State doesn't persist reboot HOT 13
- Node name HOT 5
- TypeError: Cannot read property 'toLowerCase' of undefined HOT 5
- Feature request - option to queue latest message and release on opening the gate HOT 5
- Feature request: Timer-gate HOT 3
- More a suggestion than bug. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-simple-gate.