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

Can Sonoff LED response jason in 1 line? #176

Closed
hamwong opened this issue Mar 10, 2017 · 4 comments
Closed

Can Sonoff LED response jason in 1 line? #176

hamwong opened this issue Mar 10, 2017 · 4 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@hamwong
Copy link

hamwong commented Mar 10, 2017

Hi, @arendst,

Sorry for spam you again, can you do a little adjust on Sonoff LED response?

cmnd/sonoff-LED/dimmer 2
stat/sonoff-LED/RESULT {"POWER":"ON"}
stat/sonoff-LED/POWER ON
stat/sonoff-LED/RESULT {"Dimmer":2}

cmnd/sonoff-LED/dimmer 0
stat/sonoff-LED/RESULT {"POWER":"ON"}
stat/sonoff-LED/POWER ON
stat/sonoff-LED/RESULT {"Dimmer":0}

cmnd/sonoff-LED/power off
stat/sonoff-LED/RESULT {"POWER":"OFF"}
stat/sonoff-LED/POWER OFF

Is there anyway that RESULT in one line like stat/sonoff-LED/RESULT {"POWER":"ON", "Dimmer":2}?
as it makes OPENHAB not happy and have alarm log also set device status as NULL
Finally, when dimmer 0, can it be POWER OFF?

@arendst arendst added the enhancement Type - Enhancement that will be worked on label Mar 11, 2017
@hamwong
Copy link
Author

hamwong commented Mar 11, 2017

Dear @arendst ,
If you will do modify your code base on LED,
Beside Jason output that Power ON with Dimmer,
Please also let Power off with Dimmer value,

Just disocver Color also sharing the same output
RESULT = {"Color":"3287"}
Please let all output in result show in 1 line instead base on related command

Also I feel difficult on adjust LED color (temperature), will it be able to add a slider for adjust color, I think that would more useful than dimmer slider

Thank you very much for you attention and best regards.

arendst added a commit that referenced this issue Mar 12, 2017
4.0.4 20170312
* Add pulse timers for up to 4 relays (#106)
* Fix Sonoff Led power state when dimmer or color is 0 (#176)
* Add command NtpServer<x> to configure up to three NTP servers (#177)
* Delete module User Test as module Wemos D1 mini has same/more user
configurable GPIO (#178)
* Add more user configurable GPIO to module ElectroDragon (#183)
@hamwong
Copy link
Author

hamwong commented Mar 15, 2017

Dear @arendst,

Huge thanks for promote update,
command dimmer and color is in 1 line now on response except on Power command
cmnd/sonoff-LED/Dimmer ON
stat/sonoff-LED/RESULT {"POWER":"ON"}
stat/sonoff-LED/POWER ON
stat/sonoff-LED/RESULT {"POWER":"ON", "Dimmer":1, "Color":"0200"}
cmnd/sonoff-LED/Dimmer OFF
stat/sonoff-LED/RESULT {"POWER":"OFF"}
stat/sonoff-LED/POWER OFF

@davidelang
Copy link
Collaborator

the power stat output is being sent in the legacy format to keep the simple on/off switching working for people.

however, from your sample,it looks like it is being sent twice when it's turned on. can you confirm this?

@hamwong
Copy link
Author

hamwong commented Mar 27, 2017

in fact it's not double msg,
when in power on /off command,
there is 2 output, 1 in normal output and one in json,
it's just not output in standard json output, it somehow output with single Json data output
as I mention above, I don't care simple onput: POWER ON
but in Json format, it better be standard output
which means in RESULT should always like below dimmer 0, not just a single power status output in json

02:43:31 CMND: dimmer 0
02:43:31 MQTT: stat/sonoff-LED/RESULT = {"POWER":"OFF", "Dimmer":0, "Color":"0000"}
02:43:37 CMND: power off
02:43:37 MQTT: stat/sonoff-LED/RESULT = {"POWER":"OFF"}
02:43:37 MQTT: stat/sonoff-LED/POWER = OFF

Also there is 1 more bug with fade, fade from 0-100 is fine,
but when fade 100-1 is fine, only not 0, 0 will instantly turn dark,
I guess it should due to logic involve above.

arendst added a commit that referenced this issue Jul 15, 2017
5.3.0 20170715
* Major Hue rewrite which might introduce Alexa problems. If so,
initiate an issue
* Add support for Sonoff Led and BN-SZ01 Ceiling Led brightness control
to Hue
* Fix Sonoff Led Power, Dimmer and Color MQTT response (#176)
* Add commands Delay and Backlog to allow multiple commands at once
separated by ";" (#593)
* Use default flashmode DOUT to solve restart hangs on esp8285 chips
(#453, #598)
* Change Web console column width from 99 to 300 (#599)
@arendst arendst closed this as completed Sep 8, 2017
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
4.0.4 20170312
* Add pulse timers for up to 4 relays (arendst#106)
* Fix Sonoff Led power state when dimmer or color is 0 (arendst#176)
* Add command NtpServer<x> to configure up to three NTP servers (arendst#177)
* Delete module User Test as module Wemos D1 mini has same/more user
configurable GPIO (arendst#178)
* Add more user configurable GPIO to module ElectroDragon (arendst#183)
curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
5.3.0 20170715
* Major Hue rewrite which might introduce Alexa problems. If so,
initiate an issue
* Add support for Sonoff Led and BN-SZ01 Ceiling Led brightness control
to Hue
* Fix Sonoff Led Power, Dimmer and Color MQTT response (arendst#176)
* Add commands Delay and Backlog to allow multiple commands at once
separated by ";" (arendst#593)
* Use default flashmode DOUT to solve restart hangs on esp8285 chips
(arendst#453, arendst#598)
* Change Web console column width from 99 to 300 (arendst#599)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests

3 participants