The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Re: 1 Wire Temperature


  • Subject: Re: Re: 1 Wire Temperature
  • From: John B
  • Date: Tue, 16 Mar 2004 17:53:00 +0000

> 1. First you need to set xplhal so it can match a message and carry on
to
> process further messages.
> 2. Right click the server name in the xpl manager app and select edit
the
> xml. In this you need to set the option for carry on after
successfully
> match (John - what's the option called). Then select OK to save. You
may
> need to restart xplhal for this to take effect (John ??)

You don't need to edit the XML manually.

Just right-click on your server name, hit Properties, then on the General
tab,
make sure the "Continue processing after first match" option is
ticked.
Click OK.
Not sure if you need to restart xPLHal - you shouldn't have to.

> 3. Right click the server name in the xpl manager app and select
> properties.
> 4. On the rules tab select new rule and in the dialog box type CF in
the
> subs box then ok.
> 5. Move this rule to the top and ensure it is set to continue on match
> (should be a green arrow icon next to it rather than a red cross)
> 6. That's it.
>
> xPLhal will now match on rountines that have the form [Schema type]
> _[Message_Type]
>
> There is an alternative way though that I think is simplier to
implement as
> the above was done before determinators.
>
> 1. Create a determinator that triggers when you receive a sensor.basic
> xpl-stat meesage where Type =TEMP.
> 2. Create an Action with the following in it
>
> type = xpl-cmnd
> to=tonyt-xql.master
> schema=DB.XQL
>
> parameter pairs
> SQL=select * from temperature
> dateadded=NOW() -- Not sure if NOW() will work John can you advise

No problem with () - the only special case is for curly brackets {}.

> name={DEVICE}
> temperature={CURRENT}
>
> John? What is the current syntax for pulling out the values of the
trigger
> message is it {DEVICE}?

Basically anything contained within {} will be checked by the determinator
engine, as follows:
SYS::TIMESTAMP will be replaced by the current date/time, in the form
yyyymmddhhmmss. This is useful for generating a unique number or timestamp.
SYS::DATE will be replaced by dd/mm/yyyy (current date)
SYS::TIME will be replaced by hh:mm:ss (current time in 24-hour clock)
Any global name will be replaced by it's actual value, e.g.
{WINDSPEED} will be replaced by the value of the WINDSPEED variable.

I don't think you can pull values out of the source message at the moment.
This was certainly on the list... but I'm not sure if it ever got actioned.

The idea was that something like:
{XPL::DEVICE} would be replaced by the "device" parameter from
the incoming
message.
But there are issues where more than one "device" parameter
exists in the
message.

As I think the ability to de-reference source parameters is pretty
essential for
this sort of thing, I'll move this to the top of my ToDo list.

Regards,

John






xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.