Closed canis-ferrin closed 7 years ago
see the troubleshooting page in the wiki, get more detailed logs and see exactly what's happening.
I put
in user_config.h and send a fresh weblog:
00:00:01 Wifi: Attempting connection... 00:00:02 Wifi: Attempting connection... 00:00:03 Wifi: Connected 00:00:03 mDNS: Initialized 00:00:03 HTTP: Webserver active on sonoff-6766.local with IP address 192.168.211.198 00:00:03 RTC: (UTC) Mon May 22 05:51:22 2017 00:00:03 RTC: (DST) Sun Mar 26 02:00:00 2017 00:00:03 RTC: (STD) Sun Oct 29 03:00:00 2017 06:51:23 HTTP: Handle root 06:51:25 MQTT: Attempting connection... 06:51:26 mDNS: Query done with 0 mqtt services found 06:51:26 MQTT: Connected 06:51:26 MQTT: tele/sonoff/LWT = Online (retained) 06:51:26 MQTT: cmnd/sonoff/POWER = 06:51:26 MQTT: tele/sonoff/INFO1 = {"Module":"Sonoff Basic", "Version":"5.1.3", "FallbackTopic":"DVES_3C1A6E", "GroupTopic":"sonoffs"} 06:51:26 MQTT: tele/sonoff/INFO2 = {"WebserverMode":"Admin", "Hostname":"sonoff-6766", "IPaddress":"192.168.211.198"} 06:51:26 MQTT: tele/sonoff/INFO3 = {"Started":"Software/System restart"} 06:51:26 HTTP: Handle console 06:51:27 RSLT: DataCb Group 0, Index 1, Type DVES_3C1A6E, Data Power toggle Power ON Power toggle (POWER TOGGLE POWER ON POWER TOGGLE) 06:51:27 MQTT: stat/sonoff/RESULT = {"Command":"Unknown"} 06:51:28 MQTT: stat/sonoff/RESULT = {"POWER":"OFF"} 06:51:28 MQTT: stat/sonoff/POWER = OFF 06:51:35 MQTT: tele/sonoff/STATE = {"Time":"2017-05-22T06:51:35", "Uptime":0, "Vcc":3.009, "POWER":"OFF", "Wifi":{"AP":1, "SSID":"PapaNet-E", "RSSI":56, "APMac":"00:13:10:15:25:61"}} 06:53:51 RSLT: DataCb Group 0, Index 1, Type DVES_3C1A6E, Data Power on (POWER ON) 06:53:51 MQTT: stat/sonoff/RESULT = {"Command":"Unknown"} 06:54:39 RSLT: DataCb Group 0, Index 1, Type DVES_3C1A6E, Data Power off (POWER OFF) 06:54:39 MQTT: stat/sonoff/RESULT = {"Command":"Unknown"}
This in the user_config.h:
This is the user_config.h: /* user_config.h - user specific configuration for Sonoff-Tasmota
Copyright (C) 2017 Theo Arends
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */
/*****\
// -- Project -------------------------------------
// As an IDE restriction it needs to be the same as the main .ino file
// -- Wifi ----------------------------------------
// (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY)
// -- Syslog --------------------------------------
// -- Ota -----------------------------------------
// -- MQTT ----------------------------------------
// !!! TLS uses a LOT OF MEMORY (20k) so be careful to enable other options at the same time !!! //#define USE_MQTT_TLS // EXPERIMENTAL Use TLS for MQTT connection (+53k code, +20k mem) - Disable by // // Needs Fingerprint, TLS Port, UserId and Password
// -- MQTT topics --------------------------------- //#define MQTT_FULLTOPIC "tasmota/bedroom/%topic%/%prefix%/" // Up to max 80 characers
// %prefix% token options
// May be named the same as PUB_PREFIX
// %topic% token options (also ButtonTopic and SwitchTopic)
// -- MQTT - Telemetry ----------------------------
// -- MQTT - Domoticz -----------------------------
// -- HTTP ----------------------------------------
#define EMULATION EMUL_NONE // [Emulation] Select Belkin WeMo (single relay/light) or Hue Bridge emulation (multi relay/light) (EMUL_NONE, EMUL_WEMO or EMUL_HUE)
// -- mDNS ----------------------------------------
// -- Time - Up to three NTP servers in your region
// -- Time - Start Daylight Saving Time and timezone offset from UTC in minutes
// -- Time - Start Standard Time and timezone offset from UTC in minutes
// -- Application ---------------------------------
// -- Sensor code selection -----------------------
//#define USE_DS18x20 // Optional using OneWire library for multiple DS18B20 and/or DS18S20 (+2k code)
// #define USE_IR_HVAC // Support for HVAC system using IR (+2k code)
// #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem) // When USE_WS2812_DMA is enabled expect Exceptions on Pow
/*****\
//#define BE_MINIMAL // Minimal version if upgrade memory gets tight (-45k code, -2k mem)
/*****\
see the troubleshooting page about why changes to user_config.h may not take effect.
do you have more than one relay configured? if so, you would need to do power1 instead of power to switch the first relay.
What happens if you enter the command directly in the web console? do you still get invalid command?
http://192.168.211.198/cm?&cmnd=Power%202Toggle is working and delivers: 08:53:15 RSLT: DataCb Group 0, Index 1, Type POWER, Data Toggle (TOGGLE) RESULT = {"POWER":"ON"} POWER = ON
http://wauzinet.linkpc.net:1884/cm?&cmnd=Power%202 toggles the Poer with mqtt-spy the command Power 2 results in short flash on the sonoff. I have 7 Sonoss- switches installed, acting as HUE- Bridge for an Echo Dot and i try to build up an OpenHAB2 system.
After each flasing, i held the button more than 4 seconds, waited, and restarted by power supply that changes took affect,
in https://community.home-assistant.io/t/sonoff-with-embedded-mqtt/12526 I found a hint: You can control it with Publish Message Topic: cmnd/sonoff/POWER DATA: ON | OFF | TOGGLE It could be a good idea to write examples in the wiki
Tasmota Version: 5.1.3 Only changes from downloaded Version in user_config.h:
define WIFI_IP_ADDRESS
define WIFI_GATEWAY
define WIFI_DNS
define STA_SSID1
define STA_PASS1
define MQTT_HOST "192.168.211.199"
define MQTT_USER "username"
define MQTT_PASS "password"
Test with mqtt-spy: mqtt-spy-0.5.4-jar-with-dependencies.jar Topic is: cmnd/DVES_3C1A6E Data is: Power ON The Sonoff flashes 1 time shortly Output is: stat/sonoff/RESULT Data is: {"Command":"Unknown"}
Topic cmnd/sonoff is also working, the device flashes shortly Wahat is wrong? I tried ervything without success. Security if off in the moment, and this Broker has only this Client: The MQTT Broker is reachable: www.wauzinet.linkpc.net:1883 by mqtt-spy. The Sonoff web server is reachable under http://wauzinet.linkpc.net:1884 I tried also issue 340 without success. Can anyone help? Thanks