Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post Reply
atreyu
Posts: 46
Joined: Fri Nov 27, 2020 7:22 pm

Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by atreyu » Sat Mar 13, 2021 10:59 pm

Roughly covered elsewhere but it was a little confusing. Just documenting for possible others' benefit.

I have data in Home Assistant that I thought would be neat to have on the camera overlay. Temperature, lights activation, and AI detection of saved BI stills. The part that tripped me up for a bit was BI's use of the term "Macro" in the BI settings window. Maybe there are other uses but I used it more like a variable or a placeholder. It ended up being simple since I already had a Node Red node for sending messages to BlueIris/admin. Just craft a msg payload using "Change Node" substituting in the "macro" number to update, login information, and the text to put in the macro.

'macro=2&user=USER&pw=PASSWORD&text=' & msg.payload

msg.payload is the message coming out of whatever is desired to send to that macro. It could be a light status "on" or "off", a temperature "52.6", or the AI detection "person (62%)".

Then it was setting up overlays in the desired camera's video settings tab using the placeholders (e.g. %2). I spent more time searching to see if it was possible than it took to configure 5 cameras with 9 custom macros once the lightbulb went off that macros were really just placeholders (not some sort of scripting).
User avatar
TimG
Posts: 1047
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by TimG » Sun Mar 14, 2021 10:14 am

Nice one. Thanks for that.

I did have Homeseer working with Node Red via ioBroker, but ioBroker has now failed in new and interesting ways and is fighting against all attempts to resurrect it. Must find a simpler way to run Node Red :shock:
BI5 v54711 x64 | Win10 21H1 | Dahua IPC-HDW5231R-ZE, Foscam R2, Ertech 4MP, Neos2, 2 SD cams | BI5:1 i5-3330, 16GB Ram, Multiple SSD and HD, Homeseer 2 HSPhone, TVMosaic | BI5:2 Ryzen 1800X, 16GB Ram, Multiple SSD and HD, Homeseer 4, Emby, DVBViewer.
atreyu
Posts: 46
Joined: Fri Nov 27, 2020 7:22 pm

Re: Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by atreyu » Thu Mar 18, 2021 10:47 am

I run it as part of Home Assistant ina Virtual Machine on the same computer as BI. It takes barely any horsepower. Many run Home Assistant on Raspberry Pi’s.

I followed this YouTube tutorial: https://youtu.be/sVqyDtEjudk (the smart home hookup HA install guide)
If you prefer reading, he also documents it on his website: https://www.thesmarthomehookup.com/home ... tomations/

Possibly a long way to go if you just wanted Node RED, but it opens the door to plenty of other options.
Post Reply