View Single Post
Posts: 43 | Thanked: 3 times | Joined on Jul 2008 @ Vienna
#122
Originally Posted by ludwig.xiv View Post
SENDING UDP Packages

Hi,
first thank you for this great piece of Software.

I have a Light Controller for Home Automation. This is controlled by HTML commands or UDP Commandes.

HTML does not work because of the command's syntax "http://192.168.1.130/r?text=1&s=9&t=1". When I open the link via Irreco's Command Line Interface the Maemo Browser deletes the "&" and the command does not work.

Can Irreco send UDP Codes instead? I would appreciate if someone adds that feature.

Regards

Ludwig
Theres a workaround which I use for triggering http actions from irreco.

Install curl if you haven't yet.
Create a new file in /usr/bin/ called something like control.sh or whatever fits your bill.
Make it executeable by chmod +X control.sh
Put something like this in it:

Code:
#! /bin/sh

curl "http://192.168.1.130/r?text=1&s=9&t=1"
That's it, then just add a new commandline interface and add a call for control.sh

Note: you can also use $1 in the url of the shellscript which will then be replaced by the first parameter you pass to control.sh (same goes for $2 for the second etc..)

For example, curl "http://192.168.1.130/r?text=1&s=9&t=$1" would result in curl "http://192.168.1.130/r?text=1&s=9&t=ON" if you execute the file like this:

control.sh ON