Sending notification failed: DUPLICATE MESSAGE

Patrick Fiaux Michael Kohler

I am getting the following error when sending status updates quickly: "Sending notification to brain failed: DUPLICATE MESSAGE". If I do it slowly, there is no error.

sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 true
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 false
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 true
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 false
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 true
[CONTROLLER] Sending notification to brain failed: 94103E45625C DUPLICATE_MESSAGE
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 false
[CONTROLLER] Sending notification to brain failed: 94103E45625C DUPLICATE_MESSAGE
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 true
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 false
sendComponentUpdate 94103E45625C urn:Belkin:device:lightswitch:1 true
Reply
2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • The NEEO Brain will ignore duplicate notifications (and return the DUPLICATE_MESSAGE error) usually this can safely be ignored. For example if you use polling to update the device state and you send true multiple times, the Brain will ignore state true if it's already true.

    Since you're toggling it, it could be that while you send the requests in order on the SDK they arrive out of order on the Brain (true true or false false instead of true false or false true) then the Brain gets an update request for a sensor that seems already in the correct state and ignores it. Maybe using a queue for the updates on the SDK or denouncing them is an option.

    Like
    • Patrick Fiaux 

      In this particular case, these are notifications received from the device by rapidly toggle a  switch. They are received in the right order and passed in the right order to the SDK.

      Is the suggestion to queue them and put some delays to hand them off to the SDK?

      Shouldn’t the SDK be responsible for the ensuring the notifications arrive in the proper order?

      Like
Like Follow