I’ve just purchased an emon tx6 to do some electrical load monitoring but am having trouble getting things setup.
My hardware is as follows:
Raspberry Pi 3 Model B (running emonSD-10mar26 and updated via emoncms)
emon tx6 powered by emon Vs
I have connected the emon tx6 to the raspberry pi via usb, and I believe emoncms should automatically detect the emon tx6 as per notes here. This has not happened however. I have tried to add the tx6 as a new device, which does add the appropriate inputs and feeds, but they appear to just be placeholders as there is no data being received.
I have checked the emonhub config includes the lines mentioned in this guide, which it already did by default. I did change nodename = emonTx4 to nodename = emonTx6 within [interfacers] but that didn’t make any difference. The configuration settings mentioned in the EmonHub Configuration section were also already present, with nodename = emonTx6_6CT_17 already updated to Tx6 by default.
I am unsure what to try next so would appreciate any advice on the matter.
Welcome @georgehinchliffe - I suspect you need to change the interfacer port. The Tx6 has an emulated CDC serial interface, so the setting in the interfacer is likely to be something like com_port = /dev/ttyACM0. Note this can change for each unit as the OS assigns the name. If you can access your Raspberry Pi over SSH, run ls /dev/ttyA* to see what you have available. Fingers crossed
Note: On Linux systems (RPi or laptop/desktop), you can fix the USB port - these instructions originally related to the “old” emonTx V2 & V3 programmers, but all you need to change are the Vendor and Product IDs. This example (from my laptop) may well be correct as it is. The name of the rule (“emonprogrammer”) and SYMLINK (“Atmel_emonPi3”) can be called whatever you like. The 60- relates to the order of precedence, “.rules” is mandatory.
In /etc/udev/rules.d, add a file “60-emonprogrammer.rules” containing
Thank you both, I think I’m starting to understand where the issue lies.
@awjlogan - I have run ls /dev/ttyA* which returns the following: /dev/ttyAMA0. I then checked to see if there are any processing running on the port using lsof and ps which shows the following process running on ttyAMA0: python3 /var/www/emoncms/scripts/serialmonitor/serialmonitor.py 115200 /dev/ttyAMA0
Am I correct in thinking the emonTx6 cannot use ttyAMA0 because it’s being used by the emonPi? I have also checked ls /dev/tty* and there are no ttyUSB* ports. Presumably this is why the emonTx6 can’t be found on ttyUSB0?
@Robert.Wall I have tried creating 60-emonprogrammer.rules as you describe but am still unable to see the Tx6 in emoncms. How can I check the Vendor and Product IDs?
Thanks George - just to confirm your setup, you have an emonTx6 and that’s connected to a Raspberry Pi. There are no other devices involved? The ttyAMA0 port is the Raspberry Pi’s internal hardware UART, so you don’t need to be using that for monitoring.
A bit strange that Tx6’s serial isn’t showing. Could you please run lsusb and copy the whole output? Also, quick visual check, is the LED next to the antenna jack on the Tx6 green then flashing red every ~10 s?
The VID/PID should be the same as @Robert.Wall ‘s, it’s set in the firmware. The lsusb command should show it (can’t remember off the top of my head if it needs an extra argument).
This is my laptop and the old Wicked Device programmer - my emonPi3 board is presently an emonPi3
lsusb - no arguments. If in doubt, do it without the emonTx6 connected first, then with it and see what’s new.
r@r-IdeaPad-3-15IIL05:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 174f:118d Syntek Integrated Camera
Bus 001 Device 003: ID 046d:c52f Logitech, Inc. Nano Receiver
Bus 001 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 001 Device 005: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
r@r-IdeaPad-3-15IIL05:~$