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

Flickering Issue #18

Closed
14roiron opened this issue Jul 25, 2024 · 21 comments
Closed

Flickering Issue #18

14roiron opened this issue Jul 25, 2024 · 21 comments

Comments

@14roiron
Copy link

Concerning the flickering issue, the next steps to progress on this will be quite huge:

  • Capture real traffic from ZhiJia App when the scenario is executed
  • Implement un-whitening of ZhiJia encoding (whatever v0/v1 or v2) in order to decode the packets and see what is effectively generated by the ZhiJia phone app. @14roiron , @aronsky : any idea how to do that ?

Given the amount of work, that the problem was already pre-existing and that the fix is not in the direct scope of this PR, I would recommend that we open a dedicated issue for this to track investigation progresses and resolution.

Sorry for not being able to solve this issue within the scope of this change 😢.

Originally posted by @NicoIIT in #17 (comment)

@14roiron
Copy link
Author

Instead of un-Whitening, what I was doing was to add Frida Script to log the actions from the ZhiHia App,
You can find my code here,
https://gist.github.com/14roiron/77fb45ef17576f727d3e2b87e81d4f6f
And it should be adaptable if you want to investigate a specific function, let me know If I can help
The thing is that I do not have a LIght anymore to test it, I should get the new one soon.
What would the need, decompile intercepted packet on a ESP directly?

@NicoIIT
Copy link
Contributor

NicoIIT commented Jul 25, 2024

The initial need is to obtain the (b, bArr, b2, bArr2) parameters passed to BLERequest::sendMessage function when the scenario is executed, so that we could issue the command with the same parameters from our component. I though doing it by capturing packets and un-whitening them, but if you can directly get them from the ZhiJia App when the function is called it is even better (and looks much simpler!!!)

I do not have a rooted phone so I may not be able to launch your script. Would you please try to perform it on your side? A priori as the communication is unidirectional you do not need a lamp to test, in fact you just need the ZhiJia app on your phone, add a dummy lamp not paired and perform actions on it, and for each action capture the parameters sent to BLERequest::sendMessage.

Here are the actions to be performed as per the problematic scenario given:

  1. set the light to cold (if not already the case)
  2. set the Brightness to 100% (if not already the case)
  3. set the Brightness to 1% (log parameters, several call to sendMessage may append)
  4. set the light to warm (log parameters, several call to sendMessage may append)

Thanks in advance !

@14roiron
Copy link
Author

14roiron commented Aug 1, 2024

Hello,
THis is what I got,
the frida script is here:
https://gist.github.com/14roiron/266b4af1b257274f976bf8e7a4e1353f
THis is done on a non rooted device, but injecting a Frida Gadget with Objection, as per https://blog.huli.tw/2023/04/27/en/android-apk-decompile-intro-4/
I can provide the APK for ARM64, but I feel bad for anyone installing random APK found on the internet :)
I can add more line to intercept more data if needed.

