Giter Site home page Giter Site logo

Comments (17)

wijnen avatar wijnen commented on July 26, 2024

Hi Nick,

you are in the right place. I would need a little more information to help you. Your own simple program drives the gpio pins directly? What configuration did you use? If you know Python, you may check how the server differs from your own program.

A final note: I've noticed that not all browsers support websockets (or at least not the way I implemented them). You may want to try a different browser to see if that helps.

If you can't figure it out, can you post a screenshot of the website?

Thanks,
Bas

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

Hi Bas,

My program currently does basically the same process as the move method in pump-server, except that it simply uses time.sleep(0.002) instead of your busy wait method. It also just loops through 500 times instead of a calculated number of times.

I added a couple text print lines to the javascript file and the python file and the javascript text outputs while the python one does not. I'm not an expert in python so it might be that I did the text output wrong, but I hope that information helps.

I'm currently using chrome for my web browser. I tried Safari but it gave me a lost connection to the server error. I can install another or try a different OS if you think it would help.

This is what I'm seeing for the website:
Here's a picture of the website I'm seeing.

Thanks for your help,
Nick.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

On Wed, Jul 01, 2015 at 09:47:56AM -0700, NickRothbacher wrote:

This is what I'm seeing for the website:

Yes, that is a failed websocket connection. The '-' on the first 3 lines
should be numbers instead. Can you try connecting with Firefox? That's what I
use for testing.

You can also add "tls = False" as an argument to the Server constructor at the
end of pump-server. If you do that, you must use http:// instead of https://.

Thanks,
Bas

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

I tried connecting in Firefox and I'm getting a connection time out now.

Thanks,
Nick.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

On Thu, Jul 02, 2015 at 10:50:09AM -0700, NickRothbacher wrote:

I tried connecting in Firefox and I'm getting a connection time out now.

Can you explain in detail what you're doing, and what you see at every step?
Copying all text in the terminal window would be helpful.

Thanks,
Bas

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

The steps I take:

  • plug in the power connection to the Rapsberry and the pump driver.

  • wait for the raspberry to load I get the message:

    [ok] Starting Server for Open Source Syring Pump: pump-server

  • Connect to the webpage "https://raspberryIP:8080" on firefox.

I'm actually receiving a new error I haven't gotten before, an "unable to connect". Then, when I try

sudo service pump-server restart

I get the warning "failed to kill 1874: no such process" (with a different process number each time) and a failed! message.

Thanks,
Nick.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

Ok so I can connect to the server in Firefox, but when I do the Raspberry displays the message:

Error reading from socket: [Errno 1] _ssl.c:1415" error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca

then the message

not serving unknown extension ico

I hope that helps.

Thanks,
Nick.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

Yes, it is not working. I installed firebug and the only error I am getting is "uncaught exception: out of memory". Is there some way to increase the memory allocated to the server?

Thanks,
Nick,

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

I'm seeing a warning about the certificate being insecure a lot, but no other errors are showing up in the web console. Anywhere else I should look?

Thanks,
Nick.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

Hi,

I have finally gotten around to installing this on a Pi again here to see if it worked. Because of other recent changes, I had to change it to Python3. Anyway, perhaps some other fix I made in the mean time helped, but in any case it works here. Can you confirm that if you run apt-get clean; apt-get update; apt-get upgrade; apt-get install --reinstall pump-server that it works for you as well? (You need to reinstall because I'm bad with version numbers, so it may not detect that the version you have is old; if the upgrade installs new version of pump-server, you don't need to reinstall it.)

from linear-actuator.

NickRothbacher avatar NickRothbacher commented on July 26, 2024

Hi Bas,

Thank you for all your help but I am unfortunately no longer working with the system we discussed this summer. I also did end up writing my own control program since the project I was working on was hoping to use more real time control methods than the ones afforded by a web based interface. I apologize for not letting you know but I completely forgot about this issue thread. I will close it now since it seems like its working on your end.

Thanks again for everything,
Nick

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

Ok, thanks. I'm mostly using an Arduino myself as well, which is why it took me so long to respond. But I like to keep this working for people who want a simpler solution with less hardware.

from linear-actuator.

JeroenVanStappen avatar JeroenVanStappen commented on July 26, 2024

Dear Bas,

I have a similar problem as Nick had. I was using chrome as well, but on firefox I have similar issues. Just like Nick, I am able to connect to the server, but on the webpage, the server also has "-" instead of numbers. I have looked up the web console on firefox and it gives following error:
"Rpc is not defined".
Also, this is one of the errors which I get on the Terminal (rpc.js not found).

Do you happen to know how to solve this.

Thanks in advance... I would be thrilled if I get the stepper motor to work.

Best regards,
Jeroen.

from linear-actuator.

wijnen avatar wijnen commented on July 26, 2024

Hi again,

Sorry for leaving this open for so long. Thanks for the error message. The problem is that you need to copy rpc.js from the python-websocketd package into the directory with the server program.

I hope that helps.

Thanks,
Bas

from linear-actuator.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.