-
Notifications
You must be signed in to change notification settings - Fork 638
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
YJZK 3 gang support #1047
Comments
If it is more or less the same then it should be possible. There are some extra lines in the SONOFF T1 defines, and LED_PIN_INVERSE is different. Do you already have a 3-gang (and/or 1-gang) and are willing to test it? |
Hi @ColinShorts i'm willing to test my 3-gang (I only have this). I've loaded Sonoff T1 3ch template. however, the middle switch led (#2) lights up when switch #1 or #3 are pressed (i.e., when you press #1, #1 & #2 light up. when you press #3, #2 and #3 light up. so basically #2 will light up every time something is pressed). i have not determined if #2 relay is really activating. it might just be the LED activating. apart from this behavior, #1,#2,#3 light up according to GPIO0,9,10 respectively, confirmed by grounding the respective pin on the PSF-B04). i was able to surpress the weird LED behavior of #2 by forcing LED_PIN_INVERSE to 1 but i dont think this is the perfect solution as the LED intensity looks different.YJZK 3gang pics |
please let me know how i can help to get this template added! |
You've not said what you are using to build (platformio / arduino), but I suspect that the configs will closely mirror that of the Sonoff's as per my previous suggestion. There are 4 files that should change to support new devices, and I've knocked together what I would insert into each of them below for the 1/2/3 channel devices: code/espurna/config/arduino.h:
code/espurna/config/hardware.h:
code/espurna/migrate.h:
code/platformio.ini:
NOTE: I would take @xoseperez advice on whether to include the 1CH in any pull request - ideally it should be tested first. EDIT: just noticed I was logged in with the wrong account, sorry. |
@q32103940 Can you test @ColinShorts changes and confirm his config is working for the 3CH YJZK? |
sorry for the delay, I have been busy at work and couldnt get back on this project. i will report back in the next two weeks. |
This sounds like the switch I just reverse engineered myself. If it is this device then here is a device profile that will work with any number of switches. I currently only have a 1 switch device that I have tested, but I mapped the whole board and am confident that this will work with the 2 and 3 switch devices as well. There are unpopulated footprints for what I believe is a 433MHz radio that looks to be connected to the relay controls. There are also unpopulated footprints for another radio that is hooked up to the HD6001 touch pad controller. I have not looked into them further, as there is no indication of what chip goes there. There is also a second footprint for a Wifi controller, I assume the install one or the other. My board has a PSF-B01 (PSF-B85) installed on it and this configuration is for that chip. I can also provide a configuration for the other board, the footprint looks like that of an ESP-12x. I copied the button configuration from the Sonoff Touch, because touch buttons respond differently than the physical buttons Espurna expects.
|
@ColinShorts Hey Colin, decided to use platformio. I ended up getting it working.
Couldn't find this file, so I assume you meant migrate.ino For hardware.h, I used this below. There were typos related to BUTTON2 on the snippet you pasted above. After fixing that the thing worked like magic. @xoseperez this section worked for code/espurna/config/hardware.h:
@CrazyIvan359 thanks for joining the discussion and providing your template. seems like the YJZK doesn't need the LED_PIN1_INVERSE=1. just curious, how would your switch behave if it was =0 ? |
@q32103940 I just saw the link posted to the device, looks like you have an EU version? The one I have is the US/CAN version and the WiFi LED behaves correctly with How do the buttons behave with the normal settings like you have configured? I flashed mine with the copied Sonoff Touch button settings and I like how it works, as soon as you make contact with the touch pad the switch changes. |
mine's the UK version. my switches only activate on release not on press. is that what LED_PIN1_INVERSE toggles? |
@q32103940
I also just noticed that I have |
@CrazyIvan359 |
@q32103940 You should be able to use this to have click toggle and double click pulse:
You won't be able to do this if you wanted to use |
In |
I noticed only the 2-gang switch is supported. Will 3-gang support for this T1 clone be possible?
The text was updated successfully, but these errors were encountered: