Dynamic Overlay from MQTT/HomeAssistant/NodeRed

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

Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by atreyu »

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: 2098
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by TimG »

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:
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
atreyu
Posts: 56
Joined: Fri Nov 27, 2020 7:22 pm

Re: Dynamic Overlay from MQTT/HomeAssistant/NodeRed

Post by atreyu »

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