(since ESPimatic users a more active at this forum than on Git, I make a topic for this question overhere).
I want to use a ESP with ESPinatic to use as wall switch for my current situation. My setup and building differs from ‘normal’
For my 2 main lights I use 2(!) KaKu devices per lamp. the wall switch is connected to a AWMT-003 the 230v of the light is connected to a AWMR-210,
Then I toggle the wallswitch it only does a KaKu broadcast. Nothing more. The AWMR-210 picks up the braodcast and switches the light.
The reason for these extra devices is to allways detect manual interference from the switches. Pimatic allways knows the state of the light.
There is also a second swtich with only a AWMT-003 connected to it. It broadcast to a ACM-3500-3 a few meters away, hidden in a ceiling.
My house is a so called prefab house. Most of my walls and ceilings are made of cardboard and are hollow in the inside. Giving me plenty of room to stuff some tiny hardware.
All the switches for this situation are placed next to each other, I have 4 wall switches from left to right in one frame.
After this introduction, skip to ESPimatic
I want to remove all the AWMT-003 devices and replace with 1 ESP. All the wall switches should connect to GPIO’s at the ESP, giving me the ability to detect a change on the physical switch. Removing 2 AWMT-003 device should give me enough space to put in a 230v to USB adapter and a ESP.
After detecting the switch it should just tell Pimatic to toggle the corresponding RF device. For daily operation nothing should change. I can still toggle wallswtiches, Pimatic keeps track of the state and Pimatic could also operate the lights.
When this operates without problems I want to do the next step. Replace the ACM-3500-3 with a ESP with 3 relays and ESPimatic installed.
Now whe have to think how to make this working. My plan is to do as follow :
- ESPimatic connected to wall switch detects a interrupt (toggling the switch)
- Connect to the ESP with relays and just send a ‘toggle’ command (the wallswitch ESPimatic shouldn’t need to know the status, just tell the relay to switch to other state).
- Pimatic with a ShellSwitch will know within a minute the status, because it asks on interval the state of the relay
- When I want to swith the light from Pimatic , I simply push the on/off button in the GUI
With this situation the wall switch will allways work, when the light is on, hitting the switch will simply tun it off. When after that Pimatic turns the light on, hitting the same switch will tun it off again.
Any ideas on how to build this in ESPimatic, make it future proof for other situations as well ?
I’m not sure on how to make the interrupt part on ESPimatic configurable. It should have a very minit tiny rule option where you could tell the config what to do upon interrupt detection.
Any input is welcome