Comments (6)
Hey,
I agree that would be a nice feature. The backend could be a rather simple REST API to just GET and PUT the configuration file. Next step would be exposing the BLE database with a GET and have the UI do the heavy lifting.
A few points worth noting though:
- It would still require (for now) a reboot after the configuration changes
- There are also certificates included as a part of the configuration settings that aren't in the JSON file
- In my mind, you'll have several of these devices to overcome the short range of BLE and I think the configuration should be synced with all of them
- Editing one device manually might cause some inconsistencies
- After changing a setting, you would need to download the new configuration file and still upload it to all the other devices
Let me know what you think
from esp32-ble2mqtt.
I think that's a good way to start yes.
Well rebooting after configuration change shouldn't be an issue at all.
For certificates... I am not sure (haven't used SSL yet), but one idea is to just add a text area where you can paste the content of a certificate... That's something that is often used on some routers for example.
An interface offered by the above mentioned sonoff tasmota firmware should be a good example (since it's running on an ESP8266). There you can download the whole config as a file and upload it to the new module, and then just change the stuff that you need). It doesn't have to be any more complicated than that. Although tasmota doesn't actually dump the config file, it dumps the memory instead.
One other thing that tasmota offers is that they offer pre-built binaries that you can just upload to the esp module. The module then sets up a wifi access point where you can connect and set up your wifi details, hit save and then it reboots and connects to your wifi. That's a more advanced feature, but one that would ultimately be really friendly for someone who just wants an easy to use solution. A more easy to implement solution would be to enter those details via serial for example. But none of that is probably something for the first version.
from esp32-ble2mqtt.
Why ssl certs is a problem? Is file uploading difficult? Look here: https://github.com/G6EJD/ESP32-8266-FIle-Upload
For web interface using old way static pages and static forms or rest api is not good at all. Using graphql and any client side javascript framework is more more convenient, but there is no cpp graphql server.
Also I think having autoconnect is comfortable. https://hieromon.github.io/AutoConnect/
from esp32-ble2mqtt.
Hey @cooldesigns,
Certificates aren’t a problem, I just mentioned that they are an additional file an not a part of the configuration file (config.json).
I think GraphQL is quite an overkill for this use case. I believe that simple REST APIs and static pages (that include a client side, JS, app using Angular or whatever) would be the simplest to implement and would not use up a lot of CPU time.
Autoconnect is an Arduino library so it won’t help much here. The are alternatives in ESP-IDF but the main problem is that I don’t have time to implement it.
from esp32-ble2mqtt.
I can give time for this if you orchestra the tasks. Note: I have web application development skill, I haven't writing c++ project skill.
from esp32-ble2mqtt.
Well, it's been a year but I finally got around to adding a web server.
Basically, anything under the www
folder will be served as is and the backend should be implemented in main/httpd.c
. Currently only routes for uploading firmware images (build/ble2mqtt.bin
) and file-system images (build/fs_0.bin
) are supported.
More can be added as needed.
I would be very beneficial to support uploading only the configuration file and/or manage certificates so one can make modifications without needing to install/compile this project at all.
from esp32-ble2mqtt.
Related Issues (20)
- Rate limit possible? HOT 3
- Issue trying to write characteristic to ThermoPro TP-25 HOT 8
- Unable to build HOT 6
- Switchbot meter broadcasters HOT 15
- What's the connection flow and how to control it? HOT 2
- /get and /set issues HOT 4
- How to set config.json can receive the encrypted broadcast advertise raw data? HOT 1
- Help needed: Vogel MotionMount not showing HOT 7
- Issuing commands to Opal Ice Maker HOT 3
- Connecting to a custom device is causing stack overflow crash HOT 5
- Setting values is not consitant HOT 10
- Maintain BLE connection on WiFi disconnect HOT 5
- Support repeating UUIDs HOT 7
- Ask for custom code/job HOT 1
- ESP32s3 HOT 5
- Configure Scanning? HOT 3
- BLE Advertisment publishing? HOT 3
- bug in ble2mqtt_task() function HOT 1
- How to Pair? HOT 1
- BLE Scan / certain broadcasters crash device HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-ble2mqtt.