Replies: 15 comments 78 replies
-
No experience with the hardware, but to me the simplest setup for that feature would be a hardware hack to either detect the interruption and signal that as a "button push" (with some software decoupling), or maybe just generate network frequency pulses allowing the firmware to detect the brief pause in this. |
Beta Was this translation helpful? Give feedback.
-
IN the last image there is a track on GPIO 5, but runs to the bottom of the
pic.
El mar, 21 nov 2023 a las 9:56, sfromis ***@***.***>)
escribió:
… [image: image]
<https://user-images.githubusercontent.com/47082390/284584968-bbbd505f-2557-4697-a050-46c5dac658aa.png>
—
Reply to this email directly, view it on GitHub
<#20067 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4PD6WCAIPTDAL3ZQHDYFSQIVAVCNFSM6AAAAAA7STJIOWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMMZQGM2DA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
ssieb has got the 'magic mode' working on esphome, I've tested it and it works.
|
Beta Was this translation helpful? Give feedback.
-
It looks like they are getting interrups in pin 5 , and considering a
trigger is there are a gap > 5ms.
El El jue, 23 nov. 2023 a la(s) 07:45, ferbulous ***@***.***>
escribió:
… ssieb has got the 'magic mode' working on esphome, I've tested it and it
works.
anyone mind taking a look at the custom component code and implement the
change in tasmota?
external_components:
- source: ***@***.***
components: [ magic_switch ]
refresh: 1min
magic_switch:
pin: 5
on_switch:
- light.toggle: light_1
—
Reply to this email directly, view it on GitHub
<#20067 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4IUTUIVVOPXRZNKC5TYF4SLJAVCNFSM6AAAAAA7STJIOWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMNJQGY4TG>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This is the PR:
ssieb/esphome_components@72aa9e3
On a later one pulse change from 3000 to 5000.
El El jue, 23 nov. 2023 a la(s) 15:10, Barbudor ***@***.***>
escribió:
… @lalo-uy <https://github.com/lalo-uy> could you please point me to that
code so I can have a look?
—
Reply to this email directly, view it on GitHub
<#20067 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4IITFY6JPWFRKOUCPDYF6GSTAVCNFSM6AAAAAA7STJIOWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMNJUGIZDM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I wonder what is in gpio5??. 5mS so not counting 50/60hz cicles……. May be
the power supply oscilator falls that fast? No way, the zero crossing will
be longer.
El El jue, 23 nov. 2023 a la(s) 17:22, Eduardo Spremolla <
***@***.***> escribió:
…
This is the PR:
ssieb/esphome_components@72aa9e3
On a later one pulse change from 3000 to 5000.
El El jue, 23 nov. 2023 a la(s) 15:10, Barbudor ***@***.***>
escribió:
> @lalo-uy <https://github.com/lalo-uy> could you please point me to that
> code so I can have a look?
>
> —
> Reply to this email directly, view it on GitHub
> <#20067 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACXBW4IITFY6JPWFRKOUCPDYF6GSTAVCNFSM6AAAAAA7STJIOWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMNJUGIZDM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
I simply took a "standard" mains switch from Berker (3036) and measured the time behaviour. The switching time is approx. 5 ms. It is easy to see in the oscillogram. I hope it helps with the design. |
Beta Was this translation helpful? Give feedback.
-
Not having a BasicR4 in hand but using a similar setup as @Wintespe, I tried to play with Counter, CounterDebounceHigh.Low but I didn't any good success. I have started a native driver to define a pin a "MagicSwitch" using similar code as ESPHome |
Beta Was this translation helpful? Give feedback.
-
The point is how thet looks on 220 ac.
El El vie, 24 nov. 2023 a la(s) 18:14, Wintespe ***@***.***>
escribió:
… I simply took a "standard" mains switch from Berker (3036) and measured
the time behaviour. The switching time is approx. 5 ms. It is easy to see
in the oscillogram. Approx. 5 msec switching time! I hope it helps with the
design.
Circut.png (view on web)
<https://github.com/arendst/Tasmota/assets/121858068/7b88eded-3ee2-49d3-88a6-b6c6e9faf557>
Magic.jpg (view on web)
<https://github.com/arendst/Tasmota/assets/121858068/ff8266e0-3c73-46eb-ba97-761576c93b0a>
Bereker3036.jpg (view on web)
<https://github.com/arendst/Tasmota/assets/121858068/755b0c66-964d-4b5b-8c3b-60457c0fcd53>
—
Reply to this email directly, view it on GitHub
<#20067 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXBW4L3FUAUIBIILYK7SBTYGEE2BAVCNFSM6AAAAAA7STJIOWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMNRTGYYTA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
lalo-uy I think that the time behaviour - the switching characteristic - of the switch is independent of the voltage applied. |
Beta Was this translation helpful? Give feedback.
-
Correct, as long as the real hardware is not known, the input voltage is speculative.. However, this has nothing to do with the timing behaviour of the switch. |
Beta Was this translation helpful? Give feedback.
-
Hi, I’ve flashed Tasmota to a BasicR4 and wired it in. Upgraded firmware OTA to the link posted above. Works fine over HAOS, but neither end of the two-way switching triggers the relay. Exactly how to I adjust the MagicSwitchPulse duration ? Code entered in Console ? My missus is thinking muderous thoughts, and I’d love this to work as I’ve got a bunch of them thinking they’d solve my two-way switching issues that ZBMiniL2Extremes have failed to handle. I’m not very familiar with the insides of these, but can copy paste code if I know where it goes ! |
Beta Was this translation helpful? Give feedback.
-
Was set as user. Found MagicSwitch. I swear that wasn’t there before ! MagicSwitch 1 Pulse command now works. Switches work occasionally, which unfortunately is not good enough to keep the missus happy. I presume from chat above that 1000 is the lowest limit ? Not sure how I find ‘worse’ switches - these will be UK Screwfix standard I suspect (as in, the builders chose them - not fancier ones specified by us). |
Beta Was this translation helpful? Give feedback.
-
Does anyone know which type of switch to get? I see that sonoff says double pole rocker, but looking at the diagrams, it appears that what they are looking for is a 3-way switch like this: https://www.homedepot.com/p/Leviton-Decora-15-Amp-3-Way-Switch-White-R62-05603-2WS/100078412 |
Beta Was this translation helpful? Give feedback.
-
My "magic switch" sometimes power on or off multiple times… it is not good. |
Beta Was this translation helpful? Give feedback.
-
Hi, i find this new feature great for 2 reasons:
Easy to add into existing 2 way wiring without adding new cables.
Refer to picture 1.
Can be installed on the light fixture, and still be controlled even with the wall switch toggled off.
However, with esphome/tasmota installed, it doesn't seem to work.
The light flickers for half a second, and doesn't toggle the relay
IMG_9292.mov
Anyone has any luck with this?
After some discussion in the discord, it could be using zero crossing detection based on pulse detected at pin 5.
I tried assigning zero crossing pulse on pin 5 but that's not working yet.
Beta Was this translation helpful? Give feedback.
All reactions