Announcement

Collapse
No announcement yet.

MQTT Last Received not-Accepted Payload failed to be updated or added to the database

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MQTT Last Received not-Accepted Payload failed to be updated or added to the database

    I get this error in my logs quite often:
    Apr-23 09:42:49 Database Error - Save of the devices to the database did not succeed - see the log for more details.
    Apr-23 09:42:47 Database ERROR, device MQTT Last Received not-Accepted Payload failed to be updated or added to the database.
    Apr-23 09:42:47 Error SQL Exception : UPDATE [Devices] SET [ref]=1541,[name]='Last Received not-Accepted Payload',[location]='MQTT',[location2]='',[Last_Change]='2019-04-22 08:19:39',[devValue]=0,[devString]='� x ',[object_version]=101,[object_data]=@ByteArray WHERE [ref]=1541;
    Apr-23 09:42:47 Error SQL Exception updating device record in the database: SQL logic error or missing database unrecognized token: "'� x ", Code=1, Link=
    Any ideas on how to fix this?

  • #2
    These are messages generated by HS3 and not a plugin. It looks as if you have a payload in one of your MQTT topics that contains a character that cannot be processed by the database being used by HS3. To avoid the message the sender of the topic needs to avoid using this character. Alternately you can disable the updating of statistics in HS3 devices from the General tab in mcsMQTT.

    The real solution should be within HS3 so it encodes special characters that cannot be stored in their database and then decodes them when reading. What is odd is that the character appears to be not one of the standard ascii characters. mcsMQTT stores the same payload in its database and only protects against single and double quotes and apparently no message is being generated by mcsMQTT about a database issue.

    Comment


    • #3
      Thanks! I changed the statistics setting, that seems to have done the trick.

      Comment

      Working...
      X