You could make the mqtt in node subscribe to the complete range of
topics that might be of interest, then filter out the ones you don't
want in subsequent nodes.
Colin
On 23 November 2017 at 20:50, <esc...@missionroom.nl> wrote:
> I love to use mqtt on my pi
> At the moment i am trying to create a standard pi setup.
> Output topic is set in this setup to the hostname, all is done without
> editing in node red
> Only part that i cannot get automated is the input of mqtt
> Is there a way to set the topic of the input node in another way than it the
> node itself?
>
> --
> 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/5e324394-69cd-4111-9c2e-2c17daad620c%40googlegroups.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 post to this group, send an email to node...@googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@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%3D0gLtEX7jBoUyw3q-Q-oXQSRgtUvJKYCwwzoqPo%2B7C-shgeA%40mail.gmail.com.
>> > 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/5e324394-69cd-4111-9c2e-2c17daad620c%40googlegroups.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+unsubscribe@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%3D0gLtEX7jBoUyw3q-Q-oXQSRgtUvJKYCwwzoqPo%2B7C-shgeA%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+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
>
> 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+unsubscribe@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%3D0gLv-kdPCiRP%3DAkP_Yask3zaF2vMtqoTge_r3P0G9vxn1fQ%40mail.gmail.com.
> 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/5e324394-69cd-4111-9c2e-2c17daad620c%40googlegroups.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 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/f927fdf1-c86e-4bf7-b8e2-d9f08d5ad56b%40googlegroups.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 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/3a977347-0621-416d-aa90-6b4f116be596%40googlegroups.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 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/c10fdada-5b6b-4d30-86b7-4b507d5532e3%40googlegroups.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 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/e12707dc-ed83-44e4-9198-d0aa09eec423%40googlegroups.com.
If you just want it to use the mqtt sever on the local machine use
localhost as the mqtt server
Colin
On 25 November 2017 at 13:19, <esc...@missionroom.nl> wrote:
> I cannot get it working to get the hostname or the foo-bar test
> Is there maybe another way to make the mqtt node to listen to the hostname
> of my pi?
>
> --
> 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/b61917c6-2949-44e8-ae7a-715639dbe6dc%40googlegroups.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 post to this group, send an email to node...@googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@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%3D0gLthTOoxyyKc4gY0KFWqKot8Zqp6F50Y0Jkh1RKsXizJEg%40mail.gmail.com.
> The env vars systemd i tried
But what exactly did you do when you tried this? What steps did you take?
I understand you feel this is beyond your level, but we'll figure it out.
Nick
--
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/5303c0ec-e0cb-488c-ac2c-7c49b991817d%40googlegroups.com.
[{"id":"10738b8f.73c5c4","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":172,"y":176,"wires":[["5793c44d.6b93e4"]]},{"id":"69dc05de.ff121c","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":492,"y":177,"wires":[]},{"id":"122fa2fa.db3e8d","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(NAME)","qos":"2","broker":"ed2e7523.8afa38","x":326,"y":85,"wires":[["69dc05de.ff121c"]]},{"id":"5793c44d.6b93e4","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"dns","qos":"","retain":"","broker":"ed2e7523.8afa38","x":314,"y":132,"wires":[]},{"id":"7c4ed80d.d3447","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":180,"y":389,"wires":[["5c9e533d.dc3cdc"]]},{"id":"2d3fab7f.4850bc","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":500,"y":390,"wires":[]},{"id":"c8f93f57.b526e8","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(LOGNAME)","qos":"2","broker":"ed2e7523.8afa38","x":344,"y":298,"wires":[["2d3fab7f.4850bc"]]},{"id":"5c9e533d.dc3cdc","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"pi","qos":"","retain":"","broker":"ed2e7523.8afa38","x":322,"y":345,"wires":[]},{"id":"5ceeacf8.08b16c","type":"comment","z":"fbc4dc2e.b4fe48","name":"Non working","info":"dns is the hostname of the pi\n\necho $NAME returns dns in terminal","x":329,"y":44,"wires":[]},{"id":"d917b99.8391548","type":"comment","z":"fbc4dc2e.b4fe48","name":"Working","info":"","x":325,"y":258,"wires":[]},{"id":"ed2e7523.8afa38","type":"mqtt-broker","z":"","broker":"mqtt.local","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""}]
And what have you got in /etc/profile?
what i am doing is this:
[{"id":"10738b8f.73c5c4","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":172,"y":176,"wires":[["5793c44d.6b93e4"]]},{"id":"69dc05de.ff121c","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":492,"y":177,"wires":[]},{"id":"122fa2fa.db3e8d","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(NAME)","qos":"2","broker":"ed2e7523.8afa38","x":326,"y":85,"wires":[["69dc05de.ff121c"]]},{"id":"5793c44d.6b93e4","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"dns","qos":"","retain":"","broker":"ed2e7523.8afa38","x":314,"y":132,"wires":[]},{"id":"7c4ed80d.d3447","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":180,"y":389,"wires":[["5c9e533d.dc3cdc"]]},{"id":"2d3fab7f.4850bc","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":500,"y":390,"wires":[]},{"id":"c8f93f57.b526e8","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(LOGNAME)","qos":"2","broker":"ed2e7523.8afa38","x":344,"y":298,"wires":[["2d3fab7f.4850bc"]]},{"id":"5c9e533d.dc3cdc","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"pi","qos":"","retain":"","broker":"ed2e7523.8afa38","x":322,"y":345,"wires":[]},{"id":"5ceeacf8.08b16c","type":"comment","z":"fbc4dc2e.b4fe48","name":"Non working","info":"dns is the hostname of the pi\n\necho $NAME returns dns in terminal","x":329,"y":44,"wires":[]},{"id":"d917b99.8391548","type":"comment","z":"fbc4dc2e.b4fe48","name":"Working","info":"","x":325,"y":258,"wires":[]},{"id":"ed2e7523.8afa38","type":"mqtt-broker","z":"","broker":"mqtt.local","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":""}]
--
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/e8a620f0-ee55-499f-88cd-e14b8bc5ed79%40googlegroups.com.
export NAME=$HOSTNAME
export FOO=BAR
And what have you got in /etc/profile?
On Sat, 25 Nov 2017, 16:48 , <esc...@missionroom.nl> wrote:
what i am doing is this:
[{"id":"10738b8f.73c5c4","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":172,"y":176,"wires":[["5793c44d.6b93e4"]]},{"id":"69dc05de.ff121c","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":492,"y":177,"wires":[]},{"id":"122fa2fa.db3e8d","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(NAME)","qos":"2","broker":"ed2e7523.8afa38","x":326,"y":85,"wires":[["69dc05de.ff121c"]]},{"id":"5793c44d.6b93e4","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"dns","qos":"","retain":"","broker":"ed2e7523.8afa38","x":314,"y":132,"wires":[]},{"id":"7c4ed80d.d3447","type":"inject","z":"fbc4dc2e.b4fe48","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":180,"y":389,"wires":[["5c9e533d.dc3cdc"]]},{"id":"2d3fab7f.4850bc","type":"debug","z":"fbc4dc2e.b4fe48","name":"","active":true,"console":"false","complete":"true","x":500,"y":390,"wires":[]},{"id":"c8f93f57.b526e8","type":"mqtt in","z":"fbc4dc2e.b4fe48","name":"","topic":"$(LOGNAME)","qos":"2","broker":"ed2e7523.8afa38","x":344,"y":298,"wires":[["2d3fab7f.4850bc"]]},{"id":"5c9e533d.dc3cdc","type":"mqtt out","z":"fbc4dc2e.b4fe48","name":"","topic":"pi","qos":"","retain":"","broker":"ed2e7523.8afa38","x":322,"y":345,"wires":[]},{"id":"5ceeacf8.08b16c","type":"comment","z":"fbc4dc2e.b4fe48","name":"Non working","info":"dns is the hostname of the pi\n\necho $NAME returns dns in terminal","x":329,"y":44,"wires":[]},{"id":"d917b99.8391548","type":"comment","z":"fbc4dc2e.b4fe48","name":"Working","info":"","x":325,"y":258,"wires":[]},{"id":"ed2e7523.8afa38","type":"mqtt-broker","z":"","broker":"mqtt.local","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":<span style="color:#080" class="m_-9104060393041007338styled-by-pret
pi@dns:~ $ echo $NAME
dns
pi@dns:~ $ echo $FOO
BAR
pi@dns:~ $
pi@dns:~ $ echo $LOGNAME
pi
pi@dns:~ $
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/1665d169-23fd-4e39-b073-e7cfe73630b7%40googlegroups.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 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/FC000CB3-7DEA-4871-B95E-B607D18C5D99%40zenofmud.org.
Hi Paul,
You have to add process.env to functionGlobalContext as you would any other property not part of the default Function scope.
Nick
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/07B311A6-9D2B-4224-A226-A902C86C7664%40zenofmud.org.
On Nov 25, 2017, at 7:55 PM, Nick O'Leary <nick....@gmail.com> wrote:functionGlobalContext
--
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/071C35F6-189D-47BC-A0BB-435A676072A4%40zenofmud.org.