Introducing DCC++ ---a complete open-source DCC station and interface

Gregg Aug 25, 2015

  1. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Still trying to figure out the "Web Socket closed" issue ...... the results from the websocket.org site report as follows: (so the browser does not seem to be at fault)
    Echo Test

    [​IMG]
    This browser supports WebSocket.
    Location:

    Use secure WebSocket (TLS)


    Message:

    Log:
    CONNECTED
    SENT: Rock it with HTML5 WebSocket
    RESPONSE: Rock it with HTML5 WebSocket
     
    Scott Eric Catalano and UK Steve like this.
  2. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hi Steve,

    Sorry for the delay, just got in from work.

    Looks like it's all gone wrong there. Let's go back a step or two.

    In the 'data' folder that resides with the Server sketch you should have the following.

    bootstrap.min.css
    bootstrap.min.js
    bootstrap-toggle.min.css
    bootstrap-toggle.min.js
    jquery.min.js
    Range23.css

    And last but not least, the personalised 'page' file I posted on here last night.

    indexDCC.html

    7 files total, can you confirm?
     
    Scott Eric Catalano likes this.
  3. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    When you have those 7 files all together, you should be able to start the page directly from the 'data' folder.
    Double click indexDCC.html and it should instantly display in your browser.
    If that works, you can then go to the Spiffs upload.

    I know the 'page' is good, just tested in Chrome.
     
    Last edited: May 4, 2016
    Scott Eric Catalano likes this.
  4. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Confirmed. Dcc.html displays in the browser ... ready for SPIFFs upload
     
    Scott Eric Catalano and UK Steve like this.
  5. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Repeat from earlier post

    Now for the Spiffs bit.

    With all the files now in the data folder. Relaunch the DCCppServer sketch. With your ESP connected and in flash mode,
    Select the ESP8266 Sketch Data Upload in the tools menu. Confirmation of the upload starting should be confirmed then wait it can take several minutes depending on flash memory size.

    Then the magic bit hopefully, with your esp running point a browser to your esp IP address no slashes or file names required.

    If page comes back ok fill in the address box (now blank) with the address in a slightly different format............. ws://***.***.***.***/ws............. no port number required.
     
    Scott Eric Catalano likes this.
  6. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    I have been testing and retesting, in Chrome I get 2.5 to 3 second clean downloads.

    There will be a few updates to follow shortly as I streamline the server code. Once you have this working you'll see it's no big deal doing the uploads.

    I've got an issue on the page that we can sort out shortly.

    Steve.
     
    Scott Eric Catalano likes this.
  7. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Did as told ...... success!!!! working like a dream on my computer. Can not thank you enough for your patience and understanding. It's been 15 years since I was an adjunct prof of programming (believe it or not) and I am a bit rusty. Got it to connect on the tablet but page does not have a power on button and configuration is different than on the computer
    SPF
     
    Last edited: May 4, 2016
    Scott Eric Catalano and UK Steve like this.
  8. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Hat's off to you Sir. Well done, I hope it proves useful for you.
    Programming eh, maybe you can show me a thing or two.

    Keep me posted as you get used to the new features, I'm going to alter the page now so things are a little better on small screens.

    Steve

    Edit; I was in touch with the ESPAsync developer just last night, he assures me if we use some page compression techniques, the page will be served in under 1 second. Be just like calling from the internet. So something to work on there.
     
    Last edited: May 4, 2016
    Scott Eric Catalano likes this.
  9. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Steve
    Sounds good .... hoping your revisions will render better on the tablet so I can see a "connect" button
     
    Scott Eric Catalano and UK Steve like this.
  10. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Better format for a small screen, comparing the two Loco selectors at the bottom.

    What size tablet?

    I'll try on my 7" Fire

    CaptureO.JPG
     
  11. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Looks good ..... 8 Inch .....please send me the new code. TNX
     
    Scott Eric Catalano and UK Steve like this.
  12. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    What about the Connect button? May as well do as much as we can find in one hit. It's your copy I'm working on and it doesn't take long.
     
    Scott Eric Catalano likes this.
  13. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Connect button as you show it in attachment 171833 is fine
     
    Scott Eric Catalano likes this.
  14. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Yes, I thought there was a problem on your tablet as post #1209.
    I get a stunning render on the 7" Fire HD

    And that confirms 2 instances keeping in sync with each other :)

    Edit; Check you're not zoomed in on the tablet.
     
    Last edited: May 4, 2016
    Scott Eric Catalano likes this.
  15. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Trying to empty the cache as I'm still not rendering correctly
     
    UK Steve and Scott Eric Catalano like this.
  16. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    Not the cache ..... opening indexDCC-2 from inside data and still get a bad site .....
     
    Scott Eric Catalano likes this.
  17. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    indexDCC-2 ??? I'm confused, do you have a copy of 'data' on the tablet?

    Or do you mean a new instance on tablet? in which case I would install an up to date copy of Chrome and not try to use any stock browser that shipped with the device.
     
    Scott Eric Catalano likes this.
  18. esfeld

    esfeld TrainBoard Member

    443
    382
    17
    new instance on tablet .... using new Chrome ......will start from scratch and transfer data folder anew
     
    Scott Eric Catalano and UK Steve like this.
  19. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    The single throttle slider design (again 10 loco's) will incorporate my snappy new 'speedo' that I designed with another brilliant open source CSS file.

    Work in progress.

    CaptureP.JPG

    And there's nothing to stop you hosting both on the ESP or running them side by side !
     
    Last edited: May 4, 2016
    KC Smith and Scott Eric Catalano like this.
  20. UK Steve

    UK Steve TrainBoard Member

    453
    683
    12
    Here is your new page code,

    I think you will solve the Connect button issue without further modification.
     

    Attached Files:

    Scott Eric Catalano likes this.

Share This Page