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

PWM command not publishing #1783

Closed
netomx opened this issue Feb 4, 2018 · 12 comments
Closed

PWM command not publishing #1783

netomx opened this issue Feb 4, 2018 · 12 comments

Comments

@netomx
Copy link

netomx commented Feb 4, 2018

As title. Use PWM, send cmnd/sonoff/PWM 1000

It will not get back the value from the mqtt broker, but anything else works

@curzon01
Copy link
Contributor

curzon01 commented Feb 5, 2018

What you mean is that PWM command returns an empty JSON object:

RSL: Group 0, Index 1, Command PWM, Data 1000
MQT: dev/stat/tasmota/phesp03/RESULT = {"PWM":{}}

@arendst
Copy link
Owner

arendst commented Feb 5, 2018

OK. Got it. When no PWM channel is configured and you execute the PWM command then this is the result.

I will check for any PMW configured and if none I will return

RSL: Group 0, Index 1, Command PWM, Data 1000
MQT: stat/wemos6/RESULT = {"Command":"Unknown"}

@netomx
Copy link
Author

netomx commented Feb 5, 2018 via email

arendst added a commit that referenced this issue Feb 6, 2018
5.11.1i
* Fix some Energy Monitoring related issues (#1677)
* Fix TSL2561 device detection (#1644)
* Fix command PWM response if no PWM channel is configured (#1783)
@curzon01
Copy link
Contributor

curzon01 commented Feb 6, 2018

@netomx: Be aware to configure one of the GPIOx as PWM(i), otherwise PWM is unconfigured - using cmnd PWMx is not enough to have PWM configured.

And - what is the output of "Status 2"? Do you using 5.11.1i?

@netomx
Copy link
Author

netomx commented Feb 6, 2018

Version: Sonoff-Tasmota 5.11.1 by Theo Arends
GPIO5 = 33 PWM1
I can send commands, and the PWM is working, but it doesn't return the value.

Example 1 (another sonoff with RELAY):
mosquitto_sub -h IP -u user -P pass -t stat/sonoff1/POWER
ON
OFF

Example 2 (this NodeMCU v3 (nodemcu v2 clone) configured ad wemos d1 mini, only GPIO configured):
mosquitto_sub -h IP -u user -P password -t stat/sonoff2/PWM1 (tried with PWM too)
--no output when sending command--

Status 2:
18:50:55 CMD: STATUS 2
18:50:55 MQT: stat/led1/STATUS2 = {"StatusFWR":{"Version":"5.11.1","BuildDateTime":"2018-01-07T21:51:09","Boot":31,"Core":"2_3_0","SDK":"1.5.3(aec24ac9)"}}

PWM just sends RESULT, instead of PWM

@netomx
Copy link
Author

netomx commented Feb 6, 2018

More exmaples:

22:10:40 CMD: POWER 22:10:40 MQT: stat/cuarto/RESULT = {"POWER":"OFF"} 22:10:40 MQT: stat/cuarto/POWER = OFF

22:11:12 CMD: PWM 1000 22:11:12 MQT: stat/led1/RESULT = {"PWM":{"PWM1":1000}}

@arendst
Copy link
Owner

arendst commented Feb 6, 2018

@netomx I see you are still using the old version 5.11.1 while I reported above that your problem is fixed in 5.11.1i.

Install that one and report your findings agian.

@netomx
Copy link
Author

netomx commented Feb 6, 2018

Forgot to say, I upgraded it before the "more examples" post:

22:08:39 CMD: status 2 22:08:39 MQT: stat/led1/STATUS2 = {"StatusFWR":{"Version":"5.11.1i","BuildDateTime":"2018-02-06T14:12:30","Boot":31,"Core":"2_4_0","SDK":"2.1.0(deb1901)"}}

@arendst
Copy link
Owner

arendst commented Feb 6, 2018

Right. So what's the issue here. I see nothing wrong in your latest entries.

@netomx
Copy link
Author

netomx commented Feb 6, 2018

I will try to be as simple and clear as possible, language is barrier here:

When I send a command to the device, it replies with 2 lines:

RESULT
COMMAND (for example, POWER)

but if I send PWM command, it just replies with:

RESULT

That is my issue

@arendst
Copy link
Owner

arendst commented Feb 6, 2018

As designed. Only power command returns both JSON and for legacy reasons also plain results.

To switch naming of result to command you can select one of the SetOptions. See wiki.

@netomx
Copy link
Author

netomx commented Feb 6, 2018

F*ck. Thanks, pal. I will close it as a unrelated bug was fixed and "my bug" was not.

@netomx netomx closed this as completed Feb 6, 2018
arendst added a commit that referenced this issue Feb 9, 2018
5.12.0 20180209
* Change library PubSubClient.h define MQTT_MAX_PACKET_SIZE from 512 to
1000 for Home Assistant  support
* Change relation of define MESSZ being dependent on PubSubClient.h
define MQTT_MAX_PACKET_SIZE
* Change command color parameter input checks to less strict for Home
Assistant support
* Change command Ina219Mode into command Sensor13
* Change commands HlwPCal, HlwUCal and HlwICal to PowerCal, VoltageCal
and CurrentCal to be used for both Pow and S31 calibration
* Change commands HlwPSet, HlwUSet and HlwISet to PowerSet, VoltageSet
and CurrentSet to be used for both Pow and S31 calibration
* Change uptime from hour to second resulting in a display of
123T13:45:21 where 123 is days
* Change module name Wemos D1 mini into Generic (#1220)
* Change HTML from width=100% to style=width:100% supporting HTML5
(#1358)
* Change OSWATCH_RESET_TIME (Blocked loop) from 30 to 120 seconds to
allow slow networks (#1556)
* Change WIFI_MANAGER_SEC into WIFI_CONFIG_SEC (#1616)
* Change function pointers code to save code space and memory (#1683)
* Change webserver argument processing gaining 5k code space (#1705)
* Change weblog memory usage (#1730, #1793, #1819)
* Update TasmotaSerial library to 1.1.0
* Update language files Italian (#1594), Dutch (#1723) and Spanish
(#1722)
* Fix Non-English JSON temperature unit attachement
* Fix Arilux RF induced exception by moving interrupt handler to iram on
non ESP8266/Arduino lib v2.3.0
* Fix truncated command names and wrong response for DomoticzSwitchIdx
(#1571)
* Fix %-sign issue as printf escape character in Humidity and Sonoff SC
(#1579)
* Fix DS18B20 temperature JSON decimal dot (#1561)
* Fix Energy JSON message (#1621)
* Fix IRSend parameter translation (#1636)
* Fix TSL2561 device detection (#1644, #1825)
* Fix BME680 teleperiod resistance measuring (#1647)
* Fix Energy Monitoring Energy Today and Energy Total reading after
restart (#1648)
* Fix IRReceive Data value (#1663)
* Fix Energy Monitoring Energy Period roll-over (#1688)
* Fix compiler warnings (#1774)
* Fix command PWM response if no PWM channel is configured (#1783)
* Add locale Decimal Separator to Web sensor page
* Add ColorTemperature to light status message
* Add command PowerOnState option 5 which inverts PulseTime and allows
for delayed always on after power on
* Add OtaMagic two step Web server OTA upgrade using filename-minimal
image if OTA free space is too small
* Add support for PMS5003 and PMS7003 particle concentration sensor
* Add command SetOption21 1 to allow Energy Monitoring when power is off
on Sonoff Pow and Sonoff S31 (#1420)
* Add Chinese language file (#1551)
* Add French language file (#1561)
* Add Spanish language file (#1589)
* Add HTTP Allow Cross Origin removed from ESP8266/Arduino lib v2.4.0
(#1572)
* Add Home Assistant MQTT Discovery for switch and light to be enabled
by command SetOption19 1 (#1534) or define
HOME_ASSISTANT_DISCOVERY_ENABLE in user_config.h (#1685)
* Add command State to retrieve device state information (same data as
teleperiod state and status 11 in slightly different JSON format)
* Add optional login to Webserver AP mode (#1587, #1635)
* Add command Sensor15 2 to start MHZ19(B) Zero Point Calibration
(#1643)
* Add support for Sonoff S31 Smart Socket with Power Consumption
Detection (#1626)
* Add command SetOption20 to allow update of Dimmer/Color/Ct without
turning power on (#1719, #1741)
* Add NTP sync time slot based on chip id (#1773)
* Add cursor pointer to web button (#1836)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
5.11.1i
* Fix some Energy Monitoring related issues (arendst#1677)
* Fix TSL2561 device detection (arendst#1644)
* Fix command PWM response if no PWM channel is configured (arendst#1783)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants