Skip to content

Commit

Permalink
Updating packages, and lowering logging
Browse files Browse the repository at this point in the history
  • Loading branch information
terafin committed Oct 6, 2024
1 parent c95bd77 commit 3b3c76f
Show file tree
Hide file tree
Showing 2 changed files with 671 additions and 729 deletions.
8 changes: 4 additions & 4 deletions mqtt-unifi-protect-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ async function pollBootstrap() {
logging.debug('** camera: ' + JSON.stringify(camera))

if (!_.isNil(lastRing)) {
logging.info('** camera ring:')
logging.info(' lastRing: ' + lastRing)
logging.debug('** camera ring:')
logging.debug(' lastRing: ' + lastRing)
const ringDate = new Date(lastRing)
logging.info(' ringDate: ' + ringDate)
logging.debug(' ringDate: ' + ringDate)
const ringTimeDifferenceSeconds = (now - lastRing) / 1000
logging.info(' ringTimeDifferenceSeconds: ' + ringTimeDifferenceSeconds)
logging.debug(' ringTimeDifferenceSeconds: ' + ringTimeDifferenceSeconds)

const recentRing = (ringTimeDifferenceSeconds < pollTime * 3) ? 1 : 0
client.smartPublish(mqtt_helpers.generateTopic(baseTopic, name, 'ringing'), recentRing ? '1' : '0', mqttOptions)
Expand Down
Loading

0 comments on commit 3b3c76f

Please sign in to comment.