Moin,
Traintastic already creates a backup on each save (it moves the old save to a backup folder and then saves the world to a new file), what is missing is a proper UI to actually load a backup… If you go to traintastic’s data folder you’ll see a .backup folder that contains world and setting backups:
Now back to CBUS/VLCB after the small side step.
Canusb definitely does not like to come back online for me after mucking with world and connections → E2002 Serial read failed ( bad address )
Is there a remote chance the serial connection is not torn down completely hence leading to strange behaviours?
Usually if a port is still open, the open command will fail not the write. Can you enable the server file log option, and then do it again and post the log here, based on a single error message it is hard for me to analyze the issue, I need more insight on the performed actions.
Switching between Ethernet and USB mode? I think something in the backgound must get stuck because the CBUS interface will not come back online.
I think there is still a flaw in the CANEther logic, it uses the same text based protocol as for CANUSB, I think JMRI does that too. On your second try it still dropped 96 bytes it could process properly. Are you familiar with WireShark? It would be very helpful to capture the network traffic and share the pcap file, then we hopefully can figure out where it goes sideways.
Switching from Serial to Network and Vice Versa seems to have some caching issues where it will fall back to Serial unless you stop/start the server
If you do:
- go offline
- switch type: CANUSB ↔ CANEther
- go online
that should not be an issue, if it is then there is something not handled correctly in Traintastic.
On detection:
Will do more investigtions, but it looks that the block occupancy on startup is doing something strange.
Fresh start ( merg cbus string powered down, restart traintastic )
Traintastic thinks this is the current state:
Based on the log I see all kind of events being received, I see multiple ON and OFF event. How are the events mapped to the blocks?
Does this also happen if you connect directly with CANUSB and no JMRI active?
I did notice one other behaviour: On startup my servos move to a know position.
On power-up [ start of day event @DL7BJ ] 3 way West switch goes to Left/West1 from memory ( 2 servos moving !). But ofcourse traintastic thinks it is still going straight ahead [ or whatever state was last seen ].
The start of the day event, is that a “fixed” event number send by JMRI (or something else) to trigger stuff? If that triggers stuff e.g. in a CANMIO module, but it isn’t reported, then Traintastic has no way of knowing what append. My yesterday evening I added logic to request all events states of events used by Traintastic at startup, I wonder if that helps in this case. It is available in build #1943.
Maybe for a future options: Allow sensor readings for actual turnout state?
( i would still be slightly lying: my turnout goes from thrown/mid/closed based on perceived state commanded by the CBUS can-servo → i dont have a microswitch on the servo )
But it would catch a mis-set turnout …
Traintastic currently relies on feedback of the “output” command, but for CBUS that doesn’t work in all cases, so yes that is something that should be added. You you have that configure in your modules?
Something like?:
- Traintastic/JMRI sends event for turnout
- Servo starts moving
- Once servo is in position the module sends a different event to notify the turnout is in position.
Greetings,
Reinder