Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/settings update #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

enjuthulung
Copy link
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
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
  }
``

@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