Topic-icon Raspi4PHC

  • ansgar75
  • ansgar75s Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Stay hungry, stay foolish! - Steve Jobs
Mehr
16 Dez 2015 13:13 #31 von ansgar75
ansgar75 antwortete auf Raspi4PHC
Jo,

yes you are right. The Linux VM runs currently on a Windows system.
I don't want to use a additional Raspi to run xWRC. Makes it easier for maintenance and administration.


Ansgar

Peha PHC V3 seit 2017 (vorher V2 seit 2009) im Neubau - MCC - JRM - EMD - AMD - DIM - UIM - FUI - Module
IP-Symcon Smarthome Software auf Intel NUC mit Ubuntu 20.04LTS (Einbindung von PHC tlw. über Webinterface der V3)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
16 Dez 2015 20:11 #32 von simonjo
simonjo antwortete auf Raspi4PHC
Ansgar,

Here is an updated package containing also the x86 LINUX version (xwrc.x86).


mvg, Jo
Anhänge:
Folgende Benutzer bedankten sich: ansgar75

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • ansgar75
  • ansgar75s Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Stay hungry, stay foolish! - Steve Jobs
Mehr
19 Dez 2015 09:58 #33 von ansgar75
ansgar75 antwortete auf Raspi4PHC
Hello Jo,

unfortunately the package contains no .x86 file. Can you please check.
Thanks a lot.

Ansgar

Peha PHC V3 seit 2017 (vorher V2 seit 2009) im Neubau - MCC - JRM - EMD - AMD - DIM - UIM - FUI - Module
IP-Symcon Smarthome Software auf Intel NUC mit Ubuntu 20.04LTS (Einbindung von PHC tlw. über Webinterface der V3)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
19 Dez 2015 12:51 #34 von simonjo
simonjo antwortete auf Raspi4PHC
My fault, this one should be fine.
Anhänge:
Folgende Benutzer bedankten sich: ansgar75

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
11 Jun 2016 18:14 #35 von Jan
Jan antwortete auf Raspi4PHC
Hello,

I'm trying to rebuild the configuration of Harold who started this thread (Windows - Perle TruePort - Ser2net - USBtoSerial Cable - STM)

I can read and program the STM v1 with my Windows 10 PC, so most of the software and hardware should be ok. I also can start the xwrc server and contact it over the LAN. But it seems that this server fails to communicate with the STM.

I started the xwrc server with following parameters : ./xwrc.raspi -httpport 8080 -remaddr 192.168.0.248 -remport 10001.

Ser2net is configured on RPi (192.168.0.248) as follows : 10001:raw:0/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT

Is there somebody that knows what I'm doing wrong?

Thx,
Jan

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
11 Jun 2016 18:28 #36 von simonjo
simonjo antwortete auf Raspi4PHC
Jan,

xWRC can only connect over TCP/IP with the STM, not via serial port.

So you will need an IP-to-RS232 converter that connects to the STMv1/v2, then xWRC can connect over TCP/IP to the IP side of the converter.That is what these -remaddr and -remport parameters are describing.

IF you are using an STMv3 then xWRC can connect directly to it as this STM has an IP interface.


mvg, Jo
Folgende Benutzer bedankten sich: Jan

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
12 Jun 2016 11:03 #37 von Jan
Jan antwortete auf Raspi4PHC
Hi Jo,

I understood that xWRC can only connect over TCP/IP. But since ser2net is running on Rpi I would expect that xWRC connects via ser2net to the serial port (like Harald described).

Ser2net works because I can connect to the STM(v1) with the PHC software running on a Windows 10 PC that is only connected via LAN with Rpi. Rpi is connected to STM with USBtoSerial cable.

I started the xWRC server with the same -remaddr and -remport as the one that I use in TruePort on Windows. This -remaddr is then of course the IP-address of the RPI. Maybe there is a conflict if these two functions (xWRC and ser2net) run on the same platform?

mvg,
Jan

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
12 Jun 2016 11:17 #38 von simonjo
simonjo antwortete auf Raspi4PHC
Jan,

Ok let's construct your evironment here:
1) Your RB is at 192.168.0.248, Ser2Net and xWRC are also running here
2) Ser2Net is listening at port 10001 and connects to the STM via a Usb2Ser converter
3) xWRC is listening on HTTP port 8080 and tries to connect to 192.168.0.248:10001

I suggest to start xWRC with some logging to see what is happening or not, add -loglevel 0xF00 as parameter, this will generate a logfile in the log directory, will be name xWRC_yyyymmdd_hhmmss.log.

You can send the logfile to me at Diese E-Mail-Adresse ist vor Spambots geschützt! Zur Anzeige muss JavaScript eingeschaltet sein!

Jo
Folgende Benutzer bedankten sich: Jan

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
12 Jun 2016 16:18 #39 von Jan
Jan antwortete auf Raspi4PHC
Hi Jo,

With your help the problem got solved :) . The connection of ser2net with the PC stayed open and therefore the connection of xWRC to ser2net was refused.

Applied solution:
1. Setting changed in Perle TruePort : Close TCP connection when COM port is closed
2. Timer added in ser2net.conf : 10001:raw:30:/dev/ttyUSB0:19200 8DATABITS NONE 1STOPBIT

Thx, Jan

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
22 Aug 2016 09:17 #40 von Biland
Biland antwortete auf Raspi4PHC
Hallo zusammen, ich bin recht neu hier im Forum. Da ich auch eine PHC Steuerung besitze freue ich mich über den Informationsaustausch auf diesem Weg.

Nun zu meinem Thema was sehr gut in diesen Thread passt.

