Have you created a simple Wemo flow so that you can manually turn the switch on and off?
I would do that first.
Then how are you getting the sensor values? Direct on a Pi or something like an ESP8266?
If direct to the Pi, you can consume directly. If on an external microprocessor platform, you might want to look at using MQTT as an intermediary.