PAC Control get EPIC HostName

Is it possible to get the name of the EPIC Controller HOST name that is configured in Groov Manage with PAC Control?

The host name is not in any API call (that I could find), so a PAC Control comm handle RESTful call is out of the question.

Since you have an EPIC, you have Node-RED.
The task then becomes very simple.
Here is a flow I just built to show you whats involved.

The timestamp is just an inject to the middle exec node.
You could perhaps have it set to fire 5 seconds after Node-RED boots, or every second (massive over kill) or some other trigger could fire based on when you or the end user wants to read the host name.

The middle node just runs the ‘hostname’ command. Nothing more.


Just be sure to take the check out of the ‘msg.payload’ in Append. We don’t want to do that.

Lastly, you would connect it to a PAC Write node rather than the debug.
It is in a string format, so you would want to ensure that your PAC node is writing to a string variable (that has been made public and has has write access checked in PAC Control).

image

The host name is in msg.payload so its very easy to pick up in the PAC Write Node.

That should get you your desired result.

Perfect. I will give that a try. Was trying to figure out the best way to get the host name as I am wanting to append that to a file log name.

You may read it from memory map address 0xF0380154 (length 40) in PAC Control. Ignore the delay I put in there - it is for something else and not necessary for reading the Host Name.
image

2 Likes