Re: [fpc-pascal] Ethernet Relays

2020-09-14 Thread James Richters via fpc-pascal
I put my project to control these ethernet relays on Git Hub at https://github.com/Zaaphod/Ethernet-HTTP-Relays/ I thought I would post it here so if someone comes across this while searching for information about them they will find it. This is a library to control Ethernet Relays that use w

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: Yes 10 was too short, I made it larger and larger until it worked. 1000 was the lowest value that worked so I set it to 2000, that's still quite a bit faster than the default. If I make a mistake in the link but the server IP addres

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread James Richters via fpc-pascal
To: James Richters ; FPC-Pascal users discussions Cc: Michael Van Canneyt Subject: Re: [fpc-pascal] Ethernet Relays On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: > I added ssockets now I can compile it. > > I have this working with the ssockets unit added: > Try > S

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread Michael Van Canneyt via fpc-pascal
On Tue, 8 Sep 2020, James Richters via fpc-pascal wrote: I added ssockets now I can compile it. I have this working with the ssockets unit added: Try S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); except On E: ESocketError do Writeln('Could not connect to server'); end;

Re: [fpc-pascal] Ethernet Relays

2020-09-08 Thread James Richters via fpc-pascal
connect to server'); end; finally C.Free; end; end; James -Original Message- From: fpc-pascal On Behalf Of Michael Van Canneyt via fpc-pascal Sent: Tuesday, September 8, 2020 2:51 AM To: James Richters ; FPC-Pascal users discussions Cc: Michael Van Canneyt Subje

Re: [fpc-pascal] Ethernet Relays

2020-09-07 Thread Michael Van Canneyt via fpc-pascal
Add the ssockets unit to your uses clause. Michael On Mon, 7 Sep 2020, James Richters via fpc-pascal wrote: When I try to compile either of the examples below, I get Error: Identifier not found "ESocketError" Any ideas? James Yes, catch the ESocketError in a try..except: Try S:=TFPHTT

Re: [fpc-pascal] Ethernet Relays

2020-09-07 Thread James Richters via fpc-pascal
When I try to compile either of the examples below, I get Error: Identifier not found "ESocketError" Any ideas? James Yes, catch the ESocketError in a try..except: Try S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); except On E: ESocketError do Writeln('Could not c

Re: [fpc-pascal] Ethernet Relays

2020-09-06 Thread James Richters via fpc-pascal
Thanks Michael, I'll give it a try James -Original Message- From: fpc-pascal On Behalf Of Michael Van Canneyt via fpc-pascal Sent: Sunday, September 6, 2020 11:12 AM To: James Richters ; FPC-Pascal users discussions Cc: Michael Van Canneyt Subject: Re: [fpc-pascal] Ethernet R

Re: [fpc-pascal] Ethernet Relays

2020-09-06 Thread Michael Van Canneyt via fpc-pascal
On Sun, 6 Sep 2020, James Richters via fpc-pascal wrote: I've been using simpleget to control ethernet relays like this: S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/15'); But if the IP address does not exist on the network I get this error: An unhandled exception occurred at $00

Re: [fpc-pascal] Ethernet Relays

2020-09-06 Thread James Richters via fpc-pascal
Behalf Of James Richters Sent: Monday, May 25, 2020 8:19 AM To: 'FPC-Pascal users discussions' Subject: Re: [fpc-pascal] Ethernet Relays Thank you Michael, I would have really overcomplicated that, glad I asked James -Original Message- From: fpc-pascal On Behalf Of Michael

Re: [fpc-pascal] Ethernet Relays

2020-05-25 Thread James Richters
ally L.Free; end; Michael. > > James > > -Original Message- > From: fpc-pascal On Behalf > Of Michael Van Canneyt > Sent: Monday, May 25, 2020 4:47 AM > To: ja...@productionautomation.net; FPC-Pascal users discussions > > Cc: 'Ched' > Subject

Re: [fpc-pascal] Ethernet Relays

2020-05-25 Thread Michael Van Canneyt
; Michael. James -Original Message- From: fpc-pascal On Behalf Of Michael Van Canneyt Sent: Monday, May 25, 2020 4:47 AM To: ja...@productionautomation.net; FPC-Pascal users discussions Cc: 'Ched' Subject: Re: [fpc-pascal] Ethernet Relays On Sun, 24 May 2020, James Ric

Re: [fpc-pascal] Ethernet Relays

2020-05-25 Thread James Richters
: Re: [fpc-pascal] Ethernet Relays On Sun, 24 May 2020, James Richters wrote: > I got this working, thanks for the advice Ched, > > Here's my test program: > uses fphttpclient; > Begin > TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/01'); > TFPHTT

Re: [fpc-pascal] Ethernet Relays

2020-05-25 Thread Michael Van Canneyt
On Sun, 24 May 2020, James Richters wrote: I got this working, thanks for the advice Ched, Here's my test program: uses fphttpclient; Begin TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/01'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/3/03'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.0

Re: [fpc-pascal] Ethernet Relays

2020-05-24 Thread James Richters
ed in my browser to I can see what page number I'm on, I could also then check the status of the relays as well by analyzing what I read. James -Original Message- From: fpc-pascal On Behalf Of James Richters Sent: Sunday, May 24, 2020 3:41 PM To: 'FPC-Pascal users discussio

Re: [fpc-pascal] Ethernet Relays

2020-05-24 Thread James Richters
ubject: Re: [fpc-pascal] Ethernet Relays Hello James, You'll find a source of happiness with unit fphttpclient . Particularily with the simplget function: TFPHTTPCLIENT.SIMPLEGET('http://192.168.1.4/3/00') It is said that it works with https also, but under the Mageia7 distro

Re: [fpc-pascal] Ethernet Relays

2020-05-24 Thread Ched via fpc-pascal
Hello James, You'll find a source of happiness with unit fphttpclient . Particularily with the simplget function: TFPHTTPCLIENT.SIMPLEGET('http://192.168.1.4/3/00') It is said that it works with https also, but under the Mageia7 distro, you probably encounter problems I haven't yet solved.

[fpc-pascal] Ethernet Relays

2020-05-24 Thread James Richters
Does anyone have any advice on how to get started sending commands from FPC to use these ethernet relays: https://www.amazon.com/gp/product/B076CNJNFH Default IP :192.168.1.4 prot:3http://192.168.1.4/3 HTTP Comment: http://192.168.1.4/3/00 : Relay-01 OFF http://192