Home/ Blog/Examples & Guides/Controlling a Lamp from the Internet with Digi Remote Manager

Controlling a Lamp from the Internet with Digi Remote Manager

6) Setup Digi Remote Manager

Add Your XIG to Digi Remote Manager

  • Log in to your Digi Remote Manager account. If you don’t already have one, you can register for free.

  • Click the tab labeled Digi Remote Manager and under the sub-tab Devices, click the plus button on the toolbar to add a device.

  • An “Add Devices” window will appear. Click the button “Add Manually” and choose “Device ID” from the drop down box.

  • Paste in the Device ID from your XIG set up page and click “Add.” Then click “OK.”

  • You should then see the XIG—complete with the description you assigned it—in your devices list in Digi Remote Manager.

Sending a Remote AT Command via Digi Remote Manager

  • Click on the “Web Services Console” tab and click the toolbar button labeled “SCI Targets”

  • Choose the Device ID that matches your XIG and click “Add.” Click “OK” to dismiss the window.

  • Under the “Examples” menu, choose “SCI” and then “Python Callback,” which will show you a template to send a command to the radio. As you can see, the Device ID of the gateway has been filled in for you:
<sci_request version=”1.0″>
<send_message>
<targets>
<device id=”00000000-00000000-E0F847FF-FF36ABC0″/>
</targets>
<rci_request version=”1.1″>
<do_command target=”rci_callback_example”>
ping
</do_command>
</rci_request>
</send_message>
</sci_request>
  • We’re going to make a few changes to this example, emphasized in bold below. Replace the do_command target parameter with “xig” and replace the text “ping” with an “at” tag. Be sure to use the hardware address from the bottom of the PowerSwitch Tail’s XBee in the hw_address parameter in the “at” tag. For formatting the hw_address, follow the pattern in the example below, with colons between pairs of digits and don’t forget the exclamation point at the end!
<sci_request version=”1.0″>
<send_message>
<targets>
<device id=”00000000-00000000-E0F847FF-FF36ABC0″/>
</targets>
<rci_request version=”1.1″>
<do_command target=”xig“>
<at hw_address=”00:13:a2:00:40:8A:4C:9A!” command=”D0″ value=”5″ apply=”true” />
</do_command>
</rci_request>
</send_message>
</sci_request>

  • Make sure “POST” is selected as the HTTP method.
  • When you click “Send,” your PowerSwitch Tail should actuate and the lamp will turn on! (You may need to enter your Digi Remote Manager credentials again.) To turn it off again, change the value parameter in the “at” tag to 4 and press send again.
  • If nothing happened, here are a few trouble shooting steps:
    • Under the section “Web Services Responses,” click “examine.” The response result should be “ok” and that means that Digi Remote Manager was able to send the command to the PowerSwitch Tail’s Digi XBee. If that’s the case, check your circuit. Perhaps review the more basic PowerSwitch Tail and digital input with a button examples to ensure all the parts work.
    • If the response value is something along the lines of “error setting DDO parameter,” that means that Digi Remote Manager wasn’t able to find that hardware address. Check to make sure that you’ve got it right and that the target Digi XBee is powered on and configured correctly.
    • If the response value is something along the lines of “name not registered,” that means that Digi Remote Manager wasn’t able to find the XIG. Make sure it’s up and running correctly.
  • If you got it working, great! You’re now controlling your lamp over the internet! However, it doesn’t make much sense to log into Digi
    Remote Manger just to turn a lamp on, so we’re going to set up a PHP script that will send this code to Digi Remote Manager automatically. Keep reading for how to do that!
Tags: , ,
Posted on:


Comments are closed.

Contact a Digi expert and get started today! Contact Us
Have a Question?