|
11 | 11 | from zigpy.zcl.clusters.general import Groups |
12 | 12 | from zigpy.zdo.types import NodeDescriptor, ZDOCmd |
13 | 13 |
|
14 | | -from zigpy_xbee.types import TXStatus, UNKNOWN_IEEE, UNKNOWN_NWK |
| 14 | +from zigpy_xbee.types import EUI64, TXStatus, UNKNOWN_IEEE, UNKNOWN_NWK |
15 | 15 |
|
16 | 16 |
|
17 | 17 | # how long coordinator would hold message for an end device in 10ms units |
@@ -54,8 +54,10 @@ async def startup(self, auto_form=False): |
54 | 54 |
|
55 | 55 | serial_high = await self._api._at_command("SH") |
56 | 56 | serial_low = await self._api._at_command("SL") |
57 | | - as_bytes = serial_high.to_bytes(4, "big") + serial_low.to_bytes(4, "big") |
58 | | - self._ieee = zigpy.types.EUI64([zigpy.types.uint8_t(b) for b in as_bytes]) |
| 57 | + ieee = EUI64.deserialize( |
| 58 | + serial_high.to_bytes(4, "big") + serial_low.to_bytes(4, "big") |
| 59 | + )[0] |
| 60 | + self._ieee = zigpy.types.EUI64(ieee) |
59 | 61 | LOGGER.debug("Read local IEEE address as %s", self._ieee) |
60 | 62 |
|
61 | 63 | association_state = await self._get_association_state() |
@@ -277,10 +279,10 @@ async def broadcast( |
277 | 279 |
|
278 | 280 | LOGGER.debug("Broadcast request seq %s", sequence) |
279 | 281 | broadcast_as_bytes = [ |
280 | | - zigpy.types.uint8_t(b) for b in broadcast_address.to_bytes(8, "big") |
| 282 | + zigpy.types.uint8_t(b) for b in broadcast_address.to_bytes(8, "little") |
281 | 283 | ] |
282 | 284 | request = self._api.tx_explicit( |
283 | | - zigpy.types.EUI64(broadcast_as_bytes), |
| 285 | + EUI64(broadcast_as_bytes), |
284 | 286 | broadcast_address, |
285 | 287 | src_ep, |
286 | 288 | dst_ep, |
|
0 commit comments