Skip to content

Commit

Permalink
get meter 161 name
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Feb 27, 2024
1 parent ddfe96d commit cbb6a0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- get-meter-161-name

jobs:
unit-tests:
Expand Down
4 changes: 4 additions & 0 deletions backend/app/meter.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ exports.post = async (event, context) => {
let meter
try {
meter = await new Meter(null, body.SERIALNUMBER + '_' + body.MODBUSDEVICE).get()
console.log(body.SERIALNUMBER + '_' + body.MODBUSDEVICE)
if (body.SERIALNUMBER + '_' + body.MODBUSDEVICE === '001EC60553A5_53') {
console.log('Meter name of 001EC60553A5_53 is: ' + body.MODBUSDEVICENAME)
}
} catch (err) {
if (err.name === 'MeterNotFound') {
meter = await Meter.create(
Expand Down

0 comments on commit cbb6a0d

Please sign in to comment.