Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Fix warning about consumables warning in the log #4

Closed
wants to merge 1 commit into from
Closed

Conversation

gtrabanco
Copy link

WARNING!

Thins fix needs to be tested. I can not have a test enviroment to test this fix.

Type of change

Type A:

  • Bug fix (non-breaking change which fixes an issue)

Description (Type A)

This try to fix warning in the log of Valetudo about consumables. Because topic is not set in the Valetudo settings consumables status for any reason is not send to the valetudo mqtt topic as other status values.

The warning looks like:

[2021-10-18T09:26:34.035Z] [WARN] Failed to get consumables: DomainException: Timeout waiting for response from opcode 'DEVICE_MAPID_GET_CONSUMABLES_PARAM_RSP'
    at Timeout.fail [as _onTimeout] (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1181:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  metadata: undefined
}

After a fast view I do not think that the error is in @agnoc/core package.

@gtrabanco gtrabanco changed the title Fix warning about consumables warning in the log [ISSUE] Fix warning about consumables warning in the log Oct 18, 2021
@gtrabanco
Copy link
Author

gtrabanco commented Oct 19, 2021

It looks that providing a topic in valetudo addon on ha not fix all the stuff, still have issues:

[2021-10-19T06:41:38.074Z] [WARN] Failed to get consumables: DomainException: Timeout waiting for response from opcode 'DEVICE_MAPID_GET_CONSUMABLES_PARAM_RSP'
    at Timeout.fail [as _onTimeout] (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1181:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  metadata: undefined
}
[2021-10-19T06:41:39.491Z] [ERROR] Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:164:15)
    at writeGeneric (node:internal/stream_base_commons:155:3)
    at Socket._writeGeneric (node:net:780:11)
    at Socket._write (node:net:792:8)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at PacketSocket._write (/snapshot/app/node_modules/@agnoc/core/lib/sockets/packet.socket.js:152:19)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at PacketSocket.Writable.write (node:internal/streams/writable:334:10)
    at Connection.write (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:93:26)
    at Connection.respond (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:88:17)
    at Message.respond (/snapshot/app/node_modules/@agnoc/core/lib/value-objects/message.value-object.js:39:28)
    at Robot.handleClientHeartbeat (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:836:13)
    at Robot.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1144:7) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
[2021-10-19T06:41:39.496Z] [ERROR] Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:164:15)
    at writeGeneric (node:internal/stream_base_commons:155:3)
    at Socket._writeGeneric (node:net:780:11)
    at Socket._write (node:net:792:8)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at PacketSocket._write (/snapshot/app/node_modules/@agnoc/core/lib/sockets/packet.socket.js:152:19)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at PacketSocket.Writable.write (node:internal/streams/writable:334:10)
    at Connection.write (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:93:26)
    at Connection.respond (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:88:17)
    at Message.respond (/snapshot/app/node_modules/@agnoc/core/lib/value-objects/message.value-object.js:39:28)
    at Robot.handleClientHeartbeat (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:836:13)
    at Robot.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1144:7) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
[2021-10-19T06:41:39.541Z] [ERROR] Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (node:net:459:14)
    at PacketSocket._write (/snapshot/app/node_modules/@agnoc/core/lib/sockets/packet.socket.js:152:19)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at PacketSocket.Writable.write (node:internal/streams/writable:334:10)
    at Connection.write (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:93:26)
    at Connection.send (/snapshot/app/node_modules/@agnoc/core/lib/emitters/connection.emitter.js:70:17)
    at Multiplexer.send (/snapshot/app/node_modules/@agnoc/core/lib/emitters/multiplexer.emitter.js:56:23)
    at Robot.send (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1160:34)
    at Robot.sendRecv (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1190:10)
    at Robot.controlLock (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:784:16)
    at Robot.handshake (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:788:16)
    at Robot.addConnection (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1127:17)
    at CloudServer.handleMessage (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:134:13)
    at Connection.<anonymous> (/snapshot/app/node_modules/@agnoc/core/lib/emitters/cloud-server.emitter.js:154:12)
    at Connection.emit (node:events:394:28) {
  code: 'EPIPE'
}
[2021-10-19T08:42:10.288Z] [WARN] Failed to get consumables: DomainException: Timeout waiting for response from opcode 'DEVICE_MAPID_GET_CONSUMABLES_PARAM_RSP'
    at Timeout.fail [as _onTimeout] (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:1181:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  metadata: undefined
}
[2021-10-19T08:42:29.030Z] [ERROR] Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:220:20) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}
[2021-10-19T09:23:50.456Z] [WARN] Error while starting zone cleaning {
  body: {
    action: 'clean',
    zones: [ [Object], [Object], [Object], [Object], [Object] ]
  },
  e: DomainException: Unable to change robot mode to zone
      at /snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:348:13
      at async Robot.setMode (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:341:5)
      at async Robot.cleanAreas (/snapshot/app/node_modules/@agnoc/core/lib/emitters/robot.emitter.js:509:7)
      at async CecotecZoneCleaningCapability.start (/snapshot/app/backend/lib/robots/cecotec/capabilities/CecotecZoneCleaningCapability.js:45:9)
      at async /snapshot/app/backend/lib/webserver/capabilityRouters/ZoneCleaningCapabilityRouter.js:194:25 {
    metadata: undefined
  }
}

This was reported also in @agnoc/core library repository (see #37)

@gtrabanco gtrabanco closed this Dec 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant