Device Name Not Label

I am working on multiple rules that send message(s) to BlueIris software. To communicate with BI I need to use a shortname defined in BI. In hubitat, I create virtual cameras with a long name (all starting with VM_BI...) within device label and the BI shortname in device name. The problem is I can not seem to retrieve the device name from within RM using %device% because what I put in device label overides device name.

The easy solution would be to put the BI shortname in the device label (or not use label at all) but I am a bit anal when it comes to having an organized list of devices names/labels within Hubitat. I prefer to group a bunch of related devices by name. For example, all virtual motion sensors start with VM_

The best solution for me would be the ability to retireve the device name from with RM. Is this even possible?

Can you set a variable to the device name and then parse it?

Not sure what you mean. I had considered Using the long name with the shortname appended to it.
i.e VM_Backyard Camera1-BY1 but I cant find a way within RM to parse as the only string operations it appears to have is Replace or Remove. I thought maybe I could use wildcards but that doesnt work either.
i.e.
set longName to%device%
Remove "*-" from longName (where * is the wildcard)

Whooohooo. This works

Set shortName with token(1) delimited by '-' from ''%device%(VM_Backyard Cam-BY)'

1 Like

All mine are just named BI CAM - BIShortname. But I'm not using variables or anything like that..

[EDIT] I mis-read your original post. Basically I'm just using the short names for everything.

I have virtual motion sensors that BI triggers via Maker API, and I have a couple rules in RM that trigger cameras to record/alert based on physical motion sensors and doors opening. And one last RM rule that sets BI to Home or Away based on our presence sensors.