Rocnet switch and signalcodes

http://wiki.rocrail.net/doku.php?id=roc ... netnode-en
Post Reply
daverow

rocnet codes for switch and signals

Post by daverow » 29.07.2019, 22:12

Hi
I am working with ESP32 code and am able to set switches and signals from rocrail to the esp32.

I cannot work out the correct rocnet command strings to set switches and signals from the ESP32 to rocrail. I am able to send sensor
updates into rocrail ok.

Thanks
Dave

daver
Posts: 8
Joined: 01.12.2018, 18:20

Rocnet switch and signalcodes

Post by daver » 29.07.2019, 22:52

Hi,

I am coding and esp32 and am able to send switch and signal commands from rocrail to esp32 using rocket/Matt. Ivan also get sensor messages from esp32 to rocrail.

I am having difficulty finding the correct message structure to send switch and signals updates from esp32 to rocrail.

Thanks
Dave

rjversluis
Site Admin
Posts: 42350
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Re: rocnet codes for switch and signals

Post by rjversluis » 30.07.2019, 06:33

Hi Dave,

Rocrail uses in the most cases single port:
https://wiki.rocrail.net/doku.php?id=ro ... stationary

daver
Posts: 8
Joined: 01.12.2018, 18:20

Re: Rocnet switch and signalcodes

Post by daver » 30.07.2019, 16:11

Hi, thanks for the help
I have managed to get switches to set ok but having issues with signalling

I can set the signal to green but will not set to red

Sent string 0.0.1.0.50.9.33.4.1.0.0.7 and signal set to green on rocview

20190730.160455.690 r9999c rnreader rnparser 0148 output SWITCH(event 1) addr=7 on action for 1 from 50, 4 data bytes
20190730.160455.690 r9999a 00001B30 OModel 5272 trying to match switch event: 50:7:0:0 type=0 uidname=[]
20190730.160455.690 r9999a 00001B30 OModel 3743 no more switches found by address [7,0]
20190730.160455.690 r9999a 00001B30 OModel 5301 trying to match signal event: 50:7:0 type=0 uidname=[]
20190730.160455.706 r9999I 00001B30 OSignal 0456 sg event for signal sg08 acc=0 state=turnout active=1...
20190730.160455.706 r9999I 00001B30 OSignal 0535 addr=7 port=0 gate=0, ma1=1 mp1=4, ma2=2 mp2=1, ma3=1 mp3=1, ma4=1 mp4=1
20190730.160455.722 r9999I 00001B30 OSignal 0540 sg08 multi aspect
20190730.160455.722 r9999I 00001B30 OSignal 1642 signal [sg08] action check for state: [green]

Sent string 0.0.1.0.50.9.33.4.0.0.0.7 and signal not found??

20190730.160504.844 r9999c rnreader rnparser 0148 output SWITCH(event 1) addr=7 off action for 1 from 50, 4 data bytes
20190730.160504.844 r9999a 00001B30 OModel 5272 trying to match switch event: 50:7:0:0 type=0 uidname=[]
20190730.160504.844 r9999a 00001B30 OModel 3743 no more switches found by address [7,0]
20190730.160504.875 r9999a 00001B30 OModel 5301 trying to match signal event: 50:7:0 type=0 uidname=[]


regards
Dave

daver
Posts: 8
Joined: 01.12.2018, 18:20

Re: Rocnet switch and signalcodes

Post by daver » 30.07.2019, 18:34

Hi,

managed to resolve this issue, set linear addressing and used

Sent string 0.0.1.0.50.9.33.4.1.0.0.7 and signal set to green on rocview

Sent string 0.0.1.0.50.9.33.4.1.0.0.8 and signal set to red on rocview

thanks

Post Reply

Return to “RocNetNode”