Hello Mamani,
This is my first time ever posting a comment, but I couldn’t resist since property management is my specialty. I am a property supervisor with a management company here in SD and have been in the business for 15 years. I can tell you without a doubt your landlord had no right to enter your dwelling without prior written notice (standard is 24 hour notice.) I would check your lease to see what the exact clause it was under and follow up with asking him why he was there. He may seem like a “nice guy”, but what was he doing there without notice at a time you are not normally home? If you don’t like his answer, there are many reputable landlords out there who would love to have a stable renter in their home.