Page 1 of 1

Seria Server - Ser2Net wiki?

Posted: 22 Feb 2019, 08:48
by Johnny.sk
Hi, I spent lot of time but I still don't found good answer and Wiki are old without required info.
I want to use arduino's analog inputs, measure values, make calculations and push it trough ESP to Domoticz MQTT but I still don't know how to do it.. how to make good serial communication..
for example, nvalue,idx,svalue, or how must data looks like ?
Thank you for any help.

Re: Seria Server - Ser2Net wiki?

Posted: 22 Feb 2019, 09:53
by grovkillen
I'm really sorry. I'm the guy responsible for the wiki (and to transfer it to "read the docs") but I'm currently involved in semi related projects to make some income. I will get going once that is done. Hopefully next month...

Re: Seria Server - Ser2Net wiki?

Posted: 24 Feb 2019, 13:11
by kimot
Look here:
https://www.letscontrolit.com/wiki/inde ... _Reference

You can send command by serial line from Arduino to ESPeasy.

Create dummy device in ESPeasy - for example like me in task 12:

2019-02-24-130221_1920x1080_scrot.png
2019-02-24-130221_1920x1080_scrot.png (132.11 KiB) Viewed 11976 times
From arduino send string:

TaskValueSet,12,1,<your_value>

( for Arduino#Value_1 )

Then you can send MQTT by rules using

Publish <topic>, <value>

PS:
Possible TaskValueSet can not be used from a serial line but only in Rules.
When I tried it over HTTP, it does not work.
Documentation does not speak clearly - probably bug:
"Internal - Can be run from serial and rules engine
Rules - Can be run from serial and rules engine"
looks identically, why?
TaskValueSet is marked like "Rules"

In this case, send out from the Arduino an event and in ESPeasy, when you hadle this, either directly send MQTT or save value in to dummy variable

String from Arduino by serial line:
event,Value_1=3125487

In ESPeasy rules:

on event Value_1 do
TaskValueSet,12,1,%eventvalue%
endon

Re: Seria Server - Ser2Net wiki?

Posted: 25 Feb 2019, 08:33
by Johnny.sk
Thank you,
I will try apply steps from you..

Re: Seria Server - Ser2Net wiki?

Posted: 11 Apr 2019, 02:36
by Nemocaledonie
Hello, I'm looking for the same kind of information about the Ser2Net plugin.

I'm trying to send info from an Arduino nano (or any arduino) to an ESPEasy (a Wemo D1 R2 for the moment, but I have many other models).
I get to see the info sent by the Arduino in the ESPeasy log, but I can not put them in the "Dummy" task, either directly (TaskValueSet, x, y, value) or via Rules as described in the mail of "Kimot".
I installed different firmware (20181026 -> 20190409) without success on my search.
If you have an idea, she will be welcome.

For information my assembly is the following: the Nano manages 3 TM1637 displays to display the temperature of 3 local aquariums (DS18B20), and must send these data on a display (LCD) located several tens of meters and for this I use the Node function and the UDP of the Easy.

Re: Seria Server - Ser2Net wiki?

Posted: 11 Apr 2019, 08:42
by Nemocaledonie
To image my words, here are some screenshots :
Capture d’écran 2019-04-11 à 17.39.16.jpg
Capture d’écran 2019-04-11 à 17.39.16.jpg (170.99 KiB) Viewed 11655 times
Capture d’écran 2019-04-11 à 17.39.04.jpg
Capture d’écran 2019-04-11 à 17.39.04.jpg (63.69 KiB) Viewed 11655 times
Capture d’écran 2019-04-11 à 17.38.38.jpg
Capture d’écran 2019-04-11 à 17.38.38.jpg (138.43 KiB) Viewed 11655 times
Capture d’écran 2019-04-11 à 17.37.39.jpg
Capture d’écran 2019-04-11 à 17.37.39.jpg (140 KiB) Viewed 11655 times

Re: Seria Server - Ser2Net wiki?

Posted: 11 Apr 2019, 17:23
by ThomasB
I have no experience in using the Serial Server plugin. But I have a recommendation. In your rule, change the TaskValueSet line to this:

Code: Select all

TaskValueSet,2,1,[%eventvalue%]
FWIW, my testing shows that without the brackets the %eventvalue% will result in a zero assignment. Which is odd because there's a lot of ESPEasy examples that show it the way you used it. But it doesn't work for me unless the brackets wrap it.

- Thomas

Re: Seria Server - Ser2Net wiki?

Posted: 15 Apr 2019, 09:56
by Nemocaledonie
Thanks Thomas, I 'll try now :-).

Re: Seria Server - Ser2Net wiki?

Posted: 15 Apr 2019, 10:45
by Nemocaledonie
;No working :-( . Always the same result.
With hook [] no data in the log :
Capture d’écran 2019-04-15 à 19.36.06.jpg
Capture d’écran 2019-04-15 à 19.36.06.jpg (84.29 KiB) Viewed 11610 times
without hook :
Capture d’écran 2019-04-15 à 19.38.17.jpg
Capture d’écran 2019-04-15 à 19.38.17.jpg (56.41 KiB) Viewed 11610 times
With parenthesis () :
Capture d’écran 2019-04-15 à 19.43.51.jpg
Capture d’écran 2019-04-15 à 19.43.51.jpg (75.02 KiB) Viewed 11610 times
Any other idea ??? :-)

Re: Seria Server - Ser2Net wiki?

Posted: 15 Apr 2019, 12:30
by Jedrunia
If I understand properly, you need to create an event using Arduino.

so you need to send:
"test_1=123"

In LOG window you can see:
EVENT: !Serial#test_1=123

test_1 is a name of temoprary variable

Now in RULES you should react on that event:

on !Serial do
TaskValueSet , 2,1,[test_1]
endon

or

on test_1 do
TaskValueSet , 2,1,[test_1]
endon

Not tested - just idea

Andrzej

Re: Seria Server - Ser2Net wiki?

Posted: 15 Apr 2019, 12:41
by Jedrunia
Or instead test_1 put D1 as a name you use in Dummy Device

Re: Seria Server - Ser2Net wiki?

Posted: 17 Apr 2019, 23:00
by Jedrunia
Working solution:
In ESP just define Dummy Device - no serial server needed at all.

From Arduino send via RS:
"TaskValueSet,12,1,8"

in LOG you will se
Commannd: taskvalueset

and value number 1 in dummy device in task 12 is set to 8

Re: Seria Server - Ser2Net wiki?

Posted: 19 Apr 2019, 01:20
by Nemocaledonie
Thanks Jedruina, I'll try now :-) (sorry for the late response but I was outside home for few days ).

Re: Seria Server - Ser2Net wiki?

Posted: 19 Apr 2019, 03:17
by Nemocaledonie
Hi again Jedrunia,
IT'S WORK !! Thanks a lot. :D