Receiving data from UR3e

I am using a socket connecion on port 30002 and am currently trying to set and get digital outputs. I am, however, having trouble with getting the values of the digital outputs. When I use:
data1 = socketConnection.send((“get_standard_digital_out(”+ str(index) + “)” + “\n”).encode(‘utf8’));
#print(data1);
var = socketConnection.recv(8);
print(var );

where get_standard_digital_out() URScript command is supposed to return a boolean value. I get instead data1 = 28 whether the state of the output is on or off. As for the contents of var, they are not possible to decode using UTF-8 are in the form b’\x00\x00\x007\x14\xff\xff\xff’

How is it that I can get the output True or False based on the digital output’s current state using the URScript command get_standard_digital_out(index)