# HTTPS: Secure Websockets only

**URL:** <https://forum.line-us.com/t/https-secure-websockets-only/586>\
**Category:** Programming and API\
**Created:** [August 3, 2020, 7:40am UTC](https://forum.line-us.com/t/https-secure-websockets-only/586 "2020-08-03T07:40:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emnullfuenf](https://forum.line-us.com/letter_avatar_proxy/v4/letter/e/73ab20/32.png) [@emnullfuenf](https://forum.line-us.com/u/emnullfuenf)\
**Post date:** [August 3, 2020, 7:40am UTC](https://forum.line-us.com/t/https-secure-websockets-only/586/1 "2020-08-03T07:40:51Z")

</div>

I using [Javascript Library by Beardicus](https://github.com/Line-us/Line-us-Programming/blob/master/README.md#javascript-library-by-beardicus) and trying to establish a connection within Chrome to Line-us from the p5js editor via https. Unfortunately i can’t connect via ws://. Only via wss:// which isn’t supported by the plotter.

`Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.`

Is there a solution using the websocket connection from a https connection?

---

<div class="post-metadata">

**Author:** ![rob](https://forum.line-us.com/user_avatar/forum.line-us.com/rob/32/8_2.png) [@rob](https://forum.line-us.com/u/rob)\
**Post date:** [August 3, 2020, 5:10pm UTC](https://forum.line-us.com/t/https-secure-websockets-only/586/2 "2020-08-03T17:10:36Z")

</div>

We have something in very early test that you’re welcome to try. You’ll need beta firmware and it uses a test back-end but it will allow wss connection to your Line-us. We did look at wss directly to Line-us but the processor isn’t up to the job and anyway there would be cert issues so we’ve implemented a server relay. This means that you can access your Line-us from anywhere on the internet if you want to as well.

The way it works (and as I say, it’s early test so this may change) is that there’s a gcode to create a machine key. You need to be directly connected via a regular TCP socket to do this; telnet is the easiest way. Then you connect your app to a a secure web socket URL on our server that includes the key and if the Line-us is on and also connected it will look to the app as if it’s talking to a local Line-us.

If you (or anyone else) would like to give it a try DM me your Line-us serial number and I’ll configure you for the beta firmware and let you know a bit more detail on the key etc.

---

<div class="post-metadata">

**Author:** ![emnullfuenf](https://forum.line-us.com/letter_avatar_proxy/v4/letter/e/73ab20/32.png) [@emnullfuenf](https://forum.line-us.com/u/emnullfuenf)\
**Post date:** [August 3, 2020, 5:44pm UTC](https://forum.line-us.com/t/https-secure-websockets-only/586/3 "2020-08-03T17:44:06Z")

</div>

Sounds great. I’ll connect my plotter tomorrow and will send you the serial. My p5js library is also in early stages. I would like to have it running in October.

I am currently writing a library that logs the drawing commands to a canvas element and converts it to gcode for plotters. That might be a solution for simpler drawing of SVGs, too.
