JakeBullet70 Well-Known Member Licensed User Longtime User Jun 18, 2022 #1 Doing a project to talk to Octoprint (RasPi 3d printer software) and all is going pretty good. Question on SockJS. How does one do this in B4J? I can do POST's and GET's and all is well but am clueless on SockJS There seems to be a client for javascript. OctoPrintClient — OctoPrint main documentation Anyway, just wonder if anyone could point me in a direction. FYI: I live in a city that is... Well the Internet is spotty at best (if it works at all) but that's another story for another place. Forgive me if it takes a while for me to reply.
Doing a project to talk to Octoprint (RasPi 3d printer software) and all is going pretty good. Question on SockJS. How does one do this in B4J? I can do POST's and GET's and all is well but am clueless on SockJS There seems to be a client for javascript. OctoPrintClient — OctoPrint main documentation Anyway, just wonder if anyone could point me in a direction. FYI: I live in a city that is... Well the Internet is spotty at best (if it works at all) but that's another story for another place. Forgive me if it takes a while for me to reply.
DonManfred Expert Licensed User Longtime User Jun 18, 2022 #2 JakeBullet70 said: Anyway, just wonder if anyone could point me in a direction. Click to expand... Octoprint has a REST-Api too. I would start using the REST-Api Upvote 0
JakeBullet70 said: Anyway, just wonder if anyone could point me in a direction. Click to expand... Octoprint has a REST-Api too. I would start using the REST-Api
M MathiasM Active Member Licensed User Jun 18, 2022 #3 Sockjs is just a websocket implementation. You can find more here: https://www.b4x.com/b4j/help/jwebsocketclient.html#websocketclient But as DonManfred says: Use REST-API. Will be a lot simpler. Upvote 0
Sockjs is just a websocket implementation. You can find more here: https://www.b4x.com/b4j/help/jwebsocketclient.html#websocketclient But as DonManfred says: Use REST-API. Will be a lot simpler.
JakeBullet70 Well-Known Member Licensed User Longtime User Jun 19, 2022 #4 I have the REST-API working fine. Just looking for something more efficient instead of polling Octoprint every second. Thanks guys. DonManfred said: Octoprint has a REST-Api too. I would start using the REST-Api Click to expand... I got the REST-API working. Looking for something more efficient. Upvote 0
I have the REST-API working fine. Just looking for something more efficient instead of polling Octoprint every second. Thanks guys. DonManfred said: Octoprint has a REST-Api too. I would start using the REST-Api Click to expand... I got the REST-API working. Looking for something more efficient.
JakeBullet70 Well-Known Member Licensed User Longtime User Jun 19, 2022 #5 MathiasM said: Sockjs is just a websocket implementation. You can find more here: https://www.b4x.com/b4j/help/jwebsocketclient.html#websocketclient But as DonManfred says: Use REST-API. Will be a lot simpler. Click to expand... websocket... Ahhhhh, I will give this a try. Its coming along!!!!! Upvote 0
MathiasM said: Sockjs is just a websocket implementation. You can find more here: https://www.b4x.com/b4j/help/jwebsocketclient.html#websocketclient But as DonManfred says: Use REST-API. Will be a lot simpler. Click to expand... websocket... Ahhhhh, I will give this a try. Its coming along!!!!!