Closed s0170071 closed 1 year ago
resolved it by adding
#include "ArduinoJson.h"
to P035_IRTX.ino
Still, this should not happen...
I think this include is also needed for _P016_IR.ino
as the same class is used in there.
Can you make a PR for the addition of both includes?
hmm. Now it compiles but gives me an error in the log. Deserialize Json failed: NoMemory
Other than that, I am having a hard time copying that line from the weblog as it jumps away then I try to do so. Yes, I have unchecked Autoscroll. Try strg+f "failed". You see it but you cannot grab it :-o
There is a copy button on the web page. Then you can copy/paste it into notepad or something similar.
Deserialize Json failed: NoMemory
what is the command you are giving it? I suppose is an irsendAC command
In line 210 of P035.ino StaticJsonDocument<300> doc;
Make it bigger StaticJsonDocument<320> doc;
or even 350 if this doesnt work for you.
But i am curious how big is your command
Is it possible there to include the needed size in the log?
I dont think so
Well if you know how much the message is you want to encode, you can give a rough estimate since you know the JSON structure and thus have a fixed offset.
well I have done this and I had concluded that 300 would be enought
The command that I send is:
IRSENDAC,{"power":"OFF","temp":"16","protocol":"FUJITSU_AC","model":"ARREB1E","mode":"AUTO", "swingv":"OFF", "swingh":"OFF", "turbo":"OFF", "econo":"OFF", "fanspeed":"AUTO"}
Thats 174 characters. Sounds like it should have worked. In fact, the ESPEasy log error is gone although I did not touch anything since.
The log shows now:
110256038: IRTX: JSON received: {'power':'OFF','temp':'16','protocol':'FUJITSU_AC','model':'ARREB1E','mode':'AUTO', 'swingv':'OFF', 'swing
110256115: IRTX: IR Code Sent: {'power':'OFF'
Btw, this does compile of of the box:
//StaticJsonDocument<300> doc;
DynamicJsonDocument doc(string.length());
Cant't test it right now, its too early in the morning to wake everyone by playing with the AC. Will report back.
Encapsulate the whole JSON inbetween '
IRSENDAC,' {"power":"OFF","temp":"16","protocol":"FUJITSU_AC","model":"ARREB1E","mode":"AUTO", "swingv":"OFF", "swingh":"OFF", "turbo":"OFF", "econo":"OFF", "fanspeed":"AUTO"}'
Cant't test it right now, its too early in the morning to wake everyone by playing with the AC. Will report back.
You don't have a 'testing' and 'production' environment for that? ;)
Encapsulate the whole JSON inbetween '
Yep, see also https://github.com/letscontrolit/ESPEasy/issues/2724
You don't have a 'testing' and 'production' environment for that? ;)
I wish I had. Whenever I do a
git clone MyHouse; rm -s /tmp/wife
I get an access denied error 👎
Encapsulate the whole JSON inbetween '
I'll try but I am pretty sure it worked without. The command comes from OpenHAB via MQTT and I did not touch that part of my setup. I just updated the ESP.
recent changes regarding more strict parsing of parameters.
Ah, I get it.
Check also https://www.letscontrolit.com/forum/viewtopic.php?f=2&t=6850 I have updated the posts to reflect this change also
This seems to have been fixed now, so can be closed.
As soon as I add #define P016_P035_Extended_AC to custom.h, I get a compile error:
'StaticJsonDocument' was not declared in this scope
my Custom.h: