Raspi4PHC
- haribo
- Autor
- Offline
- Senior Boarder
- Beiträge: 63
- Dank erhalten: 10
when you're going to build a raspberry based gateway as I described you can build the RS232 to IP converter with the software ser2net and the following hardware:
MAX3232 Serieller Port Modul RS232 auf TTL mit LED-Transceiver
It's working fine on my raspberry pi together with my old "V1-Steuermodul" and is much cheaper than a Nport 5110.
Regards Harald
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
Please find below the newest version 3.3.1.0 of xWRC, I updated the core files with new Windows, Linux and Raspi versions. The data files remain the same.
Support is added for newer output modules
regards, Jo
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- piet
- Offline
- Junior Boarder
- Beiträge: 13
- Dank erhalten: 2
thanks a lot for the updated version of xWRC
Piet
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Jan
- Offline
- Junior Boarder
- Beiträge: 17
- Dank erhalten: 2
You can also use following USB-RS232 adaptor (togher with Ser2net of course).
www.aliexpress.com/item/New-CH340-USB-to...13010608.0.75.NuYv5q
I paid it 1,09 € but it cost now 1,32 € (I cannot believe they can make something that works for that price and even ship it to home. Drawback is that that you might have to wait few weeks for delivery).
The cable I bought works fine under Windows10 but the default Linux driver did not work. I needed to download en compile the Linux driver and then it worked. This took me some investigation work.
Later I noticed that you can also buy a similar convertor but with Linux driver:
www.aliexpress.com/item/1pcs-USB-2-0-TO-...3010608.0.127.u7jcVj
This one I didn't, try so I don't know if it works.
Kind regards,
Jan
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- johnhess
- Offline
- Fresh Boarder
- Beiträge: 2
- Dank erhalten: 0
Thank you for all this useful information, I just have 1 question that I can't seem to find an answer to :
How do you connect the RS232 port to the controller module?
I have a 941 STM and there isn't any port like this (On the front panel is a usb and some sort of PS/2 port), On top there is a place where RS232 is marked but you can only put in single cables. Do I need to put in individual cables and push them into the RS232 cable?
My controller module looks like this : www.elektroschakelmateriaal.nl/spree/pro...717_0.png?1455756035
Can someone help me?
Thank you
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
You need to make following connections:
rs232Port.Gnd -> STMv2.0V
rs232Port.Rx -> STMv2.TxD
rs232Port.Tx -> STMv2.RxD
mvg, Jo
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- johnhess
- Offline
- Fresh Boarder
- Beiträge: 2
- Dank erhalten: 0
Thank you very much for the quick answer.
Do you have any best practice on how to do that?
Just take a wire, connect to the STM and put it in the port and tape it?
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
Here is a description of the pins
www.tronicore.com/index.php?main_page=page&id=61&chapter=0
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Biland
- Offline
- Senior Boarder
- Beiträge: 34
- Dank erhalten: 0
My Problem is that the STM 940 don't react to the commands of my server.
So if I try to send the following command via the Virtual Command Line Interface is get a timeout und nothing happens.
I Use the nport 5110 and change all nessacary settings.
I hope that there is anybody how can help me.
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
Just pay attention to 'Local TCP Port' in Operating settings, this should be the same as the -remport <port> parameter given to xWRC.
Can you tell me which parameters you are now using to start xWRC.
Most important parameters are:
-remaddr <ip-addr-of-moxa>
-remport <local-tcp-port-of-moxa>
mvg, Jo
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Biland
- Offline
- Senior Boarder
- Beiträge: 34
- Dank erhalten: 0
Here some Information regarding starting command and the MoxaPort Setting.
Start command:
root@raspi ~ > cd /xwrc/bin/
root@raspi /xwrc/bin > ./xwrc.raspi -httpport 8080 -httpaddr 192.168.1.28 -remaddr 192.168.1.4 -remport 10000
xWRC (Linux/RbPI) -- v3.3.0.9 -- Dec 8 2015 ----------- webInterface for PHC -
===============================================================================
Running in demo mode
Press CTRL+C to terminate xWRC
For the connection of Moxa and PHC STM 940 I used a interlink cable (Germany we call it “Nullmodem Kabel”).
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
Can you start xWRC with following extra parameter: -loglevel 0xF00
This will generate a logfile in xwrc/log/xwrc_YYYYMMDD_HHMMSS.log (YYYYMMDD=date, HHMMSS=time)
Pls send this logfile to Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!, I will look at it.
mvg, Jo
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Biland
- Offline
- Senior Boarder
- Beiträge: 34
- Dank erhalten: 0
I used the wrong cable the interlink cable was the wrong one. The configuration was the wrong one.
I thought that the pin configuration of the NPort corresponds to the STM-940 but it is a little bit different.
The pin configuration on the STM 940 is a little bit different than a normal SUB-D Port (Pin2 = TxD / Pin3 RxD / Pin5 GND, 0V).
So now the system runs very well and I’m very happy.
Thanks a lot for the great support!
Now I’m trying to program a script which switch on a light when the sun is going down and turn the light off when the sun rise up again.
Do you think that this scenario can be realised with this tool?
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- simonjo
- Offline
- Gold Boarder
- Beiträge: 147
- Dank erhalten: 55
Have a look at this topic on the forum:
phc-forum.de/index.php/forum/visualisier...face-to-a-phc-system
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- haribo
- Autor
- Offline
- Senior Boarder
- Beiträge: 63
- Dank erhalten: 10
Hallo,
nach langer Zeit würde ich mich gerne wieder mit PHC und "SmartHome" beschäftigen.
Ich plane die Integration in openhab bzw. fhem.
In fhem habe ich testweise über simonjo's xwrc-System einen Ausgang eingebunden - funktioniert soweit.
Jetzt wollte ich mich mit xPhcLog bzw. PHC2UDP beschäftigen, da ich die Rückmeldungen des Steuerbusses einbinden möchte.
Wie im Projekt Raspi2PHC beschrieben setzte ich bislang auf meinem Raspberry Pi die serielle Schnittstelle (/dev/ttyAMA0) ein.
Für die Verbindung zum PHC-Systembus habe ich mir nun diesen USB - RS232 Konverter gekauft.
Leider verzweifele ich bei der Inbetriebnahme.
Um dem Problem näher zu kommen, versuche ich seit Stunden, zunächst einmal die funktionierende serielle Kommunikation über den RS232-Anschlusses des Steuermoduls via ser2net über /dev/ttyAMA0 einfach durch das Device /dev/ttyUSB0 zu ersetzen.
# alter Eintrag - funktioniert!
4004:raw:600:/dev/ttyAMA0:19200 8DATABITS NONE 1STOPBIT banner
# neue Eintrag - funktioniert leider nicht
4004:raw:600:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT banner
Der USB-Adapter wird vom raspbian erkannt:
root@raspberrypi:~# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
root@raspberrypi:~#
root@raspberrypi:~# ls -l /dev/ttyAMA0 /dev/ttyUSB0
crw-rw---T 1 root dialout 204, 64 Nov 26 14:15 /dev/ttyAMA0
crw-rw---T 1 root dialout 188, 0 Nov 26 14:15 /dev/ttyUSB0
root@raspberrypi:~#
Ich habe die Verkabelung bereits überprüft und diverse Male Pin2 und Pin3 auf dem D-SUB-9 getauscht - alles ohne Erfolg.
Ist mein Adapter kaputt oder kann er vom Typ her vielleicht nicht funktionieren?
Ich bin für jede Idee dankbar.
Gruß, Harald
Bitte Anmelden oder Registrieren um der Konversation beizutreten.
- Aktuelle Seite:
- Startseite
- Forum
- PHC-Forum
- Visualisierung
- Raspi4PHC