Seria Server - Ser2Net wiki?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Johnny.sk
Normal user
Posts: 4
Joined: 19 Jan 2016, 11:18

Seria Server - Ser2Net wiki?

#1 Post by Johnny.sk » 22 Feb 2019, 08:48

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.

User avatar
grovkillen
Core team member
Posts: 3199
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Seria Server - Ser2Net wiki?

#2 Post by grovkillen » 22 Feb 2019, 09:53

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...
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

kimot
Normal user
Posts: 161
Joined: 12 Oct 2017, 20:46

Re: Seria Server - Ser2Net wiki?

#3 Post by kimot » 24 Feb 2019, 13:11

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 1234 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

Johnny.sk
Normal user
Posts: 4
Joined: 19 Jan 2016, 11:18

Re: Seria Server - Ser2Net wiki?

#4 Post by Johnny.sk » 25 Feb 2019, 08:33

Thank you,
I will try apply steps from you..

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#5 Post by Nemocaledonie » 11 Apr 2019, 02:36

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.

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#6 Post by Nemocaledonie » 11 Apr 2019, 08:42

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 913 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 913 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 913 times
Capture d’écran 2019-04-11 à 17.37.39.jpg
Capture d’écran 2019-04-11 à 17.37.39.jpg (140 KiB) Viewed 913 times

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

Re: Seria Server - Ser2Net wiki?

#7 Post by ThomasB » 11 Apr 2019, 17:23

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

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#8 Post by Nemocaledonie » 15 Apr 2019, 09:56

Thanks Thomas, I 'll try now :-).

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#9 Post by Nemocaledonie » 15 Apr 2019, 10:45

;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 868 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 868 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 868 times
Any other idea ??? :-)

Jedrunia
Normal user
Posts: 5
Joined: 28 Mar 2019, 09:22

Re: Seria Server - Ser2Net wiki?

#10 Post by Jedrunia » 15 Apr 2019, 12:30

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

Jedrunia
Normal user
Posts: 5
Joined: 28 Mar 2019, 09:22

Re: Seria Server - Ser2Net wiki?

#11 Post by Jedrunia » 15 Apr 2019, 12:41

Or instead test_1 put D1 as a name you use in Dummy Device

Jedrunia
Normal user
Posts: 5
Joined: 28 Mar 2019, 09:22

Re: Seria Server - Ser2Net wiki?

#12 Post by Jedrunia » 17 Apr 2019, 23:00

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

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#13 Post by Nemocaledonie » 19 Apr 2019, 01:20

Thanks Jedruina, I'll try now :-) (sorry for the late response but I was outside home for few days ).

Nemocaledonie
Normal user
Posts: 6
Joined: 11 Apr 2019, 02:18

Re: Seria Server - Ser2Net wiki?

#14 Post by Nemocaledonie » 19 Apr 2019, 03:17

Hi again Jedrunia,
IT'S WORK !! Thanks a lot. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests