Page 1 of 1

[SOLVED]Error opening url:

Posted: Wednesday 01 August 2018 16:32
by BertB
I have read a lot about this issue, but have not yet found an answer.
RPI 3B
Domoticz V4.9796

I use a Domoticz switch to configure a display in an ESPEasy device.
When the switch is on, it sends in the On action :

Code: Select all

http://192.168.0.76/control?cmd=NEXTION,page0.vFont.val=1
In the Off action

Code: Select all

http://192.168.0.76/control?cmd=NEXTION,page0.vFont.val=0
When I entere these commands in a web browser, I get no error message.
When I push the switch, I get:

Code: Select all

2018-08-01 16:29:44.203 Status: User: Admin initiated a switch command (293/RFLVijferpomp/Off)
[u]2018-08-01 16:29:44.933 Error: Error opening url: http://192.168.0.76/control?cmd=NEXTION,page0.vFont.val=0 [/u]
Strangely enough, the correct action is done in the ESPEasy device.

I use this method quite some time now, but I cannot remember this error before.

Re: Error opening url:

Posted: Thursday 13 September 2018 19:00
by BertB
Yes, my problem was caused by a missing answer statement in ESPEasy.

Re: Error opening url:

Posted: Monday 29 October 2018 16:39
by Vulpecula
And how did you solve that ESPEasy returns an answer statement? I have the same error, but the functionality is working. I want to avoid unneccessary error messages.

Re: [SOLVED]Error opening url:

Posted: Monday 29 October 2018 19:24
by BertB
It is solved in the later beta releases of ESPEasy.
The NEXTION plugin required an extra line (with SendStatus) in the Write section:

Code: Select all

        if (tmpString.equalsIgnoreCase(getTaskDeviceName(event->TaskIndex)) == true) { // If device names match we have a command to write.
            argIndex = string.indexOf(',');
            tmpString = string.substring(argIndex + 1);
            sendCommand(tmpString.c_str(), HwSerial);

            String log;
            log.reserve(110);                           // Prevent re-allocation
            log = F("NEXTION075 : WRITE = ");
            log += tmpString;
            #ifdef DEBUG_LOG  
              addLog(LOG_LEVEL_INFO, log);
            #endif
            SendStatus(event->Source, log);             // Reply (echo) to sender. This will print message on browser. <============
           success = true;                             // Set true only if plugin found a command to execute.
        }
        break;
    }