It’s been a while since I’ve been active on here. My OH2.5 (openhabian on a RPi 4) system continues to do just fine, and I haven’t had the time to do the full overhaul/upgrade to OH3 that I have planned.
I have installed Blue Iris on my network, and have license plate recognition working via ALPR. The documentation is scant, however I have Blue Iris passing on the only relevant string variable that I can find that includes the license plate - &PLATE - via MQTT
This includes details I don’t want, and the string doesn’t always have a license plate in it. If it does, it is the first portion of the string. Immediately after the plate (or starting the string if there is no plate) is the word ‘on’, which I thought would be useful.
I am wondering what the best approach to parsing strings in OpenHab. My final result that I want is a text object that gets only the license plate number. For example, the below strings are some of what I received via MQTT, (changed plate numbers):
AB123C on car:87
D4567E on person:89%,motorcycle:68
FG890H on truck:59%,car:58
AB123C on car:93
FG890H on car:68
FG890H on car:89
(as you can see, plate recognition is not yet reliable for recognized vehicles - I still need to tweak my motion zones, etc. The number at the end is the deepstack confidence that it is the given object type)
Given that the strings do not have a consistent structure, I’m not sure that transform is ideal.
My use case, other than logging ins & outs should it ever be relevant to look up, is for my gate automation opening/closing for recognized plates.
(the camera doesn’t record traffic off of my property, and notices are prominently displayed, and I believe I am within privacy regulation compliance. The gate is to keep deer out, and there is an unlocked pedestrian gate, so I’m not worried about someone spoofing their license plate to get in. That being said I don’t want the gate to open randomly for whomever chooses to turn around in my driveway or drive up to my gate)
Thanks for your input & suggestions on how to best go about this.