Emoncms and RPICT on the same Raspberry: Difference between revisions

From lechacal
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:


This is a stand alone solution where data are acquired and recorded on the same device.
This is a stand alone solution where data are acquired and recorded on the same device.
==Download and write image==


First you should download the latest emonSD image from this link below.
First you should download the latest emonSD image from this link below.
Line 10: Line 12:
Flash this image onto a SD card. Before inserting the SD card on the Raspberry create and empty file called '''ssh''' inside the boot partition.
Flash this image onto a SD card. Before inserting the SD card on the Raspberry create and empty file called '''ssh''' inside the boot partition.


==Modify Emonhub Config==


Insert the SD card and connect the power supply. Once the Raspberrypi fully powered up point your web browser to http://emonpi.  
Insert the SD card and connect the power supply. Once the Raspberrypi fully powered up point your web browser to http://emonpi.  


On teh left panel select '''Emonhub'''. Then click on '''Edit Config'''.
Complete the registration steps.
 
On the left panel select '''Emonhub'''. Then click on '''Edit Config'''.


You can now modify the emonhub configuration as shown below.
You can now modify the emonhub configuration as shown below.


Find and replace the section below.
Find the section below.
 


   
   
Line 38: Line 42:
         # interval =  300                        # Interval to transmit time to emonGLCD (seconds)</nowiki>  
         # interval =  300                        # Interval to transmit time to emonGLCD (seconds)</nowiki>  


Delete this text and replace with this text below
Delete this entire text and replace with this one below


   <nowiki>[[SerialDirect]]  
   <nowiki>[[SerialDirect]]  
Line 48: Line 52:
       pubchannels = ToEmonCMS,</nowiki>  
       pubchannels = ToEmonCMS,</nowiki>  
   
   
In the same way find the section that say
In the same way find the section with
  <nowiki>[[11]]
  <nowiki>[[11]]
     nodename = 3phase
     nodename = 3phase
Line 66: Line 70:
       units = W,W,W,W,W,W,W,W</nowiki>
       units = W,W,W,W,W,W,W,W</nowiki>


Note that you will certainly have to adapt this last section of the configuration yourself to make it match with your RPICT hardware. Check the data ouput section on the specific board page.
Note that you will certainly have to adapt this last section of the configuration yourself to make it match with your RPICT hardware. Check the data output section on the specific board page.
Replace the apikey with the one given by your Emoncms account. Use the Read and Write key.<br>
 
Save once you are done with it.
 
==Finally==
 
Go to the '''Inputs''' section and the data from the RPICT will appear here automatically.
 
==Prevent firmware wiped out==
 
There is currently a potential for the emonpi software to erase the firmware of the RPICT board. To prevent this from happening connect to a terminal on the emonpi.
 
Then make the modification below.
 
Open the following file:
sudo nano /etc/rc.local
 
Then change line number 21 by adding a # in front to comment it like below.
#su pi -c '/opt/openenergymonitor/EmonScripts/update/firstbootupdate'
 
More about this here. [[Emonpi_auto_reflash]]

Latest revision as of 12:00, 5 May 2022

This guide will show how to setup for Emoncms and the RPICT board hosted on the same Raspberry pi.

This is a stand alone solution where data are acquired and recorded on the same device.

Download and write image

First you should download the latest emonSD image from this link below.

https://github.com/openenergymonitor/emonpi/wiki/emonSD-pre-built-SD-card-Download-&-Change-Log

Flash this image onto a SD card. Before inserting the SD card on the Raspberry create and empty file called ssh inside the boot partition.

Modify Emonhub Config

Insert the SD card and connect the power supply. Once the Raspberrypi fully powered up point your web browser to http://emonpi.

Complete the registration steps.

On the left panel select Emonhub. Then click on Edit Config.

You can now modify the emonhub configuration as shown below.

Find the section below.


### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
[[RFM2Pi]]
    Type = EmonHubJeeInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 38400                        # 9600 for old RFM12Pi
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        subchannels = ToRFM12,

        group = 210
        frequency = 433
        baseid = 5                              # emonPi / emonBase nodeID
        calibration = 230V                      # (UK/EU: 230V, US: 110V)
        quiet = true                            # Disable quite mode (default enabled) to enable RF packet debugging, show packets which fail crc
        # interval =  300                         # Interval to transmit time to emonGLCD (seconds) 

Delete this entire text and replace with this one below

  [[SerialDirect]] 
   Type = EmonHubSerialInterfacer
   [[[init_settings]]]
       com_port = /dev/ttyAMA0
       com_baud = 38400
     [[[runtimesettings]]]
      pubchannels = ToEmonCMS, 

In the same way find the section with

[[11]]
    nodename = 3phase
    [[[rx]]]
       names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
       datacodes = h,h,h,h,h,h,h,h,h,h,h,L
       scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1
       units = W,W,W,W,V,C,C,C,C,C,C,p

delete and replace with this text below.

[[11]]
    nodename = rpict8
    [[[rx]]]
       names = power1, power2, power3, power4, power5, power6, power7, power8
       scales = 1,1,1,1,1,1,1,1
       units = W,W,W,W,W,W,W,W

Note that you will certainly have to adapt this last section of the configuration yourself to make it match with your RPICT hardware. Check the data output section on the specific board page.

Save once you are done with it.

Finally

Go to the Inputs section and the data from the RPICT will appear here automatically.

Prevent firmware wiped out

There is currently a potential for the emonpi software to erase the firmware of the RPICT board. To prevent this from happening connect to a terminal on the emonpi.

Then make the modification below.

Open the following file:

sudo nano /etc/rc.local

Then change line number 21 by adding a # in front to comment it like below.

#su pi -c '/opt/openenergymonitor/EmonScripts/update/firstbootupdate'

More about this here. Emonpi_auto_reflash