Build 120 MQTT PWM Problems

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Build 120 MQTT PWM Problems

#1 Post by sheppy » 13 Sep 2016, 08:31

I've just started experimenting with PWM to control a dimmer with V120.
Sending "1" to MyDevice/gpio/16 turns the LED ON
Sending "0" to MyDevice/gpio/16 turns the LED OFF
Sending "200" to MyDevice/PWM/16 hangs the ESP
Sending "200" via http in accordance with the wiki gives a dimmed LED
Sending "100" via http gives a dimmer LED than with "200"
The MQTT commands don't seem to work from both MQTT.fx and openHAB

Is the MQTT PWM command not working or am I doing something wrong? The board is a Wemos D1 V1

User avatar
nonflammable
Normal user
Posts: 42
Joined: 09 Mar 2016, 22:19
Location: Poland

Re: Build 120 MQTT PWM Problems

#2 Post by nonflammable » 13 Sep 2016, 09:38


sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: Build 120 MQTT PWM Problems

#3 Post by sheppy » 13 Sep 2016, 09:42

That explains it - thanks.
Can you point me to somewhere that lists the versions of libraries needed for a successful compile with the latest version? I've used the downloaded firmware so far

User avatar
nonflammable
Normal user
Posts: 42
Joined: 09 Mar 2016, 22:19
Location: Poland

Re: Build 120 MQTT PWM Problems

#4 Post by nonflammable » 13 Sep 2016, 09:51


sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: Build 120 MQTT PWM Problems

#5 Post by sheppy » 13 Sep 2016, 10:24

I added the suggested versions in that thread and sadly got an error

"'SpiffsSectors' was not declared in this scope"

It highlights

if (SpiffsSectors() == 0) and appears annoyingly to have found older libraries scattered around my PC despite running it from a freshly downloaded software in a new folder. Arduino software can be such a pain sometimes!!!!

I have ran out of time to work it out now, so will get onto it later this week and work out what its not happy with...

sheppy
Normal user
Posts: 49
Joined: 28 Jun 2016, 05:53

Re: Build 120 MQTT PWM Problems

#6 Post by sheppy » 17 Sep 2016, 01:43

Finally got this to successfully compile and MQTT PWM now works.
For those following later I deleted all traces of my previous Arduino IDE versions by removing the folders and their contents at
"My Documents\Arduino" and
"C:\Users\MyUserName\AppData\Local\Arduino15"
"C:\Users\MyUserName\AppData\Roaming\Arduino15"
Then after I had downloaded the contents of the Arduino V1.6.11 zip file into "C:\ESP8266\arduino-1.1.11" I created folders "C:\ESP8266\Sketches" and "C:\ESP8266\Sketches\ESPEasy"
I then copied the contents of ESPEasy-master into there.
It seems if you don't put the ESP Easy Master files into an "ESPEasy" folder off your sketch folder the Arduino IDE does it for you and the first thing it does when compiling is complain about SPIFFS due to the rest of the firmware being in the wrong place.
Also after looking on my scope the PWM command seems to work with values between 0 and 1023. 1023 is fully on and 0 is fully off.
Thanks nonflammable for your help!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 96 guests