Giter Club home page Giter Club logo

iobroker.sonoff's Introduction

Logo

ioBroker Sonoff

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

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.

Comparison of ioBroker adapters using MQTT protocol

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

Usage

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).

Auto-creation of objects

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 telegrams
  • TELE_STATE - creates objects from tele/xxx/STATE telegrams
  • STAT_RESULT - creates objects from stat/xxx/RESULT telegrams

Usually TELE_SENSOR should be sufficient for most users.

  • Create object tree creates objects as tree structure

Warning! 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.

Flags for LED controllers

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)

Changelog

3.0.3 (2023-09-25)

  • (bluefox/Bettman66) Added migration of password on JSON Config

2.5.7 (2023-07-07)

  • (mcm1957) Disabled the logging of username and password during connection errors
  • (bluefox) added json config

2.5.3 (2023-03-30)

  • (GreatSUN) Implemented potential .STATE.POWER update

2.5.1 (2022-04-23)

  • (Apollon77) Fixed the crash case reported by Sentry

2.5.0 (2022-03-21)

  • (GreatSUN) Implement writing of NSPanel Widget changes
  • (Apollon77) Fixed the crash case reported by Sentry

2.4.7 (2021-11-14)

  • (Apollon77) Fix crash case (Sentry IOBROKER-SONOFF-1S)

2.4.6 (2021-11-13)

  • (Apollon77) Fix some crash cases reported by Sentry (IOBROKER-SONOFF-B, IOBROKER-SONOFF-R, IOBROKER-SONOFF-4, IOBROKER-SONOFF-1, IOBROKER-SONOFF-13, IOBROKER-SONOFF-1J, IOBROKER-SONOFF-16, IOBROKER-SONOFF-3, IOBROKER-SONOFF-H)
  • (Apollon77) Adjust Uptime to mixed because it seems that it can be number or string

2.4.5 (2021-07-21)

  • (Apollon77) Fix some crash cases reported by Sentry

2.4.4 (2021-07-19)

  • (bluefox) Added UvaIntensity and UvbIntensity

2.4.3 (2021-07-18)

  • (bluefox) Better type detection for non-described states

2.4.2 (2021-07-17)

  • (bluefox) Optimize for js-controller 3.3

2.4.1 (2021-07-17)

  • (Apollon77/bluefox) Optimize for js-controller 3.3
  • (Apollon77) Add Sentry for error reporting with js-controller 3.x+

2.4.0 (2021-02-04)

  • (anwa) add several data points
  • (anwa) Fix translation for 'ignorePings'
  • (anwa) Fixed the wrong unit for humidity
  • (anwa) Config option to create a complete object tree instead of a flat structure
  • (anwa) Change Action type to string
  • (Apollon77) js-controller 2.0 is required at least

2.3.3 (2019-11-27)

  • (bluefox) Error with the empty packet was caught

2.3.2 (2019-10-23)

  • (bluefox) Fixed the password input in the configuration
  • (bluefox) Allowed setting the IP interface for server
  • (bluefox) Fixed tests for js-controller 2.0
  • (bluefox) Fixed the monitoring of the client connection
  • (bluefox) Changed "indicator.connected" to "indicator.reachable" for clients
  • (bluefox) Supported {POWERn: "true"}
  • (bluefox) Correct processing of {temp: nan}

2.2.3 (2019-01-10)

  • (simatec) Support for compact mode

2.2.2 (2018-06-22)

  • (bluefox) Configuration was fixed

2.2.1 (2018-06-20)

  • (bluefox) '-' in names was allowed again

2.2.0 (2018-05-22)

  • (gemu2015) auto generate objects, support for arrays (channel), led-controllers improved

2.1.3 (2018-05-08)

  • (bluefox) Added HC-SR04 Ultrasonic Sensor

2.1.2 (2018-04-23)

  • (bluefox) Added support of UvLight, Longitude and Latitude

2.1.1 (2018-04-13)

  • (bluefox) Support of the particle concentration sensor

2.1.0 (2018-03-30)

  • (gemu2015) Support of the devices control (many thanks :)
  • (gemu2015) Support of many new values
  • (modmax) Update alive status of the clients
  • (modmax) Added POWER5-8 and Switch3-4

2.0.2 (2018-03-19)

  • (modmax) Fixing reconnection of clients
  • (bluefox) Add SeaPressure

2.0.1 (2018-03-17)

  • (bluefox) Replace stream handler
  • (bluefox) Add timeout for clients
  • (bluefox) Add Light/Noise/AirQuality
  • (bluefox) Do not send pingresp for invalid clients

1.0.3 (2018-03-03)

  • (bluefox) Add Analog0/1/2/3 sensor

1.0.2 (2018-02-17)

  • (Apollon77) Add Illuminance sensor

1.0.1 (2018-02-05)

  • (bluefox) Ready for admin3
  • (bluefox) Added CO2 sensor

1.0.0 (2017-11-27)

  • (AlZiBa) typo @ alive
  • (AlZiBa) add Today's power consumption for Sonoff POW
  • (AlZiBa) unit of power consumption is kWh

0.3.3 (2017-11-03)

  • (bluefox) Add counters

0.3.2 (2017-10-22)

  • (Tan-DE) Small change for Switch1. Switch2 and additional IPaddress added.

0.3.1 (2017-10-12)

  • (bluefox) Fix tests and LWT

0.3.0 (2017-10-06)

  • (bluefox) Add INFO and ESP

0.2.0 (2017-10-05)

  • (bluefox) Add ENERGY and DS18x20

0.1.0 (2017-10-01)

  • (bluefox) initial commit

License

The MIT License (MIT)

Copyright (c) 2017-2023, bluefox [email protected]

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.

iobroker.sonoff's People

Contributors

algar42 avatar alziba avatar anwa avatar apollon77 avatar bettman66 avatar dependabot[bot] avatar dobis19 avatar feurer98 avatar gemu2015 avatar germanbluefox avatar greatsun avatar hurdurderp avatar jbubik avatar johnnybyzhang avatar ldittmar81 avatar lgtm-migrator avatar mccrossen avatar mcm1957 avatar mobilutz avatar modmax avatar paul53 avatar schmakus avatar simatec avatar tan-de avatar unclesamswiss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iobroker.sonoff's Issues

Add Latitude and Longitude

Um die neuen Timer Funktionen für Sonnenaufgang und Sonnenuntergang verwenden zu können ist die Eingabe von Latitude and Longitude für den Wohnort möglich. Zur zentralen Übertragung und Übersicht der Daten im ioBroker wäre die Aufnahme der Daten sinnvoll, falls möglich.

Current user provided latitude
(Beispiel Koordinate!)
MQT: stat/sonoff/RESULT = {"Latitude":"52.520007"}

Current user provided longitude
(Beispiel Koordinate!)
MQT: stat/sonoff/RESULT = {"Longitude":"13.404954"}

Dankeschön vorab für die Anpassung,
Fabian

4CH pro MQTT permanatly reconection

Hi,
I flashed me CH4 pro with 5.12 and 5.14, but on bouth firmware ich have an issue (see screenshot)
fehlermeldung

The Information like PW an User and IP of the Pi ar definetly correct
iobroker
sonoff 4ch pro

Can someone help me

Support für Tasmota Magichome

Magichome liefert z.B. die Werte Color und Dimmer. Habe die Datenpunkte in server.js erstellt und sie werden auch erzeugt. Es gibt aber kein Update und die Werte können auch nicht gesendet werden trotz write=true
dimmer geht von 0-100
color ist ein hex wert der je nach konfiguration zB bei RGB 24 Bit und bei RGBWW 32 bit hat.
per Tasmota console kann ich beide Werte problemlosen schalten.

Mit POWER kann man die LEDS an und aus schalten das funktioniert problemlos.

IoBroker Fhem auf einem Docker System....

Hallo ,
ich habe heute Fhem und ioBroker auf meinem Server in Docker installiert. DIe Umgebung läuft auch bis jetzt sehr gut.....
Nun ist das Problem , das ich den Sonoff Adapter in ioBroker installiert bekomme, aber keine Verbindung habe, das Problem hatte ich auch als ich ioBroker und FHEM einfach so ohne Docker auf dem Server installiert hatte. Das Problem tritt aber nicht auf, wenn ioBroker alleine installiert ist.........

Danke, ist das ein MQTT Problem ???

no mqtt message show up for my RF Bridge

This might be a stupid error or simply missing information: when installing the sonoff adapter I don't see my RF Bridge showing up. There is a connection to my local MQTT broker (on my NAS as well as the iobroker instance) and using the adapter "MQTT" I can even see some message. But not with this adapter!
For example my bridge sends a tele status:
tele/sonoff/STATE = {"Time":"2018-06-19T11:32:24","Uptime":"4T18:19:15","Vcc":3.143,"Wifi":{"AP":1,"SSId ......

which I can see from the Tasmota Web Interface console
Do I need to manually setup something? I would have assumed that mqtt topics like tele/sonoff should appear automatically?

The log shows a lot of errors:

sonoff.0 2018-06-19 11:43:02.359 error at process._tickCallback (node.js:428:17)
sonoff.0 2018-06-19 11:43:02.359 error at nextTickCallbackWith3Args (node.js:522:9)
sonoff.0 2018-06-19 11:43:02.359 error at net.js:1398:9
sonoff.0 2018-06-19 11:43:02.359 error at listen (net.js:1289:10)
sonoff.0 2018-06-19 11:43:02.359 error at Server._listen2 (net.js:1253:14)
sonoff.0 2018-06-19 11:43:02.359 error at exports._exceptionWithHostPort (util.js:930:20)
sonoff.0 2018-06-19 11:43:02.359 error at Object.exports._errnoException (util.js:907:11)
sonoff.0 2018-06-19 11:43:02.359 error Error: listen EADDRINUSE 0.0.0.0:1883
sonoff.0 2018-06-19 11:43:02.353 error uncaught exception: listen EADDRINUSE 0.0.0.0:1883

please add MHZ19B support

sensor data:

{"Time":"2018.02.04 10:24:19","MHZ19B":{"CarbonDioxide":528,"Temperature":30.0},"TempUnit":"C"}

please add Co2 (CarbonDioxide, PPM)

Sonoff Dual - Power - Alexa - no constant reaction

Hi,

I have the following combination running:

  • Sonoff Dual flashed with Tasmota 6.1.0
  • IOBroker
  • Alexa

There are the following data points among others in IOBroker:

POWER
POWER1
POWER2

I initially thought that the switch "POWER" is an overall switch where you can switch both switches (POWER1 and POWER2) but it just switches POWER1. Is this a bug or the intended way how it works?

Furthermore I created two smart devices in the cloud adapter in order to operate the Sonoff Dual via Alexa.
Switching the two switches with alexa works fine. In order to switch both switches with one command I created a group in the alexa app where the two switches are members.
When I now want to switch the group (via app or speach command) I works sometimes properly but often it just switches POWER1 or POWER2 but not both.

Regards,
Dora

Connection to MQTT-Adapter not possible

Connection to MQTT-Adapter not possible.

The following error messages are shown in the log.

sonoff.0 | 2017-11-04 15:32:54.404 | error | at process._tickCallback (internal/process/next_tick.js:104:9)
sonoff.0 | 2017-11-04 15:32:54.404 | error | at _combinedTickCallback (internal/process/next_tick.js:83:11)
sonoff.0 | 2017-11-04 15:32:54.404 | error | at net.js:1404:9
sonoff.0 | 2017-11-04 15:32:54.404 | error | at listen (net.js:1294:10)
sonoff.0 | 2017-11-04 15:32:54.404 | error | at Server._listen2 (net.js:1258:14)
sonoff.0 | 2017-11-04 15:32:54.404 | error | at exports._exceptionWithHostPort (util.js:1043:20)
sonoff.0 | 2017-11-04 15:32:54.404 | error | at Object.exports._errnoException (util.js:1020:11)
sonoff.0 | 2017-11-04 15:32:54.404 | error | Error: listen EADDRINUSE 0.0.0.0:1883
sonoff.0 | 2017-11-04 15:32:54.402 | error | uncaught exception: listen EADDRINUSE 0.0.0.0:1883

[Feature Request] Standart MQTT issues

Thank you for your great work with the adapter!!! It's much easier to use than the regular MQTT adapter when you are interfacing sonoff devices with iobroker.
However, I have found an issue trying to use MQTT commands which are not implemented in your code. For example, I have a TH10 module with a WS2812 RGB LED strip and I would like to send WS2812 related MQTT commands (i.e. "cmnd/TH10/scheme 5"). I'm currently using Node-RED with MQTT output node for this purpose. When I try to do this, it seems the adapter doesn't send the command to the TH10 module. The same would apply if I wanted to issue a "cmnd/TH10/POWER1" command to the module using the MQTT output node. Would there be a way that you adapter behaved just like an MQTT broker for the commands that are not implemented?
Thanks in advance.

Deutsche übersetzung

Da hier viele probleme mit der Deutschen übersetzung haben und der adapter dann nicht geht. Hier die Logs für die neuen json werte:

`

sonoff.0 2017-12-17 12:11:46.453 debug Client [Sonoff4ch] pingreq
sonoff.0 2017-12-17 12:11:45.940 debug Client [SonoffPOW] pingreq
sonoff.0 2017-12-17 12:11:41.235 debug [SonoffPOW] Received: tele/SonoffPOW/ENERGIE = {"Zeit":"2017.12.17 12:11:40","Total":20.611,"gestern":0.257,"heute":0.111,"Punkt":0,"Leistung":3,"Faktor":0.18,"Spannung":216,"Strom":0.083}
sonoff.0 2017-12-17 12:11:41.188 debug [SonoffPOW] Received: tele/SonoffPOW/STATUS = {"Zeit":"2017.12.17 12:11:40","Laufzeit":136,"VCC":3.240,"POWER":"ON","WLAN":{"AP":1,"SSID":"IOT","RSSI":76,"APMac":"CC:CE:1E:AE:7B:F9"}}
sonoff.0 2017-12-17 12:11:36.846 debug Client [ESPClient5] pingreq
sonoff.0 2017-12-17 12:11:31.451 debug Client [Sonoff4ch] pingreq
sonoff.0 2017-12-17 12:11:30.936 debug Client [SonoffPOW] pingreq
sonoff.0 2017-12-17 12:11:26.193 debug [SonoffPOW] Received: tele/SonoffPOW/ENERGIE = {"Zeit":"2017.12.17 12:11:25","Total":20.611,"gestern":0.257,"heute":0.111,"Punkt":0,"Leistung":5,"Faktor":0.26,"Spannung":218,"Strom":0.083}
sonoff.0 2017-12-17 12:11:26.189 debug [SonoffPOW] Received: tele/SonoffPOW/STATUS = {"Zeit":"2017.12.17 12:11:25","Laufzeit":136,"VCC":3.240,"POWER":"ON","WLAN":{"AP":1,"SSID":"IOT","RSSI":82,"APMac":"CC:CE:1E:AE:7B:F9"}}
sonoff.0 2017-12-17 12:11:21.845 debug Client [ESPClient5] pingreq
sonoff.0 2017-12-17 12:11:18.092 debug stateChange sonoff.0.Sonoff4ch.POWER2: {"val":false,"ack":true,"ts":1513509078090,"q":0,"from":"system.adapter.sonoff.0","lc":1513509078090}
sonoff.0 2017-12-17 12:11:18.088 debug [Sonoff4ch] Received: stat/sonoff_4ch/POWER2 = OFF
sonoff.0 2017-12-17 12:11:18.083 debug [Sonoff4ch] Received: stat/sonoff_4ch/ERGEBNIS = {"POWER2":"OFF"}
sonoff.0 2017-12-17 12:11:17.601 debug stateChange sonoff.0.Sonoff4ch.POWER2: {"val":true,"ack":true,"ts":1513509077599,"q":0,"from":"system.adapter.sonoff.0","lc":1513509077599}
sonoff.0 2017-12-17 12:11:17.598 debug [Sonoff4ch] Received: stat/sonoff_4ch/POWER2 = ON
sonoff.0 2017-12-17 12:11:17.596 debug [Sonoff4ch] Received: stat/sonoff_4ch/ERGEBNIS = {"POWER2":"ON"}
sonoff.0 2017-12-17 12:11:17.117 debug stateChange sonoff.0.Sonoff4ch.POWER1: {"val":false,"ack":true,"ts":1513509077116,"q":0,"from":"system.adapter.sonoff.0","lc":1513509077116}
sonoff.0 2017-12-17 12:11:17.115 debug [Sonoff4ch] Received: stat/sonoff_4ch/POWER1 = OFF
sonoff.0 2017-12-17 12:11:17.066 debug [Sonoff4ch] Received: stat/sonoff_4ch/ERGEBNIS = {"POWER1":"OFF"}
sonoff.0 2017-12-17 12:11:16.444 debug Client [Sonoff4ch] pingreq
sonoff.0 2017-12-17 12:11:16.376 debug stateChange sonoff.0.Sonoff4ch.POWER1: {"val":true,"ack":true,"ts":1513509076375,"q":0,"from":"system.adapter.sonoff.0","lc":1513509076375}
sonoff.0 2017-12-17 12:11:16.374 debug [Sonoff4ch] Received: stat/sonoff_4ch/POWER1 = ON
sonoff.0 2017-12-17 12:11:16.372 debug [Sonoff4ch] Received: stat/sonoff_4ch/ERGEBNIS = {"POWER1":"ON"}
sonoff.0 2017-12-17 12:11:15.946 debug Client [SonoffPOW] pingreq
sonoff.0 2017-12-17 12:11:10.974 debug [SonoffPOW] Received: tele/SonoffPOW/ENERGIE = {"Zeit":"2017.12.17 12:11:10","Total":20.611,"gestern":0.257,"heute":0.111,"Punkt":0,"Leistung":5,"Faktor":0.24,"Spannung":217,"Strom":0.093}
sonoff.0 2017-12-17 12:11:10.925 debug [SonoffPOW] Received: tele/SonoffPOW/STATUS = {"Zeit":"2017.12.17 12:11:10","Laufzeit":136,"VCC":3.240,"POWER":"ON","WLAN":{"AP":1,"SSID":"IOT","RSSI":76,"APMac":"CC:CE:1E:AE:7B:F9"}}
sonoff.0 2017-12-17 12:11:09.604 debug [Sonoff4ch] Received: tele/sonoff_4ch/STATUS = {"Zeit":"2017.12.17 12:11:09","Laufzeit":136,"VCC":3.226,"POWER1":"OFF","POWER2":"OFF","POWER3":"OFF","POWER4":"OFF","WLAN":{"AP":1,"SSID":"IOT","RSSI":7
sonoff.0 2017-12-17 12:11:06.857 debug Client [ESPClient5] pingreq
sonoff.0 2017-12-17 12:11:01.443 debug Client [Sonoff4ch] pingreq
sonoff.0 2017-12-17 12:11:00.777 debug Client [SonoffPOW] pingreq
sonoff.0 2017-12-17 12:10:55.970 debug [SonoffPOW] Received: tele/SonoffPOW/ENERGIE = {"Zeit":"2017.12.17 12:10:55","Total":20.611,"gestern":0.257,"heute":0.111,"Punkt":0,"Leistung":6,"Faktor":0.28,"Spannung":216,"Strom":0.100}
sonoff.0 2017-12-17 12:10:55.923 debug [SonoffPOW] Received: tele/SonoffPOW/STATUS = {"Zeit":"2017.12.17 12:10:55","Laufzeit":136,"VCC":3.241,"POWER":"ON","WLAN":{"AP":1,"SSID":"IOT","RSSI":76,"APMac":"CC:CE:1E:AE:7B:F9"}}
sonoff.0 2017-12-17 12:10:51.801 debug stateChange sonoff.0.ESPClient5.alive: {"val":true,"ack":true,"ts":1513509051800,"q":0,"from":"system.adapter.sonoff.0","lc":1513509051800}

`

Doesn't send update to Sonoff

I am using this plugin to connect my Sonoff to ioBroker, and I have a second MQTT broker instance (on another port) in ioBroker. When I click the sonoff POWER value under "objects" and change its value, the sonoff switches. If I change "sonoff/0/devicename/POWER" using a mqtt client, the value in the objects table changes, but the sonoff doesn't switch.

Why is that? Is that a problem with the sonoff plugin or with the mqtt broker plugin?

send cmnd to Sonoff via iobroker sonoff

hey,

im using IOBroker sonoff addon and want to send a cmnd to my RFBridge.

when i try to send it via mqtt client with "cmnd/Bridge_433MHZ/rfcode 5526835"
it doesen't work.
only when i connect the RFBridge to mqtt Server and send command "cmnd/Bridge_433MHZ/rfcode 5526835"

what can i do by using sonoff addon?

thanks for help

Sonoff Pow übergibt keine Energy werte

Guten Tag,
Heute sind meine Sonoff´s aus china angekommen.
Ich habe mich mal ran gesetzt und einen Pow geflasht und jetzt zu meinem Problem.
der State zum Power triggern ist in iobroker angekommen aber der rest nicht mit fehlt die komplette Sparte Energy.
die Tasmota Firmware ist auf Sonoff Pow umgestellt wurden und gibt in der console auch folgenden wert aus:
17:08:46 RSL: tele/sonoff/SENSOR = {"Time":"2018-03-19T17:08:46","ENERGY":{"Total":0.000,"Yesterday":0.000,"Today":0.000,"Period":0,"Power":2,"Factor":0.09,"Voltage":215,"Current":0.115}}

iFan02 FanSpeed

Ist es möglich für den Sonoff Ifan02 den State FanSpeed Controll mit zu implantieren?

Temperatur auslesen

Hallo
Ich habe ein Sonoff TH mit Temperaturfühler und habe den Sonoff Adapter installiert.Werte werden angezeigt wie z.B Typ IP Adresse usw. Was aber nicht angezeigt wird ist der Temperaturfühler.
Im Forum wurde mir empfohlen diese Info hier zu hinterlassen.
Folgendes habe Ich aus dem log ausgelesen.

[DVES_9ED4F7] Received: tele/sonoff/SENSOR = {"Zeit":"2017-11-05T14:17:26", "DS18B20":{"Temperatur":53.3}, "TempUnit":"C"}

Danke

BPM180 SeaLevel Pressure

Hi,
would it be possible to add the Altimate corrected Pressure value called SeaPressure

here is the RAW log Data:

`

stateChange sonoff.0.TH16_Wohnzimmer.BMP180_Pressure: {"val":963.4,"ack":true,"ts":1521291321999,"q":0,"from":"system.adapter.sonoff.0","lc":1521291321999}
sonoff.0 | 2018-03-17 13:55:22.007 | debug | stateChange sonoff.0.TH16_Wohnzimmer.BMP180_Temperature: {"val":32.3,"ack":true,"ts":1521291321998,"q":0,"from":"system.adapter.sonoff.0","lc":1521291321998}
sonoff.0 | 2018-03-17 13:55:21.999 | debug | stateChange sonoff.0.TH16_Wohnzimmer.AM2301_Humidity: {"val":37.6,"ack":true,"ts":1521291321996,"q":0,"from":"system.adapter.sonoff.0","lc":1521291200850}
sonoff.0 | 2018-03-17 13:55:21.998 | debug | stateChange sonoff.0.TH16_Wohnzimmer.AM2301_Temperature: {"val":23.1,"ack":true,"ts":1521291321993,"q":0,"from":"system.adapter.sonoff.0","lc":1521291321993}
sonoff.0 | 2018-03-17 13:55:21.993 | debug | [TH16_Wohnzimmer] Received: tele/sonoff/SENSOR = {"Time":"2018.03.17 13:55:17","AM2301":{"Temperature":23.1,"Humidity":37.6},"BMP180":{"Temperature":32.3,"Pressure":963.4,"SeaPressure":1004.4},"TempUn
sonoff.0 | 2018-03-17 13:55:21.934 | debug | stateChange sonoff.0.TH16_Wohnzimmer.Wifi_RSSI: {"val":54,"ack":true,"ts":1521291321927,"q":0,"from":"system.adapter.sonoff.0","lc":1521291200779}
sonoff.0 | 2018-03-17 13:55:21.934 | debug | stateChange sonoff.0.TH16_Wohnzimmer.POWER: {"val":true,"ack":true,"ts":1521291321927,"q":0,"from":"system.adapter.sonoff.0","lc":1521290594538}
sonoff.0 | 2018-03-17 13:55:21.928 | debug | stateChange sonoff.0.TH16_Wohnzimmer.Vcc: {"val":3.418,"ack":true,"ts":1521291321925,"q":0,"from":"system.adapter.sonoff.0","lc":1521291200776}
sonoff.0 | 2018-03-17 13:55:21.924 | debug | [TH16_Wohnzimmer] Received: tele/sonoff/STATE = {"Time":"2018.03.17 13:55:17","Uptime":"0 00:20:15","Vcc":3.418,"POWER":"ON","Wifi":{"AP":1,"SSId":"CM","RSSI":54,"APMac":"60:45:CB:68:E8:00"}}

`
greets
downset

[Add Support] HC-SR04 Ultrasonic Sensor / Abstandssensor

Hello,

nachdem der HC-SR04 Ultrasonic Sensor von Tasmota unterstützt wird wäre es natürlich klasse, wenn wir die Entfernungsdaten in cm auch in den ioBroker übertragen könnten.
Folgender Output ist relevant:
MQT: tele/sonoff/SENSOR = {"Time":"2018-05-07T19:55:14","SR04":{"Distance":30}}
sr04

Danke für die Implementierung im Voraus,
Grüße Fabian

Suport for I2C Sensore BH1750 Beleuchtungsintensität please

Hello team,
please add the support for the I2C Sensor BH1750 Light sensor Illuminance.
I use the following settings on Sonof Basic:
GPIO14 = DHT11 --> Works and shows in IOBroker
GPIO01= 05 I2C SCL
GPIO03 = 06 I2C SDA
GPIO04 = 00 NONE
The Console of the Sonoff Basic sad:
10:48:26 MQT: tele/sonoffbasic05/SENSOR = {"Time":"2018.02.10 10:48:26","DHT11":{"Temperature":14.0,"Humidity":24.0},"BH1750":{"Illuminance":777},"TempUnit":"C"}
10:53:26 MQT: tele/sonoffbasic05/SENSOR = {"Time":"2018.02.10 10:53:26","DHT11":{"Temperature":14.0,"Humidity":24.0},"BH1750":{"Illuminance":860},"TempUnit":"C"}

Many Thanks for your support!

Sonoff RF 433

Plz add costom MQTT Comands or RfKey to send RF commands.

After a temporary loss of connection ("This socket has been ended by the other party") sonoff adapter receives data from sonoff but does not send anymore to sonoff

  • ioBroker Sonoff adapter loses ability to control sonoff when connection is lost. This state continues also after connection is re-established.

  • ioBroker Sonoff adapter loses ability to control sonoff when connection is lost. This state continues also after connection is resumed.
    ioBroker sonoff adapter continues to receive sonoffs states after connection is resumed. The states are shown properly in ioBroker object list. But a change in the object list is not transferred to sonoff

  • possible "simple" countermeasure of mitigation: after sonoff adapter detects "This socket has been ended by the other party" it tries to reconnect at latest when receiving a new transmission from sooff device

My setup is a bit special but I am convinced that the same result can be achived ba a simpler and relates to similar complains written in the ioBroker forum setup.
Setup
Fritzbox_1:
-ioBroker on LAN

  • sonoff adapter 1.0.0
    -computer on WLAN
  • VPN to Fritzbox_2

Fritzbox_2

  • SonoffS20-01 on WLAN
  • Tasmota 5.11.1
  • VPN to Fritzbox_1

during daily reconection of DSL the connection is lost and resumed after a while. Corresponding log of Sonoff:
23:29:28 MQT: Connect failed to 192.168.1.25:1500, rc -2. Retry in 10 sec
23:29:39 MQT: Attempting connection...
23:29:45 MQT: Connect failed to 192.168.1.25:1500, rc -2. Retry in 10 sec
23:29:56 MQT: Attempting connection...
23:29:58 MQT: Connected
23:29:58 MQT: tele/sonoff/LWT = Online (retained)
23:29:58 MQT: cmnd/sonoff/POWER =
23:34:14 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:34:14","Uptime":282,"Vcc":3.210,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
23:39:14 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:39:14","Uptime":282,"Vcc":3.209,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
23:44:14 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:44:14","Uptime":282,"Vcc":3.210,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
23:49:14 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:49:14","Uptime":282,"Vcc":3.210,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
23:54:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:54:14","Uptime":282,"Vcc":3.208,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
23:59:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-09T23:59:15","Uptime":282,"Vcc":3.210,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
00:02:00 MQT: tele/sonoff/UPTIME = {"Time":"2018-03-10T00:02:00","Uptime":283}
00:04:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:04:15","Uptime":283,"Vcc":3.209,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":82,"APMac":"xxx"}}
00:09:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:09:15","Uptime":283,"Vcc":3.209,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
00:14:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:14:15","Uptime":283,"Vcc":3.210,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
00:19:15 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:19:15","Uptime":283,"Vcc":3.209,"POWER":"ON","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
00:21:58 MQT: stat/sonoff/RESULT = {"POWER":"OFF"}
00:21:58 MQT: stat/sonoff/POWER = OFF

sonoff continues sending cyclic states as configured in sonoff's config and sonoff can be controlled by it's website

00:24:24 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:24:24","Uptime":283,"Vcc":3.210,"POWER":"OFF","Wifi":{"AP":2,"SSId":"xxx","RSSI":80,"APMac":"xxx"}}
00:29:24 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:29:24","Uptime":283,"Vcc":3.210,"POWER":"OFF","Wifi":{"AP":2,"SSId":"xxx","RSSI":78,"APMac":"xxx"}}

Try to switch sonoff ON via ioBroker object after connection is resumed and proven working by using sonoff's website.
ioBroker says "true" in red.
sonoff does not react (shown in sonoff's website.
after some minutes sonoff sends (unchnaged) status back to ioBroker.

00:34:29 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:34:29","Uptime":283,"Vcc":3.208,"POWER":"OFF","Wifi":{"AP":2,"SSId":"xxx","RSSI":78,"APMac":"xxx"}}
now ioBroker shows "false" in red and later on in black.

found ioBroker Log
sonoff.0 2018-03-09 23:29:58.537 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
sonoff.0 2018-03-09 23:29:58.536 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
sonoff.0 2018-03-09 23:29:58.535 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
sonoff.0 2018-03-09 23:29:58.534 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
sonoff.0 2018-03-09 23:29:58.532 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
sonoff.0 2018-03-09 23:29:58.530 warn Client error [SonoffS20-01]: Error: This socket has been ended by the other party
...
sonoff.0 2018-03-10 00:33:19.232 warn Client "SonoffS20-01" not connected
..
most probably because connection was lost during reconection of Fritzbox to internet
log Fritzbox_1 (ioBroker running on this LAN, Computer on this WLAN)
09.03.18
23:29:57
VPN-Verbindung zu Fritzbox_2 wurde erfolgreich hergestellt.

23:28:50
VPN-Verbindung zu Fritzbox_2 wurde getrennt. Ursache: 3 IKE server
09.03.18
23:28:50
Internetverbindung wurde erfolgreich hergestellt. IP-Adresse: XXXX, DNS-Server: XX und XXX, Gateway: XX, Breitband-PoP: ETLJ00
09.03.18
23:28:40
Internetverbindung wurde getrennt.
09.03.18
23:28:40
Die Internetverbindung wird kurz unterbrochen, um der Zwangstrennung durch den Anbieter zuvorzukommen.

related log Fritzbox_2 (sonoff running on this WLAN)

09.03.18
23:29:57
VPN-Verbindung zu Fritzbox_1 wurde erfolgreich hergestellt.
09.03.18
23:29:25
VPN-Fehler: Fritzbox_1, IKE-Error 0x2027
09.03.18
23:28:50
VPN-Verbindung zu Fritzbox_1 wurde getrennt. Ursache: 3 IKE server

Then I performed a manual restart of ioBroker sonoff adapter
sonoff.0 2018-03-10 00:51:43.958 info Client [SonoffS20-01] connected
sonoff.0 2018-03-10 00:51:43.285 info Client [TestSonPow] connected
sonoff.0 2018-03-10 00:51:37.651 info Starting MQTT authenticated server on port 1500
sonoff.0 2018-03-10 00:51:37.485 info starting. Version 1.0.0 in /opt/iobroker/node_modules/iobroker.sonoff, node: v6.13.1
host.orangepiplus2e 2018-03-10 00:51:34.010 info instance system.adapter.sonoff.0 started with pid 11255
host.orangepiplus2e 2018-03-10 00:51:31.596 info instance system.adapter.sonoff.0 terminated with code 0 (OK)
sonoff.0 2018-03-10 00:51:31.485 info Client [SonoffS20-01] closed
host.orangepiplus2e 2018-03-10 00:51:31.436 info stopInstance system.adapter.sonoff.0 killing pid 26882
host.orangepiplus2e 2018-03-10 00:51:31.434 info stopInstance system.adapter.sonoff.0
host.orangepiplus2e 2018-03-10 00:51:31.407 info object change system.adapter.sonoff.0

10.03.18 00:58:
try to turn on Sonoff via ioBroker object: works, sonoff switches on. is shown on sonoffs website
Sonoff log for these actions:

00:50:26 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:50:26","Uptime":283,"Vcc":3.208,"POWER":"OFF","Wifi":{"AP":2,"SSId":"xxx","RSSI":78,"APMac":"xxx"}}
00:51:31 MQT: Attempting connection...
00:51:31 MQT: Connect failed to 192.168.1.25:1500, rc -2. Retry in 10 sec
00:51:43 MQT: Attempting connection...
00:51:43 MQT: Connected
00:51:43 MQT: tele/sonoff/LWT = Online (retained)
00:51:43 MQT: cmnd/sonoff/POWER =
00:55:45 MQT: tele/sonoff/STATE = {"Time":"2018-03-10T00:55:45","Uptime":283,"Vcc":3.209,"POWER":"OFF","Wifi":{"AP":2,"SSId":"xxx","RSSI":78,"APMac":"xxx"}}
00:57:58 MQT: stat/sonoff/RESULT = {"POWER":"ON"}
00:57:58 MQT: stat/sonoff/POWER = ON

additional check to switch off vio ioBroker object. works
01:06:48 MQT: stat/sonoff/RESULT = {"POWER":"OFF"}
01:06:48 MQT: stat/sonoff/POWER = OFF

SONOFF B1

Hallo,
wäre es möglich den Funktionsumfang derart zu erweitern, dass man die Sonoff B1 Lampe mehr als nur ein- und ausschalten kann? So das man z.B. die Helligkeit oder sogar die RGB-LEDs ansteuern kann?
Danke

Sonoff-Tasmota ADC input in mqtt topic

Hello!
I'm using ESP-12S with firmware Sonoff-Tasmota. I'm faced with a problem, is not displayed in MQTT ADC input. Not yet displayed digital input.
tasmota01
tasmota02
tasmota03
P.S. Excuse me for my google translate.
P.S.S. You need some kind of data from my device? How can I get them for you?

DHT 22 es wird nur die Temparatur ausgelesen

Hallo bei meinem Sonoff mit dem DHT 22 Sensor wird nur die Temperatur ausgelesen nicht jedoch die Luftfeuchtigkeit.

"DHT22":{"Temperatur":19.5,"Feuchtigkeit":46.1},"TempUnit":"C"}

Die Adapter Version ist 1.0.0

Fehler ist in der /lib/server.js
Falsch:
Luftfeutigkeit: {type: 'number', role: 'value.humidity', read: true, write: false, unit: '%'},
Richtig:
Feuchtigkeit: {type: 'number', role: 'value.humidity', read: true, write: false, unit: '%'},

[Feature request] Counter Function

In Tasmota Firmware it is possible to add a counter function on input-pins.
It would be nice when the adapter could process this information. In the example below you see the result for 1 Counter with Value 4:

sonoff.0 | 2017-11-03 18:44:15.250 | debug | [DVES_122684] Received: tele/sonoff/SENSOR = {"Time":"2017-11-03T18:44:15", "Counter1":4, "DHT22":{"Temperature":24.2, "Humidity":58.2}, "TempUnit":"C"}
Maximum are 4 counters.

In addition it would be very useful when the adpter could handle the following commands:

Counter |   | Show current Counter 1..4 value
Counter | 0 | Reset Counter 1..4
Counter | 1..64900 | Preset Counter 1..4

CounterDebounce |   | Show current global Counter debounce time in mSec
CounterDebounce | 0 / off | Turn global Counter debounce off
CounterDebounce | 1..3200 | Set global Counter debounce in mSec

CounterType |   | Show current Counter 1..4 type as pulse Counter or pulse Timer
CounterType | 0 / off | Set current Counter 1..4 type as pulse Counter
CounterType | 1 / on | Set current Counter 1..4 type as pulse Timer

