1 Hour RF script? anyone help?

14 replies [Last post]
g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011

This is a follow on from another post but needs a seperate thread as it may be of use to others :)

 

what i want to do is switch an RF socket on (via a tweet or a direct command from joggler/android) and for it to switch off 1 hour later automatically.

 

I do not do software, anyone any ideas how or has this been done before? (yes i did STF but couldnt find anything)

 

This is related to "boosting" a heating system remotely (or in my case locally) to max but just for 1 hour, SWMBO when she gets cold she wants HEATING NOW!

 

Dean

magill
Offline
Joined: 27 Apr 2012
boost timer

Hi Dean
I have a similar system but extended slightly to include boost for 3 zones and the ability to increment the boost in half hour intervals. In my case I do it by sending alias messages from my Android and also Joggler.
It also generates an endpoint with a run back timer which I display on Joggler/Android. I will tidy the code a bit and post it later today.
John

magill
Offline
Joined: 27 Apr 2012
boost timer

Dean
Attached is my alias script modified from Brett's original.
Example alias messages are:
"boost liv 1" this switches on relay2 and increments it's timer by 30 mins. Each subsequent receipt of this alias will increment another 30 mins.
"boost bed 1" ...relay3 on for 30 mins
"boost water 0"... relay4 off and timer reset.
At the bottom of the script there is the creation of a countdown endpoint which can be displayed.
Also a crontab switch all off at 1:00 am just in case.
Please don't be too critical of my puerile coding.
Good luck
John

AttachmentSize
JMaliasApplet.lua 4.78 KB
g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
Thank you

Over my head programming wise but i will have a go :)

got 6 months+ to get it working as a 1 hour boost via RF to switch heating on.

 

will explain further for clarity, i want to send an RF command to RF 8 for example that will switch RF8 on for 1 hour.

 

RF8 will be connected to boost heating (turn it on) irrelevant of thermostat to max.

so SWMBO say "im cold" and hits button warm up, and heating comes on! simples. (i Hope)

magill
Offline
Joined: 27 Apr 2012
Cut down version

Dean

I attach a completely fat free version. You need to remove Brett's original aliasapplet.lua from the plugboard and add this modified one. It will respond to an alias of "boost" and turn on rf8 for one hour.

I'm happy to help further if you want.

John

AttachmentSize
BoostaliasApplet.lua 1.64 KB
garrydwilms
Offline
United Kingdom
Joined: 31 Mar 2011
Exactly

Dean,

 

from what you have described, John's code is exactly what you need.

just mod the room names and relay to rf and it would appear your good to go!

 

EDIT.. Just noticed John's been kind enough to do the mods for you. Must have posted at same time. 

 

Good work John.

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
Thanks John

Testing it now :)

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
It half works.

It works with twitter but not if i turn on with joggler etc.

 

got to be something simple. (or more likely me being stupid)

magill
Offline
Joined: 27 Apr 2012
1 Hour

Are you by any chance using the default joggler configuration. If so it will need to be modified so that a button sends this alias.

Not too difficult.

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
This is my config for the joggler

<button NAME="boost">
            <label>
                <text>Heating</text>
            </label>
            <gridX>6</gridX>
            <gridY>2</gridY>
            <style>glossy_button_off_.png</style>           
            <xAP>
                <schema>xAPBSC</schema>
                <uid>FF00DBA7</uid>
                <source>dbzoo.livebox.controller:rf.8</source>
            </xAP>
            <mode>control</mode>

 

I have tried modifying various bits with no joy, can i have a pointer please?

magill
Offline
Joined: 27 Apr 2012
Joggler button

Dean
This is how I got mine to work.

<button NAME="boost">
            <label>
                <text>Heating</text>
            </label>
            <gridX>6</gridX>
            <gridY>2</gridY>
            <style>glossy_button_off_.png</style>           
            <xAP>
                <on>
                    xap-header
                    {
                    uid=uid=*.*
                    source=dbzoo.livebox.Twitter
                    hop=1
                    class=alias
                    v=12
                    }
                    command
                    {
                    text=boost
                    }
                </on>               
            </xAP>
            <mode>toggle</mode>
</button>

 

John

 

PS if you get that to work you might like to add these 2 buttons to the inventory on the joggler at MEDIA/APPSHOP/XAP/  (I think) and change the line above to:

<style>JMboost_off_.png</style>   

AttachmentSize
JMboost_off_.png 20.3 KB
JMboost_on_.png 20.3 KB
g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
Thanks John

but it does not seem to work :( i have had a play with UID etc and cannot see anything in XFXviewer when i run it?

 

anyideas whati am doing wrong?

 

Dean

magill
Offline
Joined: 27 Apr 2012
boost

there should be activity on XFX for both the plugboard (as it analyses the alias) and then the rf8 endpoint.

I've tried it on mine and it works. I don't have my joggler at the moment but have been testing from my PC using a little home brew vb app to send XAP via UDP. Can you see other activity on XFX as you press joggler buttons. I'll send you the PC app if you want.

g7pkf
Offline
United Kingdom
Joined: 11 Jan 2011
yes

XFX is fully active and if i send a tweet it is picked up fine.

joggler other buttons are picked up XFX does not pick up the "new" button at all.

 

please send me the pc app to test.

 

dean AT packetradio dot co dot uk

magill
Offline
Joined: 27 Apr 2012
boost

Dean I've been experimenting. There is probably a "proper" way to send an alias but try this

<button name="boost">           
            <label>
                <text>boost</text>
            </label>
            <gridX>6</gridX>
            <gridY>2</gridY>
           
            <xAP>
                <on>
                    xap-header
                    {
                    uid=
                    source=dbzoo.livebox.Twitter
                    hop=1
                    class=alias
                    v=12
                    }
                    command
                    {
                    text=boost
                    }
                </on>
                <off>
                    xap-header
                    {
                    uid=
                    source=dbzoo.livebox.Twitter
                    hop=1
                    class=alias
                    v=12
                    }
                    command
                    {
                    text=boost
                    }
                </off>           
            </xAP>
            <mode>toggle</mode>
        </button>       

Hardware Info