So have the signal and gnd connected as per the photos have tried
com_port= /dev/ttyUSB0
in the file emonhub.conf
and com_port = /dev/ttyRS485-0
neither seem to work nothing is appearing in the inputs screen any way of fault finding.
The TX unit has no lights on it well just one red light on start up for a 5 seconds.
borpin
(Brian Orpin)
24 January 2020 20:30
2
1 Like
Did you go back to the original link, where thereās a link to the software changes required:
https://wiki.openenergymonitor.org/index.php/EmonTx_V3.4#Direct_connection_emonTx_V3_.3E_Raspberry_Pi_GPIO
That page predates the latest versions of both emonTx software and the RPiās - one immediate thing to check is baud rates. The emonTx is almost certainly using 115200, not 9600.
borpin
(Brian Orpin)
24 January 2020 20:32
4
Is this an EmonSD image you are running?
yes it is a EmonSD
I have edited the file as per the link https://github.com/openenergymonitor/emonhub/tree/emon-pi/conf/interfacer_examples/directserial-serialtx3e
Add the following to emonhub.conf
in the [interfacers]
section:
[interfacers]
### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
Type = EmonHubTx3eInterfacer
[[[init_settings]]]
# Un-comment line below if using RS485 adapter
#com_port = /dev/ttyRS485-0
# default com port if using USB to UART adapter
com_port= /dev/ttyUSB0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
So I had been entering the commands via ssh and not using the Emonhub.After entering the parameters above I am now seeing
or
depending which line I uncomment
borpin
(Brian Orpin)
24 January 2020 20:50
7
I think it might be /dev/serial0
Note the comment refers to a USB port adapter for that not the RPi GPIO pins.
borpin:
/dev/serial0
spot on with /dev/serial0 I now have some data coming through
although not consistent and lots of errors
amended the conf file further to rem out the [[RFM2Pi]] section and it seems to have solved it.
my interfaces section now looks like this
[interfacers]
### This interfacer manages the EmonTx3 ESP format serial
[[SerialTx3e]]
Type = EmonHubTx3eInterfacer
[[[init_settings]]]
# Un-comment line below if using RS485 adapter
com_port = /dev/serial0
#com_port = /dev/ttyRS485-0
# default com port if using USB to UART adapter
#com_port= /dev/ttyUSB0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
### 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)
[[MQTT]]
Type = EmonHubMqttInterfacer
[[[init_settings]]]
mqtt_host = 127.0.0.1
mqtt_port = 1883
mqtt_user = emonpi
mqtt_passwd = emonpimqtt2016
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
# emonhub/rx/10/values format
# Use with emoncms Nodes module
node_format_enable = 1
node_format_basetopic = emonhub/
# emon/emontx/power1 format - use with Emoncms MQTT input
# http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
nodevar_format_enable = 1
nodevar_format_basetopic = emon/
[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToRFM12,
subchannels = ToEmonCMS,
url = https://emoncms.org
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
senddata = 1 # Enable sending data to Emoncms.org
sendstatus = 1 # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
sendinterval= 30 # Bulk send interval to Emoncms.org in seconds
borpin
(Brian Orpin)
24 January 2020 21:44
9
Yes /dev/ttyAMA0
and /dev/serial0
are probably the same physical port.
Thanks again for your help I have something working, just need to extend two of the CT clamps and then will be in business.
That makes sense. With it enabled, you had a com port conflict. i.e. two devices were configured to use the same serial port at the same time.
1 Like
borpin
(Brian Orpin)
24 March 2020 14:50
12
Iām trying to do this with an RPi Zero on a new shop emonTX (not modified in any way).
Can anyone tell me the difference between the EmonHubSerialInterfacer
and the EmonHubTx3eInterfacer
please?
borpin
(Brian Orpin)
24 March 2020 21:02
14
Thanks.
I got this running quite easily in the end
Next question, to power the emonTX via the RPi (so I only use 1 power supply), do I need to do anything other than remove the DC supply from the emonTX and connect the 5V from the RPi to the emonTX?
I do also have a 9V AC/AC PS connected.
You can leave the emonTx powered by the a.c. adapter if you wish - it might be cleaner than the PIās 5 V.
Otherwise, feed it the Piās 5V and pull the jumper off so that you donāt backfeed the āa.c.ā supply regulator.
borpin
(Brian Orpin)
25 March 2020 07:29
16
That was what I wondered if I needed to do.
Iāll just leave it āas isā and supply the emonTX via DC and AC and the Pi by a separate DC.
Cheers
Thatāll ensure each component gets enough current, but itās also a good idea to bond
them all together via their respective āgroundā connections to ensure a common earth.
borpin
(Brian Orpin)
25 March 2020 19:01
18
That sounded a bit like blah blah blah
Youāll need to explain that a bit moreā¦
The idea is to tie the components together via a single connection from each component, then
earthing that connection. The āconnectionā is usually a chassis or āframe,ā but lacking that, the negative power terminal on each component can be used. Doing that keeps all of the voltages referenced to a common point.
Itās a lesson I learned when I did GPS testing for the USAF.
āComponentā means the Pi, the emonTx, and anything else that is powered.
borpin
(Brian Orpin)
25 March 2020 21:34
20
Ok, but how could I do that? All I have exposed is the ground pin.