[Pianod] WSGW

Perette Barella perette at barella.org
Thu Aug 8 19:21:43 PDT 2013


Hi David,

First, verify pianod is working as expected.  You can use telnet or nc to connect:
$ telnet house 4445
Trying 10.69.69.1...
Connected to house.localnet.
Escape character is '^]'.
200 Connected
100 pianod 149. Welcome!
141 Volume: 0
109 SelectedStation: auto QuickMix
103 Stopped

The parameters are the hostname (or IP) and port where pianod is running.
* If you get connection refused here, then either pianod isn't running or you've got the wrong host/port names.
* If the hostname is wrong, you'll an error like: nodename nor servname provided, or not known



Once you're able to connect, you should be able to authenticate as the admin user.  In the telnet or nc session:
user admin admin
132 admin signed in
200 Success
136 Privileges: admin owner service influence tuner present

* If you get 406 Invalid login or password, the admin user doesn't exist.  Since you're just setting up, you could:
	$ rm ~/.config/pianod/passwd
	This will remove existing users and their preferences, and the admin user will be recreated.
	You'll need to restart pianod after removing the file.
	BSD $ killall -9 pianod
	or
	Linux $ pkill -9 pianod



But assuming the admin login is okay, then pianod seems ready.  Move on to wsgw:
$ telnet house 8000
Trying 10.69.69.1...
Connected to house.localnet.
Escape character is '^]'.
GET /foo HTTP/1.1
[enter a blank line]
HTTP/1.1 403 Forbidden

Connection closed by foreign host.

The parameters are the hostname (or IP) and port where wsgw is running.
* If you get connection refused here, then wsgw isn't running or you've got the wrong host/port names.
* If the hostname is wrong, you'll an error like: nodename nor servname provided, or not known



Next make sure wsgw is properly configured to connect to pianod.  Using http://www.websocket.org/echo.html
In location, enter the URL: ws://house:8000/pianod
Substitute your pianod hostname or IP and port number.  When you click "Connect", the log window should report:
> CONNECTED
> RESPONSE: 200 Connected
> RESPONSE: 100 pianod 149. Welcome!
> RESPONSE: 141 Volume: 0
> RESPONSE: 109 SelectedStation: auto QuickMix
> RESPONSE: 103 Stopped

If you get ERROR: undefined; DISCONNECTED:
* Check you entered the URL correctly.
* Check you are using at least Safari 6, Firefox 17, a non-ancient Chrome or another browser with proper WebSocket support.
* Check that you configured pianod service correctly (including hostnames and port names) on the wsgw command line.

In Message, enter user admin admin and click "Send".  The log window should report:
> SENT: user perette music4me
> RESPONSE: 132 perette signed in
> RESPONSE: 200 Success
> RESPONSE: 136 Privileges: admin owner service influence tuner present

If this works, then wsgw is up, pianod is correctly registered with wsgw, and your browser has a proper WebSocket implementation.  Move to the client.
* Check that you're using the correct hostname and port number in the 'Server' field.


If you're still having trouble after all that, or encounter trouble or weirdness along the way, let us know.  I'll turn this into some troubleshooting documentation in the Wiki when I get a chance.

Perette





On 2013年08月08日, at 16:39, David Williams wrote:

> Hello,
> 
> I am knew at this and i have installed pianod and wsgw. I can run pianod at admin dont understand how to create a user. When i go to http://deviousfish.com/pianod/Client/index.html i have tried using the guest account and tried using admin since that is what pianod starts as. I am unable to get in say connecting refused. I have tried it on multiple computers and they all give the same response. Can someone explain how to create a user so i can get wsgw to work.
> 
> Thanks
> _______________________________________________
> Pianod mailing list
> Pianod at lists.deviousfish.com
> http://lists.deviousfish.com/listinfo.cgi/pianod-deviousfish.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/attachments/20130808/36e86aad/attachment-0003.htm>


More information about the Pianod mailing list