python-dali icon indicating copy to clipboard operation
python-dali copied to clipboard

LUBA USB driver query

Open ptorrent opened this issue 2 years ago • 16 comments

Hello there,

first at all, thanks for your awesome job !

I would like to know the sequence for removing all short addresses of a dali bus ?

is that the correct sequence ?

            yield DTR0(255)
            yield SetShortAddress(Broadcast())

Thanks for your help !

ptorrent avatar Jun 06 '23 16:06 ptorrent

Yes, that should do it. (You can see it as part of the Commissioning sequence.)

sde1000 avatar Jun 06 '23 16:06 sde1000

I did the test but it seems not working as I isolated the code for doing that..

What would be the Brocast() value for that ? 255 ?

ptorrent avatar Jun 06 '23 17:06 ptorrent

Could you describe your setup in more detail?

sde1000 avatar Jun 06 '23 17:06 sde1000

I've 2 dali light, everything is working fine with your python scripts. Now I try to clear their short address. So I isolated this code

      yield DTR0(255)
      yield SetShortAddress(Broadcast())

But nothing seems happen, this is the sequence writed on dali bus

1x 0xa3 0xff
2x 0x7f 0x80

ptorrent avatar Jun 06 '23 17:06 ptorrent

That should do it. The two sends of 0x7f 0x80 must occur within 100ms of each other, with nothing else being sent in between — are you managing this?

sde1000 avatar Jun 06 '23 17:06 sde1000

I'm using lunaton USB DAlI2 device,

i'm able to see both request:

0091.0001 0xa3 0xff
0091.0061 0x7f 0x80
0091.0076 0x7f 0x80

Only 15ms between 0x7f 0x80 . Is this normal ?

Are the command correct ? After sending thos commands, I'm still able to get ballastStatus if I target the short address

THanks for your help, that's realy appreciate !

ptorrent avatar Jun 06 '23 19:06 ptorrent

They look correct, and 15ms between the two repetitions looks normal.

What do you get for QueryControlGearPresent on the short address? And if you broadcast QueryMissingShortAddress do you get a "yes" response?

sde1000 avatar Jun 06 '23 20:06 sde1000

Hang on, I might be being stupid. SetShortAddress(Broadcast()) should be 0xff 0x80 not 0x7f 0x80! 0x7f 0x80 is SetShortAddress(GearShort(63)).

So you should look into how the wrong frame is being sent.

sde1000 avatar Jun 06 '23 20:06 sde1000

Oh yes that was a test..

0xa3 0xff 0xff 0x80 0xff 0x80

But no changes :(

The funny fact is that i've only 2 ballasts and I can ask "ballasts status" on all addresses (means 20.21...40...63). They are all responding... How it's possible ? Do you've to call "Terminate" after ths reset or Initialise before ?

ptorrent avatar Jun 07 '23 06:06 ptorrent

Something strange with DTR0, always increasing,

I send the command 0x98 for getting the DTR0 and this is the response:

"value":41,
"binary":"00101001"

I send again

"value":43,
"binary":"00101011"

Every time I ask for DTR0 value, the value is increasing.

this is the request frame : "0x0f 0x98" for short address 07

ptorrent avatar Jun 07 '23 08:06 ptorrent

Oh this is the case for all queries x)

Asking if ballast exists:

Request : 0x03 0x91 on short address 1 Answer : 47

Request : 0x03 0x91 Answer : 48

ptorrent avatar Jun 07 '23 08:06 ptorrent

It sounds like you might have both units set to the same short address? Or there might be some other hardware issue interfering with communication.

What happens if you disconnect one of the units and only have one on the bus at a time?

sde1000 avatar Jun 07 '23 10:06 sde1000

I got the issue... Seems that you are treating the request id feedback as an answer with Luba USB

It's why it's increasing... any new request a new id + 1

Maybe something wrong with Luba status ?

ptorrent avatar Jun 07 '23 10:06 ptorrent

Oh! Probably worth opening a new issue for that and mentioning @sl-wallace — he wrote the LUBA driver. (I don't have one so can't test it.)

sde1000 avatar Jun 07 '23 10:06 sde1000

Oh! Probably worth opening a new issue for that and mentioning @sl-wallace — he wrote the LUBA driver. (I don't have one so can't test it.)

Interesting, I'll have to take a look into it. I haven't got my LUBA test hardware with me at the moment but I should be able to within the next week or so.

sl-wallace avatar Jun 07 '23 23:06 sl-wallace

Hello !

Did you already test the LUBA USB ? Seems that status are a bit strange

image

image

Is it the same for rs232?

ptorrent avatar Jun 08 '23 06:06 ptorrent