With respect, Its you who does not understand this problem, as you are explaining an issue I do not have.. or are possibly making incorrect assumptions about what my system has ..
Sorry therefore that this message has to be quite long to give more precise information. I know you prefer short questions, but here we need a long text to make sure we get the answer to the (real) question. I have tried to use smilies to emphasize the key points...
I do not physically have a Rocnet PI04 throttle. (perhaps the forum topic name could have been better?)
I DO have a mobile throttle of my own design, connected and subscribed to Rocview via the service MQTT, listening (and able to send) to both service/client and service/Info topics.
- My throttle currently has these (FULLY WORKING !) abilities:
- It can send the "lcprops" message to Rocrail
- From watching the response to the lcprops message, it can get lots of information about the locos, their names, functions etc. and build an internal loco list
- I can select ANY loco from this throttle internal loco list and send Speed or Fn commands to any selected loco.
- Rocrail accepts these commands and sends them to the appropriate CS to control the loco
- The Loco moves and the sounds sound
- At the moment, my code DOES work with "dispatch loco", BUT ONLY by sensing an "<exception text" message including "dispatch"
- If I have seen the dispatch message, the throttle then acts as a single loco throttle, and when I release the loco in rocview/rocrail, my throttle sees the <lc id="E03" cmd="release ..>" message and then waits for a lcprops reponse to build a new internal loco list, or wait for a new "dispatch" command
- Jan and I have discovered that Rocrail (/Rocview?) can send the "<exception text" message for "dispatch" in at least two different formats: (::roll:) , so we would like to have a solution that works "properly"
- I think/understand that to get Rocrail to send the <lc id="E03" cmd="dispatch" ..> message we FIRST need to tell Rocrail that we HAVE a throttle available
- Rocrail/rocview will only accept "dispatch for throttle" (AND SEND THE "CORRECT" <lc id="E03" cmd="dispatch" ...> MESSAGE) if Rocrail knows that a throttle IS available.
- BUT IF THERE is NO Throttle available, then rocrail sends the exception text. (I hope I have this correct)
- A throttle is NOT a command station, there may well be throttles connected to command stations, but you can easily have throttles as part of other hardware. For example, Rocview includes throttles..
- If you have a (or ANY) throttle that is only connected to Rocrail by a MQTT service interface, how do you expect Rocrail to know that the throttle exists ?
- WHAT message should a MQTT service connected throttle send to Rocrail to inform rocrail that it exists so that RR does not need to treat the rocview dispatch command as an exception -- It may be that you need to add this command to rocrail?? -- This is not a "cs library" issue, as the throttle is not a cs! --
- Lastly.. WHY does rocrail NEED to know throttles exist?.. what can you do if it does not exist??
- Finally: Could you just send the <lc id="E03" cmd="dispatch" ...> over service/info MQTT whenever Rocview sends the dispatch