This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.
If you only have Tasmotas speaking MQTT protocol go for ioBroker.sonoff
.
For other scenarios, consider the different options:
Feature | ioBroker.sonoff | ioBroker.mqtt (in broker mode) | ioBroker.mqtt (in client mode) | ioBroker.mqtt-client |
---|---|---|---|---|
Has a built-in MQTT broker | yes | yes | no | no |
Relays messages to other MQTT subscribers | NO!!! | yes | not applicable | not applicable |
External MQTT broker | unsupported | unsupported | required | required |
Tasmota MQTT messages to ioBroker Objects | smart processing | 1:1 processing of all messages | 1:1 processing of subscribed messages | 1:1 processing of subscribed messages |
non-Tasmota MQTT messages to ioBroker Objects | no processing | 1:1 processing of all messages | 1:1 processing of subscribed messages | 1:1 processing of subscribed messages |
publish ioBroker values as MQTT messages | none | configured subtrees | configured subtrees | individually configured values |
This adapter communicates with Sonoff devices with Tasmota firmware or ESP devices via MQTT.
The following topics are expected:
tele/DeviceNAME/STATE
tele/DeviceNAME/SENSOR
tele/DeviceNAME/INFOx
tele/DeviceNAME/ENERGY
cmnd/DeviceNAME/POWERx
stat/DeviceNAME/POWERx
/DeviceNAME/BM280/Temperature
/DeviceNAME/BM280/Humidity
/DeviceNAME/BM280/Temperatur
/DeviceNAME/BM280/Feuchtigkeit
/DeviceNAME/BM280/Vcc
/DeviceNAME/BM280/VCC
/DeviceNAME/BM280/Laufzeit
/DeviceNAME/BM280/RSSI
/DeviceNAME/BM280/POWER
/DeviceNAME/BM280/POWER1
/DeviceNAME/BM280/POWER2
/DeviceNAME/BM280/POWER3
/DeviceNAME/BM280/POWER4
/DeviceNAME/BM280/Switch1
/DeviceNAME/BM280/Switch2
/DeviceNAME/BM280/Total
/DeviceNAME/BM280/Today
/DeviceNAME/BM280/heute
/DeviceNAME/BM280/Yesterday
/DeviceNAME/BM280/gestern
/DeviceNAME/BM280/Faktor
/DeviceNAME/BM280/Factor
/DeviceNAME/BM280/Power
/DeviceNAME/BM280/Leistung
/DeviceNAME/BM280/Voltage
/DeviceNAME/BM280/Spannung
/DeviceNAME/BM280/Current
/DeviceNAME/BM280/Strom
/DeviceNAME/BM280/Punkt
/DeviceNAME/BM280/Counter1
/DeviceNAME/BM280/Counter2
/DeviceNAME/BM280/Counter3
/DeviceNAME/BM280/Counter4
/DeviceNAME/BM280/Pressure
/DeviceNAME/BM280/SeaPressure
/DeviceNAME/BM280/Druck
/DeviceNAME/BM280/Approx. Altitude
/DeviceNAME/BM280/Module
/DeviceNAME/BM280/Version
/DeviceNAME/BM280/Hostname
/DeviceNAME/BM280/IPAddress
/DeviceNAME/BM280/IPaddress
/DeviceNAME/BM280/RestartReason
/DeviceNAME/BM280/CarbonDioxide
/DeviceNAME/DHT11/Illuminance
/DeviceNAME/SonoffSC/Light
/DeviceNAME/SonoffSC/Noise
/DeviceNAME/SonoffSC/AirQuality
/DeviceNAME/SDS0X1/PM2.5
/DeviceNAME/SDS0X1/PM10
/DeviceNAME/SDS0X1/UvLevel
/DeviceNAME/SDS0X1/Latitude
/DeviceNAME/SDS0X1/Longitude
/DeviceNAME/SR04/Distance
Note: The list could be easily extended. Please send Pull Requests
or debug data for unknown states to the developer (via issue).
In the web config, you can determine which MQTT telegrams create the new objects not in default data points:
TELE_SENSOR
- creates objects from tele/xxx/SENSOR
telegramsTELE_STATE
- creates objects from tele/xxx/STATE
telegramsSTAT_RESULT
- creates objects from stat/xxx/RESULT
telegramsUsually TELE_SENSOR should be sufficient for most users.
Create object tree
creates objects as tree structureWarning! This option will mess up your sonoff object tree! You have to redo all the settings for storage... Store the object structure as JSON file, so you can recreate your old structure. Best is to stop the adapter, delete all objects under sonoff and start the adapter again.
The mode states will be created only if the device has one of the states:
Red
, Green
, Blue
, WW
, CW
, Color
, RGB_POWER
, WW_POWER
, CW_POWER
, Hue
, Saturation
States:
modeLedExor
- exor for white LEDs and color LEDs => if the white LEDs are switched on, color LEDs are switched off and vice versa (default true)modeReadColors
- allow for color read from MQTT (default false).STATE.POWER
update{POWERn: "true"}
{temp: nan}
The MIT License (MIT)
Copyright (c) 2017-2024, bluefox dogafox@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.