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 request: Add support for configuring MQTT #101

Closed
frenck opened this issue May 23, 2018 · 7 comments
Closed

Feature request: Add support for configuring MQTT #101

frenck opened this issue May 23, 2018 · 7 comments

Comments

@frenck
Copy link
Collaborator

frenck commented May 23, 2018

Problem/Motivation

MQTT is arguably the most used setting/configuration option of the Sonoff devices. Unfortunately, this setting is not manageable using SonWEB.

Expected behavior

I'd expected to be able to change the MQTT settings of a device when editing its configuration from within SonWEB.

Actual behavior

I need to go into a device to configure MQTT.

Proposed changes

  • Add the possibility of editing the MQTT settings of a device.
  • Maybe even the possibility to "copy" setting from another device.
@RaymondMouthaan
Copy link
Contributor

I think this can be combined with #100. When #100 is implemented all commands supported by Tasmota could be executed including changing MQTT settings.

@frenck
Copy link
Collaborator Author

frenck commented May 23, 2018

@RaymondMouthaan #100 simply implements console command, which is nice...
Nevertheless, I'm requesting a specific UI.

@digiblur
Copy link

I also agree with this enhancement. Also include the "MQTT enable" checkbox on the "configure other" module. I don't normally change the last option "Full Topic" and bet many don't change it either but I'm sure you'll find that one user.

@reloxx13
Copy link
Collaborator

nuff for today 👍

grafik

@ascillato
Copy link
Collaborator

Great!!!! 👍

@frenck
Copy link
Collaborator Author

frenck commented Jun 24, 2018

bitmoji

reloxx13 added a commit that referenced this issue Jun 24, 2018
  - ENHANCEMENT: Only changed config values will be send to the device
@reloxx13
Copy link
Collaborator

reloxx13 commented Jun 24, 2018

done

release is build now.
docker down -_- docker/hub-feedback#1547

Please provide feedback if sth is not working, i dont use mqtt and just made it blind with a test device and enabled but not connected mqtt.

would be also nice if some of you could look over the mqtt config translations for a better description.

TAB_HL_MQTT = "MQTT"
MQTT_ENABLED = "Enable MQTT"
MQTT_HOST = "MQTT Host"
MQTT_HOST_HELP = "Set MQTT host (max. 32 chars)"
MQTT_PORT = "MQTT Port"
MQTT_PORT_HELP = "MQTT port between (min. 2, max. 32766)"
MQTT_CLIENT = "MQTT Client Name"
MQTT_CLIENT_HELP = "MQTT Name of the Device (max. 32 chars)"
MQTTFINGERPRINT = "MQTT Fingerprint (TLS only!)"
MQTTFINGERPRINT_HELP = "TLS fingerprint as 20 space separated bytes (max. 59 chars)"
MQTT_USER = "MQTT Login Username"
MQTT_USER_HELP = "(max. 32 chars, 0 = disable Username)"
MQTT_PASSWORD = "MQTT Login Password"
MQTT_PASSWORD_HELP = "(max. 32 chars, 0 = disable Password)"
TOPIC = "MQTT Topic"
TOPIC_HELP = "Set MQTT AND Button Topic! (max. 32 chars)"
FULLTOPIC = "MQTT FullTopic"
FULLTOPIC_HELP = "(max. 100 chars)"
GROUPTOPIC = "Group Topic"
GROUPTOPIC_HELP = "(max. 32 chars)"
BUTTONTOPIC = "Button Topic"
BUTTONTOPIC_HELP = "(0 = disable, 1 = same as topic, max. 32 chars)"
SWITCHTOPIC = "Switch Topic"
SWITCHTOPIC_HELP = "(0 = disable, 1 = same as topic, max. 32 chars)"
MQTTRETRY = "MQTT Retry Timer in seconds"
MQTTRETRY_HELP = "Set MQTT connection retry timer (10 to 32000)"
TELEPERIOD = "TelePeriod in seconds"
TELEPERIOD_HELP = "Telemetry Period messages send (10 to 32000, 0 = off)"
PREFIX1 = "Prefix 1: Command"
PREFIX1_HELP = "MQTT Command Prefix (max. 10 chars)"
PREFIX2 = "Prefix 2: State"
PREFIX2_HELP = "MQTT State Prefix (max. 10 chars)"
PREFIX3 = "Prefix 3: Telemetry"
PREFIX3_HELP = "MQTT Telemetry Prefix (max. 10 chars)"
STATUSTEXT1 = "State Text: Off"
STATUSTEXT1_HELP = "(max. 10 chars)"
STATUSTEXT2 = "State Text: On"
STATUSTEXT2_HELP = "(max. 10 chars)"
STATUSTEXT3 = "State Text: Toggle"
STATUSTEXT3_HELP = "(max. 10 chars)"
STATUSTEXT4 = "State Text: Hold"
STATUSTEXT4_HELP = "(max. 10 chars)"
BUTTONRETAIN = "Retain: Button"
BUTTONRETAIN_HELP = ""
POWERRETAIN = "Retain: Power"
POWERRETAIN_HELP = ""
SENSORRETAIN = "Retain: Sensor"
SENSORRETAIN_HELP = ""
SETOPTION2 = "SetOption2: Units"
SETOPTION2_HELP = "Add units to messages"
SETOPTION4 = "SetOption4: MQTT response state as"
SETOPTION4_HELP = "( Off = RESULT Topic, On = Command Topic)"
SETOPTION10 = "SetOption10: LWT action when changing topic"
SETOPTION10_HELP = "( Off = Drop, On = Offline)"

@reloxx13 reloxx13 added the DONE label Sep 4, 2018
@reloxx13 reloxx13 closed this as completed Sep 4, 2018
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Oct 14, 2020
  - ENHANCEMENT: Only changed config values will be send to the device
inverse pushed a commit to inverse/TasmoAdmin that referenced this issue Apr 11, 2022
  - ENHANCEMENT: Only changed config values will be send to the device


Former-commit-id: ad543aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants