I guess I'm reopening up my question from before:
I am collecting data using Modbus TCP. I'd like the remain flexible and let the user enter their own IP address. it was brought up to use environmental variables. But maybe I'm not using the variable properly:
I have a text entry and it's payload is set to $IP
Then under host I have this
calling the IP.
[{"id":"dbf7fbb9.bab5b8","type":"tab","label":"Configuration","disabled":false,"info":""},{"id":"f5547811.4bbe48","type":"ui_text_input","z":"dbf7fbb9.bab5b8","name":"IP Address Entry","label":"Enter IP Address","tooltip":"","group":"b3ef20e6.67bde","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"test","x":210,"y":120,"wires":[["d9b2798f.888c48","d2eccda6.fa55a","8c43767.d750388"]]},{"id":"d9b2798f.888c48","type":"function","z":"dbf7fbb9.bab5b8","name":"","func":"\nglobal.set(\"IPAddress\", msg.payload)\n\n// global.set(\"1750_1_dc_sp\", msg.payload);\n\n// msg_o = {topic: \"DC Setpoint\", payload: msg.payload};\n\nreturn false;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":340,"wires":[[]]},{"id":"d2eccda6.fa55a","type":"ui_text","z":"dbf7fbb9.bab5b8","group":"b3ef20e6.67bde","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":680,"y":240,"wires":[]},{"id":"8c43767.d750388","type":"change","z":"dbf7fbb9.bab5b8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"IP","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":280,"wires":[[]]},{"id":"38b8a176.32dfce","type":"modbus-read","z":"dbf7fbb9.bab5b8","name":"1750+ 1","topic":"1750 1","showStatusActivities":false,"logIOActivities":false,"showErrors":false,"unitid":"0","dataType":"Coil","adr":"19","quantity":"27","rate":"1","rateUnit":"s","delayOnStart":false,"startDelayTime":"","server":"fdbc6bac.988e58","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"x":620,"y":340,"wires":[[],[]]},{"id":"13f7f91a.ce2587","type":"debug","z":"dbf7fbb9.bab5b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":100,"wires":[]},{"id":"b3ef20e6.67bde","type":"ui_group","name":"Configuration","tab":"a2c64017.1f61b","order":3,"disp":true,"width":"6","collapse":false},{"id":"fdbc6bac.988e58","type":"modbus-client","name":"1750+","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"${IP}","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"a2c64017.1f61b","type":"ui_tab","name":"Configuration","icon":"dashboard","disabled":false,"hidden":false}]
Where am I going wrong?
This person did something similar. I thought I did everything the same, I guess not: