File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 24
24
< input type = "text" id = "node-input-topic" placeholder = "" >
25
25
</ div >
26
26
< div class = "form-row" >
27
- < label for = "node-input-name " > < i class = "icon-tag" > </ i > Name </ label >
28
- < input type = "text" id = "node-input-name " placeholder = "Emoncms " >
27
+ < label for = "node-input-nodegroup " > < i class = "icon-tag" > </ i > Node Group </ label >
28
+ < input type = "text" id = "node-input-nodegroup " placeholder = "" >
29
29
</ div >
30
30
< div class = "form-row" >
31
- < label for = "node-input-nodegroup " > < i class = "icon-tag" > </ i > Node </ label >
32
- < input type = "text" id = "node-input-nodegroup " placeholder = "" >
31
+ < label for = "node-input-name " > < i class = "icon-tag" > </ i > Name </ label >
32
+ < input type = "text" id = "node-input-name " placeholder = "Emoncms " >
33
33
</ div >
34
- < div class = "form-tips" > If Topic is left blank the output Topic is the same as the input Topic.</ div >
34
+ < div class = "form-tips" > Topic is not mandatory, if Topic is left blank < b > msg.topic</ b > will used. Topic overrides < b > msg.topic</ b > </ br >
35
+ Node Group (numeric) is not mandatory, if Node Group is left blank < b > msg.nodegrpup</ b > will used. Node Group overrides < b > msg.nodegroup</ b > </ div >
35
36
</ script >
36
37
37
38
< script type ="text/x-red " data-help-name ="emoncms ">
38
39
< p > Performs post to Emoncms.</ p >
39
- < p > The Topic is not mandatory , if Topic is left blank < b > msg . topic < / b > w i l l u s e d .< / p>
40
- < p > The Node is not mandatory, (numberic) </ p >
40
+ < p > Topic is not mandatory , if Topic is left blank < b > msg . topic < / b > w i l l u s e d . T o p i c o v e r r i d e s < b > m s g . t o p i c < / b > < / p >
41
+ < p > Node Group (numeric) is not mandatory, if Node Group is left blank < b > msg.nodegrpup </ b > will used. Node overrides < b > msg.nodegrpup </ b > </ p >
41
42
</ script >
42
43
43
44
< script type ="text/javascript ">
Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ function Emoncms(n) {
40
40
this . on ( "input" , function ( msg ) {
41
41
42
42
var topic = this . topic || msg . topic ;
43
+ var nodegroup = this . nodegroup || msg . nodegroup ;
43
44
this . url = this . baseurl + '/input/post.json?json={' + topic + ':' + msg . payload + '}&apikey=' + this . apikey ;
44
- if ( this . nodegroup != "" ) {
45
- this . url += '&node=' + this . nodegroup ;
45
+ if ( nodegroup != "" ) {
46
+ this . url += '&node=' + nodegroup ;
46
47
}
47
48
node . log ( "[emoncms] " + this . url ) ;
48
49
http . get ( this . url , function ( res ) {
You can’t perform that action at this time.
0 commit comments