1 Hour RF script? anyone help?
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
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
Attachment | Size |
---|---|
JMaliasApplet.lua | 4.78 KB |
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
Attachment | Size |
---|---|
BoostaliasApplet.lua | 1.64 KB |
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.
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.
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>
Attachment | Size |
---|---|
JMboost_off_.png | 20.3 KB |
JMboost_on_.png | 20.3 KB |
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.
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>
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