I got this working, thanks for the advice Ched, Here's my test program: uses fphttpclient; Begin TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/01'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/03'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/05'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/07'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/43'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/09'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/11'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/13'); TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/15'); End.
I have to give it a command to go the next page for some reason or relays 5-8 won't work... so now I'm wondering if there is a way I can retrieve the data that is normally displayed 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 <fpc-pascal-boun...@lists.freepascal.org> On Behalf Of James Richters Sent: Sunday, May 24, 2020 3:41 PM To: 'FPC-Pascal users discussions' <fpc-pascal@lists.freepascal.org> Cc: 'Ched' <charles.edouard.des.vastes.vig...@gmail.com> Subject: Re: [fpc-pascal] Ethernet Relays Thanks!! I'm happy with http, I should have mentioned I'm on Windows 10, any issues with that unit under windows? James -----Original Message----- From: fpc-pascal <fpc-pascal-boun...@lists.freepascal.org> On Behalf Of Ched via fpc-pascal Sent: Sunday, May 24, 2020 3:02 PM To: fpc-pascal@lists.freepascal.org Cc: Ched <charles.edouard.des.vastes.vig...@gmail.com> Subject: 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/30000/00') It is said that it works with https also, but under the Mageia7 distro, you probably encounter problems I haven't yet solved. But for http, that should be right. Cheers, Ched Le 24.05.20 à 18:46, James Richters a écrit : > 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:30000 http://192.168.1.4/30000 > > HTTP Comment: > http://192.168.1.4/30000/00 : Relay-01 OFF > http://192.168.1.4/30000/01 : Relay-01 ON > http://192.168.1.4/30000/02 : Relay-02 OFF > http://192.168.1.4/30000/03 : Relay-02 ON > http://192.168.1.4/30000/04 : Relay-03 OFF > http://192.168.1.4/30000/05 : Relay-03 ON ... > http://192.168.1.4/30000/14 : Relay-8 OFF > http://192.168.1.4/30000/15 : Relay-8 ON > http://192.168.1.4/30000/41 : Enter > http://192.168.1.4/30000/40 : Exit > http://192.168.1.4/30000/42 : Next Page > http://192.168.1.4/30000/43 : Next Page > > I don't really know what I even need to do to send commands like that over > the network. Of course I can get it to work just typing the commands from a > browser but that's not what I want, I want my FPC console program to send the > appropriate commands whenever I want one of the relays to come on or go off. > > Any suggestions on how this might be accomplished? > > James > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal > _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal