Page 1 of 1

Command unknown: "relay,0,2"

Posted: 15 Nov 2020, 17:19
by _Cyber_
hello,

I am using P091 with ESP_Easy_mega_20201102_test_ESP8266_4M1M.bin.

relays do work, but I can see in log:

Code: Select all

916833: HTTP: relay,0,2
916839: Command unknown: 'relay,0,2'
916850: Domoticz: Sensortype: 7 idx: 10 values: 1;0;0;1
916856: SerSW : SetSwitch r0:1
916866: EVENT: WohnzimmerRelays#Relay0=1.00
916952: EVENT: WohnzimmerRelays#Relay1=0.00
917051: EVENT: WohnzimmerRelays#Relay2=0.00
917151: EVENT: WohnzimmerRelays#Relay3=1.00
I control them by e.g. http://<ESP-IP>/control?cmd=relay,0,2

the http response page shows: Command unknown: "relay,0,2"

Do I have to adapt the request URL anyhow?

Thanks!

BR
Alois

Re: Command unknown: "relay,0,2"

Posted: 15 Nov 2020, 18:08
by Ath
Addressing tasks by name is a PR that is not merged yet, but also not the way to turn on/off a relay. The relay is to be connected to a gpio pin, so to command a relay the gpio command should be used.

To set a value to a dummy device, the TaskValueSet command must be used.

Re: Command unknown: "relay,0,2"

Posted: 15 Nov 2020, 18:37
by TD-er
Also make sure there is an enabled task with that plugin.

Re: Command unknown: "relay,0,2"

Posted: 17 Nov 2020, 09:00
by _Cyber_
sorry ath, I do not understand your reply. the relay is not connected to a GPIO, it is on a relay shield where a MCU is on. espeasy controlls the MCU by serial rx / tx commands.
why do I need now a dummydevice? I thought the plugin is the one from viewtopic.php?f=6&t=3245 but now integrated without custom builds?

also I found today https://github.com/letscontrolit/ESPEasy/issues/3374 - is this maybe the root cause?

Thanks!

Best regards

Re: Command unknown: "relay,0,2"

Posted: 17 Nov 2020, 10:35
by TD-er
I think the issue you linked may indeed be the root cause.
And even though the replay may be "Command unknown", I think the command is still handled (if the plugin is assigned to a task and enabled).

Re: Command unknown: "relay,0,2"

Posted: 17 Nov 2020, 10:36
by Ath
_Cyber_ wrote: 17 Nov 2020, 09:00 sorry ath, I do not understand your reply. the relay is not connected to a GPIO, it is on a relay shield where a MCU is on. espeasy controlls the MCU by serial rx / tx commands.
Well, I missed that you are using P091 that supports the 'relay' command. And I've never used that plugin.
As TD-er already said, be sure to have the plugin installed, and enabled, but that seems to be the case as the relay is working (I also didn't get that part in context, sorry)
_Cyber_ wrote: 17 Nov 2020, 09:00 also I found today https://github.com/letscontrolit/ESPEasy/issues/3374 - is this maybe the root cause?
Yes, most likely your issue is directly related to this.
If possible, ignore the returned response from ESPEasy for now, until that issue is resolved.

Re: Command unknown: "relay,0,2"

Posted: 17 Nov 2020, 10:39
by _Cyber_
yes, the relays do work flawless, only the output puzzled me.

I have subscribed to the issue, will ignore the output and and will test as soon as it is fixed.

Thank you!

Best regards
Alois