All the sensors talk on the same one wire (that’s why they’re called OneWire sensors) so the physical order is totally irrelevant. It’s all done by the serial number assigned during manufacture.
But there’s worse…
If one of your sensors goes AWOL, on restarting (whatever you’re running - you don’t say) the sequence in which those that remain appear will almost certainly change. When it starts, the sketch searches for sensors and the order they are found in is explained in ‘Learn’.
Because of that, I made provision in emonLibCM to fix the positions of the sensors, so that each always appears in the same ‘slot’. When you are setting that up, you connect a sensor, look at the address, then copy that address (by hand, sadly) into the array; then repeat for each sensor. Compile the sketch and the sensors are fixed in position for ever.
The array looks like this:
DeviceAddress allAddresses[] = {
{0x28, 0x81, 0x43, 0x31, 0x7, 0x0, 0xFF, 0xD9},
{0x28, 0x8D, 0xA5, 0xC7, 0x5, 0x0, 0x0, 0xD5}, // Use the actual addresses, as many as required
{0x28, 0xC9, 0x58, 0x32, 0x7, 0x0, 0x0, 0x89} // up to a maximum of 6
};
(That’s for 3 sensors.)
As the standard emonTx and emonPi code stands, you can’t do that without making modifications.