Can I use a function to make the alarm sound every minute?

Hello

I set an alarm on my wireless device to go off every five minutes.

function using
Can I set an alarm to sound every minute?

First off, can I ask why you would set off an alarm every minute? It would seem to me that anyone near the alarm would be tempted to destroy it after a short amount of time.

Assuming you can send something from NR to your wireless device to set off the alarm, why not use node-red-contrib-cron-plus and set a schedule?

Currently, the minimum time a sensor can send an alarm is 5 minutes.
5 minutes is too long and I want the alarm to go off every minute.

If the sensor can only send the alarm every 5 minutes, does it shut off at some time or does it continue to ?
You could setup a cascade of trigger nodes like this

[{"id":"519d3f8f82eea79a","type":"trigger","z":"b1ed59b1c9e6d6ef","name":"","op1":"1","op2":"1","op1type":"str","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":310,"y":140,"wires":[["040ab8dfea136f9d"],["efc505b84271cab9"]]},{"id":"c164de0873ae1dac","type":"inject","z":"b1ed59b1c9e6d6ef","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":140,"wires":[["519d3f8f82eea79a"]]},{"id":"040ab8dfea136f9d","type":"debug","z":"b1ed59b1c9e6d6ef","name":"debug 501","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":630,"y":200,"wires":[]},{"id":"efc505b84271cab9","type":"trigger","z":"b1ed59b1c9e6d6ef","name":"","op1":"1","op2":"1","op1type":"str","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":310,"y":180,"wires":[["040ab8dfea136f9d"],["176ddb2da6ece2f7"]]},{"id":"176ddb2da6ece2f7","type":"trigger","z":"b1ed59b1c9e6d6ef","name":"","op1":"1","op2":"1","op1type":"str","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":310,"y":220,"wires":[["040ab8dfea136f9d"],["005e3d72abb036b4"]]},{"id":"005e3d72abb036b4","type":"trigger","z":"b1ed59b1c9e6d6ef","name":"","op1":"1","op2":"1","op1type":"str","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":310,"y":260,"wires":[["040ab8dfea136f9d"],["052e914485424cf2"]]},{"id":"052e914485424cf2","type":"trigger","z":"b1ed59b1c9e6d6ef","name":"","op1":"1","op2":"1","op1type":"str","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":310,"y":300,"wires":[["040ab8dfea136f9d"],[]]}]

It continues to operate with an alarm sounding every 5 minutes.

Does my example solve your issue?
does the alam send something to NR?

It didn't solve the problem.
Repost your question.

Data is received from the wireless sensor every 5 minutes.
Is it possible to fix every 1 minute? I wonder.


