Skip to content

Conversation

rohanramaswamy
Copy link

Rewrote the send and receive functions for hasseb in hid.py
Added support for firmware version reading for hasseb in hid.py
Updated examples for flash and tc for hasseb tested on actual hardware

Functioning examples for flash and tc
self._response_available = asyncio.Event()
self._response = None

def _initialise_device(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when is this method called ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 143 self._initialise_device(), it overrides hid class method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make a call to super()._initialise_device() and don't forget to set connected

byte_a, byte_b = frame
data = struct.pack('BBBBBBBBBB', 0xAA, self._HASSEB_DALI_FRAME, self._sn,
frame_length, expect_reply,
transmitter_settling_time, send_twice,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is send_twice actually sent twice !?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs further testing to confirm, however in my testing the device sends it when send_twice is set > 0. value of send twice is used as delay in ms between the two sends.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are creating a single packet, with a format which I haven't seen documented, can you link where you saw this struct ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants