UDP problem on NSPanel (Nextion) and esp easy

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kudykam
New user
Posts: 4
Joined: 31 Dec 2022, 12:59

UDP problem on NSPanel (Nextion) and esp easy

#1 Post by kudykam » 31 Dec 2022, 13:03

Hi,
I have Sonoff NSPanel with ESP Easy Mega fw and I am trying to send UDP command from button on screen to Loxone. Problem is that it is always two commands on separete line.

12 12:48:29.179 Loxone 192.168.20.25 NSPAnel 514 NSPanel_1_disp_idx=12
9 12:48:25.939 Loxone 192.168.20.25 NSPAnel 514 NSPanel_1_disp_value=1

It si sendidn IDX and Value separated, I need it together to be able to read it properly with loxone. Checking "Single event with all values:" doesnt help. It is shown on one line in esp log but it didnt send on one line via udp.
Please help

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

Re: UDP problem on NSPanel (Nextion) and esp easy

#2 Post by TD-er » 01 Jan 2023, 01:53

Are you sending via the ESPEasy p2p?

If so, then you could also send more info via an event.
See: https://espeasy.readthedocs.io/en/lates ... nd-publish
For example: ( with N being the unit nr to send to)

Code: Select all

sendTo,N,"event,MyEvent=123,456,789"
This can then be handled on the receiving end in the rules like this:

Code: Select all

on MyEvent do
  logEntry,"1:%eventvalue1% 2:%eventvalue2% 3:%eventvalue3%"
endon

kudykam
New user
Posts: 4
Joined: 31 Dec 2022, 12:59

Re: UDP problem on NSPanel (Nextion) and esp easy

#3 Post by kudykam » 01 Jan 2023, 10:29

I communicate with Loxone (Entred as a controller).
So this command should be entered into rules?

so on my event:

Code: Select all

EVENT: disp#idx=763
EVENT: disp#value=1
the rule will be like this?

Code: Select all

on disp do
  logEntry,"1:%idx% 2:%value%"
endon

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

Re: UDP problem on NSPanel (Nextion) and esp easy

#4 Post by Ath » 01 Jan 2023, 13:44

kudykam wrote: 01 Jan 2023, 10:29 I communicate with Loxone (Entred as a controller).
So this command should be entered into rules?

so on my event:

Code: Select all

EVENT: disp#idx=763
EVENT: disp#value=1
the rule will be like this?

Code: Select all

on disp do
  logEntry,"1:%idx% 2:%value%"
endon
The documentation on Rules does have examples on how to use variables in rules, it could be something like:

Code: Select all

on disp#all do
  logEntry,"idx=%eventvalue1% value=%eventvalue2%"
endon
This requires the checkbox 'Single event with all values' to be set in the Device configuration page of the Nextion plugin.

What controller do you have configured to send the data to Loxone?
/Ton (PayPal.me)

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

Re: UDP problem on NSPanel (Nextion) and esp easy

#5 Post by TD-er » 01 Jan 2023, 14:02

The example I gave was to send the eventvalues to the log so you can see what you receive.
This logEntry command is seriously useful for debugging.

kudykam
New user
Posts: 4
Joined: 31 Dec 2022, 12:59

Re: UDP problem on NSPanel (Nextion) and esp easy

#6 Post by kudykam » 01 Jan 2023, 16:50

OK thanks,
and how do I send it do UDP?

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

Re: UDP problem on NSPanel (Nextion) and esp easy

#7 Post by Ath » 01 Jan 2023, 16:53

Ath wrote: 01 Jan 2023, 13:44
kudykam wrote: 01 Jan 2023, 10:29 I communicate with Loxone (Entred as a controller).
What controller do you have configured to send the data to Loxone?
Well, that's the question I'm requesting an answer on :o
/Ton (PayPal.me)

kudykam
New user
Posts: 4
Joined: 31 Dec 2022, 12:59

Re: UDP problem on NSPanel (Nextion) and esp easy

#8 Post by kudykam » 01 Jan 2023, 17:42

Generic UDP with Loxone IP, controller Nr. 1

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

Re: UDP problem on NSPanel (Nextion) and esp easy

#9 Post by Ath » 01 Jan 2023, 19:34

I think we are talking about differnt controllers, I've been trying to ask for the ESPEasy Controller, but you seem to point to an external device :lol:

In ESPEasy there is the 'SendToUDP,ip,port,commandstring' command. The commandstring you will have to create yourself, where you can use variables to fill in the parameters, as expected by Loxone (their documentation seems quite elaborate)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 35 guests