EMONWRT2: Difference between revisions
(→Howtos) |
|||
(22 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Image: IMG_0859_small.jpg | right]] | |||
=EmonWRT Wifi Energy Monitoring Device with OpenWRT | |||
=EmonWRT Wifi Energy Monitoring Device with OpenWRT<br />= | |||
'''''<br />''''' | '''''<br />''''' | ||
Line 11: | Line 13: | ||
It combines the Arduino based microcontroller and OpenWRT wifi module together. EmonWRT interfaces with sensors like Current Transformers/ Temperature and Voltage. | It combines the Arduino based microcontroller and OpenWRT wifi module together. EmonWRT interfaces with sensors like Current Transformers/ Temperature and Voltage. | ||
[ | |||
[https://lechacal.pswebshop.com/internetofthing/13-emonwrt2-energy-monitoring-wifi-openwrt-emoncms-thingspeak-3phase.html The EmonWRT is currently for sale here.] | |||
[[Image:diagram_small.png|directct1temp1]]<br /> | [[Image:diagram_small.png|directct1temp1]]<br /> | ||
Line 28: | Line 30: | ||
[[File: | [[File:IMG_0856_small.jpg | right | 400px]] | ||
* | * 4 Current Sensor Ports | ||
* 1 Temperature Sensor Port | * 1 Temperature Sensor Port | ||
* | * 3 AC/AC Adaptor Port | ||
* 1 Ethernet Port | * 1 Ethernet Port | ||
* 1 MicroUSB Power Supply port | * 1 MicroUSB Power Supply port | ||
* Operating System: OpenWRT | * Operating System: OpenWRT Barrier Breaker | ||
* Micro Controller Unit: | * Micro Controller Unit: Attiny84 (Arduino) | ||
* Current Sensor burden resistor: 24Ω | * Current Sensor burden resistor: 24Ω | ||
* Wifi | * Wifi (internal antenna) | ||
* Dimensions: | * Dimensions: 106x86x19mm <br /> | ||
===Recommended Sensors=== | ===Recommended Sensors=== | ||
Current: SCT-013-000 <br /> | Current: SCT-013-000 <br /> | ||
Temperature: DS18B20<br /> | Temperature: DS18B20<br /> | ||
AC/AC Adaptor: 77DB-06-09 77DE-06-09 77DA-10-09 | |||
AC/AC Adaptor: 77DB-06-09 | |||
===Defaults=== | ===Defaults=== | ||
Line 59: | Line 57: | ||
=Hardware= | =Hardware= | ||
Internally the Arduino mcu collects data from sensors on the ADC port and transmit them to the OpenWRT module via serial interface. | |||
Then the OpenWRT module transfer all data to the specified web server (Emoncms, thingspeak etc...) using conventional ethernet protocols. | |||
The | The Arduino sketch can be uploaded to the board for custom applications. The default sketch is available on this page. | ||
The configuration of the unit is quite simple using the Luci web interface that comes with OpenWRT. One can at easy configure the EmonWRT to connect to a home wireless router. | |||
The configuration of the | |||
=Configuration= | =Configuration= | ||
Line 107: | Line 89: | ||
==Arduino Sketch== | ==Arduino Sketch== | ||
The emontx has an | The emontx has an attiny84 mcu which can be programmed with the Arduino IDE. To upload a sketch you will have to open the EmonWRT box and connect an avr programmer to the SPI port on the EmonWRT. The default arduino sketch can be found on this page. The library from OEM is also needed for this. It can be found [https://github.com/openenergymonitor/EmonLib here].<br /> <br /> | ||
===Serial String Format=== | ===Serial String Format=== | ||
Line 124: | Line 106: | ||
===Data Forwarder script=== | ===Data Forwarder script=== | ||
The WR703N router has a script written in bash to grab the data from the | The WR703N router has a script written in bash to grab the data from the ARduino mcu and send them over to the emoncms server. This script is called emonwrt_forwarder.sh. You can download it below.<br /> | ||
The script is launched when | The script is launched when OpenWRT boots up using init.d mechanism. | ||
=RF Gateway= | =RF Gateway= | ||
Previous version of EmonWRT used to have RF gateway. Due to lack of interest we have removed this option. Get in touch with us if you need a similar solution. | |||
=Files= | =Files= | ||
[http://lechacal.com/ | [http://lechacal.com/EMONWRT2/EmonWRT2_default_attiny_v1_0.ino Default Attiny84 Sketch]<br /> | ||
=Howtos= | =Howtos= | ||
Line 151: | Line 121: | ||
[[Startup_guide_emonwrt | Startup Guide]] | [[Startup_guide_emonwrt | Startup Guide]] | ||
[[update_emonWRT| Install/Update EmonWRT on WR703N]] | [[update_emonWRT| (old) Install/Update EmonWRT on WR703N]] | ||
[[update_emonWRT_from1.5 | (New) Install/Update EmonWRT on WR703N]] | |||
[[forwarder_debug| Start the forwarder in debug mode]] | [[forwarder_debug| Start the forwarder in debug mode]] | ||
[[ | [[FIRMWARE_UPLOAD_EMONWRT2 | Upload Firmware]] | ||
[[Timeout for some wifi connections]] | [[Timeout for some wifi connections]] | ||
Line 170: | Line 142: | ||
===1.4=== | ===1.4=== | ||
* Support for OpenWRT Barrier Breaker | * Support for OpenWRT Barrier Breaker | ||
[[Image: IMG_0849_small.jpg]] |
Latest revision as of 19:46, 19 October 2016
EmonWRT Wifi Energy Monitoring Device with OpenWRT
EmonWRT is a one unit system for energy monitoring. It measures usage of an electrical installation and post data on a server (Emoncms). You can then view the data on your computer or phone.
It combines the Arduino based microcontroller and OpenWRT wifi module together. EmonWRT interfaces with sensors like Current Transformers/ Temperature and Voltage.
The EmonWRT is currently for sale here.
- Simple to use with web interface for configuration.
- Connect with Wired or Wifi.
- Wall mountable.
- Single box system.
- Open source components OpenWRT and Arduino.
EmonWRT vs Raspberry Pi. The main motivation for developing the EmonWRT was to increase robustness. For the long run the RaspberryPi solution can become vulnerable due to the operating system hosted on a SD card. High quality SD cards can be used but a higher risk of failure still remains. The EmonWRT contains the operating system on an embedded flash memory and will solidly keep on running.
Technical Specifications
- 4 Current Sensor Ports
- 1 Temperature Sensor Port
- 3 AC/AC Adaptor Port
- 1 Ethernet Port
- 1 MicroUSB Power Supply port
- Operating System: OpenWRT Barrier Breaker
- Micro Controller Unit: Attiny84 (Arduino)
- Current Sensor burden resistor: 24Ω
- Wifi (internal antenna)
- Dimensions: 106x86x19mm
Recommended Sensors
Current: SCT-013-000
Temperature: DS18B20
AC/AC Adaptor: 77DB-06-09 77DE-06-09 77DA-10-09
Defaults
IP Address (LAN): 192.168.2.1
IP Address (WAN): DHCP
Username: root
Password: admin
Hardware
Internally the Arduino mcu collects data from sensors on the ADC port and transmit them to the OpenWRT module via serial interface.
Then the OpenWRT module transfer all data to the specified web server (Emoncms, thingspeak etc...) using conventional ethernet protocols.
The Arduino sketch can be uploaded to the board for custom applications. The default sketch is available on this page.
The configuration of the unit is quite simple using the Luci web interface that comes with OpenWRT. One can at easy configure the EmonWRT to connect to a home wireless router.
Configuration
The web interface
OpenWRT uses Luci for configuration. The EmonWRT has a page on Luci where APikey, emoncms server and node ID can be configured.
Apikey is the long number that identify the account on the Emoncms server. It can be found on the emoncms server in the API help page. The Read & Write apikey key should be copy pasted here.
EmonCMS Hostname is the location of the emoncms server to use. It can either be emoncms.org or your own server. If using your own emoncms server you might need to indicate the full path here. e.g. 192.168.1.50/emoncms/
Node ID is a number that identify the device. If you have several EmonWRT (or emontx) you can change this number here to differentiate between them on the server.
Background Configuration
The actual configuration is saved in a text configuration file /etc/config/emonwrt.
Arduino Sketch
The emontx has an attiny84 mcu which can be programmed with the Arduino IDE. To upload a sketch you will have to open the EmonWRT box and connect an avr programmer to the SPI port on the EmonWRT. The default arduino sketch can be found on this page. The library from OEM is also needed for this. It can be found here.
Serial String Format
If you decide to write your own sketch you need to output on serial interface the data in the following format:
EMONWRT CSV_DATA
CSV_DATA being each output field separated by a comma. Here is an example for three fields:
EMONWRT 75,45,4058 EMONWRT 79,51,4060
This format is necessary for the forwarder program in the WR703N.
Data Forwarder script
The WR703N router has a script written in bash to grab the data from the ARduino mcu and send them over to the emoncms server. This script is called emonwrt_forwarder.sh. You can download it below.
The script is launched when OpenWRT boots up using init.d mechanism.
RF Gateway
Previous version of EmonWRT used to have RF gateway. Due to lack of interest we have removed this option. Get in touch with us if you need a similar solution.
Files
Howtos
(old) Install/Update EmonWRT on WR703N
(New) Install/Update EmonWRT on WR703N
Start the forwarder in debug mode
Timeout for some wifi connections
Version History
Sketch
1.6
EmonWRT Software
1.3
- Support for OpenWRT Attitude Adjustment
1.4
- Support for OpenWRT Barrier Breaker