Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUBA USB driver query #120

Open
ptorrent opened this issue Jun 6, 2023 · 16 comments
Open

LUBA USB driver query #120

ptorrent opened this issue Jun 6, 2023 · 16 comments

Comments

@ptorrent
Copy link

ptorrent commented Jun 6, 2023

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 !

@sde1000
Copy link
Owner

sde1000 commented Jun 6, 2023

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

@sde1000 sde1000 closed this as completed Jun 6, 2023
@ptorrent
Copy link
Author

ptorrent commented Jun 6, 2023

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 ?

@sde1000
Copy link
Owner

sde1000 commented Jun 6, 2023

Could you describe your setup in more detail?

@ptorrent
Copy link
Author

ptorrent commented Jun 6, 2023

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

@sde1000
Copy link
Owner

sde1000 commented Jun 6, 2023

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?

@ptorrent
Copy link
Author

ptorrent commented Jun 6, 2023

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 !

@sde1000
Copy link
Owner

sde1000 commented Jun 6, 2023

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
Copy link
Owner

sde1000 commented Jun 6, 2023

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.

@ptorrent
Copy link
Author

ptorrent commented Jun 7, 2023

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
Copy link
Author

ptorrent commented Jun 7, 2023

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
Copy link
Author

ptorrent commented Jun 7, 2023

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

@sde1000
Copy link
Owner

sde1000 commented Jun 7, 2023

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?

@ptorrent
Copy link
Author

ptorrent commented Jun 7, 2023

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 ?

@sde1000
Copy link
Owner

sde1000 commented Jun 7, 2023

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.)

@sl-wallace
Copy link
Contributor

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.

@ptorrent
Copy link
Author

ptorrent commented Jun 8, 2023

Hello !

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

image

image

Is it the same for rs232?

@sde1000 sde1000 changed the title Reseting all dali short address LUBA USB driver query Jun 8, 2023
@sde1000 sde1000 reopened this Jun 8, 2023
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

No branches or pull requests

3 participants