web based home automation


hai iam working on a project smart home automation in which i want to control home appliances using openhab from web or android phone. so in which iam using relay to to connect the things and iam having problem with the items and sitemaps. iam getting problem which switch not working for the relay to turn on/off.
if any body has the solution please help me to get the output.

Thank u,

things iam using-

raspberry pi 3

1-channel relay

a light for testing

i need support for the web control through openhab or apache/php by any means.