poor mans switch panel Create a switch panel webpage to be handled using a tablet
#1
Posted 14 April 2023 - 01:18 AM
Implementing the websocket part is rather clean and not that much code. The same for firing the action in Open Rails when pushing the button on the tablet. However determining the status needs a lot of code, as there is no such thing in Open Rails. But not all buttons would need a status displayed, for instance subwindows like map, track monitor etc. would not need it.
I'm using the keyboard for brakes, forward, etc. The keys you need every second. Different keys can be shown on the tablet for different types of locomotives: steam, diesel or electric. I even dream of an Options tab for setting the keys as you wish on the tablet webpage. Current implementation would permit this as the button info is stored in Open Rails and send to the tablet.
Testing can also be done using a second monitor and clicking with the mouse on the buttons. You would need a second monitor as the webpage is switched to full screen.
Tablet on my desk:
Current contents of the tablet webpage:
#2
Posted 14 April 2023 - 10:06 AM
Siebren, on 14 April 2023 - 01:18 AM, said:
This looks like a very nice installation.
Regarding your issue about lots of code, if a control has a display in the cab, then the web API which reports the Cab Controls should include it, like this:
How does your situation differ, I wonder?
#3
Posted 14 April 2023 - 10:23 AM
Now let's do that with the path ahead and have the ability to open and close turnouts/switches/points.... the dispatcher window is good, but just a linear path similar to a CTC board is what I'd really like to see eventually.
#4
Posted 14 April 2023 - 10:51 AM
And I like Eric's idea with the CTC board.
Randy
#5
Posted 14 April 2023 - 12:26 PM
#6
Posted 15 April 2023 - 12:23 AM
cjakeman, on 14 April 2023 - 10:06 AM, said:
Regarding your issue about lots of code, if a control has a display in the cab, then the web API which reports the Cab Controls should include it, like this:
2023-04-14 19_02_54-MS Excel with extensions - Squared1.jpg
How does your situation differ, I wonder?
The situation differs in that I want a clear description off the status on the key. For instance for the headlight the statuses Off, Dim and Bright instead of 0, 1 or 2. And lots of code, depends on what you regard as lots. At first I was hoping I could use the message displayed on the screen. But that message is more like an action instead of a status. For instance the messages for pantograph actions is "raise" or "lower". And on the button I use "Down" and "Up". That gives at most 10 lines of code extra per button.
#7
Posted 15 April 2023 - 12:59 AM
Weter, on 14 April 2023 - 10:18 AM, said:
Do I understand Your idea right, that it's going to be virtual keyboard with true functions written on every big key, instead of just alphanumeric symbols, as ordinary keyboard has? Also, as I understand, the different color of keys would indicate, whether given button is currently "depressed"/function activated, or no?
Poor man's raildriver, but without levers yet? By the way, how about sliders in future?
Yes a virtual keyboard. Different colors could be done, red for "Door Open", green for "Door Closed", not yet implemented. Sliders could be done also. But my opinion is that you need real sliders or just the keyboard for those functions. I have a digital model railroad and used to drive the trains via the keyboard and mouse, but replaced that by real sort of levers:
But for this you would need extra hardware instead of just a tablet.
#8
Posted 15 April 2023 - 01:07 AM
ATW, on 14 April 2023 - 12:26 PM, said:
I have been doing something similar and growing towards the better end of success
20230413_120048.jpg
Looks really nice, your hardware.
I'm rather new to Open Rails and I just use it to drive a train. No CTC (Centralized traffic control?) yet. And what do the abbreviations PTC TCS stand for?
#9
Posted 15 April 2023 - 02:54 AM
#10
Posted 15 April 2023 - 04:19 AM
Quote
May I suggest to keep red color for malfunctions and emergency or critical notes, but to use yellow or orange color for "normal" statuses, demanding attention.
Furthermore, when it's acceptable to move with opened doors, or if not closed doors prevent traction application automatically.
I like Your krafts!
Erick, You are right, but in given case particularly, some ones are not aware about these specific abbreviations meaning, so brief answer is welcomre!