Git Product home page Git Product logo

Comments (6)

shmuelzon avatar shmuelzon commented on July 28, 2024

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.

r00li avatar r00li commented on July 28, 2024

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.

mehmetaydogduu avatar mehmetaydogduu commented on July 28, 2024

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.

shmuelzon avatar shmuelzon commented on July 28, 2024

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.

mehmetaydogduu avatar mehmetaydogduu commented on July 28, 2024

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.

shmuelzon avatar shmuelzon commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.