Skip to content

Feature/settings update#340

Open
enjuthulung wants to merge 1 commit intomasterfrom
feature/settings-update
Open

Feature/settings update#340
enjuthulung wants to merge 1 commit intomasterfrom
feature/settings-update

Conversation

@enjuthulung
Copy link
Copy Markdown
Collaborator

@enjuthulung enjuthulung commented May 9, 2021

Resolves: #326

Summary:

  • Added endpoint for influx, postgres and mqtt settings.
    • GET, PATCH /api/settings/influx
      {
          "host": "0.0.0.0",
          "port": 8086,
          "database": "db",
          "username": "username",
          "password": "password",
          "ssl": false,
          "verify_ssl": false,
          "timeout": 5,
          "retries": 3,
          "timer": 1,
          "path": "",
          "measurement": "pt",
          "attempt_reconnect_secs": 5
      }
      
    • GET, PATCH /api/settings/postgres
      {
         "host": "0.0.0.0",
         "port": 5432,
         "dbname": "db",
         "user": "user1",
         "password": "root",
         "ssl_mode": "allow",
         "connect_timeout": 5,
         "timer": 1,
         "table_prefix": "tbl",
         "attempt_reconnect_secs": 5
      }
      
    • GET, POST /api/settings/mqtt
    • PATCH, DELETE /api/settings/mqtt/uuid/<string:uuid>
      {
          "enabled": true,
          "name": "rubix-points",
          "host": "0.0.0.0",
          "port": 1883,
          "authentication": true,
          "username": "user1",
          "password": "root",
          "keepalive": 60,
          "qos": 1,
          "attempt_reconnect_on_unavailable": true,
          "attempt_reconnect_secs": 5,
          "timeout": 10,
          "retain_clear_interval": 10,
          "publish_value": true,
          "topic": "rubix/points/value",
          "listen": true,
          "listen_topic": "rubix/points/listen",
          "publish_debug": false,
          "debug_topic": "rubix/points/debug"
      }
      
    • GET, PATCH /api/settings/drivers
      {
          "generic": true,
          "modbus_rtu": true,
          "modbus_tcp": true
      }
      
    • GET, PATCH /api/settings/services
      {
          "mqtt": true,
          "histories": true,
          "cleaner": true,
          "history_sync_influxdb": true,
          "historieshistory_sync_postgres: true,
      }
      
  • Currently Influx, Postgres and Mqtt POST supports auto restart.

@enjuthulung enjuthulung added the WIP Work in progress label May 9, 2021
@enjuthulung enjuthulung requested a review from RaiBnod May 9, 2021 12:16
@NubeDev
Copy link
Copy Markdown
Contributor

NubeDev commented May 9, 2021

@enjuthulung
Please also let the user edit drivers and services

  "drivers": {
    "generic": true,
    "modbus_rtu": true,
    "modbus_tcp": false
  },
  "services": {
    "mqtt": true,
    "histories": true,
    "cleaner": true,
    "history_sync_influxdb": false,
    "history_sync_postgres": true
  }
``

@enjuthulung enjuthulung force-pushed the feature/settings-update branch from ab140a9 to 523a507 Compare May 28, 2021 13:27
@RaiBnod RaiBnod added blocked and removed WIP Work in progress labels Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make end point to CRUD details

3 participants