ESP8266 does not control LEDs, buzzers. Syntax Error

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Dynalon
Normal user
Posts: 12
Joined: 26 Jun 2020, 18:36

ESP8266 does not control LEDs, buzzers. Syntax Error

#1 Post by Dynalon » 30 Jul 2020, 19:30

Hello everybody,

I am still quite new with this nice project and unfortunately even a beginner with json, pearl and so on. So perhaps this is a dumb question, but I do not get the answer alone (or with the help from Google).

I have several ESP8266 (D1 Mini and ESP-12E) running with EasyESP. Some projects are already running nicely, but one thing never works completely: I am not able to light a simple LED without an error message.

I tried this manual: https://www.letscontrolit.com/wiki/index.php?title=GPIO

I used the command

Code: Select all

http://<espeasyip>/control?cmd=GPIO,12,1
, in my case with inserted IP (192.168.178.75). I guess it should be then:

Code: Select all

http://192.168.178.75/control?cmd=GPIO,12,1
. I tried to type this in my firefox as I would open a website.

Am I correct? Or did I understand something wrong?

Everytime I try this, I get the message
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 9 column 1 of the JSON data
.

It doesn't matter if I try D1 Mini or ESP12-E, I used even different versions of ESPEasy, I always get this message.

Now the most weird thing: since I run the command

Code: Select all

GPIO,12,1
directly in the command input of my ESP-12E it switches the LED without any problem. After this it switches the LED by entering the code http://192.168.178.75/control?cmd=GPIO,12,1, too - but I still get the JSon Error message every time.

My ESP Nodes all are flashed quite slow and the actual version is Git Build: mega-20200608


Can anybody explain this to me? My final plan is to switch some LEDs, buzzers and so on automatically from my FHEM, but it is frustrating when even this early state is not working...

Thank you very much!

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

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#2 Post by Ath » 30 Jul 2020, 19:52

What version of ESPEasy is installed on your board?
/Ton (PayPal.me)

Dynalon
Normal user
Posts: 12
Joined: 26 Jun 2020, 18:36

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#3 Post by Dynalon » 30 Jul 2020, 22:39

It is the "ESP_Easy_mega_20200608_normal_ESP8266_4M1M"

If you do not know this one - I do not mind to change my version.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#4 Post by TD-er » 30 Jul 2020, 23:15

Well, there is a bug in the outputted JSON as it also includes a trailing "OK", which makes the JSON syntax invalid.

Code: Select all

{
"log": "GPIO 12 Set to 1",
"plugin": 1,
"pin": 12,
"mode": "output",
"state": 1
}

Ok
Is that what you mean?

Dynalon
Normal user
Posts: 12
Joined: 26 Jun 2020, 18:36

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#5 Post by Dynalon » 31 Jul 2020, 12:59

To be honest, I am an absolute beginner with JSON - thats why I am using until now only ESPEasy for my ESP8266 nodes. This way I get around most of the "programming" and I still get quite nice and usable results to integrate in my FHEM.
Is this "Ok" part of the bin file I installed on my ESP8266? I tried several devices now, this "Ok" also appears when I use a passive buzzer (active buzzer causes some more problems, but about this I will think later - one problem after the other). So what should I do? Is this "Ok" part of every ESPEasy Release? Should it be there? Or can I solve all this by using a different Version or release? Actually I do not mind to change my release, I just want to use a normal stable one, which supports as much devices as possible (BH1750, BME280, RFID, PIR, DHT22, Switches and so on) and runs on 4MB devices like my ESP8266-12E and my ESP8266 D1 Mini.

So If normally this "Ok" is not appearing, could you recommend me a different Release/bin file?

If this "Ok" always appears, is it possible to make it working (means switching LEDs, using buzzers,...) and ignoring this mistake that I at least do not get this message every time? (I guess it should not cause real problems if I cannot delete this message but just make it not visible...?)

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#6 Post by TD-er » 31 Jul 2020, 17:11

This extra OK is a known bug, which still needs to be resolved..

Dynalon
Normal user
Posts: 12
Joined: 26 Jun 2020, 18:36

Re: ESP8266 does not control LEDs, buzzers. Syntax Error

#7 Post by Dynalon » 31 Jul 2020, 22:42

Thank you, then I will just wait.

Post Reply

Who is online

Users browsing this forum: No registered users and 61 guests