Logs
[SM S908B::Gadget ]-> setBeganBrightness - i: 0, i2: 995
sendMessage - Inputs: b: B5, bArr: 00 03 E3, b2: AD, bArr2: F8 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 01 9C 32 34 A8 98 2B 79 20 DD, advData1: F9 08 49 E6 29 AF D4 A5 7F D5 1B 79 5B B4 C7 08 55 3C B2 74 32 B6 F1 0C 90 6C, advData2: 22 9D 03 42 0E 9F 79 AC DF 36 3C B3 1F D5 33 2D DF D0 A2 4A 5F 85 F6 9C A9 19
setBeganBrightness - i: 0, i2: 995
setBeganBrightness - i: 0, i2: 993
setBeganBrightness - i: 0, i2: 991
setBeganBrightness - i: 0, i2: 973
setBeganBrightness - i: 0, i2: 907
setBeganBrightness - i: 0, i2: 842
setBeganBrightness - i: 0, i2: 787
setBeganBrightness - i: 0, i2: 735
setBeganBrightness - i: 0, i2: 694
setBeganBrightness - i: 0, i2: 630
setBeganBrightness - i: 0, i2: 565
setBeganBrightness - i: 0, i2: 498
setBeganBrightness - i: 0, i2: 428
setBeganBrightness - i: 0, i2: 364
setBeganBrightness - i: 0, i2: 304
setBeganBrightness - i: 0, i2: 241
setBeganBrightness - i: 0, i2: 179
setBeganBrightness - i: 0, i2: 115
setBeganBrightness - i: 0, i2: 56
setBeganBrightness - i: 0, i2: 3
setBeganBrightness - i: 0, i2: 0
sendMessage - Inputs: b: B5, bArr: 00 00 00, b2: AD, bArr2: 00 00 00
sendMessage - advData: F9 08 49 B2 CE 2C E0 7D D3 D6 49 79 C8 7B C8 59, advData1: F9 08 49 E6 29 AF D4 5D 83 D5 1B 7D 5B B4 C7 08 55 3C B2 74 36 B6 F1 0C 27 D5, advData2: 22 9D FF BA 0A 9B 79 A8 DB 32 3C B7 1B D1 37 2D DF D4 A6 4A 5F 85 F6 9C A9 19
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setBeganBrightness - i: 0, i2: 0
setEndedBrightness - i: 0, i2: 0
sendMessage - Inputs: b: B5, bArr: 00 00 00, b2: AD, bArr2: 00 00 00
sendMessage - advData: F9 08 49 B2 CE 2C E6 7B D5 D0 4F 7F C8 7D A3 C7, advData1: F9 08 49 E6 29 AF D4 5D 8F D5 1B 71 5B B4 C7 08 55 3C B2 74 3A B6 F1 0C 69 01, advData2: 22 9D F3 BA 06 97 79 A4 D7 3E 3C BB 17 DD 3B 2D DF D8 AA 4A 5F 85 F6 9C A9 19
setBeganColorTemperature - i: 0, i2: 0
sendMessage - Inputs: b: B7, bArr: 00 00 00, b2: AE, bArr2: 00 00 00
sendMessage - advData: F9 08 49 B2 CE 2C E4 79 D7 D2 4F 7D C8 7F 03 73, advData1: F9 08 49 E6 29 AF D4 5D 88 D5 1B 75 5B B4 C7 08 56 3C B2 74 3E B6 F2 0C CA 77, advData2: 22 9D 0B 46 FE 6F 85 5C 2F C6 C0 40 EF 25 C3 D1 20 23 52 4A 5F 85 F6 9C A9 19
setBeganColorTemperature - i: 0, i2: 0
setBeganColorTemperature - i: 0, i2: 0
setBeganColorTemperature - i: 0, i2: 0
setBeganColorTemperature - i: 0, i2: 0
setBeganColorTemperature - i: 0, i2: 0
setBeganColorTemperature - i: 5, i2: 0
setBeganColorTemperature - i: 32, i2: 0
setBeganColorTemperature - i: 64, i2: 0
setBeganColorTemperature - i: 107, i2: 0
setBeganColorTemperature - i: 153, i2: 0
setBeganColorTemperature - i: 213, i2: 0
setBeganColorTemperature - i: 269, i2: 0
setBeganColorTemperature - i: 319, i2: 0
setBeganColorTemperature - i: 373, i2: 0
setBeganColorTemperature - i: 420, i2: 0
setBeganColorTemperature - i: 472, i2: 0
setBeganColorTemperature - i: 515, i2: 0
setBeganColorTemperature - i: 548, i2: 0
setBeganColorTemperature - i: 586, i2: 0
setBeganColorTemperature - i: 614, i2: 0
setBeganColorTemperature - i: 642, i2: 0
setBeganColorTemperature - i: 662, i2: 0
sendMessage - Inputs: b: B7, bArr: 00 02 96, b2: AE, bArr2: A5 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 7C E1 4F 48 D7 E5 5E 71 B5 D7, advData1: F9 08 49 E6 29 AF D4 F8 31 D5 1B 69 5B B4 C7 08 56 3C B2 74 22 B6 F2 0C E2 54, advData2: 22 9D B2 E3 E2 73 85 40 33 DA C0 5C F3 39 DF D1 20 3F 4E 4A 5F 85 F6 9C A9 19
setBeganColorTemperature - i: 684, i2: 0
setBeganColorTemperature - i: 712, i2: 0
setBeganColorTemperature - i: 739, i2: 0
setBeganColorTemperature - i: 770, i2: 0
setBeganColorTemperature - i: 799, i2: 0
setBeganColorTemperature - i: 830, i2: 0
setBeganColorTemperature - i: 856, i2: 0
setBeganColorTemperature - i: 882, i2: 0
setBeganColorTemperature - i: 904, i2: 0
setBeganColorTemperature - i: 924, i2: 0
setBeganColorTemperature - i: 943, i2: 0
setBeganColorTemperature - i: 970, i2: 0
setBeganColorTemperature - i: 998, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
sendMessage - Inputs: b: B7, bArr: 00 03 E8, b2: AE, bArr2: FA 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 00 9D 33 35 AB 99 20 73 C6 F8, advData1: F9 08 49 E6 29 AF D4 A7 6A D5 1B 6D 5B B4 C7 08 56 3C B2 74 26 B6 F2 0C E5 16, advData2: 22 9D E9 BC E6 77 85 44 37 DE C0 58 F7 3D DB D1 20 3B 4A 4A 5F 85 F6 9C A9 19
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setBeganColorTemperature - i: 1000, i2: 0
setEndedColorTemperature - i: 1000, i2: 0
sendMessage - Inputs: b: B7, bArr: 00 03 E8, b2: AE, bArr2: FA 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 06 9B 35 33 AD 9F 20 75 AD 66, advData1: F9 08 49 E6 29 AF D4 A7 66 D5 1B 61 5B B4 C7 08 56 3C B2 74 2A B6 F2 0C AB C2, advData2: 22 9D E5 BC EA 7B 85 48 3B D2 C0 54 FB 31 D7 D1 20 37 46 4A 5F 85 F6 9C A9 19
setBeganBrightness - i: 1000, i2: 0
sendMessage - Inputs: b: B5, bArr: 00 00 00, b2: AD, bArr2: 00 00 00
sendMessage - advData: F9 08 49 B2 CE 2C EC 71 DF DA 45 75 C8 77 0F 6D, advData1: F9 08 49 E6 29 AF D4 5D 9B D5 1B 65 5B B4 C7 08 55 3C B2 74 2E B6 F1 0C AA 75, advData2: 22 9D E7 BA 12 83 79 B0 C3 2A 3C AF 03 C9 2F 2D DF CC BE 4A 5F 85 F6 9C A9 19
setBeganBrightness - i: 1000, i2: 0
setBeganBrightness - i: 1000, i2: 0
setBeganBrightness - i: 1000, i2: 21
setBeganBrightness - i: 1000, i2: 70
setBeganBrightness - i: 1000, i2: 102
setBeganBrightness - i: 1000, i2: 144
setBeganBrightness - i: 1000, i2: 201
setBeganBrightness - i: 1000, i2: 275
setBeganBrightness - i: 1000, i2: 364
setBeganBrightness - i: 1000, i2: 449
setBeganBrightness - i: 1000, i2: 525
setBeganBrightness - i: 1000, i2: 589
setBeganBrightness - i: 1000, i2: 649
setBeganBrightness - i: 1000, i2: 717
setBeganBrightness - i: 1000, i2: 784
setBeganBrightness - i: 1000, i2: 854
setBeganBrightness - i: 1000, i2: 920
setBeganBrightness - i: 1000, i2: 963
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
sendMessage - Inputs: b: B5, bArr: 00 03 E8, b2: AD, bArr2: FA 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 1A 87 29 2F B3 83 20 69 E8 25, advData1: F9 08 49 E6 29 AF D4 A7 5D D5 1B 59 5B B4 C7 08 55 3C B2 74 12 B6 F1 0C 4D 29, advData2: 22 9D 21 40 2E BF 79 8C FF 16 3C 93 3F F5 13 2D DF F0 82 4A 5F 85 F6 9C A9 19
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setBeganBrightness - i: 1000, i2: 1000
setEndedBrightness - i: 1000, i2: 1000
sendMessage - Inputs: b: B5, bArr: 00 03 E8, b2: AD, bArr2: FA 00 00
sendMessage - advData: F9 08 49 B2 CE 2C 18 85 2B 2D B1 81 20 6B 3E A8, advData1: F9 08 49 E6 29 AF D4 A7 59 D5 1B 5D 5B B4 C7 08 55 3C B2 74 16 B6 F1 0C 77 65, advData2: 22 9D 25 40 2A BB 79 88 FB 12 3C 97 3B F1 17 2D DF F4 86 4A 5F 85 F6 9C A9 19

