Wireless Vibration & Temperature Sensor Operation

We are having issue with constant the operation of the unit. The sensor is not transmitting data.
The unit is connected to a llot Enterprise gateway. We have configured the unit and connected it to the gateway using Nod-Red. The gateway appears to be functioning properly with a green “Ready” indicator. The sensor appears to be running as indicated by a green “Running” message.
Both gate and sensors are connected to the “debug” tag for trouble shooting.

The gateway sends msg on a regular interval. However, the sensor does not send any data, although it is configured to send data every 5 min. The sensor had appeared to work properly when it was first connected to the gateway, but it stopped sending messages after an hour or so.

Would appreciate your feedback on how we can get the sensor work properly. Thank you.

Hi @northstar Sure, let me ask you a few things:

  • Could you share a screenshot of your Node-RED flow?
  • Could you share a screenshot of your debug window?
  • Could you also send us a picture of your vibration sensor?
  • And what’s the approximate distance between the sensor and the gateway?

With this information, we’ll be able to better understand the issue. I may ask you to reset the sensor, but first we need to confirm the exact sensor type so we can share the right instructions.

Note: Wireless Device node status display the status of the sensor based on the last message received. If a sensor stops transmitting its state will not be updated to reflect this.

Please send this over when you have a chance, and feel free to reach out if you have any questions!
Thanks,
Eduardo M.

We have been able to get the sensor to work. Do you have any document listing the proper settings for the sensor and default settings. This would help in setting up and trouble-shooting the units. How do we check the battery life on the sensor?

Also, now we seem to have an issue with generating .txt files of the information being collected. Attached is a screenshot of the our flow setup. The debug indicates that a txt file is being generated and stored in the designated folder. However, there is no file found in the folder. FYI, we are running node-red ,as administrator on a local machine and connecting to the gateway through the browser at 10.0.0.94:1880. Our goal is to extract the data being generated in a TXT format for our evaluation and processing. Would appreciate your feedback. Thank you.

Alex

Hi @northstar The Vibration Sensor V4 is a brand new sensor line, and our documentation is still in development. The documentation will be available on our web site soon.

In the sensor_data message, the sensor transmits a battery percent property, which you can use to monitor the battery level of the sensor.

Could you share your Node-RED flow so we can take a look at it? To do this:

  • Go to the main menu in Node-RED
  • Select the Export option
  • At the top of the Export Nodes window, be sure to select ‘current flow’
  • Then click Download — this will download a flow.json file

Please attach that file here in this thread so we can review it.
Thank you,
Eduardo M.

Eduardo,

Please see attached flow.
flows.json (25.2 KB)

Hi @northstar Thank yuu for the file. I’ve checked your Node-RED flow, let me break into some recomendatios:

Since Node-RED is running locally on the Enterprise IIoT Gateway, you’ll need to define a valid local path on the Gateway, for example:

/home/ncdio/.node-red/datalog/datalogger.txt

You shouldn’t set a local PC path like:

C:\Users\<username>\Desktop\datalogger.txt

This is because your local PC is only accessing the Node-RED instance that runs locally on the Enterprise IIoT Gateway, and Node-RED only has access to the Enterprise IIoT Gateway’s local file system.

Let me go ahead and create, test and share you a basic Node-RED flow, you’ll be able to import this into your Gateway’s Node-RED workspace to save sensor data to a file, and later download it from your local PC.

I’ll share it shortly.
Thank you,
Eduardo M.

Eduardo,

Thank you for the information. We got the system to work and send data.

We have set the sensor data to be transmitted in imperial units (e.g. in/sec, etc.). However, the data being transmitted continues to be metric units. How do we get the information in the units we want?

Alex

Hi @northstar Unfortunately, this sensor does not support the Measurement Mode command. We’ll be updating the library soon, and this command will no longer be available for this sensor type.

The good news is that you can easily handle unit conversion using a Function node in Node-RED. I’ll share an example function node that converts velocity from mm/sec to inches/sec.

