Hello,
I’m trying to set the filtering and data rate for PR52-33N sensor so I modified your node-red library, adding a few functions for setting time series flag, filtering and data rate.
First off, can you please confirm these functionalities are supported for my sensor type?
After i do the sensor configuration, the USB modem outputs this JSON:
{“topic”:“Config Results”,“payload”:{“destination”:true,“id_and_delay”:true,“power”:true,“retries”:true,“network_id”:true,“time_series”:true,“filtering”:true,“data_rate”:true},"_msgid":“1f9865bc.7b660a”}
Secondly, can I assume the configuration is correct since Config Results show no error?
After configuration the sensor stops sending anything except for this JSON:
{"topic":"sensor_mode","payload":{"mac":"00:13:a2:00:41:8b:c0:a5","type":40,"nodeId":0,"mode":"RUN"},"_msgid":"55c4058a.fc94dc"}
Thirdly, these are the functions I’m using, am i correct to assume all these flags have 1-byte length?
// SET TIME SERIES: 0xF4 / 0x08 / TS
config_set_time_series(sensor_mac, bool) {
var packet = [244, 8, 0, 0, 0, bool];
return this.config_send(sensor_mac, packet);
}
// SET FILTERING: 0xF4 / 0x02 / F
config_set_filtering(sensor_mac, bool) {
var packet = [244, 2, 0, 0, 0, bool];
return this.config_send(sensor_mac, packet);
}
// SET DATA RATE: 0xF4 / 0x03 / ODR
config_set_data_rate(sensor_mac, rate) {
var packet = [244, 3, 0, 0, 0, rate];
return this.config_send(sensor_mac, packet);
}
Thanks
Horia