DS1242 simple html request

Hi together,
I have received just recently a robot-electronics ds1242 board and now I have some problems how to realize the following task:

Can I program the ds1242 so that I can switch a relay by a simple html request?
For ex, if the ds1242 has the ipv4 addr a.b.c.d, so maybe http://a.b.c.d/rly1.htm means to switch relay #1 on for a specified amount of time. (that “rly1” is only an example, no matter which syntax might be needet to get the result)

There should not be any scripting into that html page, I fear that that maybe a problem: it should be able to call that command from any other device like a Router, Web Cam or similiar devices which are able to send a html request. So the tcpip-server would not be able to solve my problem since tcpip-server must be called by putty - or am I wrong?

Does someone know an answer or could give me a tip for that problem?

Many thanks for any help / tip !!

Kind rgds
Tom

Hey Tom!
Welcome to the RobotShop community! :slight_smile:

I’m by no mean an expert on this, but I think the example code provided with the documentation might already have a starting point/answer on how to do this. Here are some details on this idea:
The default example seems to have a large .dsi script that includes many features (including using an HTML page to change relay status, i.e.: on/off).

From this example you will notice an example app with an HTML page (index.html) that has many buttons to toggle the status of relays using ajax. It stands to reason that running a different HTML page (ex: rly1.html) that simply makes an ajax call to toggle relay 1 on load would suffice.

I recommend looking in that direction and see if you can make this work. If you are still facing more difficulties after trying it out, I’d recommend asking the manufacturer directly (@devantech).

I hope this helps!

Sincerely,

Hi Tom,
The dS modules provide a range of communication options but html requests are not one of them.
I would recommend taking a look at the binary command set.

Hi Scharette,
thank you v. much for your reply with your informations.
Unfortuneately using ajax means to execute something like java and that would not be possible at these devices from which I want to do that. These devices can only send html requests without java or other executable scripts.
Greetings Tom

Dear devatech,
thanks too for your answer, pls can you help me what you men with “binary command set” and where can I read about that? Maybe I did not realize the possibilites shown in the pdf manual.
Greetings
Tom