Loxone Integration

Thanks @nausser. Glad this worked.

Thanks for the tutorial here on how to get the Bond API hooked into Loxone. I was able to get the lights and fan to respond to commands using the REST API, but the one issue I haven’t cracked is how to get status information in order to make sure Loxone and Bond stay in sync with each other. I tried to use the BPUDP but only managed to get the initial acknowledgement packet and never got topic updates on the state. Is there another way to get the state bond information into the Loxone program since I don’t believe there is a way to use the token for virtual http inputs (not to mention 10s polling isn’t ideal)?

Are you sending pings to keep the BPUDP connection alive? Here’s my Python code for that.

    def udp_receive(self):
        while True:
            now = time.time()
            if now > self.next_ping:
                self.sock.sendto('\n'.encode("utf-8"), (self.address, 30007))
                self.next_ping = now + PING_TIMEOUT

            try:
                json_data, address = self.sock.recvfrom(2048)
            except socket.timeout as err:
                continue
            except socket.error as err:
                raise

            data = json.loads(json_data.decode("utf-8"))

            # ignore ping messages
            if len(data) == 1:
                continue

            # fix up the data
            topic = data['t'].split('/')
            data['id'] = topic[1]

            self.callback(data)

1 Like

Having the same problem with BPUDP feedback. I’m working with a Bond Bridge Pro on firmware v3.17.4.

The Bond Bridge is being polled every 60 seconds and I see a reply immediately -

{"B":"ZPGE12345","d":0,"v":"v3.17.4"}\n

Just no more replies outside of the keep-alive response.

Bump… Hello Support.

While not particularly specific to Loxone integration, I’m still having problems with BPUDP feedback. There is no feedback outside of the immediate reply -

{"B":"ZPGE12345","d":0,"v":"v3.17.4"}\n

I’m working with a Bond Bridge Pro on firmware v3.17.4.

The Bond Bridge sends updates only when the status of a device changes. You don’t have to poll Bond; Loxone listens for incoming UPD packets. I resend the keep-alive every 60 seconds with Loxone and I receive status update via UPD.

Example when turning the ceiling fan off:

{“B”:“ZBLL00000”,“d”:0,“v”:“v3.20.1”,“t”:“devices/122b740e0c946ae3/actions/TurnOff”,“i”:“020000693aa77d2d”,“f”:228,“s”:200,“m”:2,“x”:“bond”,“b”:{“argument”:null,“no_tx”:true,“_”:“00000000”,“__”:“00000000”}}