@14roiron
Copy link
Author

14roiron commented Aug 1, 2024

I do not see anything crazy here, or anything out of the ordinary,
I do not have a lamp to verify that we observe the same behavior as described.

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 1, 2024

That is more or less what I was expecting indeed, but with slight changes:

  • For the first brightness change 100% -> 1%:
    • One command at the beginning: B5 / 995
    • One Two identical commands at the end: B5 / 0
  • For the color temperature change:
    • One command at the beginning: B7 / 0
    • One command in the middle: B7 / 662 (probably depends on how long it takes you to slide the bar, one every 360ms as per software)
    • One Two identical commands at the end: B7 / 1000 (interval 80ms as per software)

This is globally what I guessed from the phone app software, except for the fact the software seems to always send 2 identical commands at the end of each change, and this might explain that some buggy lamps could wait for 2 identical changes...

I think we could implement a custom light transition to replicate this behavior, should not be too difficult. I will try to do this today.

@14roiron
Copy link
Author

14roiron commented Aug 1, 2024

I agree, but does not seem to explain the perceived brightness change on the colorchange,
We would need someone with a Lamp to test it, and report the perceived value,

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 1, 2024

Well I totally agree a normal lamp coded by a smart developer should not react this way... My hypothesis is that the developer of the lamp have not tested each command independently, but only the global effect on the lamp when controlled with the phone app directly.

The software of the lamp needs to keep the last brightness received somewhere in order to be able to keep it applied for the next color temperature transaction, but what if this software was not storing the last one received, but the previous one, as for example storing it at the beginning of the command handling, while the change of brightness was not processed by the lamp? The following would happen:

  • When the phone app is used, the previous brightness is the same as the last one as the light receives twice the same message with the same brightness
  • When ble_adv_light component is used, color temperature and brightness are always both sent on a transaction, so:
    • when the color change is applied, brightness comes 'back' to its value n-1, resulting in lamp at 100%
    • when the brightness is applied just after, it 'corrects' the problem and brightness comes back to 1%
    • => the result is simply a flickering
  • When ble_adv_controller is used, the brightness is NOT sent just after a color temperature change
    • when the color change is applied, brightness comes 'back' to its value n-1, resulting in lamp at 100%
    • => it stays like this, resulting in the behavior seen by @cRazyK67 (and asking for an option to force re apply brightness after color change)

@cRazyK67, we would need your help (again) to test this hypothesis, I modified the dev branch to always send the Brightness and the color temperature change twice, as done by the phone app:

Would you mind switch to dev branch and test the flickering?

If it still does not work, could you please add the following option to the light and re test?
default_transition_length: 200ms

This would result in a behavior even closer to the one of the app, the last chance I would say...

@14roiron
Copy link
Author

14roiron commented Aug 1, 2024

That is more or less what I was expecting indeed, but with slight changes:

  • For the first brightness change 100% -> 1%:

    • One command at the beginning: B5 / 995
    • One Two identical commands at the end: B5 / 0
  • For the color temperature change:

    • One command at the beginning: B7 / 0
    • One command in the middle: B7 / 662 (probably depends on how long it takes you to slide the bar, one every 360ms as per software)
    • One Two identical commands at the end: B7 / 1000 (interval 80ms as per software)

This is globally what I guessed from the phone app software, except for the fact the software seems to always send 2 identical commands at the end of each change, and this might explain that some buggy lamps could wait for 2 identical changes...

I think we could implement a custom light transition to replicate this behavior, should not be too difficult. I will try to do this today.

One other thing on your answer below,
If this 2 commands are send too close time wise it should no matter, as they are anyway repeated by the async loop in the queue no? the First command would be removed by the second one?
I can print the command timing if needed

A Second think we could try is to use the scene button, as in those one you do not have this setBeganBrightness/setEndedBrightness combo

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 1, 2024

One other thing on your answer below,
If this 2 commands are send too close time wise it should no matter, as they are anyway repeated by the async loop in the queue no? the First command would be removed by the second one?

Well there is a difference between the repetition of the exact same command by the loop and two different commands with the same parameters:

  • in the loop the commands have the same tx_count and seed and is then are discarded by the lamp if it already handled one of the repetition (this is a guess, but I do not know how it could be handled in another way by the lamp)
  • if the command is repeated twice before the encoding part, they will have a different tx_count and seed, and hopefully should be handled as 2 different commands by the lamp.

That is why I did the change on dev branch with a crappy fix to avoid the removal and have 2 distinct commands. They will both reach the handler queue and be repeated one after the other each time for 50ms(default), and during 200ms. This is clearly a temporary software just to see if it solves the issue; if it works I will do something smarter.

A Second think we could try is to use the scene button, as in those one you do not have this setBeganBrightness/setEndedBrightness combo

Ah !!!! That could be interesting! I did not investigate this scene at all as I haven't noticed it in the BLERequest.java, worse having a look if we can avoid introducing hacks in the software...

@cRazyK67
Copy link

cRazyK67 commented Aug 1, 2024

@NicoIIT

@cRazyK67, we would need your help (again) to test this hypothesis, I modified the dev branch to always send the Brightness and the color temperature change twice, as done by the phone app:
Would you mind switch to dev branch and test the flickering?
If it still does not work, could

I will definitely test it. I have several esp boards, so I can test it without affecting the operation of my other chandeliers. But I won't be able to do it until tomorrow.

@14roiron
Copy link
Author

14roiron commented Aug 2, 2024

Logs
2024-08-02 06:54:10 - setBeganColorTemperature - i: 174, i2: 1000
2024-08-02 06:54:10sendMessage - Inputs: b: B7, bArr: 00 00 AE, b2: AE, bArr2: 2B 00 00
2024-08-02 06:54:10sendMessage - advData: F9 08 49 B2 CE 2C 04 99 37 32 AF 9D 66 31 33 C3, advData1: F9 08 49 E6 29 AF D4 76 BF D5 1B 69 5B B4 C7 08 56 3C B2 74 22 B6 F2 0C 32 BB, advData2: 22 9D 3C 6D E2 73 85 40 33 DA C0 5C F3 39 DF D1 20 3F 4E 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:10 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:10 - setBeganColorTemperature - i: 174, i2: 1000
2024-08-02 06:54:10 - setBeganColorTemperature - i: 174, i2: 1000
2024-08-02 06:54:10 - setBeganColorTemperature - i: 175, i2: 1000
2024-08-02 06:54:10 - setBeganColorTemperature - i: 175, i2: 1000
2024-08-02 06:54:10 - setEndedColorTemperature - i: 175, i2: 1000
2024-08-02 06:54:10 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:10 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:10 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:10 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:11 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:11 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:11 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:11 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:11 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:11 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:11 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:11 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:12 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:12 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:12 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:13 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:13 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:13 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:13 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:14 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:14 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:14 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:14 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:14 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:14 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:14 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:14 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:15 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:15 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:15 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:15 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:15 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:15 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:15 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:15 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:16 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:16 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:16 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:16 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:17 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:17 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:17 - startAdvertising - bArr: 22 9D 3E 6D E0 71 85 42 31 D8 C0 5E F1 3B DD D1 20 3D 4C 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:17 - startAdvertising - bArr: F9 08 49 B2 CE 2C 05 98 36 33 AE 9C 66 30 D8 85
2024-08-02 06:54:17 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 76 BD D5 1B 6B 5B B4 C7 08 56 3C B2 74 20 B6 F2 0C 2F 9D
2024-08-02 06:54:23sendMessage - Inputs: b: A1, bArr: 19 19 00, b2: A7, bArr2: 19 19 00
2024-08-02 06:54:23sendMessage - advData: F9 08 49 B2 CE 2C A8 2C 9B 87 15 31 C8 2A AA 60, advData1: F9 08 49 E6 29 AF D4 44 99 D5 02 6D 5B B4 C7 08 5F 3C B2 74 26 B6 FB 0C 40 AD, advData2: 22 9D 1A 56 F6 7E 95 54 27 CE C9 41 E7 2D CB C1 20 22 5A 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:23 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:23 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:23 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:23 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:23 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:24 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:24 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:24 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:24 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:25 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:25 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:25 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:25 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:25 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:25 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:25 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:25 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:26 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:26 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:26 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:27 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:27 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:27 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:27 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:28 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:28 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:28 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:28 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:28 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:28 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:28 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:28 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:29 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:29 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:29 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:29 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:29 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:29 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:29 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:29 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:30 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:30 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:30 - startAdvertising - bArr: 22 9D 18 56 F4 7C 95 56 25 CC C9 43 E5 2F C9 C1 20 20 58 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:30 - startAdvertising - bArr: F9 08 49 B2 CE 2C A9 2D 9A 86 14 30 C8 2B 41 26
2024-08-02 06:54:30 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 44 9B D5 02 6F 5B B4 C7 08 5F 3C B2 74 24 B6 FB 0C 5D 8B
2024-08-02 06:54:32sendMessage - Inputs: b: A6, bArr: 01 00 00, b2: AF, bArr2: 00 00 00
2024-08-02 06:54:32sendMessage - advData: F9 08 49 B2 CE 2C AE 32 9D 98 14 37 C8 34 28 BB, advData1: F9 08 49 E6 29 AF D4 5D 9D D5 1B 61 5B B4 C7 08 57 3C B2 74 2A B6 F3 0C 7E 15, advData2: 22 9D E1 B8 14 85 7B B6 C5 2C 3E AB 05 CF 29 2F DF C8 B8 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:32 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:32 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:32 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:33 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:33 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:33 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:33 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:33 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:33 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:33 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:33 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:34 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:34 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:34 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:34 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:35 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:35 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:35 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:35 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:35 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:35 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:35 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:35 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:36 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:36 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:36 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:37 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:37 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:37 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:37 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:38 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:38 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:38 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:38 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:38 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:38 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:38 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:38 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:39 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:39 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:39 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:39 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
2024-08-02 06:54:39 - startAdvertising - bArr: 22 9D E3 B8 16 87 7B B4 C7 2E 3E A9 07 CD 2B 2F DF CA BA 4A 5F 85 F6 9C A9 19
2024-08-02 06:54:39 - startAdvertising - bArr: F9 08 49 B2 CE 2C AF 33 9C 99 15 36 C8 35 C3 FD
2024-08-02 06:54:39 - startAdvertising - bArr: F9 08 49 E6 29 AF D4 5D 9F D5 1B 63 5B B4 C7 08 57 3C B2 74 28 B6 F3 0C 63 33
This is the sequence of action: One color change, One Scene change One time button on the right, each time waiting for the end of the bluetooth broadcast I do not see the double message behavior, It may have been related to the sliding action, https://github.com/user-attachments/assets/15c8e827-6ecc-40d2-bdfa-d9e43b389cac

But the broadcast seems to be much longer than what you describe, If I logged the correct function

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 2, 2024

For the broadcast time, there are different things to consider:

  • For a single command with no other command coming, the broadcast is done 60 times, alternatively sending each variant during 120ms => up to 7.2s
  • While a command is being broadcast, when a new command comes with a delay 't' after the start of the broadcast of the previous command:
    • if t < 80 ms: the new command is ignored
    • if 80ms < t < 360ms,
      • if the new command is "end" (as setEndedColorTemperature) it starts to be broadcasted in replacement of the previous
      • else the new command is ignored
    • if t > 360ms, it starts to be broadcasted in replacement of the previous

I roughly described this behavior here in the ZhiJia part, with the link to the software

