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.