More hAP AC^2 woes! :(

So it appears AC^2’s report their model differently depending on… I have no idea… different manufacturing dates perhaps?
2018-08-03 12.13.29.jpg
Screen Shot 2018-08-03 at 12.14.17.png
Up to now, my script takes the model, drops the first 12 chars, and reports that to my server (via fetch). It now seems in some cases it’s not needed to drop the first 12.

Mikrotik people: Is there anything I can query easily in script (eg firmware version) that will determine which model is reported?

Surely I’m not going to have to resort to doing a string compare on the first 12…? :frowning:

Hey also Mikrotik: it’s exactly these undocumented, unnecessary changes that makes dealing with your products so massively frustrating and wastes hours of my time!

In this specific case, you see short-name and long-name. If you assume that RouterBOARD = RB (no space), then you could update your script accordingly. I will find out why it was changed. Also it seems that “-TC” was dropped (this indicates case type)

I see that, yes.

But doing string comparison in ‘Mikrotik script’ is tough. Is there some other thing I can query to determine whether to drop either 12 or 2 chars?

…and why is stuff like this NOT DOCUMENTED?? I’ve wasted 2-3 hours this morning chasing this problem.

local board
if ([:pick [:sys ro g mod] 0 11] = “RouterBOARD”) do={
set board [:pick [:sys ro g mod] 12 [:len [:sys ro g mod]]]
} else={
set board [:pick [:sys ro g mod] 2 [:len [:sys ro g mod]]]
}
Little workaround for anyone else having the same problem.