Following on from my other post, I am creating this one to focus on emoncms, emonhub, and EmonTx4 integration (via direct USB connection).
I believe my emoncms VM (container actually) is working, but maybe I have missed something. In the main set up page there is no entry for emonhub. I manually configured (in emonhub.conf file) Tx4 as USB device and that seems to be collecting data. But no entries have magically appeared in the INPUT section. The device was configured by the shop for me, so I don’t want to mess up the Tx4 by trying to ‘add’ it if that might overwrite its config.
Server Information
Services
emonhub : Active Running
emoncms_mqtt : Active Running
feedwriter : Active Running - sleep 300s 0 feed points pending write
service-runner : Active Running
redis-server : Active Running
mosquitto : Active Running
demandshaper : Active Running
emonPiLCD : Not found or not installed
Emoncms
Version : low-write 11.3.22
Git :
URL : GitHub - emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data
Branch : * stable
Describe : 11.3.22
Components : Emoncms Core v11.3.22 | App v2.7.4 | Dashboard v2.3.3 | Device v2.2.2 | Graph v2.2.3 | Backup v2.3.2 | DemandShaper v2.2.2 | Postprocess v2.4.7 | Sync v2.1.4 | Usefulscripts v2.3.10 | EmonScripts v1.6.20 | Emonhub v2.5.8
Server
Machine : ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 0416 08/27/2020
CPU : AMD Ryzen 3 4300U with Radeon Graphics | 1 Threads(s) | 4 Core(s) | 1 Sockets(s) | 5389.92MIPS |
OS : Linux 6.2.16-8-pve
Host : emon-cms | emon-cms.wifi.lan | (192.168.1.19)
Date : 2023-08-24 15:12:49 BST
Uptime : 15:12:49 up 17 min, 1 user, load average: 0.01, 0.04, 0.00
Memory
RAM : Used: 18.99%
Total : 1 GB
Used : 194.43 MB
Free : 829.57 MB
Swap : Used: 0.00%
Total : 512 MB
Used : 0 B
Free : 512 MB
Disk
: - / : Used: 1.73%
Total : 64 GB
Used : 1.11 GB
Free : 62.89 GB
Read Load : n/a
Write Load : n/a
Load Time : n/a
HTTP
Server : Apache/2.4.52 (Ubuntu) HTTP/1.1 CGI/1.1 80
MySQL
Version : 5.5.5-10.6.12-MariaDB-0ubuntu0.22.04.1
Host : 127.0.0.1 (127.0.0.1)
Date : 2023-08-24 15:12:49 (UTC 01:00)
Stats : Uptime: 1060 Threads: 7 Questions: 1301 Slow queries: 0 Opens: 46 Open tables: 39 Queries per second avg: 1.227
Redis
Version :
Redis Server : 6.0.16
PHP Redis : 6.0.0-dev
Host : localhost:6379
Size : 0 keys (995.62K)
Uptime : 0 days
MQTT Server
Version : Mosquitto 2.0.11
Host : localhost:1883 (127.0.0.1)
PHP
Version : 8.1.2-1ubuntu2.14 (Zend Version 4.1.2)
Run user : User: www-data Group: www-data Script Owner: pi
Modules : apache2handler calendar Core ctype curl date dom v20031129exif FFI fileinfo filter ftp gd gettext hash iconv json libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 8.1.2-1ubuntu2.14openssl pcre PDO pdo_mysql Phar posix readline redis v6.0.0-devReflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zlib
Here is /etc/emonhub/emonhub.conf
$ cat /etc/emonhub/emonhub.conf
#######################################################################
####################### emonhub.conf #########################
#######################################################################
### emonHub configuration file, for info see documentation:
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
#######################################################################
####################### emonHub settings #######################
#######################################################################
[hub]
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
loglevel = DEBUG
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
####################### Interfacers #######################
#######################################################################
[interfacers]
### Manually added for the emonTx4 unit
[[USB]]
Type = EmonHubOEMInterfacer
[[[init_settings]]]
com_port = /dev/ttyUSB0
com_baud = 115200
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
nodename = emonTx4
### 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/
# Single JSON payload published - use with Emoncms MQTT
node_JSON_enable = 0
node_JSON_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
# interval= 30 # Bulk send interval to Emoncms.org in seconds
#######################################################################
####################### Nodes #######################
#######################################################################
[nodes]
## See config user guide: https://github.com/openenergymonitor/emonhub/blob/emon-pi/conf/emonhub.conf
[[5]]
nodename = emonpi
[[[rx]]]
names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount
datacodes = h, h, h, h, h, h, h, h, h, h, L
scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1
units = W,W,W,V,C,C,C,C,C,C,p
[[6]]
nodename = emontxshield
[[[rx]]]
names = power1, power2, power3, power4, vrms
datacode = h
scales = 1,1,1,1,0.01
units = W,W,W,W,V
[[7]]
nodename = emontx4
[[[rx]]]
names = power1, power2, power3, 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.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[8]]
nodename = emontx3
[[[rx]]]
names = power1, power2, power3, 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.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[9]]
nodename = emontx2
[[[rx]]]
names = power1, power2, power3, 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.1,0.1, 0.1,0.1,0.1,0.1,1
units = W,W,W,W,V,C,C,C,C,C,C,p
[[10]]
nodename = emontx1
[[[rx]]]
names = power1, power2, power3, 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
[[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
[[12]]
nodename = 3phase2
[[[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
[[13]]
nodename = 3phase3
[[[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
[[14]]
nodename = 3phase4
[[[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
[[15]]
nodename = emontx3cm15
[[[rx]]]
names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
whitening = 1
[[16]]
nodename = emontx3cm16
[[[rx]]]
names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p
whitening = 1
[[19]]
nodename = emonth1
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[20]]
nodename = emonth2
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[21]]
nodename = emonth3
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[22]]
nodename = emonth4
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[23]]
nodename = emonth5
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[24]]
nodename = emonth6
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[25]]
nodename = emonth7
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
[[26]]
nodename = emonth8
[[[rx]]]
names = temperature, external temperature, humidity, battery, pulsecount
datacodes = h,h,h,h,L
scales = 0.1,0.1,0.1,0.1,1
units = C,C,%,V,p
Here is a sample from /var/log/emonhub/emonhub.log
2023-08-24 15:21:27,165 DEBUG USB Report 160 AC present V1 = 240.33 V2 = 0.00 V3 = 0.00 f=50.31
2023-08-24 15:21:27,367 DEBUG USB Ch 1 I=0.048 W=0 VA=12 Wh=0 pf=0.0158
2023-08-24 15:21:27,469 DEBUG USB Ch 2 I=0.046 W=0 VA=11 Wh=0 pf=-0.0594
2023-08-24 15:21:27,570 DEBUG USB Ch 3 I=0.022 W=0 VA=5 Wh=0 pf=-0.0599
2023-08-24 15:21:27,671 DEBUG USB Ch 4 I=0.022 W=0 VA=5 Wh=0 pf=-0.0610
2023-08-24 15:21:27,772 DEBUG USB Ch 5 I=0.022 W=0 VA=5 Wh=0 pf=0.0006
2023-08-24 15:21:27,874 DEBUG USB Ch 6 I=0.009 W=0 VA=2 Wh=0 pf=-0.0186
2023-08-24 15:21:27,975 DEBUG USB Ch 7 I=0.009 W=0 VA=2 Wh=0 pf=-0.0971
2023-08-24 15:21:28,076 DEBUG USB Ch 8 I=0.009 W=0 VA=2 Wh=0 pf=-0.0353
2023-08-24 15:21:28,177 DEBUG USB Ch 9 I=0.009 W=0 VA=2 Wh=0 pf=-0.0206
2023-08-24 15:21:28,279 DEBUG USB Ch 10 I=0.009 W=0 VA=2 Wh=0 pf=0.0002
2023-08-24 15:21:28,380 DEBUG USB Ch 11 I=0.009 W=0 VA=2 Wh=0 pf=-0.0608
2023-08-24 15:21:28,482 DEBUG USB Ch 12 I=0.009 W=0 VA=2 Wh=0 pf=-0.0897
2023-08-24 15:21:36,323 DEBUG USB RF No Ack (1)
2023-08-24 15:21:36,826 DEBUG USB RF No Ack (2)
2023-08-24 15:21:36,927 DEBUG USB Report 161 AC present V1 = 240.35 V2 = 0.00 V3 = 0.00 f=50.10
2023-08-24 15:21:37,129 DEBUG USB Ch 1 I=0.047 W=0 VA=11 Wh=0 pf=0.0140
2023-08-24 15:21:37,230 DEBUG USB Ch 2 I=0.046 W=0 VA=11 Wh=0 pf=-0.0712
2023-08-24 15:21:37,331 DEBUG USB Ch 3 I=0.022 W=0 VA=5 Wh=0 pf=-0.0501
2023-08-24 15:21:37,433 DEBUG USB Ch 4 I=0.022 W=0 VA=5 Wh=0 pf=-0.0620
2023-08-24 15:21:37,534 DEBUG USB Ch 5 I=0.021 W=0 VA=5 Wh=0 pf=0.0033
2023-08-24 15:21:37,636 DEBUG USB Ch 6 I=0.009 W=0 VA=2 Wh=0 pf=-0.0313
2023-08-24 15:21:37,737 DEBUG USB Ch 7 I=0.009 W=0 VA=2 Wh=0 pf=-0.0764
2023-08-24 15:21:37,838 DEBUG USB Ch 8 I=0.009 W=0 VA=2 Wh=0 pf=-0.0238
2023-08-24 15:21:37,940 DEBUG USB Ch 9 I=0.009 W=0 VA=2 Wh=0 pf=-0.0459
2023-08-24 15:21:38,040 DEBUG USB Ch 10 I=0.008 W=0 VA=2 Wh=0 pf=0.0022
2023-08-24 15:21:38,141 DEBUG USB Ch 11 I=0.008 W=0 VA=2 Wh=0 pf=-0.0677
2023-08-24 15:21:38,242 DEBUG USB Ch 12 I=0.009 W=0 VA=2 Wh=0 pf=-0.0866
Is there a part of the puzzle I’m missing? Thanks!