Skip to content

Commit 4d9dd0a

Browse files
committed
Fix LoraWan manufacturer decoding (#22880)
1 parent 53dee5b commit 4d9dd0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tasmota/tasmota_xdrv_driver/xdrv_73_6_lorawan_decode.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ void LoraWanDecode(struct LoraNodeData_t* node_data) {
8888
uint8_t FPort;
8989
*/
9090
if (bitRead(Lora->settings.flags, TAS_LORA_FLAG_DECODE_ENABLED)) { // LoraOption3 1
91-
if (0x00161600 == Lora->settings.end_node[node_data->node].DevEUIh) { // MerryIoT
91+
uint32_t manufacturer = Lora->settings.end_node[node_data->node].DevEUIh >> 8;
92+
if (0x001616 == manufacturer) { // MerryIoT
9293
if (120 == node_data->FPort) { // MerryIoT door/window Sensor (DW10)
9394
if (9 == node_data->payload_len) { // MerryIoT Sensor state
9495
// 1 2 3 4 5 6 7 8 9
@@ -122,7 +123,7 @@ void LoraWanDecode(struct LoraNodeData_t* node_data) {
122123
}
123124
}
124125

125-
else if (0xA840410E == Lora->settings.end_node[node_data->node].DevEUIh) { // Dragino
126+
else if (0xA84041 == manufacturer) { // Dragino
126127
if (10 == node_data->FPort) { // Dragino LDS02
127128
// 8CD2 01 000010 000000 00 - Door Open, 3.282V
128129
// 0CD2 01 000011 000000 00 - Door Closed

0 commit comments

Comments
 (0)