It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
Take baby steps Dogs, just like people, learn best when new tasks are broken down into small steps. For example, you can’t go out and line dance unless you learn all of the individual steps first! When teaching your dog a new skill, begin with an easy first step and increase difficulty gradually. If you’re training your dog to stay, start by asking her to stay for just 3 seconds. After some practice, try increasing the duration of her stay to 8 seconds. When your dog has mastered an 8-second stay, make things a little harder by increasing the time to 15 seconds. Over the next week or two, continue to gradually increase the duration of the stay from 15 seconds to 30 seconds to a minute to a few minutes, etc. By training systematically and increasing difficulty slowly, you’ll help your dog learn faster in the long run.
Step 1: Using either a laser pointer or touch stick, get your dog in the habit of jumping up to touch the light switch. It is best to have him jump up with his pads on the wall (instead of his claws) touching the switch with his nose. I used a laser pointer here, because I would play with it as a game, knowing that he would really go after it—even if it's on a wall.
Work on only one part of a skill at a time Many of the skills we want our dogs to learn are complex. For instance, if you want to train a solid sit-stay, you’ll need to work on teaching your dog that she should stay in a sitting position until you release her (duration), she should stay while you move away from her (distance), and she should stay while distracting things are going on around her (distraction). You’ll probably both get frustrated if you try to teach her all of these things at the same time. Instead, start with just one part of the skill and, when your dog has mastered that, add another part. For example, you can work on duration first. When your dog can sit-stay for a few minutes in a quiet place with no distractions while you stand right next to her, start training her to stay while you move away from her. While you focus on that new part of the skill, go back to asking your dog to stay for just a few seconds again. When your dog can stay while you move around the room, slowly build up the duration of the stay again. Then you can add the next part-training in a more distracting environment. Again, when you make the skill harder by adding distraction, make the other parts-duration and distance-easier for a little while. If you work on all the parts of a complex skill separately before putting them together, you’ll set your dog up to succeed. Can I train my dog myself?