Heat 3 tablespoons coconut oil in a pan.
Keep flame to a low and add 1 teaspoon mustard seeds and let them crackle.
When the mustard seeds crackle, then add ½ teaspoon cumin seeds. Let cumin seeds splutter.
Now add 2 pieces each of 1 inch cinnamon, 2 green cardamoms, 4 cloves and 1 dry red chili. Fry for 1 to 2 seconds till the spices become aromatic. The frying of the spices should be done on a low flame.
Add ⅓ cup sliced pearl onions or shallots or onions. Give a stir.
Add 8 to 10 curry leaves, 1 teaspoon chopped ginger and 1 teaspoon chopped garlic.
Also add 2 tablespoons chopped fresh coconut and mix well.
Then add ¼ teaspoon black pepper, slightly crushed.
Mix and sauté till the onions become translucent.
Now add ½ cup chopped tomatoes and 2 green chilies (slit). mix well.
Then add ¼ teaspoon turmeric powder, ½ teaspoon red chili powder, 1 teaspoon coriander powder and ¼ teaspoon garam masala powder (optional).
Mix again and begin to sauté tomatoes on a low to medium flame till the tomatoes soften. When sautéing the tomatoes, you could add a few tablespoons of water if the tomato mixture dries up or starts sticking to the pan.
Now add 1.5 cups water or add as required.
Add the cooked vellapayar or black eyed peas.
Season with salt as per taste. mix again.
On a low to medium-low flame simmer vellapayar curry for 12 to 15 minutes till the gravy thickens. With a spoon mash some vellapayar (lobia) to thicken the gravy.
Once the vellapayar curry is done, then switch off flame and add 3 to 4 curry leaves. Also drizzle 1 teaspoon coconut oil. Stir and cover the pan. Let the flavors infuse for 4 to 5 minutes.
Serve kerala vellapayar masala curry with steamed rice, puttu or appam or idiayappam. You can garnish kerala lobia curry with coriander leaves if you want.