One of the victim's children witnessed part of the assault in which he was punched and struck in the eye.
Paul Green, 34, had been angry and jealous after seeing text messages on his ex-partner's phone from his cousin.
Green was given a 15 month prison term, suspended for two years, having admitted a charge of assault causing actual bodily harm.
Shrewsbury Crown Court heard that Green had two previous convictions for violence and Judge Peter Barrie told him he was "on the brink of going straight to prison".
"This was the third time you lost your temper and assaulted people. It was out of anger and jealousy," he said.
Judge Barrie said Green had attacked his cousin, Raymond Green, the moment he arrived at his home and there were children about and it was a sustained assault.
Green, a qualified tree surgeon, of Sharps Drive, Whitchurch, must also attend an anger management programme, complete 120 hours unpaid work and pay a £900 crown court charge.
In addition Judge Barrie imposed restraining order preventing Green from approaching his cousin either directly or indirectly for the next five years.
Miss Samantha Powis, prosecuting, said that Green and his former partner, Lesley Warrilow, had separated in December last year, but they continued to live at the same address.
In April this year he saw messages from his cousin of a "flirtatious and sexual nature" on Miss Warrilow's phone.
Miss Powis said Green was very angry and threw the phone at the wall and went round to Raymond Green's home in Wayland Road, Whitchurch.
As the victim came to the door the defendant forced it open and hit his cousin to head several times and tried to strangle him.
"There was a young child there and Green raised his hand and as the victim tried to stop him he was struck in the eye," she said.
Miss Powis said that Green told his cousin he would "stab him if he called the police". She said Raymond Green was left with an injury to his eye, cuts and a swollen nose.
Green was later arrested at a caravan site and initially had denied having been to his cousins address.
Mr Hunter Gray, for Green, said his client bitterly regretted what happened, but he and Miss Warrilow had been together for 15 years before they separated.
He said his client had strong emotions of anger and jealously which he had failed to control.
"He had not intended to attack his cousin, but on arriving at the house failed to control his temper and has since shown remorse," said Mr Gray.