#!/opt/bin/bash


echo Content-type: text/html
echo ""

/bin/cat << EOM
<HTML>
<HEAD><TITLE>office_lights_max</TITLE>
</HEAD>
<BODY bgcolor="#cccccc" text="#000000">
<P>
<SMALL>
<PRE>
EOM

SERVER=192.168.1.21
PORT=8123

echo "Sending request to ${SERVER}"

curl \
	-H "x-ha-access: hb_api_passwd1!" \
    -H "Content-Type: application/json" \
	http://${SERVER}:${PORT}/api/services/scene/turn_on -d '{"entity_id": "scene.office_lights_max"}' -X POST

/bin/cat << EOM
</PRE>
</SMALL>
<P>
</BODY>
</HTML>
EOM

