Using node, I can connect to a phidget web server running on a raspberry pi from my laptop using this address: phid://raspberry.pi/5661.

However, when I try to connect using javascript using that address, I get an error that says "failed to connect to server".I also tried ws://raspberrypi.local/phidgets, and I get an error: "Socket error (server unavailable)"

The Phidget control panel application does find the server and accesses the controllers on it. It just seems to be in javascript running in a web page that it can't find it.

The api documentation for javascript doesn't indicate how to open a remote server. So I am stumped. Is this even possible?

You are saying "Using node" - do you mean NodeJS? It IS JavaScript.You are saying "However... try to connect using javascript" - what do you mean? is it JavaScript on web page?From my experience using Phidgets JavaScript implementation, it is still in alfa or beta. When you use an example from Phidget API documentation, you will not get error message on server failure because of improper implementation of promise by Phidgets JavaScript API. (The promise is not rejected)Sorry, I am not helpful, maybe try to use IP address instead of raspberry.piUse nmap utility to find IPs on your subnet, example:

Yes, I mean javascript on the web page. NodeJS/Javascript running by itself does connect, but Javascript in the browser doesn't. Yes, I have tried the IP address.

mariusz7 wrote:You are saying "Using node" - do you mean NodeJS? It IS JavaScript.You are saying "However... try to connect using javascript" - what do you mean? is it JavaScript on web page?From my experience using Phidgets JavaScript implementation, it is still in alfa or beta. When you use an example from Phidget API documentation, you will not get error message on server failure because of improper implementation of promise by Phidgets JavaScript API. (The promise is not rejected)Sorry, I am not helpful, maybe try to use IP address instead of raspberry.piUse nmap utility to find IPs on your subnet, example: