VNET instruction disregarded

41 views
Skip to first unread message

Zoltan Orosz

unread,
Nov 25, 2018, 4:52:34 AM11/25/18
to souliss
Hello,

I have the following setup: 2 Arduino Mega boards connected to relays, communicating via Ethernet shields between each other and RS485 towards some light switches. I have a working setup on the ground floor (ground floor is also the gateway), now I wanted to add the first floor but I'm unable to make the physical switches work (everything works via the Soulissapp & Openhab, I just can't make the physical switches work over RS485).

The code for the first floor bridge & an example lightswitch is available here: https://github.com/Z0l/soulissconf

I see the communication coming in from the switch to the bridge but the relay doesn't turn on or off; below please find the VNET debug from 2 switch pushes:

(vN(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<SETADDR><|0xCD01>
(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>
(vNet)<OUTPATH><|0x0>
(vNet)<NHBOR><|0x0>
(vNet)<OUT><ROUT><|0xCD01><|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>
(vNet)<OUTPATH><|0x0>
(vNet)<NHBOR><|0x0>
(vNet)<OUT><ROUT><|0xCD01><|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>

It seems to me that the bridge is trying to forward the communication instead of processing it. If I remove the Supernode.h from the include and switch to FAST_PeerComms(); (I don't need anything to talk back to the lightswitches) the VNET debug changes to this but it still does not change the relay:

(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<SETADDR><|0xCD01>
(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x1>

If you need the code for the groundfloor gateway, I can upload that as well but the issue is with the RS485 link between the switch and the bridge.

Thanks in advance for your help!

Di Maio, Dario

unread,
Nov 26, 2018, 11:47:03 AM11/26/18
to sou...@googlegroups.com
Hi,

where are your switches located? On the same board where the relays are? Or on a different one?

Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a63a027c-8a87-4f73-81b1-62a6894083b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zoltan Orosz

unread,
Nov 26, 2018, 12:03:09 PM11/26/18
to sou...@googlegroups.com
Hi Dario,

The switches are running on individual Arduino Nano-s. There is a 6wire cable going to each switch carrying 12volt and ground from the Mega and A/B for the RS485. The Nano-s are running the code from ffswitch.ino if you check out the GitHub link in my previous email.

Technically I have a Mega driving the relays on each floor with Nano-s connected via RS485 as light switches; the ground floor Mega is the gateway and that one works, but the same code doesn't work on the first floor Mega, which is a peer/supernode, as I can't have 2 gateways.

Let me know if you want to see the working code (first floor Mega & first floor Nano) and I'll upload to GitHub.

Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a63a027c-8a87-4f73-81b1-62a6894083b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Nov 26, 2018, 12:09:10 PM11/26/18
to sou...@googlegroups.com
Show me just the code that you use on the switches to send the commands.

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a63a027c-8a87-4f73-81b1-62a6894083b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Nov 26, 2018, 12:22:25 PM11/26/18
to souliss
Here you are:

FAST_50ms() {
          
            if(DigIn(PIN_LAMP1, Souliss_T1n_ToggleCmd, LSLOT_LAMP1))
              {
                Send(Emelet_RS485, RSLOT_LAMP1, Souliss_T1n_ToggleCmd);
                ResetInput(LSLOT_LAMP1);
              }

            Logic_T11(LSLOT_LAMP1); //start the local button logic
                  
            
        }

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/a63a027c-8a87-4f73-81b1-62a6894083b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

Di Maio, Dario

unread,
Nov 26, 2018, 12:26:04 PM11/26/18
to sou...@googlegroups.com
Try with OnCmd instead of toogle. 

The destination is directly reachable or data need to be forwared to another device?


To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Nov 26, 2018, 12:28:23 PM11/26/18
to sou...@googlegroups.com
Thanks I'll try, but on the long run I also want to turn them off. It's directly reachable (0xCD01 on RS485 - switches are from 0xCD02-0xCD07).

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Nov 26, 2018, 12:30:41 PM11/26/18
to sou...@googlegroups.com
Sure you can turn off but have a try

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/3f51499b-25a0-4e18-a4c3-f1899e08c73f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Nov 26, 2018, 12:39:47 PM11/26/18
to souliss
I just did, the VNET message changed to this but the relay status is not changed:

(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<SETADDR><|0xCD01>
(vNet)<SETADDR><|0x4E>
(MAC)<1A,A6,49,6B,0,4F,>
(IP)<C0,A8,1,4E,>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x2>
(vNet)<IN>(0x0)<|0xC|0x17|0xCD01|0x0|0x14|0x0|0x0|0x29|0x1|0x2>

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Nov 26, 2018, 1:34:35 PM11/26/18
to sou...@googlegroups.com
You see, node send the message twice and twice a toogle is a null command.

Anyhow, looks like your sending node has address zero (vNet)<IN>(0x0).
Fix this, then you can enable MaCaco debug to see how it is processed the IN data.

Dario.


To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Nov 26, 2018, 2:29:34 PM11/26/18
to sou...@googlegroups.com
Thank you! You see 2 messages because I pushed the button 2x, but the addressing seems indeed an issue, I will look into that.

I used the following to set the address:


#define myvNet_subnet 0xFF00
#define Emelet_RS485 0xCD01
#define Halo 0xCD05
SetAddress(Halo, myvNet_subnet, Emelet_RS485);

Will try something else and revert back.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Zoltan Orosz

unread,
Nov 26, 2018, 5:38:11 PM11/26/18
to sou...@googlegroups.com
Oddly enough it was really the addressing. Switching to 0xDE01-0xDE02 works; the same with 0xCE01-0xCE02 doesn't work (I used 0xCDxx addressing on the ground floor and wanted to use something else on the first floor).

I'm also having some cabling issues but thanks for the help, I guess I need to fix the cabling myself :)

You are doing great work with Souliss; it is an integral component of my smart home and I appreciate your hard work in the library. Keep it up!

Thanks,

Zoltan

Di Maio, Dario

unread,
Nov 27, 2018, 1:31:20 PM11/27/18
to sou...@googlegroups.com
Nice hear that you got it working.

Dario.

To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/d46c3368-33aa-40b9-aee4-d66e002706fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/qAw6rVQBkio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages