Command unknown TaskValueSet

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Command unknown TaskValueSet

#1 Post by LaurB » 21 Oct 2022, 22:35

Hello,

I'm trying to send some data from an arduino Uno to a Wemos D1 using the serial pins. I'm not very good with codding so I need your help.
I use serial.print in Uno like this:

Code: Select all

  Serial.print("TaskValueSet,1,1,");
  Serial.println(String(thermocouple1.readCelsius()));

  Serial.print("TaskValueSet,1,2,");
  Serial.println(String(thermocouple2.readCelsius(),3));
It looks ok in putty, but the data received on the Wemos side is truncated, or concatenated like this:

Code: Select all

865728: Too many arguments: cmd=TaskValueSet Arg1=1 Arg2=TaskValueSet Arg3=1 ExtraArg4=1 ExtraArg5=27.75 lineLength=37
865731: Line: _TaskValueSet,1,TaskValueSet,1,1,27.75_
865734: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
865743: Command unknown: TaskValueSet,1,TaskValueSet,1,1,27.75
870521: Command unknown: TaskVal,27.75
872063: WD   : Uptime 15 ConnectFailures 0 FreeMem 17888 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
From what I find on the internet it should work, but again my coding skill level is copy and pasting, and I don't know what to do to fix it.

What I tryed:
1. Used 115200, 9600 and 19200 baud rate on both Uno and D1 side;
2. Used level shifter 5V>3.3V;
3. Used Serial.println("TaskValueSet,1,2," + String(thermocouple2.readCelsius(),3));
4. Looked at https://github.com/letscontrolit/ESPEasy/issues/2724, but I didnt knew how to used it for my case.

Thank you.

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

Re: Command unknown TaskValueSet

#2 Post by TD-er » 21 Oct 2022, 22:45

How quickly will those commands be sent one after eachother?

Maybe it is best to add some delay from the Arduino board inbetween the commands.

Code: Select all

  // Read both temps first before sending, so they're taken nearly at the same moment.
  const float temp1 = thermocouple1.readCelsius();
  const float temp2 = thermocouple2.readCelsius();
  
  Serial.println(""); // Clear some of the buffer and make sure ESPEasy will not see a command starting with some left-over data.
  delay(100); // Give ESPEasy time to read all from the serial buffers
  Serial.print("TaskValueSet,1,1,");
  Serial.println(String(temp1));
  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  Serial.print("TaskValueSet,1,2,");
  Serial.println(String(temp2,3));

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

Re: Command unknown TaskValueSet

#3 Post by Ath » 21 Oct 2022, 22:50

Assuming your ESPEasy release is no more that 6 months old.
On the ESPEasy side, if you are not trying to change a Dummy device, you need to set "Allow TaskValueSet on all plugins:" checked on the Tools/Advanced page to be able to set other than Dummy device task values.

The command log you shared shows quite inconsistent commands, so you might need to clean that up before they are recognized properly.
/Ton (PayPal.me)

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#4 Post by LaurB » 21 Oct 2022, 23:02

The build is mega-20220809_57b0c0c.
I checked "Allow TaskValueSet on all plugins" on Tools/Advanced page.

I added the delay on the arduino, here is the full sketch:

Code: Select all

#include "max6675.h" 

// Temperature Sensor1
int thermoD0 = 12; // so
int thermo1CS = 4; 
int thermoCLK = 13; // sck
float temp1 = 0; 
MAX6675 thermocouple1(thermoCLK, thermo1CS, thermoD0); 

// Temperature Sensor2
int thermo2CS = 5; 
float temp2 = 0; 
MAX6675 thermocouple2(thermoCLK, thermo2CS, thermoD0); 

void setup()
{
  Serial.begin(19200); 
  delay(1000);
}

void loop()
{

  // Read both temps first before sending, so they're taken nearly at the same moment.
  const float temp1 = thermocouple1.readCelsius();
  const float temp2 = thermocouple2.readCelsius();
  
  Serial.println(""); // Clear some of the buffer and make sure ESPEasy will not see a command starting with some left-over data.
  delay(100); // Give ESPEasy time to read all from the serial buffers
  Serial.print("TaskValueSet,1,1,");
  Serial.println(String(temp1,2));
  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  Serial.print("TaskValueSet,1,2,");
  Serial.println(String(temp2,2));
  
}
It looks ok in putty but with the same problems in esp side logs:

Code: Select all

289000: Line: _TaskValueSet,1,2TaskValueSet,1,1,27.25_
289003: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
289010: Command unknown: TaskValueSet,1,2TaskValueSet,1,1,27.25
289304: Too many arguments: cmd=TaskValueSet Arg1=1 Arg2=1TaskValueSet Arg3=1 ExtraArg4=2 ExtraArg5=29.00 lineLength=38
289307: Line: _TaskValueSet,1,1TaskValueSet,1,2,29.00_
289310: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
289317: Command unknown: TaskValueSet,1,1TaskValueSet,1,2,29.00
290721: Too many arguments: cmd=TaskValueSet Arg1=1TaskValueSet Arg2=1 Arg3=2 ExtraArg4=29.00 lineLength=36
290724: Line: _TaskValueSet,1TaskValueSet,1,2,29.00_
290728: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
290738: Command unknown: TaskValueSet,1TaskValueSet,1,2,29.00
292042: Too many arguments: cmd=TaskValueSet Arg1=1 Arg2=2TaskValueSet Arg3=1 ExtraArg4=1 ExtraArg5=27.50 lineLength=38
292045: Line: _TaskValueSet,1,2TaskValueSet,1,1,27.50_
292048: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
292055: Command unknown: TaskValueSet,1,2TaskValueSet,1,1,27.50
292346: Command unknown: TaskValueSTaskValueSet,1,2,29.00
293763: Too many arguments: cmd=TaskValueSet Arg1=1 Arg2=1TaskValueSet Arg3=1 ExtraArg4=2 ExtraArg5=28.75 lineLength=38
293767: Line: _TaskValueSet,1,1TaskValueSet,1,2,28.75_
293770: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
293779: Command unknown: TaskValueSet,1,1TaskValueSet,1,2,28.75
And in putty:

Code: Select all

TaskValueSet,1,1,27.50
TaskValueSet,1,2,28.25

TaskValueSet,1,1,27.50
TaskValueSet,1,2,29.25

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

Re: Command unknown TaskValueSet

#5 Post by TD-er » 21 Oct 2022, 23:16

OK, maybe you should change it into this:

Code: Select all

#include "max6675.h" 

// Temperature Sensor1
int thermoD0 = 12; // so
int thermo1CS = 4; 
int thermoCLK = 13; // sck
float temp1 = 0; 
MAX6675 thermocouple1(thermoCLK, thermo1CS, thermoD0); 

// Temperature Sensor2
int thermo2CS = 5; 
float temp2 = 0; 
MAX6675 thermocouple2(thermoCLK, thermo2CS, thermoD0); 

void setup()
{
  Serial.begin(19200); 
  delay(1000);
}

void loop()
{

  // Read both temps first before sending, so they're taken nearly at the same moment.
  const float temp1 = thermocouple1.readCelsius();
  const float temp2 = thermocouple2.readCelsius();
  
  Serial.println(""); // Clear some of the buffer and make sure ESPEasy will not see a command starting with some left-over data.
  delay(100); // Give ESPEasy time to read all from the serial buffers
  String str = "TaskValueSet,1,1,";
  str += String(temp1,2);
  str += "\r\n";
  Serial.println(str);

  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  str = "TaskValueSet,1,2,";
  str += String(temp2,2);
  str += "\r\n";
  Serial.println(str);

  delay(1000); // Wait a second before sending new values.
  
}
Main difference is the delay at the end of the loop and adding CRLF explicitly at each command, just to be sure.

Edit:
Maybe you should also use 115200 baud on both sides.
Not sure what serial buffer size is present on the Uno, but it could maybe overflow?

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#6 Post by LaurB » 21 Oct 2022, 23:26

I changed the code and the baud to 115200 but there are still errors

Code: Select all

40417: Dummy: value 1: 27.50
40419: Dummy: value 2: 29.00
40440: EVENT: Temperaturi#Temp1=27.50
40447: EVENT: Temperaturi#Temp2=29.00
53296: EVENT: Clock#Time=Sat,00:24
53403: Too many arguments: cmd=TaskValueSet Arg1=1TaskValueSet Arg2=1 Arg3=2 ExtraArg4=28.50 lineLength=36
53404: Line: _TaskValueSet,1TaskValueSet,1,2,28.50_
53404: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
53408: Command unknown: TaskValueSet,1TaskValueSet,1,2,28.50
59447: Too many arguments: cmd=TaskValueSet Arg1=1TaskValueSet Arg2=1 Arg3=2 ExtraArg4=28.75 lineLength=36
59448: Line: _TaskValueSet,1TaskValueSet,1,2,28.75_
59448: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
59452: Command unknown: TaskValueSet,1TaskValueSet,1,2,28.75
60417: Dummy: value 1: 2.00
60419: Dummy: value 2: 28.50
60440: EVENT: Temperaturi#Temp1=2.00
60446: EVENT: Temperaturi#Temp2=28.50
61851: WD   : Uptime 1 ConnectFailures 0 FreeMem 17384 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
69116: Too many arguments: cmd=TaskValueSet Arg1=1 Arg2=1TaskValueSet Arg3=1 ExtraArg4=2 ExtraArg5=29.00 lineLength=38
69117: Line: _TaskValueSet,1,1TaskValueSet,1,2,29.00_
69117: Command not executed! See: https://github.com/letscontrolit/ESPEasy/issues/2724
69122: Command unknown: TaskValueSet,1,1TaskValueSet,1,2,29.00

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

Re: Command unknown TaskValueSet

#7 Post by Ath » 21 Oct 2022, 23:31

Does it work if you only send the temp1 value, and ignore the temp2 value for now? Or increase the 100 msec delay to 1000 msec, 'just for trying'?
/Ton (PayPal.me)

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

Re: Command unknown TaskValueSet

#8 Post by TD-er » 21 Oct 2022, 23:34

Apart from the suggested increase in delay time between the commands, what else is your ESPEasy node doing?
It looks like it is now occupied with something so it cannot read from its serial buffers in due time.

For example, are you running some rules on the ESPEasy node and if so. please show them.

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#9 Post by LaurB » 21 Oct 2022, 23:43

I changed the delay to 1000ms, same errors.
Removed temp2 and it works for temp1.
There are no rules defined, only 1 dummy defined and one mqtt controller. The load is at 8%.
Capture.PNG
Capture.PNG (30.73 KiB) Viewed 3324 times

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown TaskValueSet

#10 Post by ThomasB » 21 Oct 2022, 23:54

I'm trying to send some data from an arduino Uno to a Wemos D1 using the serial pins.
Which Wemos D1 Mini hardware Rev is it?

There's a USB Serial Chip that shares the ESP8266 serial pins so external serial could conflict. Some D1 Mini versions have resistors on the ESP's serial pins to help prevent conflicts, but I believe the exact configuration depends on the board rev.

I also made some changes to your code. Assuming the serial signals are not being mangled, here's what I suggest:

Code: Select all

#include "max6675.h" 

// Temperature Sensor1
int thermoD0 = 12; // so
int thermo1CS = 4; 
int thermoCLK = 13; // sck
MAX6675 thermocouple1(thermoCLK, thermo1CS, thermoD0); 

// Temperature Sensor2
int thermo2CS = 5; 
MAX6675 thermocouple2(thermoCLK, thermo2CS, thermoD0); 

void setup()
{
  Serial.begin(19200);
  delay(1000);
  Serial.println(""); // Clear some of the buffer and make sure ESPEasy will not see a command starting with some left-over data.
  Serial.flush();
  delay(250); // Give ESPEasy time to read all from the serial buffers
}

void loop()
{
  float temp1 = 0.0f;
  float temp2 = 0.0f;
  
  // Read both temps first before sending, so they're taken nearly at the same moment.
  temp1 = thermocouple1.readCelsius();
  temp2 = thermocouple2.readCelsius();

  Serial.print("TaskValueSet,1,1,");
  Serial.println(String(temp1,2));
  Serial.flush();
  delay(250); // Give ESPEasy time to process the command

  Serial.print("TaskValueSet,1,2,");
  Serial.println(String(temp2,2));
  Serial.flush();
  delay(250); // Give ESPEasy time to process the command  
}
- Thomas

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

Re: Command unknown TaskValueSet

#11 Post by TD-er » 21 Oct 2022, 23:58

You also want to "run" the task as it is connected to a controller.

So either call "TaskRun" or use the combined command "TaskValueSetAndRun"

Also I guess it would be better to send both values in a single command, via events:

Code: Select all

#include "max6675.h" 

// Temperature Sensor1
int thermoD0 = 12; // so
int thermo1CS = 4; 
int thermoCLK = 13; // sck
float temp1 = 0; 
MAX6675 thermocouple1(thermoCLK, thermo1CS, thermoD0); 

// Temperature Sensor2
int thermo2CS = 5; 
float temp2 = 0; 
MAX6675 thermocouple2(thermoCLK, thermo2CS, thermoD0); 

void setup()
{
  Serial.begin(115200); 
  delay(1000);
}

void loop()
{
  // Read both temps first before sending, so they're taken nearly at the same moment.
  const float temp1 = thermocouple1.readCelsius();
  const float temp2 = thermocouple2.readCelsius();
  
  String event = "event,thermo=";
  event += String(temp1,2);
  event += ',';
  event += String(temp2,2);
  event += "\r\n";
  Serial.println(event);

  delay(1000); // Wait a second before sending new values.
}
This will create an event command like this:
event,thermo=25.12,26,34

The rules for ESPEasy to process the event:

Code: Select all

on thermo do
  TaskValueSet,1,1,%eventvalue1%
  TaskValueSet,1,2,%eventvalue2%
  TaskRun,1  // Send the new samples to the controller
endon

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

Re: Command unknown TaskValueSet

#12 Post by TD-er » 22 Oct 2022, 00:00

@ThomasB
What does the Serial.flush() do on Arduino?
The Serial implementation on ESP's is just clearing the buffer and not really sending out the data.

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown TaskValueSet

#13 Post by ThomasB » 22 Oct 2022, 00:10

What does the Serial.flush() do on Arduino?
It waits for the Arduino's Serial Tx Data to be sent out.
https://www.arduino.cc/reference/en/lan ... ial/flush/
The Serial implementation on ESP's is just clearing the buffer and not really sending out the data.
That behavior was used in early versions of Arduino. Now it sends out all the TxD chars.

- Thomas
Last edited by ThomasB on 22 Oct 2022, 00:14, edited 1 time in total.

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

Re: Command unknown TaskValueSet

#14 Post by TD-er » 22 Oct 2022, 00:13

OK, then that one really is needed right before the delay call.

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#15 Post by LaurB » 22 Oct 2022, 08:13

@ThomasB
I tried your code but there are still errors. I don't know what revision the board is. All it is written on it is D1. I don't think it's a Wemos, it's a chinese clone. Picture with the setup below.

@TD-er
It's still messing the data

Code: Select all

31467254: EVENT: thermo=26.75,27.75
31468265: EVENT: thermo=26.50,28.00
31469271: EVENT: thermo=27.00,27.75
31471286: EVENT: thermo=26.event,thermo=26.75,28.50
31471851: WD   : Uptime 525 ConnectFailures 0 FreeMem 17752 WiFiStatus WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
31472291: EVENT: thermo=26.25,28.00
31473299: EVENT: thermo=26.25,27.50
Attachments
20221022_090957.jpg
20221022_090957.jpg (221.31 KiB) Viewed 3280 times

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#16 Post by LaurB » 22 Oct 2022, 09:02

It looks like the problem is with the D1 board. I switched to a NodeMCU and it runs without any problems, at least for the last 15 minutes. That is really sad becouse I like the D1 shape more then the NodeMCU.
I changed the code to send 4 values using TaskValueSetAndRun

Code: Select all

#include "max6675.h" 

// Temperature Sensor1
int thermoD0 = 12; // so
int thermo1CS = 4; 
int thermoCLK = 13; // sck
float temp1 = 0; 
MAX6675 thermocouple1(thermoCLK, thermo1CS, thermoD0); 

// Temperature Sensor2
int thermo2CS = 5; 
float temp2 = 0; 
MAX6675 thermocouple2(thermoCLK, thermo2CS, thermoD0); 

void setup()
{
  Serial.begin(115200); 
  delay(1000);
}

