ok, that works great, in 100% of all cases so far
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as tcp:
try:
tcp.settimeout(self.timeout)
tcp.connect((self.ip, self.port))
tcp.settimeout(None)
i = 0
data = []
while len(data) != 7 or i > 10:
tcp.sendall(b"\x61\x03\x00\x20\x00\x01\x8c\x60")
time.sleep(0.05)
data = tcp.recv(self.bytes)
i += 1
tcp.close()
50ms waiting time has solved the problem. The 10-fold white loop is only for additional security