"Bridge" to the internet? #3915
Replies: 1 comment
-
Posted at 2021-10-17 by Robin Sun 2021.10.17 Hi @user135414 have you by chance read over this thread? Posted at 2021-10-17 by user135414 Hi @robin I had not in fact read that page and those referenced by that page. I have done so now - and will do so again in more detail, however, either I'm still misunderstanding something or I phrased my question poorly. I understand that I can host a page or pages on a website on a public url - but I need to access that page from a BT enabled device while I am in range of the puck for this to work. I'm trying to understand how I can get or send data to the puck from a url on the public web while I am not within BT range of the puck. i.e. it's truly remote (let's say the puck is at home, I am in the office and I want to know the temperature or light reading from the puck). The puck itself cannot connect to my home WiFi for example - so how do I "bridge" the connection so that my puck has internet access? Thanks a lot for your speedy response earlier - much appreciated. Cheers Posted at 2021-10-17 by Robin Sun 2021.10.17 Thank you @user135414 for clarifying:
Posted at 2021-10-18 by @gfwilliams Hi,
Realistically right now there's EspruinoHub which you mentioned. With that you can either:
There is however also https://blecon.net/ which does pretty much exactly what you want using an old phone as a bridge. I'm not 100% sure if it's freely available yet, but they do have a good Espruino implementation. Finally Robin mentioned Gadgetbridge, and while right now that doesn't support sending data to the internet, as part of the Bangle.js 2 kickstarter I will be adding that functionality, so hopefully by the end of the year you'll just be able to use Gadgetbridge. There are other options like using ESPHome or rolling your own, but maybe they're not quite as flexible Posted at 2021-10-18 by user135414 Hi Gordon Thanks to you (and Robin) for the responses. I appreciate all the feedback and the speed of reply. I'm looking forward to seeing the updated implementation of GadgetBridge to support sending the request(s) to the internet. Will this be limited to only working on the Bangle.js 2 or will the original Bangle.Js also be able to make use of this feature? Cheers PS: Blecon looks like a great alternative in the meantime, thanks for pointing me in their direction! Posted at 2021-10-19 by @gfwilliams
No - the idea is actually to ensure it works with all bluetooth Espruino devices :) Posted at 2021-11-18 by DanDyse @user135414 I have the puck in a public room downstairs. Since I cannot access it from the 3rd floor (out of bluetooth range) I have placed an old iPhone in a locked room close to the puck. This phone has access to wifi and internet. When I open my website with the phone, it connects through WebBLE to the puck (just like the electricity meter example). I have added some Javascript (infinite loop) to the website which calls an URL (XMLHttpRequest) once a day passing data from the Puck-object. This works quite well. However, if the connections is lost (for whatever reason), I'll have to walk downstairs, refresh the website to reconnect to the puck. Still have to see how often this will be the case. Posted at 2021-11-25 by @gfwilliams You might be able to make the website force a reconnect if the connection fails? Posted at 2021-11-25 by DanDyse Yeah, well, but it needs a human input to reconnect. Since I am not near the phone below and there is no way to remotely control an iPhone ... I'll have to walk downstairs. Posted at 2021-11-29 by @gfwilliams
You're using the Posted at 2021-12-01 by DanDyse Oh, really? Yes I am using this library. That would be quite an improvement! Unfortunately, I don't know how to do this ... Posted at 2021-12-30 by zx85 Hello :) I'm watching this with interest - I'm hoping to be able to get the Bangle.js I got for my birthday this year to do everything I've been able to do on the (sadly now ailing) Pebble Time it's intending to replace... being able to control home automation from my wrist via my mobile is a must for me. Cheers and happy 2022 :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-10-17 by user135414
Hi Folks
I know that the puck and Bangle (and others) can be accessed and programmed via BLE on a BLE capable device and that they don't have a WiFi stack. However I'm confused as to how I can "bridge" a connection so that a puck (for example) could report something from a sensor (such as light or temperature) to a website sitting on the public internet.
Or being able to call a url on the public internet (such as IFTT or Zapier) to trigger other workflows based on the puck's sensor data?
I get that I can host an Espruino Hub on a raspberry Pi 3 which would give me control in the sense that I have a web server running on my local network - but would I be able to forward/proxy an HTTP request to another domain (again on the public internet) or is there an easier, simpler method to accomplish this?
Appreciate any help or directions...
Cheers
Beta Was this translation helpful? Give feedback.
All reactions