void loop()
{

  // Read both temps first before sending, so they're taken nearly at the same moment.
  const float temp1 = thermocouple1.readCelsius();
  const float temp2 = thermocouple2.readCelsius();
  
  Serial.println(""); // Clear some of the buffer and make sure ESPEasy will not see a command starting with some left-over data.
  delay(100); // Give ESPEasy time to read all from the serial buffers
  String str = "TaskValueSetAndRun,1,1,";
  str += String(temp1,2);
  str += "\r\n";
  Serial.println(str);

  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  str = "TaskValueSetAndRun,1,2,";
  str += String(temp2,2);
  str += "\r\n";
  Serial.println(str);

  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  str = "TaskValueSetAndRun,1,3,";
  str += String(temp1,2);
  str += "\r\n";
  Serial.println(str);
    
  delay(100); // Give ESPEasy time to read all from the serial buffers and process the command

  str = "TaskValueSetAndRun,1,4,";
  str += String(temp2,2);
  str += "\r\n";
  Serial.println(str);
  delay(1000); // Wait a second before sending new values.
  
}
I will need to set up a syslog server to monitor the logs for a longer period of time.

Code: Select all

614781: EVENT: Temp#Temp1=26.75
614783: EVENT: Temp#Temp2=27.75
614783: EVENT: Temp#Temp3=26.75
614784: EVENT: Temp#Temp4=27.75
616054: Dummy: value 2: 28.25
616055: Dummy: value 3: 26.75
616057: Dummy: value 4: 27.75
616085: EVENT: Temp#Temp1=26.75
616087: EVENT: Temp#Temp2=28.25
616087: EVENT: Temp#Temp3=26.75
616088: EVENT: Temp#Temp4=27.75
616155: Dummy: value 1: 26.75
616157: Dummy: value 2: 28.25
616158: Dummy: value 3: 26.75
616160: Dummy: value 4: 28.25
616200: EVENT: Temp#Temp1=26.75
616208: EVENT: Temp#Temp2=28.25
616208: EVENT: Temp#Temp3=26.75
616209: EVENT: Temp#Temp4=28.25
Thank you for all your help!

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

Re: Command unknown TaskValueSet

#17 Post by Ath » 22 Oct 2022, 12:53

Taking a step back from the issues you have encountered, and looking at the task you seem to try and solve: Why not use the ESPEasy supported MAX6675 thermocouple directly from ESPEasy, instead of using another Arduino device just to read that sensor?
/Ton (PayPal.me)

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#18 Post by LaurB » 22 Oct 2022, 14:28

Ath wrote: 22 Oct 2022, 12:53 Why not use the ESPEasy supported MAX6675 thermocouple directly from ESPEasy, instead of using another Arduino device just to read that sensor?
I need 6 sensors.

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

Re: Command unknown TaskValueSet

#19 Post by Ath » 22 Oct 2022, 16:26

LaurB wrote: 22 Oct 2022, 14:28 I need 6 sensors.
That should not be a problem, AFAICS you can configure multiple tasks with that plugin, just give them different names, and when disabling I2C you have 6 GPIOs available for configuring CS pins, and when also disabling the serial port, there are 8 available (though the note suggests only 5 for ESP8266, that note should better be removed, I think). I haven't tested it myself though.
/Ton (PayPal.me)

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#20 Post by LaurB » 22 Oct 2022, 17:37

The setup requires 6 MAX6675, 12 relays and one OLED display. The temperature sensors and the display will connected to the Uno. Two PCF8574T will be connected to ESP8266 I2C to control the relays.
Here is a picture with the prototype, it still needs 3 sensors. I'm using an arduino Uno with an ESP8266 board.
20221022_182721.jpg
20221022_182721.jpg (223.72 KiB) Viewed 3232 times

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown TaskValueSet

#21 Post by ThomasB » 22 Oct 2022, 17:47

It looks like the problem is with the D1 board.
It is a Wemos D1R2 UNO clone board. It has 470 ohm resistors inline with USB chip's serial signals that are intended for sharing the external serial signal. But very fussy, typical logic level conversion circuitry used on the Arduino probably won't work well.
https://www.openhacks.com/uploadsproduc ... ematic.pdf

BTW, your photo shows that the USB cable is connected to the Wemos board. For sure, disconnect it since USB activity might interfere with the Arduino's Serial data.
Why not use the ESPEasy supported MAX6675 thermocouple directly from ESPEasy
+1. That is the ideal solution.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1065
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Command unknown TaskValueSet

#22 Post by ThomasB » 22 Oct 2022, 18:19

@TD-er/@Ath: Does serial log support a "Serial Swap" configuration? If my suspicions are correct then enabling that (use different serial pins) may solve the problem. I'd investigate this myself, but all my ESPEasy stuff is packed in boxes.

As an alternative configuration, how about eliminating the Arduino and use two NodeMCUs instead. One for temperature measurements, the other for Relay I/O. Data sharing would use ESPEasy's P2P communication rather than hard wires.

- Thomas

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

Re: Command unknown TaskValueSet

#23 Post by Ath » 22 Oct 2022, 18:45

ThomasB wrote: 22 Oct 2022, 18:19 @TD-er/@Ath: Does serial log support a "Serial Swap" configuration? If my suspicions are correct then enabling that (use different serial pins) may solve the problem. I'd investigate this myself, but all my ESPEasy stuff is packed in boxes.
That is being worked on by TD-er... ;)
ThomasB wrote: 22 Oct 2022, 18:19 As an alternative configuration, how about eliminating the Arduino and use two NodeMCUs instead. One for temperature measurements, the other for Relay I/O. Data sharing would use ESPEasy's P2P communication rather than hard wires.
Or a single ESP32 or ESP32-s2, as they have many more GPIO's available. And you can still use the PCF8574 GPIO expanders, they are quite useful for managing relays.
/Ton (PayPal.me)

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#24 Post by LaurB » 22 Oct 2022, 18:56

Ok, then I can use 2 NodeMCUs. One for I2C and the other for temperature measurments.
I did a test but it seems that there are not enough CS pins available. I disabled I2C interface so it seems that there are 6 pins available in the plugin settings.
CS.png
CS.png (12.15 KiB) Viewed 3206 times
- D0, D1, D2 and D4 are working
- D3 not working
- D8 is working, but when I used it the task configured for D3 also updates
task.png
task.png (96.4 KiB) Viewed 3206 times
EDIT: Or I can put 4 MAX6675 on one NodeMCU and 2 MAX6675 + the PCF expanders on the other one.
Or use an ESP32 as @Ath sugested, but at the moment I don't have any to do some tests.

The logic will be done by openhab, so I don't need serial comunication between the two NodeMCUs.

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

Re: Command unknown TaskValueSet

#25 Post by Ath » 22 Oct 2022, 19:11

LaurB wrote: 22 Oct 2022, 18:56 - D8 is working, but when I used it the task configured for D3 also updates
That seems to be a somewhat obscure bug. I'll put in a fix for that.

Edit: Added it as a bugfix in this PR #4309. Once the Github Actions build is completed, you can download the binaries from there, assuming you have a (free) Github account.
/Ton (PayPal.me)

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

Re: Command unknown TaskValueSet

#26 Post by TD-er » 22 Oct 2022, 20:19

Not sure if GPIO extenders like PCF/MCP units will work well with SPI.
No idea how quickly those pins will switch, which is needed for a CS channel on SPI.
Apart from the fact that you can't select external GPIO pins in the task itself.

LaurB
Normal user
Posts: 33
Joined: 05 Aug 2019, 13:22

Re: Command unknown TaskValueSet

#27 Post by LaurB » 22 Oct 2022, 20:35

TD-er wrote: 22 Oct 2022, 20:19 Not sure if GPIO extenders like PCF/MCP units will work well with SPI.
No idea how quickly those pins will switch, which is needed for a CS channel on SPI.
Apart from the fact that you can't select external GPIO pins in the task itself.
I meant the other NodeMCU with 2 MAX6675 on the SPI and the PCF extenders on the I2C interface

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

Re: Command unknown TaskValueSet

#28 Post by Ath » 23 Oct 2022, 22:07

Ath wrote: 22 Oct 2022, 19:11 Edit: Added it as a bugfix in this PR #4309. Once the Github Actions build is completed, you can download the binaries from there, assuming you have a (free) Github account.
The PR has been merged into 'mega', so will be included in the next ESPEasy release. Or you can get the binaries from the Github Actions build.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 44 guests