For the sequence of actions:

  • I do not really understand why the advData and advData1 logged by the sendMessage function are different from the startAdvertising ones, whereas the advData2 is OK?
  • The 'second' message for the color change is requested, the setEndedColorTemperature, but dropped probably because it comes before the minimum 80ms
  • The 'scene' message b: A1, bArr: 19 19 00, b2: A7, bArr2: 19 19 00 correspond to this part of the software, the values 0x19(25) seems hard coded. There are other modes here, in particular command 0xA8(-88) which seems to be called with 2 parameters being either 0 or 250 (-6), 250 being the max value for ZhiJia. Guessing I would say it is Cold White, Warm White and Natural white, if this command would accept other value than simply 0 and 250, it could be the same command than the one for fanlamp that controls cold% and warm% at the same time, and it would be MUCH better than what we use today!
  • The last message A6, bArr: 01 00 00, b2: AF, bArr2: 00 00 00 correspond to the switch on of the 'secondary' light that we implemented a few days ago, so not related to the main light brightness 😄

@cRazyK67; another bunch of buttons (or custom service command if you prefer?) for testing, 'cmd: custom' and the following args, for a ZhiJia v2 light:

  • [168, 25, 25, 0, 0] => hopefully brightness: minimum, color: natural white
  • [168, 7, 7, 0, 0] => same as previous, just testing the minimum that may switch off the light
  • [168, 0, 0, 0, 0] => same as previous, just testing the minimum that may switch off the light
  • [168, 250, 250, 0, 0] => hopefully brightness: maximum, color: natural white
  • [168, 0, 25, 0, 0] => hopefully brightness: minimum, color: warm
  • [168, 25, 0, 0, 0] => hopefully brightness: minimum, color: cold
  • [168, 0, 125, 0, 0] => hopefully brightness: medium, color: warm
  • [168, 125, 0, 0, 0] => hopefully brightness: medium, color: cold
  • [168, 0, 250, 0, 0] => hopefully brightness: maximum, color: warm
  • [168, 250, 0, 0, 0] => hopefully brightness: maximum, color: cold
    and... the same with 167 instead of 168 😄. Please let us know if the results are the one expected!

@14roiron
Copy link
Author

14roiron commented Aug 2, 2024

For the sequence of actions:

  • I do not really understand why the advData and advData1 logged by the sendMessage function are different from the startAdvertising ones, whereas the advData2 is OK?

I think none of them are OK, and this is due to the Data extraction method, where getAdvDataX is called twice, we also see it with advData2 where I guess the counters are different
here is the Frida script:

BLERequest.sendMessage.overload('byte', '[B', 'byte', '[B').implementation = function (b, bArr, b2, bArr2) {
        // Call the original method to get advData, advData1, and advData2
        var advData = this.getAdvData(b, bArr);
        var advData1 = this.getAdvData1(b2, bArr2);
        var advData2 = this.getAdvData2(b2, bArr2);

        // Log the input parameters
        console.log(getCurrentTime() + ' - sendMessage - Inputs: b: ' + b + ', bArr: ' + byteArrayToHexString(bArr) + ', b2: ' + b2 + ', bArr2: ' + byteArrayToHexString(bArr2));

        // Log the computed advData arrays
        console.log(getCurrentTime() + ' - sendMessage - advData: ' + byteArrayToHexString(advData));
        console.log(getCurrentTime() + ' - sendMessage - advData1: ' + byteArrayToHexString(advData1));
        console.log(getCurrentTime() + ' - sendMessage - advData2: ' + byteArrayToHexString(advData2));

        // Call the original sendMessage method
        this.sendMessage(b, bArr, b2, bArr2);
    };

For the rest I agree with your analysis, it seems coherant,

@cRazyK67
Copy link

cRazyK67 commented Aug 3, 2024

@NicoIIT, tested it

1.1. [168, 25, 25, 0, 0] => color: natural white, brightness: visually one step before minimum. If you set the brightness to 1% with the slider and press the button, the brightness becomes a little brighter (see log 1)
1.2. [168, 7, 7, 0, 0] =>color: natural white, brightness: less that step 1.1. I set the slider to the minimum brightness, press the button - the brightness becomes even lower (see log 2)
1.3. [168, 0, 0, 0, 0] => brightness: 0 (lamp off)
1.4. [168, 250, 250, 0, 0] => color: natural white, brightness: maximum
1.5. [168, 0, 25, 0, 0] => color: cold, brightness: see step 1.1.
1.6. [168, 25, 0, 0, 0] => color: warm, brightness: see step 1.1.
1.7. [168, 0, 125, 0, 0] => color: cold, brightness: visually medium
1.8. [168, 125, 0, 0, 0] => color: warm, brightness: visually medium
1.9. [168, 0, 250, 0, 0] => color: cold, brightness: maximum
1.10. [168, 250, 0, 0, 0] => color: warm, brightness: maximum

2.1. [167, 25, 25, 0, 0] => color: natural white , brightness: visually minimum
2.2. [167, 7, 7, 0, 0] => color: natural white , brightness: visually minimum
2.3. [167, 0, 0, 0, 0] => color: natural white , brightness: visually minimum
2.4. [167, 250, 250, 0, 0] => color: natural white , brightness: visually minimum
2.5. [167, 0, 25, 0, 0] => color: natural white , brightness: visually minimum
2.6. [167, 25, 0, 0, 0] => color: natural white , brightness: visually minimum
2.7. [167, 0, 125, 0, 0] => color: natural white , brightness: visually minimum
2.8. [167, 125, 0, 0, 0] => color: natural white , brightness: visually minimum
2.9. [167, 0, 250, 0, 0] => color: natural white , brightness: visually minimum
2.10. [167, 250, 0, 0, 0] => color: natural white , brightness: visually minimum

With the first argument =167 all buttons lead to the same result, i.e. the brightness and color temperature arguments are ignored.
The color and brightness of the chandelier correspond to those when pressing "Night mode" button in the application Zhi Jia.

my config:

- platform: ble_adv_controller
   ble_adv_controller_id: bedroom_bedsidelamp_my_controller
   id: bedroom_bedsidelamp_my
   name: bedroom_bedsidelamp_my
   default_transition_length: 50ms
   min_brightness: 0%
   send_brightness_after_color_temperature_change: true

log 1

