I noticed that the Espruino Hub software is installed without SSL certificate.
Thus it is unable to connect via Bluetooth.
Any instructions available to add https?
Hi - you shouldn't need this if EspruinoHub is working correctly. If you just want to use Web Bluetooth use espruino.com/ide
What happens is EspruinoHub serves up a page which creates a WebSocket connection back to EspruinoHub. Then EspruinoHub handles the bluetooth connection (which it doesn't need SSL for)
Yes but that was my point, you should mention that in the manual that without SSL is not going to allow.
Yes of course I can use the public web version which has SSL.
I'm not sure where in the manual you mean but if you want to do a PR for the extra docs I'll happily merge.
I'm still not sure why you'd want to use Web Bluetooth when the whole point of using EspruinoHub is to use the bluetooth that it provides though?
I think we are missing each other, yes exactly I want to use the EspruinoHub installed on my Raspberry so that I can connect remotely from my laptop (which is far away from the BLE sensors) to the ide and then program the sensors via the WebBluetooth option.
Yes I could do the same thing via SSH into the box and run the commandline but this is not always possible because of firewalls and other controls.
I seem to recall that not having SSL enabled on webpages doesn't allow the WebBluetooth dialog to be available?
Ahh, I think I see what you're getting at.
"Web Bluetooth" is the thing that allows the Web Browser to use your PC's Bluetooth connection. And yes, you need HTTPS for that.
But that's not what we're using to allow you to access Bluetooth sensors from far away.
Instead, EspruinoHub uses a WebSocket connection from the page that hosts the IDE back to EspruinoHub, and the bluetooth connection goes through that. Web Bluetooth is not needed.
Maybe you could check http://yourhost:1888/status and see if any devices have been found there?
If they have, when you open the http://yourhost:1888/ide and click the connect button (you may have to wait a few seconds) the bluetooth devices in range that Espruino recognises should just appear, as in the picture below:
You could always check the Chrome Debug console to see if anything looks amiss
It seems to have crashed today let me investigate...
It seems to be happened at midnight.
EspruinoHub.service - EspruinoHub BLE -> MQTT bridge
Loaded: loaded (/etc/systemd/system/EspruinoHub.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-02-18 01:33:55 GMT; 5 days ago
Process: 25723 ExecStart=/home/pi/EspruinoHub/start.sh (code=exited, status=1/FAILURE)
Main PID: 25723 (code=exited, status=1/FAILURE)
Feb 18 01:33:55 pihome systemd: EspruinoHub.service: Scheduled restart job, restart counter is at 5.
Feb 18 01:33:55 pihome systemd: Stopped EspruinoHub BLE -> MQTT bridge.
Feb 18 01:33:55 pihome systemd: EspruinoHub.service: Start request repeated too quickly.
Feb 18 01:33:55 pihome systemd: EspruinoHub.service: Failed with result 'exit-code'.
Feb 18 01:33:55 pihome systemd: Failed to start EspruinoHub BLE -> MQTT bridge.
It seems to be constantly failing even when restarting this is weird ...
I know EspruinoHub does attempt to restart if it can't detect any Bluetooth LE devices in range because it thinks something might be broken - could that be it?
There are like 20 devices in range, I can't really understand what is the problem.
I will probably reinstall everything again.
I have wrote my own docker compose file now which works quite well, but one question about the config.json:
if I have an open MQTT broker, do I just omit the username and password fields?
I seem to have solved my problems, here's the docker file:
I need to find the folder where to store the Espruino web pages.
Great, glad it's working for you! I think you can just leave mqtt_options commented with "//mqtt_options" and it should be fine if there is no password
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem