Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
livebox:ethrelay [2013/09/10 08:03] – minerva9 | livebox:ethrelay [2013/11/18 17:08] – minerva9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ethernet Relay Unit ====== | ====== Ethernet Relay Unit ====== | ||
- | Using a couple of off the shelf components; Ethernet module and 2x relay unit; we have purpose built a controller using the ubiquitous | + | Using a couple of off the shelf components; Ethernet module and 2x relay unit; we have purpose built a controller using the ubiquitous |
{{: | {{: | ||
+ | |||
+ | The main board requires DC power (7.5V .. 9V). The onboard 7805 regulator gives us the power for the micro and the relays. A 3.3V regulator keeps the ethernet module happy. The use of four-way DuPont female to female cables for hooking up the relay & ethernet module allows flexibility when mounting these parts in an enclosure. A red LED indicates that the unit is powered. A reset button is provided. | ||
+ | |||
+ | The relay board has a couple of opto-isolated relays. Each rated at 10A for 250V. Be sure to [[http:// | ||
There are two versions of firmware for this unit | There are two versions of firmware for this unit | ||
Line 22: | Line 26: | ||
As the sketch by default is configured to use DHCP it's best that you setup your DHCP server to send out a static IP for its MAC address. | As the sketch by default is configured to use DHCP it's best that you setup your DHCP server to send out a static IP for its MAC address. | ||
- | Under the covers it's exposing the following | + | Under the covers it's exposing the following |
* /main.html - Outline shell | * /main.html - Outline shell | ||
* /main.css - Style sheet | * /main.css - Style sheet | ||
* /main.js - JQuery javascript to populate the UI | * /main.js - JQuery javascript to populate the UI | ||
- | * /list.json - JSON data of the state of the relays. | + | * /list.json - JSON data of the state of the relays |
* /relay0 - Toggle relay | * /relay0 - Toggle relay | ||
* /relay1 - Toggle relay | * /relay1 - Toggle relay | ||
Line 34: | Line 38: | ||
===== xAP Enabled === | ===== xAP Enabled === | ||
- | Watch the short [[http:// | + | Watch the short [[http:// |
As xAP is a broadcast protocol there is no need to know the units IP address. Having the unit use DHCP creates a ZERO configuration installation. | As xAP is a broadcast protocol there is no need to know the units IP address. Having the unit use DHCP creates a ZERO configuration installation. | ||
Line 45: | Line 49: | ||
**Technical explanation why this does not work** | **Technical explanation why this does not work** | ||
The problem is the receive ethernet buffer is also used for sending as we are tight on RAM. So after the 1st relay WRITES its response into the buffer and transmits the 2nd relay when it goes to look inside for the incoming xAP frame that triggered processing it'll only find the outbound message and all the xAP parse states are messed up. | The problem is the receive ethernet buffer is also used for sending as we are tight on RAM. So after the 1st relay WRITES its response into the buffer and transmits the 2nd relay when it goes to look inside for the incoming xAP frame that triggered processing it'll only find the outbound message and all the xAP parse states are messed up. | ||
- | Given this is the case there is no wildcard | + | Given this is the case there is no wildcard |
Apart from that it's fully xAPBSC compliant. | Apart from that it's fully xAPBSC compliant. | ||
If nothing happens for 2 mins it will send out a xAPBSC.info for each relay unit to let you know they are still there. | If nothing happens for 2 mins it will send out a xAPBSC.info for each relay unit to let you know they are still there. | ||
Unit heartbeat will occur every 60 seconds and will include an ip= field so you can tell where this unit is. | Unit heartbeat will occur every 60 seconds and will include an ip= field so you can tell where this unit is. | ||
+ | |||
+ | The following image shows how the unit looks on xfxViewer. | ||
+ | \\ | ||
+ | {{: | ||
+ | |||
Sample xAP message to toggle relay 1 | Sample xAP message to toggle relay 1 | ||
Line 69: | Line 78: | ||
</ | </ | ||
- | If you are using a joggler | + | If you are using a Joggler |
<code xml> | <code xml> | ||
<button NAME=" | <button NAME=" |