[
    {
        "id": "d9a43cbc15734973",
        "type": "ncd-wireless-node",
        "z": "46b5a43b90df2a1a",
        "name": "",
        "connection": "f4bdf3f4b5cd3511",
        "config_comm": "f4bdf3f4b5cd3511",
        "addr": "00:13:a2:00:42:0c:5a:95",
        "sensor_type": "80",
        "auto_config": true,
        "on_the_fly_enable": false,
        "node_id_delay_active": "",
        "node_id": 0,
        "delay": 300,
        "form_network": false,
        "destination_active": "",
        "destination": "0000FFFF",
        "power_active": "",
        "power": 4,
        "retries_active": "",
        "retries": 10,
        "pan_id_active": "",
        "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_active": false,
        "impact_accel": "0",
        "impact_data_rate_active": false,
        "impact_data_rate": "4",
        "impact_threshold_active": false,
        "impact_threshold": 25,
        "impact_duration_active": false,
        "impact_duration": 1,
        "activ_interr_x": 1,
        "activ_interr_y": 2,
        "activ_interr_z": 4,
        "activ_interr_op": 8,
        "force_calibration_co2_auto_config": "",
        "force_calibration_co2": 400,
        "filtering": 0,
        "data_rate": 5,
        "time_series": 0,
        "reading_type": 1,
        "mode_80_active": "",
        "mode_80": 0,
        "measurement_mode_80_active": "",
        "measurement_mode_80": 0,
        "on_request_timeout_80_active": "",
        "on_request_timeout_80": 1,
        "sensor_boot_time_420ma_active": "",
        "sensor_boot_time_420ma": 0,
        "sensor_boot_time_78_active": false,
        "sensor_boot_time_78": "0",
        "deadband_80_active": "",
        "deadband_80": 0,
        "filter_80_active": "",
        "filter_80": 0,
        "output_data_rate_p1_81_active": "",
        "output_data_rate_p1_81": 0,
        "output_data_rate_p2_81_active": "",
        "output_data_rate_p2_81": 0,
        "sampling_duration_p1_81_active": "",
        "sampling_duration_p1_81": 0,
        "sampling_duration_p2_81_active": "",
        "sampling_duration_p2_81": 0,
        "led_alert_mode_84_active": "",
        "led_alert_mode_84": 0,
        "led_accelerometer_threshold_84_active": "",
        "led_accelerometer_threshold_84": "",
        "led_velocity_threshold_84_active": "",
        "led_velocity_threshold_84": "",
        "acceleration_interrupt_threshold_84_active": "",
        "acceleration_interrupt_threshold_84": "",
        "set_rtc_101": 0,
        "current_calibration_82": "",
        "current_calibration_82_active": false,
        "current_calibration_c1_80": 178,
        "current_calibration_c1_80_active": "",
        "current_calibration_c2_80": 178,
        "current_calibration_c2_80_active": "",
        "current_calibration_c3_80": 178,
        "current_calibration_c3_80_active": "",
        "output_data_rate_101_active": true,
        "output_data_rate_101": "9",
        "output_data_rate_101_m2_active": "",
        "output_data_rate_101_m2": 0,
        "sampling_duration_101_active": true,
        "sampling_duration_101": "20",
        "sampling_interval_101_active": true,
        "sampling_interval_101": "0",
        "full_scale_range_101_active": "",
        "full_scale_range_101": 1,
        "full_scale_range_101_m2_active": "",
        "full_scale_range_101_m2": 1,
        "x_axis_101": "",
        "y_axis_101": "",
        "z_axis_101": "",
        "low_pass_filter_80_active": "",
        "low_pass_filter_80": 0,
        "high_pass_filter_80_active": "",
        "high_pass_filter_80": 0,
        "low_pass_filter_81_p2_active": "",
        "low_pass_filter_81_p2": 0,
        "high_pass_filter_81_p2_active": "",
        "high_pass_filter_81_p2": 0,
        "roll_angle_threshold_47": 0,
        "roll_angle_threshold_47_active": "",
        "pitch_angle_threshold_47": 0,
        "pitch_angle_threshold_47_active": "",
        "counter_threshold_35": 50,
        "counter_threshold_35_active": "",
        "payload_length_80_active": "",
        "payload_length_80": 3,
        "motion_threshold_46_active": false,
        "motion_threshold_46": "100",
        "low_calibration_420ma_active": false,
        "low_calibration_420ma": "68805",
        "mid_calibration_420ma_active": false,
        "mid_calibration_420ma": "68724",
        "high_calibration_420ma_active": false,
        "high_calibration_420ma": "68714",
        "x": 390,
        "y": 2600,
        "wires": [
            [
                "8f78cd5d4683cefe",
                "c6dec8cd401e3218",
                "a3061da52a1c9e97",
                "2d74c10476e7d3d8",
                "2d49768ccc387898",
                "c72c045b04fd321c",
                "0caecc1e57b93397",
                "71b6c94169467695",
                "97a7aaeb1f44039f",
                "d0d6d542b5cba1b5",
                "c0620fd4dca1801f",
                "2e3cad06c7d4f551"
            ]
        ]
    },
    {
        "id": "f4bdf3f4b5cd3511",
        "type": "ncd-gateway-config",
        "name": "usb - do",
        "comm_type": "serial",
        "ip_address": "",
        "tcp_port": "2101",
        "port": "COM3",
        "baudRate": "9600",
        "pan_id": "7fff",
        "rssi": false
    }
]

If you are asking Can node-red make the wireless sensor send an alarm every minute? the answer is it depends on the wireless device. You will have to look at the wireless devices API to see if you can change the timing.

Did you put the series of trigger nodes after the wireless device's node? It should receive a msg and forward it on every minute five times. If you need to send the msg that came from the sensors node, you need change the trigger nodes to send the existing msg object in both places in the trigger node.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.