MQTT &MEMO not working? Limit on length?

Post Reply
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

MQTT &MEMO not working? Limit on length?

Post by Ferguson »

I'm just running into a lot of issues making me think I am doing something incorrectly.

Trying to configure BI to work with Home Assistant which requires MQTT. I have it working but an expected field is being truncated (or possibly just has the wrong content), and not sure why.

I have the on-alert configured with this payload:

Code: Select all

{"type":"Motion","trigger":"On", "memo": "&MEMO"}
The &MEMO is documented as showing the AI's processing confidence as well as what was detected. What I get instead is only this:

Code: Select all

{"type":"Motion","trigger":"On", "memo": "RuleEngine/CellMotionDetector/Motio"}
It appears to be substantially truncating the full memo. It's not an underlying MQTT limitation as I tried adding &JSON and I get the full, long value set including locations, confidence, etc (as below). That's something in theory I could use to get the same info, but it's not what I want. I know in the past I did something to get it showing things like "Person: 93%" though I do not recall precisely.

Am I missing something? I'm going by this definition of &MEMO from the manual:
memo.jpg
memo.jpg (22.01 KiB) Viewed 159 times

Code: Select all

{
  "api": "objects",
  "found": {
    "message": "Found bench, person",
    "count": 2,
    "predictions": [
      {
        "confidence": 0.6642040014266968,
        "label": "bench",
        "x_min": 2516,
        "y_min": 1253,
        "x_max": 3506,
        "y_max": 2143
      },
      {
        "confidence": 0.9286361336708069,
        "label": "person",
        "x_min": 3196,
        "y_min": 346,
        "x_max": 3510,
        "y_max": 1168
      }
    ],
    "success": true,
    "processMs": 52,
    "inferenceMs": 52,
    "moduleId": "ObjectDetectionYOLOv5-6.2",
    "moduleName": "Object Detection (YOLOv5 6.2)",
    "code": 200,
    "command": "detect",
    "requestId": "4a5e68ce-0140-447f-a395-986d9b88e394",
    "inferenceDevice": "GPU",
    "analysisRoundTripMs": 127,
    "processedBy": "localhost",
    "timestampUTC": "Sat, 10 Aug 2024 18:04:53 GMT"
  }
}
User avatar
TimG
Posts: 2391
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: MQTT &MEMO not working? Limit on length?

Post by TimG »

I'm sure I've had that working before. Can you show your BI5 On Alert/ Action set/ MQTT settings for it ? I've got MQTT outputting car number plates from BI5 via MQTT and Homeseer reading them out via Alexa speakers. The other use was to restrict the BI5 MQTT to only trigger when "Required AI Objects: Person" which then only needed a "ON" as the payload to allow Homeseer to control the drive lights.

From my notes, Variables that can be used are:

• {"plate":"&PLATE"} which gives you the OCR’d number plate,
• {"AlertImgPath":"&ALERT_PATH"} gives the path of the jpg image,
• {"Alert_AI":"&MEMO"} gives the ALPR AI info.
• {"Date":"%d-%m-%Y %H:%M:%S"} gives date and time,
• {"Camera":"&CAM"} adds in the camera name that was triggered.
• {"type":"&TYPE"} will show which motion detection was triggered.

And these can be used individually, or combined into one payload.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

Re: MQTT &MEMO not working? Limit on length?

Post by Ferguson »

TimG wrote: Sat Aug 10, 2024 7:09 pm I'm sure I've had that working before. Can you show your BI5 On Alert/ Action set/ MQTT settings for it ?
....
From my notes, Variables that can be used are:
Is below the one you want?

I don't think it's that the variable can't be used, since it does substitute, it just doesn't have in the substitution what the manual says it should have.

I'm pulling the actual values out of mqtt explorer, so am viewing it before it gets to Home Assistant, so it's not something being changed in HA. I do use Mosquito for other things, and those work fine as well.

I wish I had saved my setup from the prior house. I know this was working once upon a time, though I made little actual use of it (as in automations), it was more to view, and I can't say I've looked at it in a long time. It could have broken in a prior BI version and I may never have noticed. Also, these are different cameras. I did have to change the setting to say "Motion" as when I used &TYPE it was a long string that HA didn't interpret as a motion event, but I think that's a different concern than the AI Memo.

I'm a bit surprised that it says this is the AI memo, but what it looks like is the ONIVF event. But I confirmed that CPAI was called and confirmed the alert.
settings.jpg
settings.jpg (54.76 KiB) Viewed 144 times
Ferguson
Posts: 71
Joined: Sat Feb 22, 2020 1:32 am

Re: MQTT &MEMO not working? Limit on length?

Post by Ferguson »

I also tried the %001 macro, which is sort of documented as identical to &MEMO, and it indeed came out identically.
Post Reply