-
Hello, I am using a ESP32-C3 here with default firmware. I want to make two simple rules to send a WebQuery on a SSerial Event Rule2 ON SSerialReceived#Message DO WebQuery http://URL POST %value% ENDON and send back a SSerial message, that the WebQuery was delivered. But I cant find any documentation how to parse if WebQuery was successfully delivered. ChatGpt told me to use this: Rule3 ON WebQuery#Status=200 DO SSerialSend "WebQuery sent" ENDON But it seems there is no "Status" at all implemented. I found this example here to use something like this: Rule3 ON WebQuery#Data=Done DO SSerialSend "WebQuery sent" ENDON This gets parsed, but it always is parsed no matter what. There is always a RESULT = {"WebQuery":"Done"} sent, no matter if the message was delivered. You could even do a bogus command like this: WebQuery http://THIS_URL_DOES_NOT_EXIST POST test and you still get a : RESULT = {"WebQuery":"Done"} What is the right way to do this and get a proper HTTP reponse code like 200, or something else to notice the server responded? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 33 replies
-
I already answered about what you can do. #13209 (comment) |
Beta Was this translation helpful? Give feedback.
-
@sfromis Hello, thanks for answering, but like I already said, this doesnt work. Tasmota always sends back {"WebQuery":"Done"} no matter what. if you do a bogus command like WebQuery https://thisurldoesnotexist POST test it also respons with {"WebQuery":"Done"} and not with {"WebQuery":"Connect failed"} There is never a error message sent back. is this a bug? I dont know how to use Berry, the documentation is sadly not really good. If youd like to post a simple Berry example for this if it is just a few lines, I would appreciate that. But I would more like to use Rules because how simple they are for this. |
Beta Was this translation helpful? Give feedback.
As I already posted:
A direct match for your rule now would be:
Sure, this is not shorter; where Berry wins is when starting to combine things, without weird workaround for limitations with rules.
A fuller implementation would be to replace the use of
WebQuery
, something along the lines of: