Is there a way to use LocoNet-based throttles and turnout controllers with a DCC++EX command station and the sensors connected to the DCC++EX Arduino? For control awareness, the sensor data would need to get from the DCC++EX Arduino to LocoNet. [Note that there would be no command station on the LocoNet.] A computer-based solution or intermediary is acceptable (i.e. both LocoNet and DCC++EX can be connected to a computer). Possible approaches? 1. JMRI: It appears that JMRI is able to establish multiple connections (documentation), but I'm not clear on what the interoperability is between connections when there is more than one connection. (For example, if a sensor connected to the DCC++EX Arduino changes state, will LocoNet-attached devices see that that change has occurred?) 2. DCC++EX: One open source project modified DCC++ to support LocoNet Project Description Link GitHub Source Code Link Link to diff of changes verses the starting point DCC++ code This modified version does use a LocoNet shield, but if the USB connection to the computer could be used instead, that would be fine. 3. LocoNet / LocoNet2 Libraries for Arduino: LocoNet Source - https://github.com/mrrwa/LocoNet LocoNet2 Upstream Source - https://github.com/mrrwa/LocoNet2 LocoNet2 Downstream Source that is more active - https://github.com/positron96/LocoNet2 4. Other possible approaches? Might any of these be viable? Digitrax LocoNet OpCode Summary
See how Hans Tanner solved it. We have a few people using this already. You don't have to use serial 0, we can put it on any serial port on a Mega by enabling another parser. That way you can still use the USB to connect to a serial monitor or JMRI.
I am speaking with Hans soon to see if we can team up to make this work together integrally, rather than as an add-on. We will keep you up to date on progress.
Yes, an integration would be interesting, especially if the Arduino USB connection could be used to connect a computer to LocoNet, instead of requiring an additional, separate adapter to connect to LocoNet. This would perhaps entail further abstraction of DCCEXParser, etc., to better accommodate use of other protocols, though these two protocols might not map 1:1 (e.g. slot-related commands or responses). I saw Hans noted as a contributor to the LocoNet library linked in the initial post, and it appears Atani has been involved with the refactored LocoNet2.
…link to Hans Tanner's website, for reference. IoTT: The Internet of Toy Trains https://myiott.org/
Also agree that Hans has a solution for your search. He has some great ideas. I use an NCE system but all of my turnouts and signals utilize his IoTT products and use his LocoNet compatibility as well. Looking forward to what may be coming in the future. Rob