Skip to content

Commit

Permalink
fix(nrplus): use utf-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Oct 31, 2023
1 parent eadeae7 commit 0f0e0f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lambda/nrplusGatewayScan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const handler = async (): Promise<void> => {
return iotData.send(
new PublishCommand({
topic,
payload: Buffer.from(payload, 'hex'),
payload: Buffer.from(payload, 'utf-8'),
qos: 1,
}),
)
Expand Down
2 changes: 1 addition & 1 deletion lambda/onMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const handler = async (
await iotData.send(
new PublishCommand({
topic: `${deviceId}/nrplus-ctrl`,
payload: Buffer.from(nrplusCtrl, 'hex'),
payload: Buffer.from(nrplusCtrl, 'utf-8'),
qos: 1,
}),
)
Expand Down

0 comments on commit 0f0e0f6

Please sign in to comment.