Yes cannon rush in PvP is a viable strategy even in mid-low Diamond, that's why people still do it. It's easy to stop if you realize the early probe or early forge, but it's still possible to miss it until they got the first proxy pylon up, especially if they use the 6th probe, or chat to distract you.
There is an easy way to deal with this strat that doesn't require too cautious scouting - build another nexus. The most important thing you need to realize is a pylon + 2 cannons are already worth a nexus. Just follow these simple rules:
- Try to harvest at your main base as long as you can.
- Force him to build as many cannons in your base as possible.
- Pretend that you don't know what to do. FAKE NERDRAGEEE.
- Expand in a gold expo if possible. Avoid expanding to your nat if the cliff could overlook the nat - he could extend the cannon rush there easily.
- Have either cannons or stalkers to: prevent more cannon rushes at the new base, and defend the remaining tech buildings still in your first base. Just one cannon/stalker will do.
- Now that you have a massive tech & econ lead, do something fun like mass sentries or fast mothership :p
I personally prefer to do it this way than denying the cannon rush right away, because it's more fun (especially with the fake nerd rage :p)