Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 932 Bytes

README.md

File metadata and controls

42 lines (31 loc) · 932 Bytes

aframe-iot-component

A-Frame IOT component (for testing purposes only)

Usage example

<html>

<head>
  <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
  <script src="https://unpkg.com/aframe-iot-component/aframe-iot-component.js"></script>
</head>

<body>
  <a-scene>
    <a-sphere
      position="0 0 -8"
      color="lightgray"
      iot="device: 123">
    </a-sphere>
  </a-scene>
</body>

</html>

Remember to replace the device with your unique device identifier.

Demo

You can find a demo that works on any modern browser.

Try to light the ball up with:

curl -X POST https://keyvalue.immanuel.co/api/KeyVal/UpdateValue/123/status/on -H "Content-Length: 0"

Turn it off with:

curl -X POST https://keyvalue.immanuel.co/api/KeyVal/UpdateValue/123/status/off -H "Content-Length: 0"