Thank you!

[Feature request] BEM280 Druck

Version: Sonoff-Tasmota 5.10.0g
Geräte Tpy: 18 WeMos D1 mini

Konsole(DS18B20, BME280):
19:28:30 MQT: tele/sonoff-nodemcu/SENSOR = {"Zeit":"2018.01.03 19:28:30","DS18B20":{"Temperatur":21.4},"BME280":{"Temperatur":23.1,"Feuchtigkeit":37.0,"Druck":990.1},"TempUnit":"C"}

Konsole(DHT22, BME280):
19:39:40 MQT: tele/sonoff-test/SENSOR = {"Zeit":"2018.01.03 19:39:40","SI7021":{"Temperatur":7.3,"Feuchtigkeit":82.1},"BME280":{"Temperatur":8.0,"Feuchtigkeit":78.6,"Druck":991.3},"TempUnit":"C"}

Kein Status für SwitchMode 1

Wenn für einen angeschlossenen Switch (GPIO14 an einem Basic) der Mode auf SwitchMode 1 und SwitchTopic 1 gesetzt wird, wird dieser Status nicht im Broker angezeigt.
Das neue Topic kommt zwar an, aber der Status bleibt leer.
Bei dem "normalem" MQTT broker ändert sich hingegen der Status, insofern gehe ich davon aus, dass es nicht an Tasmota selber liegt.
image
image

ioBroker.sonoff

Adapter does not read the Tasmota/ sonoff T1, T2, T3 properly. It don,t see all the switches, just one and does not react on state changes. IOBroker.MQTT is working oke with T1,T2, T3.

Grtz.

MagicHome Support

Hello is it Possible to ADD the MagicHome Support with the Tasmota Firmware.

Would be nice if you could ghet the "Color" Command and the "Dimmer" Command. (all other Commands would be a BONUS)

Thank you.

Sonoff TH10/16 DS18X20

Hallo,

besteht die möglichkeit beim Adapter den Sensor DS18X20 einzupflegen.
In der Tasmota Weboberfläche werden die Werte für Temperatur angezeigt nur nicht im Adapter.

LG Pierre

Sonoff SC

Ist es Möglich noch die Sensorwerte "Light", "Noise" und "Air Quality" des Sonoff SC miteinzupflegen? Bis jetzt werden im Broker nur "Temperature" und "Humidity" angezeigt.

MQT: stat/sonoff/STATUS10 = {"StatusSNS":{"Time":"2018-03-16T01:56:06","Temperature":24.0,"Humidity":43.0,"Light":10,"Noise":20,"AirQuality":80,"TempUnit":"C"}}

Grüße

Reduce log level from WARN to DEBUG for invalid ping request

After reconnects of sonoff with ioBroker there occurs following line in log file:
Old client Stehlampe with secret 1534742437089_8715 sends pingreq. Ignore! Actual secret is 1534747629125_6065

