Securifi Community Forum

Securifi Products => Almond+ => Topic started by: cswilly on December 15, 2015, 01:51:20 pm

Title: R83 Websocket Server Documentation
Post by: cswilly on December 15, 2015, 01:51:20 pm
The blog mentioned "New Websocket Server added."

Where can I find documentation on the New Websocket Server?
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on December 15, 2015, 02:04:51 pm
The blog mentioned "New Websocket Server added."

Where can I find documentation on the New Websocket Server?

Blog Post
https://blog.securifi.com/firmware-r083-released

R83 Announcement thread
https://forum.securifi.com/index.php/topic,3898.0.html


The Web Socket Server is mentioned in the Blog post and in the R83 release thread but I don't think anyone else has posted this question yet about R83, though many have been asking about the API for some time.  A little "sniffing" will yield some interesting info but best to get the official word.

We are waiting on the API documentation right now, it is supposed to be released after the rollout of R83. Perhaps Ashok will chime in with details. 8)
Title: Re: R83 Websocket Server Documentation
Post by: Ashok on December 15, 2015, 03:23:08 pm
Yes, we are working on it as we speak and once it is ready, would be happy to update it.
Title: Re: R83 Websocket Server Documentation
Post by: cswilly on December 16, 2015, 07:02:32 am
@SecureComp yes API doc.

@Ashok Yes please.
Title: Re: R83 Websocket Server Documentation
Post by: czyzczyz on December 27, 2015, 02:03:11 pm
Any updates on this?

Even a simple list of commands that it accepts?

Title: Re: R83 Websocket Server Documentation
Post by: Ashok on December 28, 2015, 08:12:09 am
@ czyzczyz,

We are still working on it and as per the update I got, it won't be taking much time now.
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on December 28, 2015, 03:23:06 pm
@ czyzczyz,

We are still working on it and as per the update I got, it won't be taking much time now.

Very Good news!  8)

It will be Excellent news when it is released.  ;D
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on January 06, 2016, 12:06:48 am
The documentation is now available.

https://forum.securifi.com/index.php/topic,3965.0.html
Title: Re: R83 Websocket Server Documentation
Post by: czyzczyz on January 31, 2016, 04:44:48 pm
Fantastic.

I'm working my way towards understanding how to use it. I've hit a wall and posted a question to stack exchange, but will hopefully figure this out.

http://stackoverflow.com/questions/35119833/is-it-possible-to-both-listen-and-send-messages-to-a-remote-socket-using-node-re
Title: Re: R83 Websocket Server Documentation
Post by: lrosenstein on February 01, 2016, 10:42:01 pm
I'm not familiar with node.js. I'm using Go with https://github.com/gorilla/websocket for the websocket API, and only one connection is necessary to both read and write.
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on February 02, 2016, 08:31:12 am
I am using a single socket as well.

There was an answer posted on Stack Exchange. Hope it helps.
Title: Re: R83 Websocket Server Documentation
Post by: lmmmmm on February 02, 2016, 03:09:29 pm
what's a good resource to read up on websockets.
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on February 02, 2016, 04:03:07 pm
what's a good resource to read up on websockets.

http://www.tutorialspoint.com/html5/html5_websocket.htm

http://www.websocket.org/aboutwebsocket.html
Title: Re: R83 Websocket Server Documentation
Post by: fillibar on February 02, 2016, 04:47:25 pm
Anyone know of a websockets library or arduino-compatible code sample that can work without DNS? I have been trying to work with existing libraries but most want to go to yourdomain.com and port... Not 10.10.10.1 (or whatever the internal IP for the router may be). I COULD make it accessible on a domain... But since it is not WSS I worry about the security.
Title: Re: R83 Websocket Server Documentation
Post by: SecureComp on February 02, 2016, 06:46:44 pm
you should be able to you localhost or hard code something in /etc/hosts and use that
Title: Re: R83 Websocket Server Documentation
Post by: fillibar on February 02, 2016, 08:00:25 pm
Not sure I entirely understand, so...
Localhost (or 127.0.0.1) would only be useful if I was on the Almond+ itself. I am looking to have my Arduino (or Proton) connect to the Almond+ to give it some commands via the websocket. Arduinos do not have /etc/hosts functionality (that is linux-based) so I assume you mean to do something in the Almond+ for that... but I am not sure what as the Almond+ is not providing DNS resolution.

All the Arduino samples I see rely on DNS and I have tried a variety of Google searches to find an alternative. I even started trying to make my own Websocket version by upgrading the HTTP but do not have good examples for that process either. Would love to see how the Chrome Add-In is actually talking (what the HTTP commands look like so I could replicate them) but have not had a chance to stick a Wireshark into place to observe. I thought someone here might have a much quicker solution.