Announcement

Collapse
No announcement yet.

MQTT error message after broker restart

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

  • MQTT error message after broker restart

    I have a Raspberry PI running both NodeRed and Mosquito and noticed that after a couple of days the NodeRed dashboard gets slow in responding. Recently I implemented a nighty restart of the PI and this solved the problem.

    I checked the my log files and found that every time I restart my MQTT broker (Mosquito) I get the following error message in the HS Log:

    GetLastHistoryRecord Line 0 Conversion from type 'DBNull' to type 'Long' is not valid.

    Not sure what is causing this, maybe someone can comment on it?

    Using version 4.0.0.0 of the MQTT plugin, Homeseer 3.0.0.531 running on Windows10.

    Francois

  • #2
    An error will occur when the history database is empty and mcsMQTT tries to find the last record of that database. The following exists in the code to trap for that error. Could it be that the message is in a different language and the filter used does not work in your case? It is just a nuisance and should not cause any problems.
    Code:
                    If ex.Message <> "Line 0 Conversion from type 'DBNull' to type 'Long' is not valid" Then
                        hsWritelogEx(PLUGIN_NAME, "GetLastHistoryRecord", ex.Message)
                    End If

    Comment


    • #3
      Michael, thanks for the clarification.

      I am not using the history database and have never set it up. Following your explanation the error message is caused by not having a database at all which makes sense.

      Maybe for a future release you could consider to include an additional line of code to suppress the error message if history is not enabled?

      Thanks,

      Francois




      Verzonden vanaf mijn iPhone met Tapatalk

      Comment


      • #4
        Good idea. I will put it in the code for the next update.

        Comment

        Working...
        X