I know at least as far back as the Middle Ages, Europeans used herbs and related plants in their homes and gardens. They planted certain plants aside others to deter pests. We call that companion planting these days. They also would chop up and spread such pest detering plants around the home or place inside bed straw to drive away creatures like bedbugs and lice. Many of the bug and pest products today,especially the organic ones,are derived from those plants and herbs used all those years ago.