How to change alarm settings from a wireless gateway to a wireless device

Hello

Alarm is set on the Node Red NCD wireless gateway. I want to change the alarm settings to a wireless device I will send you the file, so please check it. It’s a very important project.

Help me, please.
flows (9).json (51.4 KB)

You already have Wireless Device Nodes in your flow(42:0c:5a:95). You should be able to attach the Play Audio Alarm nodes to the flow connected to the device flow.

What problem are you having connecting the alarms to the Device Node?

One other thing I noticed is that the Set Temperature Limit nodes are checking numbers but the variable types are set to strings. I recommend setting those limit variables to numbers instead of strings. See Screenshot:

My co-worker couldn’t log in, so I left a reply instead

This picture Report So that the alarm goes off Please do it for me.


Alarm sensor does not sound when using wireless device
We Per sensor One motor goes in
You should not use the gateway because the temperature alarm sensor is different for each motor
I want you to share it in node-red
If you have a solution, please share it
Thank you.

The data object that is output by the Device Node is not the exact same structure as the object that I output by the Gateway Node.

Device Node Sensor Data object:

{
	"topic": "sensor_data",
	"data": {
		"nodeId": 0,
		"firmware": 11,
		"battery": "3.28",
		"battery_percent": "98.56",
		"counter": 3,
		"sensor_type": 80,
		"sensor_data": {
			"mode": 0,
			"odr": "400Hz",
			"temperature": 22.18,
			"x_rms_ACC_G": 0,
			"x_max_ACC_G": 0,
			"x_velocity_mm_sec": 0,
			"x_displacement_mm": 0,
			"x_peak_one_Hz": 0,
			"x_peak_two_Hz": 0,
			"x_peak_three_Hz": 0,
			"y_rms_ACC_G": 0,
			"y_max_ACC_G": 0,
			"y_velocity_mm_sec": 0,
			"y_displacement_mm": 0,
			"y_peak_one_Hz": 0,
			"y_peak_two_Hz": 0,
			"y_peak_three_Hz": 0,
			"z_rms_ACC_G": 0,
			"z_max_ACC_G": 0,
			"z_velocity_mm_sec": 0,
			"z_displacement_mm": 0,
			"z_peak_one_Hz": 0,
			"z_peak_two_Hz": 0,
			"z_peak_three_Hz": 0
		},
		"sensor_name": "One Channel Vibration Plus",
		"type": "sensor_data",
		"addr": "00:13:a2:00:42:23:8f:61",
		"received": 1683297168816,
		"original": {
			"mac": "00:13:a2:00:42:23:8f:61",
			"receive_options": {
				"ack": 0,
				"broadcast": 0,
				"type": ""
			},
			"data": [127, 0, 11, 3, 252, 3, 0, 80, 0, 0, 9, 8, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
			"type": "receive_packet"
		},
		"modem_mac": "00:13:A2:00:42:11:72:FC"
	},
	"payload": {
		"mode": 0,
		"odr": "400Hz",
		"temperature": 22.18,
		"x_rms_ACC_G": 0,
		"x_max_ACC_G": 0,
		"x_velocity_mm_sec": 0,
		"x_displacement_mm": 0,
		"x_peak_one_Hz": 0,
		"x_peak_two_Hz": 0,
		"x_peak_three_Hz": 0,
		"y_rms_ACC_G": 0,
		"y_max_ACC_G": 0,
		"y_velocity_mm_sec": 0,
		"y_displacement_mm": 0,
		"y_peak_one_Hz": 0,
		"y_peak_two_Hz": 0,
		"y_peak_three_Hz": 0,
		"z_rms_ACC_G": 0,
		"z_max_ACC_G": 0,
		"z_velocity_mm_sec": 0,
		"z_displacement_mm": 0,
		"z_peak_one_Hz": 0,
		"z_peak_two_Hz": 0,
		"z_peak_three_Hz": 0
	},
	"time": 1683297168827,
	"_msgid": "47532d55d3c2bf33"
}

Sensor Data object output by Gateway Node:

{
	"topic": "sensor_data",
	"payload": {
		"nodeId": 0,
		"firmware": 11,
		"battery": "3.28",
		"battery_percent": "98.56",
		"counter": 3,
		"sensor_type": 80,
		"sensor_data": {
			"mode": 0,
			"odr": "400Hz",
			"temperature": 22.18,
			"x_rms_ACC_G": 0,
			"x_max_ACC_G": 0,
			"x_velocity_mm_sec": 0,
			"x_displacement_mm": 0,
			"x_peak_one_Hz": 0,
			"x_peak_two_Hz": 0,
			"x_peak_three_Hz": 0,
			"y_rms_ACC_G": 0,
			"y_max_ACC_G": 0,
			"y_velocity_mm_sec": 0,
			"y_displacement_mm": 0,
			"y_peak_one_Hz": 0,
			"y_peak_two_Hz": 0,
			"y_peak_three_Hz": 0,
			"z_rms_ACC_G": 0,
			"z_max_ACC_G": 0,
			"z_velocity_mm_sec": 0,
			"z_displacement_mm": 0,
			"z_peak_one_Hz": 0,
			"z_peak_two_Hz": 0,
			"z_peak_three_Hz": 0
		},
		"sensor_name": "One Channel Vibration Plus",
		"type": "sensor_data",
		"addr": "00:13:a2:00:42:23:8f:61",
		"received": 1683297168816,
		"original": {
			"mac": "00:13:a2:00:42:23:8f:61",
			"receive_options": {
				"ack": 0,
				"broadcast": 0,
				"type": ""
			},
			"data": [127, 0, 11, 3, 252, 3, 0, 80, 0, 0, 9, 8, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
			"type": "receive_packet"
		}
	},
	"time": 1683297168825,
	"_msgid": "d533016e5fed1554"
}

Notice that the sensor data from the Device Node is inside an object called data, where as the sensor data from the Gateway node is inside the payload object. This may be why your flow works with a Gateway node but not with a Device Node.

100 motors must be installed. We have to go into 1/1.
You must use a wireless device
Can I modify the above file? Can I get it if I have a json?

Simply change your switch node from: msg.payload.sensor_data.x_rms_ACC_G to msg.data.sensor_data.sensor_data.x_rms_ACC_G then you can connect that switch node to a wireless device node.