Need help with ser2net

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Need help with ser2net

Post by Jochen »

What i want to do:
I have one Raspberry PI where i connect my RFXtrx433 USB
And i have another PI where i want to use the RFXtrx433 USB also.

Is this possible? Is ser2net the right tool to do that?
Can someone help me?

Thanks,
Jochen
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
User avatar
tommit01
Posts: 39
Joined: Friday 12 July 2013 14:08
Target OS: Raspberry Pi / ODroid
Domoticz version: multiple
Location: Germany / SL
Contact:

Re: Need help with ser2net

Post by tommit01 »

Why don't you use built in sharing of domoticz?


BR
Tommit01
1 x RPi3
4 x RPI
3 x RPi2
1 x RPI2 + Win 10 IoT (experimental device)
2 x RPI2 Raspbian "Jessie" + Domoticz (for tenants)
2 x RPI OSMC @ 1GHz
1 RPi Zero W + Cam NOIR
1 RPi Zero W + Cam
RFXtrx 433 FW 1015
RFXtrx 433 E FW 1020
User avatar
Jochen
Posts: 11
Joined: Saturday 13 July 2013 10:37
Target OS: -
Domoticz version:
Location: Germany / NRW
Contact:

Re: Need help with ser2net

Post by Jochen »

The second PI is my "development-machine" where i want to test my own software.
I will try to create an decoder for undecodet signals.
And there i don´t want to use domoticz.
I want to call the RFX directly and not requesting the status of devices.
I have not failed 1,000 times.
I have successfully discovered 1000 ways to NOT make a light bulb.
*Thomas Edison*
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Need help with ser2net

Post by alfred_j_kwak »

Can someone add to Wiki the rest of process? https://www.domoticz.com/wiki/SharingSerialDevices

After installing ser2net and setting .conf-file you can add new hardware into Domoticz -> "RFXCOM - RFXtrx shared over LAN interface" with remote machine IP and .conf-file port.

Does someone knows correct baudrate settings for RFXCom? I use "3001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT" and it seems to transmit ok, but I don't have any sensors into other end.

Is it confusing if there is settings for different devices in wiki (Z-wave, RFXCom, etc.)?

Also maybe mention about using dmesg | grep tty in remote machine to find out name of the serial port.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Need help with ser2net

Post by ThinkPad »

See also this topic: http://domoticz.com/forum/viewtopic.php?f=4&t=9337 about 'VirtualHere'.
I am not active on this forum anymore.
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Need help with ser2net

Post by alfred_j_kwak »

Yes I watch it, but in my case I find much more easier just use ser2net. I don't need any client to run in my Pi server. I even try to test VirtualHere, but it doesn't worked instantly - more or less my fault, because I cant use it - and ser2net does, so thats my winner here.

What are advantages in VirtualHere against ser2net?

(I still miss IRQs and DMAs... 8-) )
b_weijenberg
Posts: 518
Joined: Friday 12 July 2013 18:13
Target OS: -
Domoticz version:
Location: Netherlands
Contact:

Re: Need help with ser2net

Post by b_weijenberg »

Disable Serial Console
======================
sudo nano /etc/inittab
insert a # sign in front of this line:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
ctrl-O
Enter
ctrl-x

Remove console
==============
sudo nano /boot/cmdline.txt
delete these 2 fields: console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
ctrl-O
Enter
ctrl-x

Add ser2net
===========
sudo apt-get install ser2net

sudo nano /etc/ser2net.conf
10001:raw:0:/dev/ttyUSB0:38400 8DATABITS NONE 1STOPBIT
10002:raw:0:/dev/ttyUSB1:38400 8DATABITS NONE 1STOPBIT

sudo /etc/init.d/ser2net restart

Autostart ser2net
=================
sudo nano /etc/rc.local

add the next line before exit o :
/usr/local/sbin/ser2net -n
RFX-433, RFX-433EMC, RFX-868
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Need help with ser2net

Post by alfred_j_kwak »

May I ask what is that serial console for? I suppose ttyAMA0 is serial via Raspberry GPIO.
Also what is USB1 in ser2net.conf?

EDIT: Ok. Found some additional info from here: http://www.hobbytronics.co.uk/raspberry-pi-serial-port

EDIT2: Now I don't understand why GPIO serial port has to be disconnected from Linux to use ser2net with ttyUSB0?
b_weijenberg
Posts: 518
Joined: Friday 12 July 2013 18:13
Target OS: -
Domoticz version:
Location: Netherlands
Contact:

Re: Need help with ser2net

Post by b_weijenberg »

You connect 2 RFXtrx devices and access the 1st RFXtrx on port 10001 and the 2nd RFXtrx on port 10002
RFX-433, RFX-433EMC, RFX-868
alfred_j_kwak
Posts: 110
Joined: Friday 20 September 2013 18:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.3530
Location: Finland
Contact:

Re: Need help with ser2net

Post by alfred_j_kwak »

Thank you.
So in my case when other RFXCom is connected straight into server I just use USB0.

Seems simple - at least it is working now. :smile:
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest