Change node property from ui

187 views
Skip to first unread message

jegham aymen

unread,
Oct 17, 2017, 6:04:33 PM10/17/17
to Node-RED
Let's say i have a email node and mqtt node ,and i want to change the "mqtt topic", "send to adress" ,"from adress" and "password",...etc from the ui ,i see passing these values to the email or mqtt node is deprecated and won't work anymore, is there other solution to that ? thank you all 

Nick O'Leary

unread,
Oct 17, 2017, 6:12:20 PM10/17/17
to Node-RED Mailing List
In the case of the MQTT Topic, as long as you leave it blank in the MQTT Node, then msg.topic will be used to determine the topic.

So you could use a flow context property (eg flow.myTopic) to store the 'current' topic you want to use, and stick a Change node ahead of the MQTT node to set mqtt.topic of each message passing through.

When you say from the UI, I assume you mean a node-red-dashboard UI? If so, wire the output from the ui widget to a Change node to update the flow context value.

A similar approach can be used for the email node (although I can't remember off the top of my head which of those properties can be set by msg property). They key thing is you must leave the property blank in the node config in order for the msg property to override it.

Nick

On 17 October 2017 at 23:04, jegham aymen <jegham....@gmail.com> wrote:
Let's say i have a email node and mqtt node ,and i want to change the "mqtt topic", "send to adress" ,"from adress" and "password",...etc from the ui ,i see passing these values to the email or mqtt node is deprecated and won't work anymore, is there other solution to that ? thank you all 

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/6605ba36-bb1e-4cee-b1c5-9226c9f2b3ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
Oct 18, 2017, 3:44:54 AM10/18/17
to node...@googlegroups.com
On 17 October 2017 at 23:04, jegham aymen <jegham....@gmail.com> wrote:
Where did you see that these are deprecated?

Colin

jegham aymen

unread,
Oct 24, 2017, 9:59:36 AM10/24/17
to node...@googlegroups.com

--
http://nodered.org

Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/0-hhfXIdTTs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send an email to node...@googlegroups.com.

jegham aymen

unread,
Oct 24, 2017, 10:05:02 AM10/24/17
to node...@googlegroups.com
Thank you nick,that was helpful regarding mqtt output topic , but i am still in the quest for an approach to dynamically change my coming mqtt  topic on my UI dashboard so i can switch from one sensor to one another(every sensor has its own topic) ,i would like also to be able to enter email credentials from UI to enable SMTP messaging ...the case is i have too many sensors in my network and are sending measurements through mqtt and i would like to find an approach to make the factory users switch and control such options without access to the editing panel ..is there anything i can do ?   

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/0-hhfXIdTTs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Colin Law

unread,
Oct 24, 2017, 12:51:05 PM10/24/17
to node...@googlegroups.com
That link is talking about the situation where a value has been set in
the node, then an attempt is made to change it using the message. If
all you want to do is set it from a message then leave it blank in the
node config. That is not deprecated.

Colin
>> node-red+u...@googlegroups.com.
>> To post to this group, send an email to node...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/node-red.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/node-red/CAL%3D0gLu86rYRa1uAroncGEHbwexr5StG0%2BFgBX1b2%3Da0Ezm9BA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/CABAAqx2xObKY-99vxrpi%2BG0MFUwcr964gnu0yfcoy08dX74kmg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages