I have recently come up with an idea for my secure house alarm which can be found at my house (/warp goombahouse).
I was wondering if it would be possible to connect a command block (wiring shown below) to my alarm so that when triggered, it would activate the command block and execute a command?
/m Goombaistic Alarm at GoombaHouse has been triggered.
So for me, it would show up as:
[Console->me] Alarm at Goombahouse has been triggered.
The command block will not create lag as the pressure plates outside the doors to my house are connected to a 1-bit memory, which stores either a 1 or a 0, so that the alarm would have to be reset and triggered again to be able to send an output signal to the command block again. Therefore, the command block will not execute the command again until the alarm is reset and triggered again which will not create lag.
No. Even in the unlikely event that that may happen, no one (other than me) will be affected. But to create spam, I will have to manually reset the alarm, trigger it, come back inside and reset it e.t.c. But, this will only (if this ever happened) send me about 1 message every 20 or so seconds. This is the worst case scenario and I doubt I will actually want to spam myself. Others will not be able to do this as I will, by that stage, have the 'Lever Toggle' flag on my region set to deny/false.
What if I don't want it?
If I want this feature to be disabled, the wiring (shown below) allows me to conveniently turn on/off this feature.
What If the command block is destroyed?
The command block will be completely safe from myself and other players. A small 3x3 region outside my own, could contain the command block. The redstone signal from my house could then connect to the command block so that it can not be destroyed. The region will not contain any members and only have the creator as the only owner. This way, I can have the my trusty alarm system safely connected to the command block and no one (other than OPs) will be able to tamper with it or destroy it.
Why do I want this?
I think that this will be very useful because in the past, I've come home to see my alarm ringing away and some of my items (in containers that can't be protected) stolen. But by the time I get there, the thief has long gone and I am left with stolen items and no evidence or clue about who could have done it. So this is why I would like to have a command block connected to my alarm.
Reset lever -> 1-bit memory <- Pressure plates
The memory is then connected to an AND gate which only gives an output signal if both the alarm has been triggered and the on/off switch is in the 'on' position.
This is where the command block comes in, there is another AND gate. This gate requires the output of the previous AND gate to be on, and the command feature lever to be in the 'enabled' position. This then is connected to the grand command block.
Thank you for taking the time to read this post and I hope that this can be done!