@b3nj1 I have been working on the menu unlock functionality; I could not get the left-right button to work as it was, but with the help of your sniffer, and some AI help, we have it working. It turns out on my Aqua Logic v2.85 left and right are 2-bytes, but left+right is sent as 4-bytes. I’m interested to hear your comments.
From the physical controller:
1 @ 00 02 05 00 01 00 |......|
61 @ 00 02 05 00 00 00 |......|
1 @ 00 02 05 00 05 00 |......|
I’m not sure about the purpose of the 05 00 01 00 frame. We implemented a latching switch that sends the left+right every 100ms for five seconds, then sends the release. It works perfectly on my system, and then the menu navigation key strokes work as is.
50 @ 00 02 05 00 00 00 |......|
1 @ 00 02 00 00 00 00 |......|
0103 payloads:
3 @ 01 03 20 43 6F 6E 66 69 67 75 72 61 74 69 6F 6E 20 20 20 4D 65 6E 75 2D 55 6E 6C 6F 63 6B 65 64 |.. Configuration Menu-Unlocked|
4 @ 01 03 20 43 68 6C 6F 72 2E 20 43 6F 6E 66 69 67 2E 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. Chlor. Config. |
3 @ 01 03 20 43 68 6C 6F 72 2E 20 43 6F 6E 66 69 67 2E 20 2B 20 74 6F 20 76 69 65 77 2F 63 68 61 6E |.. Chlor. Config. + to view/chan|
4 @ 01 03 50 6F 6F 6C 2F 53 70 61 20 43 6F 6E 66 69 67 2E 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |..Pool/Spa Config. |
4 @ 01 03 50 6F 6F 6C 2F 53 70 61 20 43 6F 6E 66 69 67 2E 2B 20 74 6F 20 76 69 65 77 2F 63 68 61 6E |..Pool/Spa Config.+ to view/chan|
4 @ 01 03 20 46 69 6C 74 65 72 20 43 6F 6E 66 69 67 2E 20 2B 20 74 6F 20 76 69 65 77 2F 63 68 61 6E |.. Filter Config. + to view/chan|
3 @ 01 03 20 46 69 6C 74 65 72 20 43 6F 6E 66 69 67 2E 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. Filter Config. |
5 @ 01 03 48 65 61 74 65 72 31 20 43 6F 6E 66 69 67 2E 20 2B 20 74 6F 20 76 69 65 77 2F 63 68 61 6E |..Heater1 Config. + to view/chan|
5 @ 01 03 48 65 61 74 65 72 31 20 43 6F 6E 66 69 67 2E 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |..Heater1 Config. |
8 @ 01 03 20 53 6F 6C 61 72 20 43 6F 6E 66 69 67 2E 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. Solar Config. |
7 @ 01 03 20 53 6F 6C 61 72 20 43 6F 6E 66 69 67 2E 20 20 2B 20 74 6F 20 76 69 65 77 2F 63 68 61 6E |.. Solar Config. + to view/chan|
4 @ 01 03 20 20 20 20 20 53 6F 6C 61 72 20 20 20 20 20 20 20 20 20 20 45 6E 61 62 6C 65 64 20 20 20 |.. Solar Enabled |
4 @ 01 03 20 20 20 20 20 53 6F 6C 61 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.. Solar |
0002 payloads:
5 @ 00 02 01 00 01 00 |......|
1 @ 00 02 20 00 20 00 |.. . .|
The following code is in my aqualogic.yaml, as I bring your code in as an import for my own device. I’m sure you can put this where it makes sense for your personal implementations.
@AndreiR I would also think you can do a similar emulation within your codebase if you are interested.
# 1. Establish the type-safe template switch (Completely vanilla ESPHome, no custom component code)
switch:
- platform: template
name: "Menu Unlock Hold State"
id: menu_unlock_hold_state
optimistic: true
# 2. Execute the hold of left-right and submit to bus every 100ms
script:
- id: execute_hold_loop
mode: restart
then:
- while:
condition:
- switch.is_on: menu_unlock_hold_state
then:
- rs485_frame.send_frame:
id: pool
frame_type: [0x00, 0x02]
# Changed to the exact 4-byte physical capture payload
payload: [0x05, 0x00, 0x00, 0x00]
- delay: 100ms
# 3. Create a button that triggers the button hold for five seconds, then releases
button:
- platform: template
name: "Trigger Menu Unlock Sequence"
id: trigger_menu_unlock_sequence
on_press:
then:
- switch.turn_on: menu_unlock_hold_state
- script.execute: execute_hold_loop
- delay: 5s
- switch.turn_off: menu_unlock_hold_state
- rs485_frame.send_frame:
id: pool
frame_type: [0x00, 0x02]
# Changed to the exact 4-byte idle payload
payload: [0x00, 0x00, 0x00, 0x00]