Rajbir Singh
Published © GPL3+

Wireless Sensor to Excel using Node-RED

Sending data of NCD Long Range IoT Wireless Vibration and Temperature Sensor data to Excel using Node-RED.

IntermediateProtip2 hours809
Wireless Sensor to Excel using Node-RED

Things used in this project

Hardware components

National Control Devices Wireless Vibration and Temperature Sensor
×1
National Control Devices 900HP-S3B Long Range Wireless Mesh Modem with USB Interface
×1

Software apps and online services

Node-RED

Story

Read more

Code

Node-RED Flow

JSON
[{"id":"196a9fe1.7ccfd","type":"tab","label":"Flow 10","disabled":false,"info":""},{"id":"7d4721bf.a16ae","type":"ncd-gateway-node","z":"196a9fe1.7ccfd","name":"","connection":"dd330f73.d38c4","x":120,"y":80,"wires":[["7c4cff18.6dec1"]]},{"id":"8afeb9de.1b6c58","type":"ncd-wireless-node","z":"196a9fe1.7ccfd","name":"","connection":"22543864.0ebf38","config_comm":"4fd1b36a.f61a0c","addr":"","sensor_type":"8","auto_config":true,"node_id":0,"delay":"900000","destination":"0000FFFF","power":4,"retries":10,"pan_id":"7FFF","change_enabled":"","change_pr":"0","change_interval":"0","cm_calibration":"60.6","bp_altitude":"0","bp_pressure":"0","bp_temp_prec":"0","bp_press_prec":"0","amgt_accel":"0","amgt_mag":"0","amgt_gyro":"0","impact_accel":"0","impact_data_rate":"4","impact_threshold":25,"impact_duration":1,"activ_interr_x":1,"activ_interr_y":2,"activ_interr_z":4,"activ_interr_op":8,"filtering":0,"data_rate":5,"time_series":0,"reading_type":1,"x":80,"y":240,"wires":[["c98be87e.aa1ff8","5a9846ac.6f6408"]]},{"id":"7c4cff18.6dec1","type":"debug","z":"196a9fe1.7ccfd","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":80,"wires":[]},{"id":"c98be87e.aa1ff8","type":"debug","z":"196a9fe1.7ccfd","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":260,"y":400,"wires":[]},{"id":"5a9846ac.6f6408","type":"function","z":"196a9fe1.7ccfd","name":"Function","func":"var rms_x = msg.payload.rms_x;\nvar rms_y = msg.payload.rms_y;\nvar rms_z = msg.payload.rms_z;\nvar max_x = msg.payload.max_x;\nvar max_y = msg.payload.max_y;\nvar max_z = msg.payload.max_z;\nvar min_x = msg.payload.min_x;\nvar min_y = msg.payload.min_y;\nvar min_z = msg.payload.min_z;\nvar temperature = msg.payload.temperature;\nvar d = new Date();\nvar time = d.toLocaleTimeString();\nvar m ={'Time':time, 'RMS_X':rms_x, 'RMS_Y':rms_y, 'RMS_Z':rms_z, 'MAX_X':max_x, 'MAX_Y':max_y, 'MAX_Z':max_z, 'MIN_X':min_x, 'MIN_Y':min_y, 'MIN_Z':min_z, 'Temperature':temperature};\nreturn {payload:m};","outputs":1,"noerr":0,"x":280,"y":240,"wires":[["61edf644.9b33e8"]]},{"id":"61edf644.9b33e8","type":"csv","z":"196a9fe1.7ccfd","name":"","sep":",","hdrin":true,"hdrout":"","multi":"one","ret":"\\n","temp":"Time,RMS_X,RMS_Y,RMS_Z,MAX_X,MAX_Y,MAX_Z,MIN_X,MIN_Y,MIN_Z,Temperature","skip":"1","x":490,"y":240,"wires":[["85aa32da.0c053"]]},{"id":"85aa32da.0c053","type":"file","z":"196a9fe1.7ccfd","name":"Excel_Output","filename":"\"C:\\Users\\dcube\\Desktop\\node-red vibration sensor\\Excel\\Output.xlsx\"","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"utf8","x":690,"y":240,"wires":[[]]},{"id":"dd330f73.d38c4","type":"ncd-gateway-config","z":"","name":"","comm_type":"serial","ip_address":"","tcp_port":"2101","port":"COM6","baudRate":"115200","pan_id":"7fff","rssi":false},{"id":"22543864.0ebf38","type":"ncd-gateway-config","z":"","name":"","comm_type":"serial","ip_address":"","tcp_port":"2101","port":"COM6","baudRate":"115200","pan_id":"7fff","rssi":false},{"id":"4fd1b36a.f61a0c","type":"ncd-gateway-config","z":"","name":"","comm_type":"serial","ip_address":"","tcp_port":"2101","port":"COM6","baudRate":"115200","pan_id":"7fff","rssi":false}]

Credits

Rajbir Singh

Rajbir Singh

20 projects • 7 followers
A skilled developer with experience of extensive development in the Internet of Things (IoT).

Comments