Actually the log level ist set to WARN; but DEBUG level is enough, cause this has no impact on the sonoff handling.

Dopellete Logeinträge bei Verbindungsabbrüchen

Wenn Verbindung vom Sonoff zum Adapter/ioBroker abbbricht, dann
tauchen 6 Logmeldungen im Log auf; alle mit gleichem Zeitstempel.
Kann man dies auf eine Logmeldung reduzieren?

sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end
sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end
sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end
sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end
sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end
sonoff.0 2018-02-26 00:49:02.565 warn Client error [sonoff-s20-1]: Error: write after end

Evtl. erscheint die Logmeldung für je Subscription? Bins da jedoch kein Experte.

Switch1 replace POWER2 ?

Hallo Bluefox,

warum ersetzt/übersetzt du grundsätzlich den Status von Switch1 auf POWER2?

Switch1: {type: 'boolean', role: 'switch', read: true, write: true, replace: 'POWER2'},

Ich nutze einen Wemos D1 mit 2 Ein- und Ausgängen (POWER1/POWER2), hier wird durch den Value Switch1=ON immer der POWER2 auf ON (true) gesetzt, obwohl dieser Ein/Ausgang auf OFF (false) steht!?

Das sendet mein WeMos Modul:

`tele/wemos-1/STATE = {"Time":"2017-10-14T13:27:38", "Uptime":215, "Vcc":2.763, "POWER1":"OFF", "POWER2":"OFF", "Wifi":{"AP":1, "SSID":"xxx", "RSSI":82, "APMac":"xxx"}}

tele/wemos-1/SENSOR = {"Time":"2017-10-14T13:27:38", "Switch1":"ON", "Switch2":"ON"}`

Viele Grüße
Tan

Bitte Support für internen ADC hinzufügen

Hallo,
könnt Ihr im Adapter den Internen ADC hinzufügen. Werte werden vom Sonoff übertragen, nur es wird kein Objekt erstellt.
Output Sonoff Console:
17:36:59 MQT: tele/sonoff/SENSOR = {"Time":"2018-02-23T17:36:59","Analog0":298}

Debuglog Sonoff-Adapter:
sonoff.0 2018-02-23 17:36:59.646 debug [Basic-Analog] Received: tele/sonoff/SENSOR = {"Time":"2018-02-23T17:36:59","Analog0":298}

Danke

DS18B20 Temperature will not be shown

Hi,

I've a connect DS18B20 to a Sonoff Basic.
Under the object the temperature will not be shown. I have restarted the adapter several time, but it doesn't help.

The sonoff is sending:

10:03:24 MQT: tele/sonoff/STATE = {"Time":"2018-06-15T10:03:24","Uptime":"0T00:10:14","Vcc":3.208,"POWER1":"OFF","Wifi":{"AP":1,"SSId":"S04_mesh","RSSI":84,"APMac":"EC:08:6B:F9:07:94"}} 10:03:24 MQT: tele/sonoff/SENSOR = {"Time":"2018-06-15T10:03:24","DS18B20":{"Temperature":0.0},"TempUnit":"C"}

The iobroker is is receiving the temperature:

sonoff.0 2018-06-15 11:03:24.811 debug stateChange sonoff.0.Sonoff_Basic_1.DS18B20_Temperature: {"val":0,"ack":true,"ts":1529053404803,"q":0,"from":"system.adapter.sonoff.0","lc":1529052803660}
sonoff.0 2018-06-15 11:03:24.792 debug [Sonoff_Basic_1] Received: tele/sonoff/SENSOR = {"Time":"2018-06-15T10:03:24","DS18B20":{"Temperature":0.0},"TempUnit":"C"}
sonoff.0 2018-06-15 11:03:24.772 debug stateChange sonoff.0.Sonoff_Basic_1.Wifi_RSSI: {"val":84,"ack":true,"ts":1529053404757,"q":0,"from":"system.adapter.sonoff.0","lc":1529053404757}
sonoff.0 2018-06-15 11:03:24.771 debug stateChange sonoff.0.Sonoff_Basic_1.POWER1: {"val":false,"ack":true,"ts":1529053404755,"q":0,"from":"system.adapter.sonoff.0","lc":1529052446688}
sonoff.0 2018-06-15 11:03:24.758 debug stateChange sonoff.0.Sonoff_Basic_1.Vcc: {"val":3.208,"ack":true,"ts":1529053404748,"q":0,"from":"system.adapter.sonoff.0","lc":1529052453690}
sonoff.0 2018-06-15 11:03:24.737 debug [Sonoff_Basic_1] Received: tele/sonoff/STATE = {"Time":"2018-06-15T10:03:24","Uptime":"0T00:10:14","Vcc":3.208,"POWER1":"OFF","Wifi":{"AP":1,"SSId":"S04_mesh","RSSI":84,"APMac":"EC:08:6B:F9:07:94"}}

deepinbildschirmfoto_bereich auswahlen_20180615111158

`

Regards
Sebastian

Implementation Sonoff Touch "ledstate"

hi bluefox,
first thank you for this great project.
Could you implement the ledstate in the adapter?
It would be great to controll this option, cause i want to set the wifi led of for the night, cause i am using a sonoff touch in the bedroom.

Best regards,
julian

Logs from Sonoff B1 and Sonoff SC (Plz add)

Sonoff B1 logs

19:45:14 MQT: Attempting connection...
19:45:14 MQT: Connected
19:45:14 MQT: SHOME/sonoff/LED1/LWT = Online (retained)
19:45:14 MQT: SHOME/sonoff/LED1/cmnd/POWER =
19:45:14 MQT: SHOME/sonoff/LED1/INFO1 = {"Module":"Sonoff B1","Version":"5.9.1f","FallbackTopic":"LED1","GroupTopic":"sonoffs"}
19:45:14 MQT: SHOME/sonoff/LED1/INFO2 = {"WebServerMode":"Admin","Hostname":"LED1","IPAddress":"192.168.1.110"}
19:45:14 MQT: SHOME/sonoff/LED1/INFO3 = {"RestartReason":"Power on"}
19:45:15 MQT: SHOME/sonoff/LED1/RESULT = {"POWER":"ON"}
19:45:15 MQT: SHOME/sonoff/LED1/POWER = ON
19:45:22 MQT: SHOME/sonoff/LED1/STATE = {"Time":"2018-01-19T19:45:22","Uptime":0,"Vcc":3.289,"POWER":"ON","Wifi":{"AP":1,"SSId":"SmartHOME","RSSI":96,"APMac":"60:31:97:3E:74:B4"}}
19:50:22 MQT: SHOME/sonoff/LED1/STATE = {"Time":"2018-01-19T19:50:22","Uptime":0,"Vcc":3.280,"POWER":"ON","Wifi":{"AP":1,"SSId":"SmartHOME","RSSI":82,"APMac":"60:31:97:3E:74:B4"}}
19:55:07 APP: Serial logging disabled
19:55:22 MQT: SHOME/sonoff/LED1/STATE = {"Time":"2018-01-19T19:55:22","Uptime":0,"Vcc":3.280,"POWER":"ON","Wifi":{"AP":1,"SSId":"SmartHOME","RSSI":86,"APMac":"60:31:97:3E:74:B4"}}
20:00:22 MQT: SHOME/sonoff/LED1/STATE = {"Time":"2018-01-19T20:00:22","Uptime":0,"Vcc":3.279,"POWER":"ON","Wifi":{"AP":1,"SSId":"SmartHOME","RSSI":88,"APMac":"60:31:97:3E:74:B4"}}
20:02:00 MQT: SHOME/sonoff/LED1/UPTIME = {"Time":"2018-01-19T20:02:00","Uptime":1}
20:02:50 CMD: color 12
20:02:50 MQT: SHOME/sonoff/LED1/RESULT = {"POWER":"ON","Dimmer":100,"Color":"FFFFFF0000"}
20:02:58 CMD: Dimmer
20:02:58 MQT: SHOME/sonoff/LED1/RESULT = {"Dimmer":100}
20:07:18 CMD: CT
20:07:18 MQT: SHOME/sonoff/LED1/RESULT = {"CT":499}

Command options Color
Command | Payload | Description
Color | 1 | Set color to Red
Color | 2 | Set color to Green
Color | 3 | Set color to Blue
Color | 4 | Set color to Orange
Color | 5 | Set color to Light Green
Color | 6 | Set color to Light Blue
Color | 7 | Set color to Amber
Color | 8 | Set color to Cyan
Color | 9 | Set color to Purple
Color | 10 | Set color to Yellow
Color | 11 | Set color to Pink
Color | 12 | Set color to White

Command options CT

CT |   | (Sonoff B1 and Led) Show current Color Temperature (153 = Cold, 500 = Warm)
CT | 153..500 | (Sonoff B1 and Led) Set color temperature from cold to warm
CT | + | Increment CT in 10 steps
CT | - | Decrement CT in 10 steps

Command options Dimmer

Dimmer |   | Show current dimmer setting from 0 to 100%
Dimmer | 0..100 | Set dimmer value from 0 to 100%
Dimmer | + | Increment brightness in 10 steps
Dimmer | - | Decrement brightness in 10 steps

Command options Scheme
Scheme |   | Show current selected scheme
Scheme | 0 | (default) Use a single color for all pixels in light/strip/ring
Scheme | 1 | (= Wakeup) Start wake up sequence
Scheme | 2 | Cycle through RGB colors using speed option
Scheme | 3 | Cycle through RBG colors using speed option
Scheme | 4 | Random cycle through colors using speed and fade options

Sonoff SC logs

20:15:08 MQT: SHOME/sonoff/HomeMonitor/INFO1 = {"Module":"Sonoff SC","Version":"5.9.1f","FallbackTopic":"HomeMonitor","GroupTopic":"sonoffs"}
20:15:08 MQT: SHOME/sonoff/HomeMonitor/INFO2 = {"WebServerMode":"Admin","Hostname":"HomeMonitor","IPAddress":"192.168.1.112"}
20:15:08 MQT: SHOME/sonoff/HomeMonitor/INFO3 = {"RestartReason":"Power on"}
20:15:16 MQT: SHOME/sonoff/HomeMonitor/STATE = {"Time":"2018-01-19T20:15:16","Uptime":0,"Vcc":3.170,"Wifi":{"AP":1,"SSId":"SmartHOME","RSSI":100,"APMac":"60:31:97:3E:74:B4"}}
20:15:16 MQT: SHOME/sonoff/HomeMonitor/SENSOR = {"Time":"2018-01-19T20:15:16","Temperature":20.0,"Humidity":16.0,"Light":10,"Noise":60,"AirQuality":90,"TempUnit":"C"}

Command options
Altitude |   | Show current Altitude to be used by calculating Sea level Pressure
Altitude | -30000..30000 | Set local Altitude in meters
AmpRes |   | Show current Current Resolution
AmpRes | 0..3 | Set Current Resolution
Counter |   | Show current Counter 1..4 value
Counter | 0 | Reset Counter 1..4
Counter | 1..64900 | Preset Counter 1..4
CounterDebounce |   | Show current global Counter debounce time in mSec
CounterDebounce | 0 / off | Turn global Counter debounce off
CounterDebounce | 1..3200 | Set global Counter debounce in mSec
CounterType |   | Show current Counter 1..4 type as pulse Counter or pulse Timer
CounterType | 0 / off | Set current Counter 1..4 type as pulse Counter
CounterType | 1 / on | Set current Counter 1..4 type as pulse Timer
EnergyRes |   | Show current Energy Resolution
EnergyRes | 0..5 | Set Energy Resolution
HumRes |   | Show current Humidity Resolution
HumRes | 0..3 | Set Humidity Resolution
Ina219Mode |   | Show current Ina219 Calibration Mode
Ina219Mode | 0 | Set Ina219 Calibration to max 32V and 2A
Ina219Mode | 1 | Set Ina219 Calibration to max 32V and 1A
Ina219Mode | 2 | Set Ina219 Calibration to max 16V and 0.4A
PressRes |   | Show current Pressure Resolution
PressRes | 0..3 | Set Pressure Resolution
SetOption8 |   | Show current Temperature as either Celsius or Fahrenheit
SetOption8 | 0 / celsius | Set Temperature to Celsius
SetOption8 | 1 / fahrenheit | Set Temperature to Fahrenheit
SetOption18 |   | Show Signal Light state - currently used with CO2 sensors only
SetOption18 | 0 / off | (default) Disable signal light
SetOption18 | 1 / on | Enable signal light
TempRes |   | Show current Temperature Resolution
TempRes | 0..3 | Set Temperature Resolution
TempUnit |   | Replaced by SetOption8
VoltRes |   | Show current Voltage Resolution
VoltRes | 0..3 | Set Voltage Resolution
WattRes |   | Show current Power Resolution
WattRes | 0..3 | Set Power Resolution

Link to tasmota wiki commands: https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#ws2812-ailight-sonoff-led-b1-bn-sz01-h801-and-magichome

[Add Support] Analog Input A0

Hello,
es gibt bei Tasmota die Möglichkeit den Analog Input A0 auszugeben.
Der Output (z.B. eines Regensensors) würde mein ioBroker sehr gerne verarbeiten.
Folgender Output ist relevant:
MQT: tele/sonoff/SENSOR = {"Time":"2018-05-08T11:06:33","ANALOG":{"A0":485}}
analog

Ich hoffe auch für diese Implementierung besteht bei Gelegenheit die Zeit :-)
Grüße Fabian

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.