Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Anyone interested in a "Hardware Helper" for iRule?

Just an idea at this stage... there may be no interest or I may be letting myself in for a whole heap of trouble. Still, thought I'd put it out there.

For my day job, I have developed an OpenWRT Linux based OS for one of these. Its a neat box which only uses 2.5W of power, and running my OS has a GUI and can do lots of stuff that much more expensive routers can do.

In my spare time, I've developed ( and am still developing ) an "iRule helper," which currently:


  • Allows commands to be sent asynchronously from iRule... that is to say you can send commands after a set period of time without iRule needing to do anything ( currently only IP controlled devices, but GC devices should be do-able in the near future. )

  • Can send UDP commands ( not just broadcast UDP. )

  • Acts as a proxy for IP devices, including GC devices. This means that there is only ever one connection to the device, and so connection limits are never hit. ( My daemon allows 100's of connections. ) iRule's initial connection is much quicker ( for me ) and you never get connection limit issues ( which I do without this even with IP2IR boxes and only two remotes. )

  • Has special functions for LightwaveRF devices

  • Can read data from a CurrentCost energy monitor ( though the Mikrotik doesn't have a USB port unfortunately. )


In the ( hopefully near ) future I also hope to implement:

  • Very simple macros, which are stored by iRule and then called by a single IP command. Just commands ( GC and IP ) plus delays, and hopefully simple substitution of parts of the macro on execution.

  • Execute commands based on simple variables. Variables can be set to a value from iRule, then a command executed conditional on the value of a variable.


I figure that putting these two together ( the MT750 and the daemon ) would give a fairly user friendly box which could be used in conjunction with iRule, and since it's also a Linux box it could be used for other things too.

I don't have much time, and so I would have to charge a small amount for setting it up etc.... I would imagine that the box would end up costing around £55 plus any eBay/PayPal costs ( the easiest way for me to make them available ) plus any shipping costs. To be honest I could also make the source code of the daemon available in case anyone wanted to "roll their own" ( but wouldn't have much time to explain how! )

Any takers/thoughts?
7 people like
this idea
+1
Reply
  • Hi Sidepipe,

    Looks like you're doing some interesting things with the "iRule Helper." I'd be interested to talk more about what you are doing and planning on doing. You can email me at brennan@iruleathome.com. Cheers!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Hi Brennan... e-mail on it's way. For anyone else who is interested, I now have variables working too. There is a major advantage to having variables outside of iRule itself, because they can be globally significant - i.e. all handsets know about them.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • This is of tremendous interest to me, but is it still happening? No posts for several months now.

    I would also be VERY interested in just the daemon to run on Mac OSX. This would mean any local Mac server could be used as a central proxy to limit connections to gateways and maintain 'network variables'. What a wonderful feature that would be.

    What do you think Adam?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • There didn't seem to be that much interest, my own set-up sort of works at the moment, and I've been REALLY busy for the last few months ( writing the code was just taking up too much time :( )

    However, I still intend to finish it at some point - the code is in a state where I can use it, but there is no real configurability so not fit for human consumption. As for a Mac OSX daemon... the code should compile I would think but may need a few changes because it uses some Linux specific features - though a box for it to run on as a standalone is pretty cheap.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I know Linux boxes can be obtained quite cheaply, but nothing is as cheap as something you already have and for those that are already using a Mac as a media, or any other form of server, the best solution would simply be a daemon to run on that.

    I can also see the value of a standalone, but the link in your first post is dead. I'd be interested in seeing what you are working on.

    Any lack of interest is I'm sure down to lack of understanding of you are proposing, or they simply missed this thread. There's been a fair bit of talk about the idea of sharing variables across devices and your idea promises to solve that problem. Mostly I think it's value would be to enable all devices to know what's on and what is off, but I'm sure there'll be other uses.

    Don't give up. I'm sure once the word gets around there'll be a lot of interest.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I'm still very interested in this, 5 months later :D

    It's good to see some activity on it.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • The issue with a daemon for OSX for me ( or Windows for that matter ) is that I don't have development tools for either ( or hardware for the former... ) so it's unlikely to happen unless I let the source code out.

    It seems that Mikrotik have stopped the "www" version of the link working ( a crazy move! ) and so you can just remove it from the front of the link, or go here. To be honest though I may try to find something with a USB port - I have a build for one of these but the on-board flash is tiny so you need a USB hub and flash drive.

    Anyway, I will try to make a concerted effort to get something that is workable over the next few weeks and we'll see where we get to!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I'd be happy to lend you a Mac to help, but as I guess you're in the US it's not really practical. Unless you're in the UK...?

    But if you can get the hardware, the development tools can be downloaded from Apple at no charge.

    I would have 2 current requirements for such a helper. One would be MT750 based and the other OSX. So from my point of view I'd like to see both progressing and an OSX version wouldn't have to be that different as unix code can usually be compiled to run on OSX - unlike Windows.

    Could the MT750 be used to NOT route, but act just as 5 port switch and DHCP server?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I'm in the UK, but there wouldn't be much point looking at Mac versions until the basic version was done.

    For the MT750 I'd be using my own OS, not Mikrotik's... so essentially a modified version of OpenWRT. It can be used as a router and/or a switch, has DHCP and much more besides.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Am I correct in thinking that your 'helper' allows multiple instances of iRule (on different devices) to share variables and effectively provide multiple connections through a GC-100?

    What about when there's multiple rooms with a GC-100 in each? Can it handle all of them or must there be one for each GC-100?

    Putting aside the OSX question for the moment, I have need of your helper on an MT750 and also a 5 port switch and DHCP server, so your solution sounds ideal for that location.

    Once the basic version is done, I'd like to further discuss how I can help with an OSX daemon. Great to hear that you're in the UK. Where?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Yes... many iRule devices can share the same helper and have global variables accessible by all, or session variables created for a single session only. Macros can also be called based on the contents of variables. It can also emulate multiple gateways using multiple IP addresses and/or ports. In fact one of the reasons why it stalled is that I realised that it was going to be pretty tricky to document it so that people other than me could actually understand how it all works!

    I'm in South Birmingham.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • OK, close enough as I'm just west of London. So definitely possible to assist with developing an OSX daemon when the time comes.

    In the meantime, I'm definitely interested in the MT750 version. When might it be 'available'?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Ah, the million dollar question! I've not looked at the code for some time now, so I need to remember how far I'd got first! I'll try to make a concerted effort to make some progress and I'll update when I know where I am with it.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • OK, won't hold my breath, but obviously keen to actually have it to use. Keep us updated as to how you're getting on.
    • I'm now nearly at the point where this is usable for people other than me. IMHO it expands the capability of iRule massively but it will never be particularly "user friendly" - certainly initially support will be "can it..." and me saying "yes, this is how..." It could be improved by a few simple additions to iRule itself, such as the ability to jump to a panel based on feedback from a device ( so that you can go in to a room and have iRule automatically go to the page for the currently active device in that room. ) The ability to download database commands to my device would also be cool, so that it doesn't have to be done "semi manually".... but I digress.

      It's not been tested to any large extent - if you want to wait for that then you'll probably be waiting another month because it really involves me re-designing my own set-up to use all of the features, and it took me so long to sort my iRule layout in the first place that I have to get over the resistance to rip it apart again.

      Are you the UKenGB registered on XDA developers? If so, and if you're still interested, I'll pm you there and let you know how you can get hold of one and how much it will cost. I can't make it generally available yet because of the possibility that it will simply eat up all of what little time I have available for doing things other than work - but IF you're willing to be a guinea pig and IF it turns out to be as useful as I think it is then once some docs are written and any major issues are sorted I will do so.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I’m thankful
    That sounds really cool.
    Would love to see such a thing for my MacMini ;-)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • As per my comment to UKenGB, this is coming on, but won't be generally available until I get some verification that it is as useful as I hope. Just to whet people's appetites, what I have working so far in addition to the initial post is:


    1. Macros which can send any command, including those to iTachs etc. These can be called based on the contents of a variable - so you can have macros called volup.livingroom, volup.bedroom etc and call volup..

    2. Variables can be session based ( i.e. active for just a single iRule connection, ) controller based ( active for all connections from a specific iRule device IP, ) or global ( visible to all devices all the time. )

    3. Commands/macros can be called conditionally based on variable contents

    4. UNIX shell ( busybox ash ) is used for variable expansion, so that anything that can be a "variable" can also be the result of a script. For example, $(date) expands to the current date, $(date +%s) expands to the date in seconds since Jan 1st 1970.

    5. Custom scripts can be written on the box, and the UNIX cron used to call them at specific times. These scripts can run commands themselves, so for example you could insert something into cron which fetches today's sunrise and sunset times every day at midnight. Another script could then be called every minute to check to see if it is sunset yet, and turn on a lamp if it is... totally independent of iRule itself.

    6. The OS of the box is my own, which is a heavily modded OpenWRT. This is therefore a fully functional router in its own right, supporting useful things like a DHCP server and local hosts table, 5 ethernet ports which can be bridged as a switch or used as separate DMZs, etc. etc.



    The possibilities are pretty much endless, but unfortunately even basic documentation will take an age to write, so unless I'm flooded with interest, or a certain company based near Lake Michigan decides to do something similar or do things to make the setup of my box easier, it may be a while before anyone else can get one!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I think it would be incredibly useful.

    I'm thinking, could you not use your box to maintain 'state' of each piece of equipment, then iRule just sends e.g. ON and your box decides whether the command actually needs to be sent since it would know if it was already on or not?

    I'm not suggesting the above as usable straight 'out of the box', but by the use of unix shell scripting etc? Got to be easier than waiting for conditionals in iRule and also more powerful since it would all be available to any iRule remote so they'd all be able to operate in sync. Isn't that something we all want?

    Keeping multiple remotes in sync was the great USP of ThinkFlood's RedEye, but this could be even better with all that iRule has to offer.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Yes, and that will work out of the box, since commands can be sent with conditions attached ( i.e. only execute the command if a particular condition is met. )

    Did you read my comment under your "I won't hold my breath" post above?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited