Multiple emonTX Serial connections

Indeed it would, HOWEVER!

Be aware that the /dev/ttyUSB* addresses are dynamically issued at boot up or as each device is connected/comes online, so there are no guarantees that the 3 devices will always use the same node id’s, it very much depends on who gets what address first.

The “problem” here is that because the emonESP output format is aimed solely at a close coupled emonESP that recieves input from that one emontx only, there is no node id passed in the frame of data.

You have 3 options

  1. Cross your fingers and hope that the devices always get allocated the same address.

  2. Change the emonTx FW’s to send a node id, using the original “serial-direct” space seperated values output eg nodeid val1 val2 val3 etc and use the original serial interfacer not the Tx3e interfacer in emonhub.

  3. Use serial to USB adaptors that can have a unique id set so that the emonBase can identify the device and allocate it the correct address regardless of connection/boot order.

I always opt for FTDI usb serial adaptors that have a programmable eeprom and udev rules to match so my emonTx’s are not addressed as /dev/ttyUSB* but as /dev/emonTx* instead.

Some further reading if you are interested

There is actually another method a “3a” if you like, where you use usb serial devices from 3 different vendors and use the vendor:product id’s and udev rules, Bill explain’s how in this thread

1 Like