How to get the device name "hostname"

an exec node set to run hostname ?
(and don't append the payload from the incoming message.)

[{"id":"da669b10.7253d8","type":"debug","z":"e9b4dddd.70115","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":60,"wires":[]},{"id":"3078162b.0ab55a","type":"exec","z":"e9b4dddd.70115","command":"hostname","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":300,"y":60,"wires":[["da669b10.7253d8"],[],[]]},{"id":"6238f928.ad4ca8","type":"inject","z":"e9b4dddd.70115","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":60,"wires":[["3078162b.0ab55a"]]}]
1 Like