[11:25:15][D][light:352]: 'bedroom_bedsidelamp_my' - Setting cold/warm white channels using white/color temperature values.
[11:25:15][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:25:15][D][light:066]:   Color temperature: 222.2 mireds
[11:25:15][D][light:071]:   Cold white: 100%, warm white: 78%
[11:25:15][D][light:085]:   Transition length: 0.1s
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:15][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:16][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:25:16][D][light:051]:   Brightness: 100%
[11:25:16][D][light:085]:   Transition length: 0.1s
[11:25:16][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 66
[11:25:16][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 108, Command: '0xAD', Args: [64,0,0]
[11:25:17][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.A1.07.F7.85.0E.B6.C5.15.91.A9.07.CF.CB.4F.4B.8C.B8.4A.5F.85.F6.9C.A9.19 (26)
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 254
[11:25:17][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 109, Command: '0xAD', Args: [248,0,0]
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:25:17][D][light:085]:   Transition length: 0.1s
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:25:17][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:25:17][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.E7.40.09.7B.F1.48.3B.EB.6E.57.F9.31.35.B0.B4.72.46.4A.5F.85.F6.9C.A9.19 (26)
[11:25:20][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:25:22][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:25:22][D][light:051]:   Brightness: 1%
[11:25:22][D][light:085]:   Transition length: 0.1s
[11:25:22][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 191
[11:25:22][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 110, Command: '0xAD', Args: [186,0,0]
[11:25:22][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.59.FD.F5.87.0E.B4.C7.17.91.AB.05.CD.C9.4F.4B.8E.BA.4A.5F.85.F6.9C.A9.19 (26)
[11:25:22][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:22][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 111, Command: '0xAD', Args: [2,0,0]
[11:25:22][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:25:22][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:25:22][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.1F.BA.0B.79.F1.4A.39.E9.6E.55.FB.33.37.B0.B4.70.44.4A.5F.85.F6.9C.A9.19 (26)
[11:25:25][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:25:30][D][button:010]: 'button 1_168' Pressed.
[11:25:30][D][ble_adv_button:016]: BleAdvButton::press_action called
[11:25:30][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 112, Command: '0xA8', Args: [25,25,0]
[11:25:30][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.F8.5B.F7.9C.12.B6.C5.15.94.AC.07.CF.CB.53.4B.89.B8.4A.5F.85.F6.9C.A9.19 (26)
[11:25:34][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising

log 2

11:27:00][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:27:00][D][light:051]:   Brightness: 100%
[11:27:00][D][light:085]:   Transition length: 0.1s
[11:27:00][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 74
[11:27:00][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 113, Command: '0xAD', Args: [72,0,0]
[11:27:00][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.4B.F0.15.67.F1.54.27.F7.6E.4B.E5.2D.29.B0.B4.6E.5A.4A.5F.85.F6.9C.A9.19 (26)
[11:27:00][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:27:00][D][light:085]:   Transition length: 0.1s
[11:27:00][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 119
[11:27:00][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 114, Command: '0xAD', Args: [116,0,0]
[11:27:00][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 220
[11:27:00][D][ble_adv_controller:101]: Removing 1 previous pending commands
[11:27:00][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 115, Command: '0xAD', Args: [214,0,0]
[11:27:00][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 255
[11:27:00][D][ble_adv_controller:101]: Removing 1 previous pending commands
[11:27:00][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 116, Command: '0xAD', Args: [249,0,0]
[11:27:00][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:27:00][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.00.BE.EF.9D.0E.AE.DD.0D.91.B1.1F.D7.D3.4F.4B.94.A0.4A.5F.85.F6.9C.A9.19 (26)
[11:27:04][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:27:04][D][light:036]: 'bedroom_bedsidelamp_my' Setting:
[11:27:04][D][light:051]:   Brightness: 1%
[11:27:04][D][light:085]:   Transition length: 0.1s
[11:27:05][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 175
[11:27:05][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 117, Command: '0xAD', Args: [170,0,0]
[11:27:05][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.AD.12.11.63.F1.50.23.F3.6E.4F.E1.29.2D.B0.B4.6A.5E.4A.5F.85.F6.9C.A9.19 (26)
[11:27:05][D][ble_adv_light:063]: Cold: 171, Warm: 84, Brightness: 3
[11:27:05][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 118, Command: '0xAD', Args: [2,0,0]
[11:27:05][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:27:05][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.F9.45.ED.9F.0E.AC.DF.0F.91.B3.1D.D5.D1.4F.4B.96.A2.4A.5F.85.F6.9C.A9.19 (26)
[11:27:08][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising
[11:27:12][D][button:010]: 'button 2_168' Pressed.
[11:27:12][D][ble_adv_button:016]: BleAdvButton::press_action called
[11:27:12][D][zhijia:657]: Zhi Jia - v2 - UUID: '0xC630B1', tx: 119, Command: '0xA8', Args: [7,7,0]
[11:27:12][D][ble_adv_controller:130]: bedroom_bedsidelamp_my_controller - request start advertising: 22.9D.00.BA.11.64.F3.50.23.F3.6B.4A.E1.29.2D.B2.B4.6F.5E.4A.5F.85.F6.9C.A9.19 (26)
[11:27:15][D][ble_adv_controller:142]: bedroom_bedsidelamp_my_controller - request stop advertising

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 3, 2024

@cRazyK67 , I pushed a new version to dev branch that uses the new command you tested.
Could you please have a look? Please remove the 'min_brightness', 'send_brightness_after_color_temperature_change' and 'default_transition_length' from your light config, and also the 'reverse' from the controller

@cRazyK67
Copy link

cRazyK67 commented Aug 3, 2024

@NicoIIT Results next:

option "reverse" not include in my controller config.
option 'min_brightness', 'send_brightness_after_color_temperature_change' and 'default_transition_length' commented in config

two lamp (bedside lamp) perfectly work without flickering to dev branch, only cold and warm color reversed.
to main branch colors is correct.

two other lamp (livingroom) not change color and brightness to dev branch and work perfectly to main branch.

Apparently the application sends 2 commands (0xAD(E) and 0xA8) at the same time.
We also need to do this so that all the chandeliers are controlled, or enter the option "alternative_color_and_brightness_change", which will be responsible for the color and brightness control mode.

alternative_color_and_brightness_change: false (0xAD and 0xAE)
alternative_color_and_brightness_change: true (0xA8)


# --------------------------------------------------------------
 - id: bedroom_bedsidelamp_my_controller
   encoding: zhijia
   variant: v2
   #duration: 100
   show_config: false
   forced_id: 0xC630B1
# --------------------------------------------------------------
 - id: bedroom_bedsidelamp_notmy_controller
   encoding: zhijia
   variant: v2
   #duration: 100
   show_config: false
   forced_id: 0xC630B2
# --------------------------------------------------------------
 - id: livingroom_chandelier_controller
   encoding: zhijia
   variant: v2
   #duration: 100
   show_config: false
   forced_id: 0xC630B3
# --------------------------------------------------------------
 - id: livingroom_sofa_chandelier_controller
   encoding: zhijia
   variant: v2
   #duration: 100
   show_config: false
   reversed: true
   forced_id: 0xC630B4
# --------------------------------------------------------------

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 3, 2024

@cRazyK67 , let's focus on the dev branch only. I pushed some new changes (limit max color, reverse cold/warm by default) for you to test.

two other lamp (livingroom) not change color and brightness

I hardly understand this, may I ask you to test the 'scene' buttons with the phone app, meaning the shortcut buttons to put full cold / full warm and tell me if they work with those lamps? If they do not work it may explain...

Apparently the application sends 2 commands (0xAD(E) and 0xA8) at the same time.

You mean the Zhi Jia phone application? As per the logs we extracted previously with @14roiron this is not the case. If you mean our component ble_adv_controller this is not possible as per software: it is either one or the other, maybe a mix of logs?

I am implementing the possibility to force the use of 2 separated commands AD/AE as previously, the default would be the use of the new A8 command.

@cRazyK67
Copy link

cRazyK67 commented Aug 3, 2024

@NicoIIT this buttons works to all (four) my chandeliers

Screenshot_20240803_165510

reverse cold/warm by default)

This works

You mean the Zhi Jia phone application?

Yes

livingroom chandelier not respond to change color and brihtness/


[17:00:18][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:18][D][light:047]:   State: ON
[17:00:18][D][ble_adv_light:044]: BleAdvLight::write_state - Switch ON
[17:00:18][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 24, Command: '0xA5', Args: [0,0,0]
[17:00:18][D][ble_adv_light:075]: Updating Cold: 1, Warm: 72
[17:00:18][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 25, Command: '0xA8', Args: [180,1,0]
[17:00:18][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.67.B0.71.03.FC.30.43.93.63.27.81.49.4D.BD.B1.07.3E.4A.5F.85.F6.9C.A9.19 (26)
[17:00:18][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:18][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.21.F6.83.F0.0F.C2.B1.61.91.D8.73.BB.BF.4E.4E.F8.CC.4A.5F.85.F6.9C.A9.19 (26)
[17:00:18][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:18][D][ble_adv_light:075]: Updating Cold: 1, Warm: 72
[17:00:18][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 26, Command: '0xA8', Args: [180,1,0]
[17:00:20][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:20][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.DD.09.7F.0C.F0.3E.4D.9D.6E.24.8F.47.43.B1.B1.04.30.4A.5F.85.F6.9C.A9.19 (26)
[17:00:20][D][light:036]: 'livingroom_sofa_chandelier_2' Setting:
[17:00:20][D][light:047]:   State: ON
[17:00:20][D][ble_adv_light:109]: BleAdvSecLight::write_state - Switch ON
[17:00:20][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 27, Command: '0xAF', Args: [0,0,0]
[17:00:20][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:20][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.91.45.87.F5.09.C6.B5.65.96.DB.77.BF.BB.48.4E.FB.C8.4A.5F.85.F6.9C.A9.19 (26)
[17:00:22][D][light:352]: 'livingroom_sofa_chandelier_1' - Setting cold/warm white channels using white/color temperature values.
[17:00:22][W][light:227]: 'livingroom_sofa_chandelier_1' - Color temperature value 333.00 is out of range [167.0 - 333.0]!
[17:00:22][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:22][D][light:066]:   Color temperature: 333.0 mireds
[17:00:22][D][light:071]:   Cold white: 0%, warm white: 100%
[17:00:22][D][ble_adv_light:075]: Updating Cold: 72, Warm: 0
[17:00:22][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 28, Command: '0xA8', Args: [0,180,0]
[17:00:22][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:22][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.25.42.33.F5.BA.72.01.D1.91.68.C3.0B.0F.FB.4E.48.7C.4A.5F.85.F6.9C.A9.19 (26)
[17:00:25][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:25][D][light:352]: 'livingroom_sofa_chandelier_1' - Setting cold/warm white channels using white/color temperature values.
[17:00:25][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:25][D][light:066]:   Color temperature: 250.1 mireds
[17:00:25][D][light:071]:   Cold white: 100%, warm white: 100%
[17:00:25][D][ble_adv_light:075]: Updating Cold: 72, Warm: 72
[17:00:25][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 29, Command: '0xA8', Args: [180,180,0]
[17:00:25][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.6F.09.CD.0B.45.8C.FF.2F.6E.96.3D.F5.F1.04.B1.B6.82.4A.5F.85.F6.9C.A9.19 (26)
[17:00:25][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:25][D][ble_adv_light:075]: Updating Cold: 72, Warm: 72
[17:00:25][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 30, Command: '0xA8', Args: [180,180,0]
[17:00:26][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:26][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.93.F6.31.F7.BA.70.03.D3.91.6A.C1.09.0D.FB.4E.4A.7E.4A.5F.85.F6.9C.A9.19 (26)
[17:00:27][D][light:352]: 'livingroom_sofa_chandelier_1' - Setting cold/warm white channels using white/color temperature values.
[17:00:27][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:27][D][light:066]:   Color temperature: 167.0 mireds
[17:00:27][D][light:071]:   Cold white: 100%, warm white: 1%
[17:00:27][D][ble_adv_light:075]: Updating Cold: 1, Warm: 72
[17:00:27][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 31, Command: '0xA8', Args: [180,1,0]
[17:00:27][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:27][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.27.F6.85.F6.0F.C4.B7.67.91.DE.75.BD.B9.4E.4E.FE.CA.4A.5F.85.F6.9C.A9.19 (26)
[17:00:30][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:31][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:31][D][light:051]:   Brightness: 24%
[17:00:31][D][ble_adv_light:075]: Updating Cold: 0, Warm: 25
[17:00:31][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 32, Command: '0xA8', Args: [60,0,0]
[17:00:31][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.91.7E.BB.C9.0E.FA.89.59.91.E0.4B.83.87.4F.4E.C0.F4.4A.5F.85.F6.9C.A9.19 (26)
[17:00:31][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:31][D][ble_adv_light:075]: Updating Cold: 0, Warm: 25
[17:00:31][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 33, Command: '0xA8', Args: [60,0,0]
[17:00:31][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:31][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.6F.81.45.37.F1.04.77.A7.6E.1E.B5.7D.79.B0.B1.3E.0A.4A.5F.85.F6.9C.A9.19 (26)
[17:00:34][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:34][D][light:051]:   Brightness: 86%
[17:00:34][D][ble_adv_light:075]: Updating Cold: 1, Warm: 86
[17:00:34][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 34, Command: '0xA8', Args: [214,1,0]
[17:00:34][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:34][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.87.6B.47.34.F0.06.75.A5.6E.1C.B7.7F.7B.B1.B1.3C.08.4A.5F.85.F6.9C.A9.19 (26)
[17:00:35][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:35][D][light:051]:   Brightness: 100%
[17:00:35][D][ble_adv_light:075]: Updating Cold: 1, Warm: 100
[17:00:35][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 35, Command: '0xA8', Args: [250,2,0]
[17:00:35][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:35][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.A9.47.45.35.F3.04.77.A7.6E.1E.B5.7D.79.B2.B1.3E.0A.4A.5F.85.F6.9C.A9.19 (26)
[17:00:38][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:42][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:42][D][light:047]:   State: OFF
[17:00:42][D][light:036]: 'livingroom_sofa_chandelier_2' Setting:
[17:00:42][D][light:047]:   State: OFF
[17:00:42][D][ble_adv_light:036]: BleAdvLight::write_state - Switch OFF
[17:00:42][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 36, Command: '0xA6', Args: [0,0,0]
[17:00:42][D][ble_adv_light:112]: BleAdvSecLight::write_state - Switch OFF
[17:00:42][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 37, Command: '0xB0', Args: [0,0,0]
[17:00:42][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.A7.4C.B1.C3.00.F0.83.53.9F.E4.41.89.8D.41.4E.C4.FE.4A.5F.85.F6.9C.A9.19 (26)
[17:00:43][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:43][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.4F.A5.59.2B.E9.18.6B.BB.76.1A.A9.61.65.A8.B1.3A.16.4A.5F.85.F6.9C.A9.19 (26)
[17:00:44][D][light:036]: 'livingroom_sofa_chandelier_1' Setting:
[17:00:44][D][light:036]: 'livingroom_sofa_chandelier_2' Setting:
[17:00:44][D][ble_adv_light:036]: BleAdvLight::write_state - Switch OFF
[17:00:44][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 38, Command: '0xA6', Args: [0,0,0]
[17:00:44][D][ble_adv_light:112]: BleAdvSecLight::write_state - Switch OFF
[17:00:44][D][zhijia:666]: Zhi Jia - v2 - UUID: '0xC630B4', tx: 39, Command: '0xB0', Args: [0,0,0]
[17:00:44][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:44][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.A5.4C.B3.C1.00.F2.81.51.9F.E6.43.8B.8F.41.4E.C6.FC.4A.5F.85.F6.9C.A9.19 (26)
[17:00:44][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising
[17:00:44][D][ble_adv_controller:128]: livingroom_sofa_chandelier_controller - request start advertising: 22.9D.4D.A5.5B.29.E9.1A.69.B9.76.18.AB.63.67.A8.B1.38.14.4A.5F.85.F6.9C.A9.19 (26)
[17:00:47][D][ble_adv_controller:140]: livingroom_sofa_chandelier_controller - request stop advertising

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 3, 2024

@cRazyK67 : More and more strange... I will check the phone app software deeper in order to understand. I pushed the feature to choose which command to use, option 'separate_dim_cct' to be setup to true to use previous commands.

@cRazyK67
Copy link

cRazyK67 commented Aug 3, 2024

@NicoIIT, In this configuration all my chandeliers work correctly, without flickering.

# --------------------------------------------------------------
 - platform: ble_adv_controller
   ble_adv_controller_id: bedroom_bedsidelamp_my_controller
   id: bedroom_bedsidelamp_my
   name: bedroom_bedsidelamp_my
   #default_transition_length: 50ms
   #min_brightness: 0%
   #send_brightness_after_color_temperature_change: true
# --------------------------------------------------------------
 - platform: ble_adv_controller
   ble_adv_controller_id: bedroom_bedsidelamp_notmy_controller
   id: bedroom_bedsidelamp_notmy
   name: bedroom_bedsidelamp_notmy
   #default_transition_length: 200ms
   #min_brightness: 0%
   #send_brightness_after_color_temperature_change: true
# --------------------------------------------------------------
 - platform: ble_adv_controller
   ble_adv_controller_id: livingroom_chandelier_controller
   id: livingroom_chandelier
   name: livingroom_chandelier
   separate_dim_cct: true
   #default_transition_length: 200ms
   #min_brightness: 0%
# --------------------------------------------------------------
 - platform: ble_adv_controller
   ble_adv_controller_id: livingroom_sofa_chandelier_controller
   id: livingroom_sofa_chandelier_1
   name: livingroom_sofa_chandelier_1
   separate_dim_cct: true
   #default_transition_length: 0s
   #min_brightness: 0%
   on_turn_off:
    then:
     light.turn_off: livingroom_sofa_chandelier_2
# --------------------------------------------------------------
 - platform: ble_adv_controller
   ble_adv_controller_id: livingroom_sofa_chandelier_controller
   id: livingroom_sofa_chandelier_2
   name: livingroom_sofa_chandelier_2
   secondary: true        
# --------------------------------------------------------------

@NicoIIT
Copy link
Contributor

NicoIIT commented Aug 13, 2024

The changes have been pushed to main branch, I think we can close this one.

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