Skip to content

Commit

Permalink
Update modbus-sensor.js
Browse files Browse the repository at this point in the history
shift 3 bytes to show the modbus payload
  • Loading branch information
Watteco committed Jul 13, 2023
1 parent b921bfc commit e8407c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/nke-watteco/modbus-sensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ function Decoder(bytes, port) {
//
initMultiModbusValue()
stdData.value.multimodbus_payload = ""
bytes.slice(index+1).forEach((value, i) => bytes[i] = value.toString( 16 ).toUpperCase().length === 1 ? "0" + value.toString( 16 ).toUpperCase() : value.toString( 16 ).toUpperCase())
bytes.slice(index+4).forEach((value, i) => bytes[i] = value.toString( 16 ).toUpperCase().length === 1 ? "0" + value.toString( 16 ).toUpperCase() : value.toString( 16 ).toUpperCase())
stdData.value.multimodbus_payload = bytes.join('')
}
tab.push(stdData);
Expand Down Expand Up @@ -1098,4 +1098,4 @@ function decodeUplink(input) {
errors: []
};
return decodedInput.data.data
}
}

0 comments on commit e8407c8

Please sign in to comment.