I want to instal it on AC phase of the grid that provide the home with energy.
I don't know where you live. Where I live (Switzerland) such modifications are not allowed. Even if they are allowed where you live I strongly discourage you to do the modifications as you've proven that you don't know enough about electric power and how to handle it, so modifying these circuit may be lethal!