[{"id":"85af2b3179b04b65","type":"function","z":"0d56bf4105857e6a","name":"mm/sec to inch/sec","func":"if (msg.topic === 'sensor_data') {\n    if(msg.payload.sensor_type == 114){\n        const sensorData = msg.payload.sensor_data;\n        \n        // Convert velocities from mm/s to inch/s (1 mm/s = 1/25.4 inch/s)\n        const convertVelocity = (value) => Number((value / 25.4).toFixed(4));\n        \n        // Create new object with renamed properties and converted values\n        const updatedSensorData = {\n            ...sensorData,\n            x_velocity_inch_sec: convertVelocity(sensorData.x_velocity_mm_sec),\n            y_velocity_inch_sec: convertVelocity(sensorData.y_velocity_mm_sec),\n            z_velocity_inch_sec: convertVelocity(sensorData.z_velocity_mm_sec)\n        };\n\n        // Update the payload\n        msg.payload.sensor_data = updatedSensorData;\n        \n        // Remove old properties if needed\n        delete updatedSensorData.x_velocity_mm_sec;\n        delete updatedSensorData.y_velocity_mm_sec;\n        delete updatedSensorData.z_velocity_mm_sec;\n\n        return msg;\n    }\n}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":240,"wires":[[]]}]

You can copy the provided code, then in Node-RED:

  1. Click on the main menu.
  2. Select the Import option.
  3. Paste the code into the pink text box.
  4. Click the Import button.

Finally, connect the output of your Wireless Gateway node to the input of this new Function node.

You can use this node as a reference example, please give it a try, and don’t hesitate to reach out if you have any questions.
Thank you,
Eduardo M.

Edurado,

Thanks for reply. So it sounds like the measurements are all in mm/sec.

Hi @northstar Yes, by default velocity is in mm/seconds unit.

Eduardo,

Another issue we are trying to resolve, is saving the sensor data to a file in JSON format. We are using the function node to define the msg.payload information. When we connect it to a JSON node (Action is "covert between JSON string and data) we receive an error that appears to be related to msg.paylod in the Function node.

The only way we have been able to get it to work is when we set the JSON node to convert everything into string format. This basically gives us a TXT file format.

What do we need to do to be able to save the file in a JSON string and file?

FYI, we have setup an injection node and used the same function arrangement, with JSON node set to String and Object Action and were able to get a JSON type file.

Please advise. Thanks

Hi @northstar Let me share with you a basic Node-RED flow that converts sensor data into a JSON string.

sensor-data-to-json-string.json (1.3 KB)

In this flow, I’ve included a Switch node to filter only the sensor_data messages. This is important because the Wireless Gateway node can send various types of messages, and sensor_data is the one that contains the key sensor information. You can identify the message type using the msg.topic property.

Then, a second Switch node filters messages for a specific sensor type, in this case, type 114. This is especially useful when you’re working with multiple sensor types.

Next, I’ve added a Change node to include the battery percentage into the sensor_data object. In the same node, I also move msg.payload.sensor_data to msg.payload.

Finally, a JSON node converts msg.payload to a JSON string. At the output of this node, you should see something like:

You can easily download and import this flow into your Node-RED workspace. Just follow these steps:

  1. Click on the main menu in Node-RED (top right corner).
  2. Select the Import option.
  3. In the pop-up window, click on the Select File button.
  4. Choose the sensor-data-to-json-string.json file from your computer.
  5. Click the Import button to add the flow to your workspace.

Once imported, make sure to connect the output of the Wireless Gateway node to the input of the filter-by-sensor-data node, as shown in the following image:

Please try this and feel free to let us know if you have any questions.
Thank you,
Eduardo M.

Eduardo,

Thanks. What would be the best way to manage multiple wireless vibration sensors within the same gateway? We are planning to use the same flow structure on all the vibration sensors.

Also, what we have noticed is although we use different data file names to store different sets of data and sending them to different web download names (i.e. :1880/download-json1, download-json2, etc) we get the same data on all of the files. Any idea why we are not getting different sets of data within different files? Seems like this would be a problem trying to get information form different sensors.

Hi Alex,

You can, for example, assign a Node ID to each sensor or use the MAC address to uniquely identify each one. The MAC address is unique per sensor. Yopu can use a Switch node to evaluate either msg.payload.nodeId or msg.payload.addr, and route each message to the appropriate output flow.

For log file naming, you can dynamically generate filenames using the last eight characters of the sensor’s MAC address. This helps organize and identify data per device. For example:

  • 42-53-64-53.json
  • 42-23-64-33.json

To extract the last eight characters of the mac address and replace the colons (:) with dashes (-), you can use the following change node:

[{"id":"54f07a9d8b8ce04b","type":"change","z":"ee82bdecab6d959e","name":"get-mac-and-set-filename","rules":[{"t":"set","p":"filename","pt":"msg","to":"$substring(msg.payload.addr, 12)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":740,"wires":[["3256b79cb68fb4fa"]]},{"id":"3256b79cb68fb4fa","type":"debug","z":"ee82bdecab6d959e","name":"debug 14","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"filename","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":740,"wires":[]}]

Take a look at this and feel free to let us know if you have any questions.
Thank you,
Eduardo M.

Eduardo,

Thank you. I will try it out and let you know.

I am trying to understand the information generated by the sensor. I am assuming the following, please correct me if any of the assumptions are incorrect:

  • X, Y, Z_RMS: Root mean square of corresponding axis.
  • X, Y, Z_Max Acc: Max value in (g) for each axis. Where is the associated frequency?
  • X, Y, Z_Velocity: Max mm/sec for each axis. Where is associated frequency?
  • X, Y, Z_Displacement: Max value in mm.
  • X, Y, Z- Peak (1, 2, 3) HZ, are the relevant order harmonics. Where are the values associated with these harmonics?
  • RPM: I see no value generated here. Is this an input we would have to load on to the sensor?

Also, when I try to convert g value to mm/s or mm, the values do not match any of the values indicated in the sensor. What am I missing here?

Alex,

  • The RMS (root mean square) acceleration over the X, Y, and Z axes in G
  • The MAX peak acceleration over the X, Y, and Z axes in G
  • The velocity over the X, Y, and Z axes in mm/sec
  • The displacement over the X, Y, and Z axes in mm
  • The frequency at which the first, second, and third highest energy/amplitude peaks occur in Hz, over the X, Y, and Z axes

RPM: The rate of rotation of the machine in revolutions per minute. You can enable or disable the rpm calculation using the Wireless Device node. When a measurement sample is taken, you can choose not to calculate the RPM, this will shorten the measurement time and help conserve battery. Could you share a screenshot of the sensor data?

Could you please share the calculation method you’re using to convert?

Thanks,
Eduardo M.

Eduardo,

Below are the sensor data. Please note, we have checked the RPM box in the sensor, but there is no value being calculated. Also, there are no mm/s values associated with any of the harmonics so without having the running frequency (RPM) how are the orders of harmonics being calculated.
“mode”: 0,
“msg_type”: “regular”,
“odr”: “800Hz”,
“temperature”: 21.93,
“x_rms_ACC_G”: 0.036,
“x_max_ACC_G”: 0.007,
“x_velocity_mm_sec”: 0.01,
“x_displacement_mm”: 2.12,
“x_peak_one_Hz”: 12,
“x_peak_two_Hz”: 8,
“x_peak_three_Hz”: 7,
“y_rms_ACC_G”: 0.033,
“y_max_ACC_G”: 0.007,
“y_velocity_mm_sec”: 0.01,
“y_displacement_mm”: 1.75,
“y_peak_one_Hz”: 10,
“y_peak_two_Hz”: 41,
“y_peak_three_Hz”: 111,
“z_rms_ACC_G”: 0.036,
“z_max_ACC_G”: 0.013,
“z_velocity_mm_sec”: 0.01,
“z_displacement_mm”: 1.68,
“z_peak_one_Hz”: 14,
“z_peak_two_Hz”: 12,
“z_peak_three_Hz”: 83,
“rpm”: 0,
“timestamp”: “2025-04-23T17:02:46.135Z”

Also, here is how we are trying the match the numbers, starting with the G (mm/s^2) reading. For example using the X-Max-ACC, and using X_Peak_one as the assumed running speed:

(0.007) /(2 x 3.14 x 12HZ x 9086.7) = 1.02x 10^-8 (this number is no where close to the 0.01).

Hi @northstar RPM values are calculated based on vibration data. However, if the vibration level is too low, the RPM may not be calculated. Could you please try setting the Dead Band to 0 and check the values again?

I share you the sensor configuration guide using Node-RED as reference, this sensor support Automatic Configuration OTF mode:

Note: be sure to enable the ‘Wait for Network Formation’ checkbox during sensor configuration.

Please try this and feel free to let us know if you have any questions.
Thanks,
Eduardo M.

Hi Eduardo,

Thank you for the information. We have confirmed all of the settings as suggested and the same result, no RPM value. Furthermore, now we are noticing that the sensor is not sending any data and no “green light” is indicated in the node-red flow.

We have tried to rest the sensor several times, by running the magnet along both sides, without success. The sensor does not seem to be communicating with the gate way. Please advise. Thank you.