Ich möchte mir auch eine Visualisierung bzw. Steuerungsmöglichkeit der PHC Steuerung an einem Tablett oder Handy installieren.
Hierzu ein paar Infos:
- STM V1 vorhanden
- Raspberry vorhanden
- Nport 5110 vorhanden
- alles entsprechend verkabelt

Auf dem Raspi habe ich xWRC installiert und kann aufs WebIF zugreifen.

Nun zur Frage, wie komme ich weiter, bzw. was muss ich noch erledigen um von einem Tablett aus eine Visualisierung zu realisieren?
In der Software xWRC und iControl bin ich ein absoluter Neuling. Kann ich hier schon eine Visualisierung einrichten oder brauche ich noch weitere Software und das xWRC dient als Kommunikationsschnittstelle zur PHC bzw. zum NPort?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
23 Aug 2016 10:41 #41 von Oude Maatman
Oude Maatman antwortete auf Raspi4PHC
Hi, I'm from the Netherlands and fairly new here in the forum.

Since I have a PHC control I am pleased with the exchange of information in this way.

I want to install me a visualization or control possibility of PHC control on a tablet, mobile phone or PC.
Here are a few more:
- 941 STM V2 only USB Connection
- Raspberry 3

xWRC cannot use a serial port, but how do I fix it now to still connect the Raspberry to the 941 STM
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
23 Aug 2016 18:19 - 23 Aug 2016 18:22 #42 von simonjo
simonjo antwortete auf Raspi4PHC
@Biland

A good starting point to get things working is this little presentation: phc-forum.de/media/kunena/attachments/27...C-GettingStarted.pdf

In short:
1) Configure the NPort 5110
1.1) Serial settings
- 19200 baud/8 databits/1 stopbit
- no parity
- no flowcontrol
- disable fifo
- RS232

1.2) Operating settings
- TCP server mode
- TCP alive check=7
- inactivity time=0
- max connection=1
- packing length=0
- delimiter 1= C1 (hex + enable)
- delimiter process=do nothing
- force transmit=0
- local TCP port=10000

2) Connect RS232 port on STM to NPort 5110, don't use the USB connection (stm.0V -> Nport.gnd, stm.TxD->Nport.RxD, stm.RxD->Nport.TxD

3) start xWRC with minimal following parms, optional add -httpport 8080 so webserver is at port 8080.

./xwrc.raspi -remaddr <nport-ip-address> -remport 10000

4) use webbrowser to goto <raspi-ip-address>:8080


About making a page for your project, this will require some HTML skills but it is also explained in the GettingStarted guide and sample pages are available in the installation.

But to get you a quick start:
1) Create a file xwrc/icontrol/demo.html and add following text to it, the use webbrowser to visit page: <raspi-ip-address>:8080/icontrol/demo.html.

This is a simple sample to turn on/off output 0 on output module 0. The first link is a text-only sample, the second link also uses an image to represent the state of the output.

A full explanation of these links and tags is given in xwrc/bin/xwrc.help.pdf


<html>

<body>
<a href="icontrol.dll?ccmd=omd.0.out0.toggle&file=<?request file?>">
omd.0.out0.toggle
</a>

<br>

<a href="icontrol.dll?ccmd=omd.0.out0.toggle&file=<?request file?>">
omd.0.out0.toggle <img border="0“ src="/icontrol/img/s.light.<?phc omd.0.out0?>.gif" title="Toggle">
</a>
</body>

</html>
Letzte Änderung: 23 Aug 2016 18:22 von simonjo.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
23 Aug 2016 18:24 #43 von simonjo
simonjo antwortete auf Raspi4PHC
@Oude Maatman

Another user Jan is using Ser2Net to connect xWRC over USB to the STM.

Using this tool, xWRC can connect to Ser2Net which converts the TCP connection into a serial port via USB

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
24 Aug 2016 07:40 - 24 Aug 2016 07:49 #44 von Biland
Biland antwortete auf Raspi4PHC
Thanks a lot for your fast and detailed response.

A few minutes ago I bought the needed RS232 cable. I guess that a “Nullmodem” cable with male and female connectors can be use for this case.
In addition I create a HTML File to visualize my control. In the next days I will try my visualisation I’m very excited if my files and config will work.

Is it possible to use for example this comands in my HTML-File:
<!-- Deckenleuchte Wohnzimmer -->
<a href="?ccmd=omd.0.out5.toggle&amp;file=%3C?request%20file?%3E">
<img style="position: absolute; top: 118px; left: 510px;" src="/%3C?plugin%20alias?%3E/img/s.light.%3C?phc%20omd.0.out5?%3E.gif" title="Deckenleuchte Wohnzimmer" border="0">
</a>


But I still have one question:
I start xwrc with:
./xwrc.raspi -httpport 8080 -httpaddr 192.168.xxx.xxx -remaddr 192.168.xxx.xxx -remport 10000
So the program is running well and I can go to the webif. But how can I start the program in the background?
The reason of my question is: I would like to start the program via terminal (telnet) and after that I would like to close the telnet connection.
So if I start the program with the a.m. command the program stops after I disconnect the telnet connection of course.
Can you help me in this case?
Letzte Änderung: 24 Aug 2016 07:49 von Biland.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
24 Aug 2016 08:28 #45 von simonjo
simonjo antwortete auf Raspi4PHC
You need to add an ampersand to the end of the commandline to start in background

./xwrc.raspi -httpport 8080 -httpaddr 192.168.xxx.xxx -remaddr 192.168.xxx.xxx -remport 10000 &

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Powered by Kunena Forum