Command unknown: "PWM,14,200"

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tsegula
New user
Posts: 7
Joined: 13 Nov 2020, 15:51

Command unknown: "PWM,14,200"

#1 Post by tsegula » 13 Nov 2020, 16:24

I receive the following response when trying to issue a PWM command from the browser.
http://10.0.0.19/control?cmd=PWM,14,200 ==> Command unknown: "PWM,14,200"

http://10.0.0.19/control?cmd=GPIO,14,0 ==> works as expected
http://10.0.0.19/control?cmd=GPIO,14,1 ==> works as expected
Am I missing something??

Hardware:
ESP Chip ID: 7726593 (0x75E601)
ESP Chip Frequency: 80 MHz
ESP Chip Model: ESP8266
ESP Chip Cores: 1
ESP Board Name: PLATFORMIO_ESP12E

Firmware:
Build:⋄ 20111 - Mega
System Libraries:⋄ ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄
Plugin Count:⋄ 46 [Normal]
Build Origin: Travis
Build Time:⋄ Nov 2 2020 13:13:15

Binary:
ESP_Easy_mega_20201102_normal_ESP8266_4M1M.bin



I get the same response on an ESP32 board.
I get the same response using ESPEasy R120 release
I get the same response using either the IDE ESPEasy.ino or the image

Any help you can offer would be greatly appreciated.
Thanks,
Todd

User avatar
Ath
Normal user
Posts: 3488
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Command unknown: "PWM,14,200"

#2 Post by Ath » 13 Nov 2020, 16:35

If you add a Switch device to your ESPEasy setup (must be enabled, but no need to assign a GPIO pin to it) the PWM command should work again.
Recent restructuring of the source is the 'cause' for this. I don;t know why it isn't working in the R120 release though, haven't ever used that ancient version.
Work is in progress to move the more generic commands, that have been hiding in the P001 plugin for a long time, to the core, but that process is not completed yet.
/Ton (PayPal.me)

tsegula
New user
Posts: 7
Joined: 13 Nov 2020, 15:51

Re: Command unknown: "PWM,14,200"

#3 Post by tsegula » 13 Nov 2020, 17:35

Thanks for your quick reply.
I had seen that workaround from previous posts (2017,2018?). I was hoping it had been fixed since then.
I had tried this earlier with no success.
I just tried again. Still no luck.

Device: Switch input - Switch ❔
Name:
Dummy
Enabled:
Sensor
Internal PullUp:
Inversed Logic:
Note: Will go into effect on next input change.
GPIO ⇄ :
- None -
Switch Type:
Switch
Switch Button Type:
Normal Switch

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown: "PWM,14,200"

#4 Post by ThomasB » 13 Nov 2020, 19:24

As mentioned, starting with the ESP_Easy_mega_20201102 the PWM command will need the Switch input - Switch plugin to be installed. This may change again, but for now that's the new requirement. See this:
https://github.com/letscontrolit/ESPEasy/issues/3361

But something odd is going on. I just installed mega_20201102 on a Wemos Di Mini and have duplicated the problem you are experiencing. The PWM command reports Command Unknown using http. It works OK when using Tools->Command.

I have the Switch input - Switch plugin installed and enabled.
Here is an example of the URL I used for the test:

Code: Select all

http://192.168.1.3/control?cmd=PWM,13,500
The response is:

Code: Select all

Command unknown: "PWM,13,500"
The problem is not experienced with an earlier Mega release.

- Thomas

tsegula
New user
Posts: 7
Joined: 13 Nov 2020, 15:51

Re: Command unknown: "PWM,14,200"

#5 Post by tsegula » 13 Nov 2020, 20:01

That is very good news.
I did not think there might be a difference between http & tool/command.
I will reconfigure my MQTT input and confirm it works through a rule.
Thanks!!

tsegula
New user
Posts: 7
Joined: 13 Nov 2020, 15:51

Re: Command unknown: "PWM,14,200"

#6 Post by tsegula » 13 Nov 2020, 20:52

This is working within a rule set also.
Even though http commands are not working in this build I am good to go.
Thanks all,
Todd

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown: "PWM,14,200"

#7 Post by ThomasB » 13 Nov 2020, 21:32

It's good to know that your rule workaround resolved the problem.

Please add your findings to the open Github issue ticket so that the developers are informed about your discoveries:
https://github.com/letscontrolit/ESPEasy/issues/3361

Edit/Update: I reported this info at github.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown: "PWM,14,200"

#8 Post by ThomasB » 24 Nov 2020, 01:24

TD-er released the fix for the PWM "Command Unkown" bug. See this: https://github.com/letscontrolit/ESPEasy/issues/3361

- Thomas

waspie
Normal user
Posts: 127
Joined: 09 Feb 2017, 19:35

Re: Command unknown: "PWM,14,200"

#9 Post by waspie » 25 Nov 2020, 14:11

i thought i was going crazy. i have two ESP units that utilize a number of plugins with many tasks and one of them worked with PWM and the other didn't - same exact firmware compiled for both.

Would work on a release from august but not november. must have built and reflashed the "broken" one a dozen times and could not figure it out and i was starting to wonder how i was going to report this to github and have it make sense without you guys (td-er etc) thinking i'm crazy.

thanks for this post :D

User avatar
Ath
Normal user
Posts: 3488
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Command unknown: "PWM,14,200"

#10 Post by Ath » 25 Nov 2020, 14:32

The release has been made, so using release 20201125 should get you going
/Ton (PayPal.me)

tsegula
New user
Posts: 7
Joined: 13 Nov 2020, 15:51

Re: Command unknown: "PWM,14,200"

#11 Post by tsegula » 26 Nov 2020, 05:17

Just tested with 20201125 on an ESP32.
Everything seems to work fine even without a Switch device
Thank you!!!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 50 guests