  Abridged. Here we report on the X-ray activity of the primary star, HD189733
A, using a new XMM-Newton observation and a comparison with the previous X-ray
observations. The spectrum in the quiescent intervals is described by two
temperatures at 0.2 keV and 0.7 keV, while during the flares a third component
at 0.9 keV is detected. We obtain estimates of the electron density in the
range $n_e = 1.6 - 13 \times 10^{10}$ cm$^{-3}$ and thus the corona of HD189733
A appears denser than the solar one. {For the third time, we observe a large
flare that occurred just after the eclipse of the planet. Together with the
flares observed in 2009 and 2011, the events are restricted to a small
planetary phase range of $\phi = 0.55-0.65$. Although we do not find conclusive
evidence of a significant excess of flares after the secondary transits, we
suggest that the planet might trigger such flares when it passes close to
locally high magnetic field of the underlying star at particular combinations
of stellar rotational phases and orbital planetary phases. For the most recent
flares, a wavelet analysis of the light curve suggests a loop of length of four
stellar radii at the location of the bright flare, and a local magnetic field
of order of 40-100 G, in agreement with the global field measured in other
studies. The loop size suggests an interaction of magnetic nature between
planet and star, separated by only $\sim8 R_*$. We also detect the stellar
companion (HD 189733 B, $\sim12"$ from the primary star) in this XMM
observation. Its very low X-ray luminosity ($L_X = 3.4\times 10^{26}$ erg
s$^{-1}$) confirms the old age of this star and of the binary system. The high
activity of the primary star is best explained by a transfer of angular
momentum from the planet to the star.
