Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If your trying to get a remote_transmitter and or remote_receiver device to work and its not working try this
- 1. hear is all the data:
- [0][I][remote.pronto:234]: Received Pronto: data=
- [0][I][remote.pronto:236]: 0000 006D 0002 0000 015B 0056 0016 0181 06C3
- [0][I][remote.jvc:049]: Received JVC: data=0x00FF
- [0][I][remote.lg:054]: Received LG: data=0x00FF6897, nbits=32
- [0][I][remote.nec:098]: Received NEC: address=0xFF00, command=0xE916 command_repeats=1
- [0][I][remote.pioneer:149]: Received Pioneer: rc_code_X=0x0016
- [0][I][remote.pronto:234]: Received Pronto: data=
- [0][I][remote.pronto:236]: 0000 006D 0022 0000 015C 00AB 0017 0015 0017 0015 0016 0015 0016 0015 0017 0014 0017 0015 0016 0015 0016 0015 0017 003F 0017 003F 0017 003F 0016 0040 0017 0040 0016 0040 0016 0040 0017 003F 0016 0015 0017 0040 0017 0040 0017 0015
- [0][I][remote.pronto:236]: 0018 003F 0016 0015 0016 0015 0017 0015 0017 0040 0016 0015 0017 0014 0016 0040 0016 0015 0016 0040 0017 003F 0017 0040 0016 0181 06C3
- [0][W][component:237]: Component remote_receiver took a long time for an operation (65 ms).
- [0][W][component:238]: Components should block for at most 30 ms.
- 2. Take this part of the data
- [0][I][remote.pronto:236]: 0000 006D 0022 0000 015C 00AB 0017 0015 0017 0015 0016 0015 0016 0015 0017 0014 0017 0015 0016 0015 0016 0015 0017 003F 0017 003F 0017 003F 0016 0040 0017 0040 0016 0040 0016 0040 0017 003F 0016 0015 0017 0040 0017 0040 0017 0015
- [0][I][remote.pronto:236]: 0018 003F 0016 0015 0016 0015 0017 0015 0017 0040 0016 0015 0017 0014 0016 0040 0016 0015 0016 0040 0017 003F 0017 0040 0016 0181 06C3
- 3. REMOVE THIS!!! 06C3
- 4. Combine it like this
- data: "0000 006D 0022 0000 015C 00AB 0017 0015 0017 0015 0016 0015 0016 0015 0017 0014 0017 0015 0016 0015 0016 0015 0017 003F 0017 003F 0017 003F 0016 0040 0017 0040 0016 0040 0016 0040 0017 003F 0016 0015 0017 0040 0017 0040 0017 0015 0018 003F 0016 0015 0016 0015 0017 0015 0017 0040 0016 0015 0017 0014 0016 0040 0016 0015 0016 0040 0017 003F 0017 0040 0016 0181"
- light:
- - platform: monochromatic
- name: "Test Light"
- output: lightBrightRead
- output:
- - platform: ledc
- id: debugLED
- pin: 2
- - platform: template
- id: lightBrightRead
- type: float
- write_action:
- - output.set_level:
- id: debugLED
- level: !lambda return state;
- - lambda: id(channel) = state * 100;
- - script.execute: send_channel
- switch:
- - platform: gpio
- pin: 0
- id: gpio_enter
- - platform: gpio
- pin: 14
- id: gpio_0
- - platform: gpio
- pin: 15
- id: gpio_1
- - platform: gpio
- pin: 17
- id: gpio_2
- - platform: gpio
- pin: 18
- id: gpio_3
- - platform: gpio
- pin: 19
- id: gpio_4
- - platform: gpio
- pin: 21
- id: gpio_5
- - platform: gpio
- pin: 22
- id: gpio_6
- - platform: gpio
- pin: 23
- id: gpio_7
- - platform: gpio
- pin: 25
- id: gpio_8
- - platform: gpio
- pin: 26
- id: gpio_9
- globals:
- - id: my_global_int
- type: int
- restore_value: no
- initial_value: '0'
- - id: channel
- type: int
- restore_value: no
- - id: buttons
- type: 'std::array<switch_::Switch*, 10>'
- restore_value: no
- initial_value: '{ gpio_0, gpio_1, gpio_2, gpio_3, gpio_4, gpio_5, gpio_6, gpio_7, gpio_8, gpio_9 }'
- script:
- - id: send_channel
- then:
- - if:
- condition:
- lambda: return (id(channel) > 9);
- then:
- - lambda: id(buttons)[channel / 10]->turn_on();
- - delay: 500ms
- - lambda: id(buttons)[channel / 10]->turn_off();
- - delay: 1s
- - lambda: id(buttons)[channel % 10]->turn_on();
- - delay: 500ms
- - lambda: id(buttons)[channel % 10]->turn_off();
- - delay: 1s
- - switch.turn_on: gpio_enter
- - delay: 500ms
- - switch.turn_off: gpio_enter
- script:
- - id: send_channel
- then:
- - if:
- condition:
- lambda: return (id(channel) > 9);
- Debug.Log("Raw Value" + id(channel)); or print("something") or console.write("something")
- Debug.Log("ones convertion" + id(channel) / 10);
- Debug.Log("tens convertion" + id(channel) % 10);
- then:
- - lambda: id(buttons)[id(channel) / 10]->turn_on();
- Debug.Log("ones button press" + id(channel) % 10);
- - delay: 2s
- Debug.Log("ones delay");
- - lambda: id(buttons)[id(channel) / 10]->turn_off();
- Debug.Log("ones button relece" + id(channel) / 10);
- - delay: 2s
- - lambda: id(buttons)[id(channel) % 10]->turn_on();
- Debug.Log("tens button press" + id(channel) % 10);
- - delay: 2s
- - lambda: id(buttons)[id(channel) % 10]->turn_off();
- Debug.Log("tens button relese + id(channel) % 10);
- - delay: 2s
- - switch.turn_on: gpio_enter
- - delay: 2s
- - switch.turn_off: gpio_enter
- - delay: 2s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement