Hi Dave, I currently use a separate serial interfacer in emonhub, for each emonTx. They will usually get automatically addressed as /dev/ttyUSB0, /dev/ttyUSB1, and /dev/ttyUSB2 but have no control over which is which (not so good!!!) but as long as the node id is written into the sketches payload this isn’t a problem until you have other USB devices and the addressing range gets altered.

I use FTDI serial adapters with a writable eeprom and have added udev rules so emonTx’s are automatically recognized and use their own serial numbers as addresses e.g.

pi@emonBase5(ro):~$ ls -la /dev/emon*
lrwxrwxrwx 1 root root 7 Oct 11 16:21 /dev/emonTX-TX4O3K2 -> ttyUSB1
lrwxrwxrwx 1 root root 7 Oct 11 16:21 /dev/emonTX-TXPTU5K -> ttyUSB2
lrwxrwxrwx 1 root root 7 Oct 11 16:21 /dev/emonTX-TXTNIZG -> ttyUSB0

and in emonhub.conf

[interfacers]

[[TxN1]]
        Type = EmonHubSerialInterfacer
        [[[init_settings]]]
                com_port = /dev/emonTX-TXTNIZG
                com_baud = 38400
        [[[runtimesettings]]]

[[TxN2]]
        Type = EmonHubSerialInterfacer
        [[[init_settings]]]
                com_port = /dev/emonTX-TXPTU5K
                com_baud = 38400
        [[[runtimesettings]]]

[[TxN3]]
        Type = EmonHubSerialInterfacer
        [[[init_settings]]]
                com_port = /dev/emonTX-TX4O3K2
                com_baud = 38400
        [[[runtimesettings]]]
1 Like