I’m trying to send a message to a client with system.util.sendMessage but although the message is sent it never arrives. I can successfully send a message to the gateway.
I’ve noticed that the list of connected Vision clients in the gateway lists all of the clients with the address of the local DNS server rather than their actual IP address. I’ve also noticed that the output of the sendMessage command lists the client address as this address. so I think the messages are being sent to the wrong place.
Anyone have any thoughts on why the client addresses are pointing at the wrong address? There is no hostname to IP address resolution on the network - DNS only works for external addresses.
When I try using the client session id instead of the hostname in the Script Console, the clientAddress is still listed as the address of the local DNS server and I don’t get any response.
No, and the same IP address is shown whether I specify the client session id or the hostname. I’ve never managed to send a message to a client on this network, only to the gateway.
Joe in support helped me solve this. It turns out there was no name resolution on the network so everything was being passed to the default gateway. He also pointed out that if you are sending a message to a client, you have to monitor the client for any logger messages, not the gateway!
It turns out there’s an (undocumented) option in system.util.sendMessage that allows you to send the message using the client’s IP address: clientAddress. This means that as long as you’re using fixed IP addresses you don’t have to depend on any form of name resolution.
It turns out this didn’t actually work. All clients were still receiving the message, so we reverted to running client event scripts and filtering in the script which client should respond.