Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Sonoff D1 RF Custom File Doesn't Work #1

Open
robbz23 opened this issue Oct 12, 2020 · 2 comments
Open

Sonoff D1 RF Custom File Doesn't Work #1

robbz23 opened this issue Oct 12, 2020 · 2 comments

Comments

@robbz23
Copy link
Contributor

robbz23 commented Oct 12, 2020

I tried the rf file today with a remote here and I had a couple of issues. I was able to fix them myself and would like to upload a pull request. or I can just send you my changes.

  1. last brightness and last binary don't seem to be filled and used. This causes problems when turning off with the remote so it wouldn't update esp and HA.

  2. the brightness value that is sent over serial is a hex percentage. Hex 64 = 100 which I can see the confusion. So the line that is round (brightness/64) should be just brighness/100 since esphome is looking for a number between 0 and 1.

  3. I set a variable called isReceivedBrightness when receiving a value from the dimming/rf chip. This way I don't send it back over serial to the same chip that sent it to esp.

  4. Yaml should have default_transition_length: 0s as transitions are handled by the dimming chip on the D1.

@JeffResc
Copy link
Owner

@robbz23, I did the best I had with the information I have and I'm glad about the amount of work done to get this working in ESPHome in such a short amount of time. Thanks for pointing all this out to me. If you'd like to open a pull request with the changes, I'd be happy to take a look at it and merge it.

@JeffResc JeffResc changed the title sonoff d1 rf custom file doesnt work Sonoff D1 RF Custom File Doesn't Work Oct 13, 2020
@JeffResc
Copy link
Owner

@robbz23 So I actually tried setting default_transition_length: 0s and realized the on/off switch doesn't work. Did you change something else as well to make that work?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants