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: My list of possible xAP Enhancements


  • Subject: RE: My list of possible xAP Enhancements
  • From: "Neil Wrightson" <neilw@xxxxxxxxxx>
  • Date: Wed, 17 Mar 2010 00:11:34 +1100

------=_NextPart_000_0231_01CAC566.6827DF20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Lehane / Kevin,
=20
I'm not sure how I'm breaking a schema. Perhaps we are talk about two
separate things.
As an example
{=20
InstanceRename=3DHouse=20
}=20
In the message body. If the device did not know anything about
"InstanceRename" wouldn't it just ignore this message?
All I'm doing is adding some extra parameters.
Are you suggesting that there should be another class for configuration? If
so would this need to be two different classes then?=20
One for the general xAP and one for xAPBSC.
I.e. class=3Dxap.config or class=3Dxapbsc.config
This is because xap.config does not have endpoints.
=20
=20
Watchdog's versus Pulsed outputs.
They are TWO different things.
I use watchdog's all of the time both in the hardware sense, where it is
supervising the embedded processor and from a software perspective.=20
The hardware watchdog is used to ensure the embedded processor is reset
incase of lock up. Possibly due to a firmware bug, EMI, Sun spot whatever.
The software watchdog is used if the main controller (PC) stops talking to
the embedded device after a preset time. Here the embedded device turns off
all outputs.=20
I have been doing this style of thing for a few decades now and believe,
both are required.
This is completely different to a pulsed about, where you send the embedded
device a signal telling it to turn on it's output for a preset period i.e.
5min, 30min whatever.
In a watering of the garden scenario, a pulsed output of 30min may be
fine.=
=20
However in a closed loop scenario, i.e. where a PC is controlling the water
level in the swimming pool. The PC interrogates the embedded control for
th=
e
water level and if the water level is too low, it tells the embedded device
to set an output to fill the pool. The PC controller would tell the
embedde=
d
processor to turn ON (not pulsed) the water inlet valve. The PC must at
appropriate intervals, continually tell the embedded controller to set the
output to ON.
Because of this continual refresh, the embedded controller keeps this
outpu=
t
ON until it is told to turn OFF. If the comms from the PC dies, the
softwar=
e
watchdog in the embedded device kicks in and turns off the output before
th=
e
pool overflows.=20
I know I'm using backyard scenarios here but in my world these apply, as
well as systems I've done for filling truck fuel tankers, gas cylinders,
grain loading into ships etc.=20
Both hardware and software watchdogs must exist.=20
However a pulsed output if a defined period, is fine to turn on the
veranda/porch light.
I believe that the designers of xAP, intended this to be more than just a
backyard controller protocol. They hoped it would move into commercial
products, so now we need to think in a commercial real world manner. I for
one, don't want to be responsible for why the gas cylinder was over filled
and exploded.
=20
The reason I specified byte here, relates to the above. The software
watchdog is an emergency safety switch. 1..255 seconds is a bloody long
tim=
e
when something is overflowing etc.
The other thing that is always in the back of my mind, is that my embedded
controller doesn't have 1.5TB of parameter storage :-( Only some EEPROM.
Bytes count.
=20
=20
In regard to the watchdog's being endpoints in their own write, and
concatenated messages as per your example. Sounds good.
=20
=20
As far as the time stamp goes', I'm only talking about down to the second
level. Also having a Julian/LongInt representation in the same message
migh=
t
not go astray. It's easy to do quick comparisons on a Longint.
RTC's for use in embedded devices are quite cheap these days.
=20
=20
In regard to the optional RestoreState facility. I see this more for
reasonably dumb  things, like light controllers. The power dies and comes
back in 10 seconds, the light comes on with the power.
I.e. like some X10 fittings that remember there last state. Meanwhile, 10
minutes later the server has finished booting and is in control again.=20
Yes I know.... UPS.    Personally, I have four hours of UPS runtime driving
my servers but not everybody has this luxury.
=20
As you also said Lehane, "xAP is not predicated on the use of
controllers".
Just that statement says that the devices on the xAP network should go back
their prior state.
This is one of the big differences between xAP and xPL.=20
=20
The final other point is, that just because some endpoint controllers don't
have some functionality (i.e. RTC facilities), doesn't mean we should
restrict the specification to the dumbest/leanest hardware.
=20
=20

Regards,=20

Neil Wrightson.=20
N.W.Electronics=20
ABN 76 768 513 867=20
Embedded Controllers and Home Automation Products=20
Skype : Neil_Wrightson=20
Web     : www.nwe.net.au=20

=20



_____=20=20

From: xAP_developer@xxxxxxx [mailto:xAP_developer@xxxxxxx]
On Behalf Of Kevin Hawkins
Sent: Tuesday, 16 March 2010 9:47 PM
To: xAP_developer@xxxxxxx
Subject: Re: [xAP_developer] My list of possible xAP Enhancements


=20=20

Hi Neill,

I agree with Lehane's comments below - in particular the need for a
separat=
e
configuration schema - you couldn't implement it in the way you propose
within BSC as it would break the existing schema specification and hence
al=
l
existing BSC implementations and devices.Configuration is quite an involved
area that also encompasses device discovery, internal parameter config, UID
allocation etc as well as the renaming of devices.  I would heartily
welcom=
e
a thorough schema proposal here.

Re the watchdogs - I can see that it is useful for some devices  Within BSC
it could  be done by supplementing additional parameters within a
xAPBSC.cm=
d
message.  This is allowable within the existing specification.    There are
some additional aspects to consider such as how do you know whether the
endpoint you are controlling supports watchdogs or not and how could you
recover (read) any values you had set ?

The watchdog is essentially a hardware feature supplemented by a need to
configure it from software.  As such existing controllers like the very
popular xAP Netiom couldn't be supported.   A limited software only
watchdo=
g
is possible by a controller monitoring output states but that assumes
network connectivity remains available or is restored.     The application
you are using in a way is requiring a programmable pulse output with a
cancel/retrigger feature .  You could achieve this in hardware (eg a
Netiom=
)
by attaching a diode/capacitor that  is used as a timer into a highish
impedance circuit.     Also Phaedrus make a device called the Viom which
supports pulse outputs and internal smarts although this is not available
i=
n
a xAP version.    You could attach this to a xAP driven  serial port , such
as the one available on the xAP Netiom for example or roll your own
hardwar=
e
, as I suspect is your preference.

Another approach instead of , or additional to the inclusion of watchdog
parameters within the xAPBSC.cmd message would be to expose the watchdog
parameters as BSC endpoints in their own right.  That way you can clearly
see if the device has watchdog support and you have a way to set or read
th=
e
values .=20

source=3Dacme.irrigation.controller:lawn.sprinkler
source=3Dacme.irrigation.controller:lawn.WD.timer
source=3Dacme.irrigation.controller:lawn.WD.enable
source=3Dacme.irrigation.controller:lawn.WD.timeout=20

BTW I don't think there should be byte value restrictions imposed.

Because xAP supports concatenated messages you could include all the
xapbsc.cmd's within one xAP message which ensures that all are received and
actioned coincident.  Note however that the feature to include a different
target =3D line within each message body will be deprecated in xAP v1.3
and=
so
your addressing of the differing endpoints for each body block would be
achieved by means of the ID=3D parameter.     Doing it this way doesn't
nee=
d
any specific schema changes although it doesn't address discovery of
endpoint watchdog capabilities (aside from naming).

Re the time stamp - there is actually an existing date/time schema for xAP
used in a xAP clock application which I could dig out ( I see its schema is
not listed on the web site) although it might be preferable to have better
resolution and some accuracy / priority indication.  Interestingly I'm
passingly familiar with the C-Bus time application which handles different
accuracy time sources and master slave negotiation.  As that attests it is
horrendously complex to implement in a complete way  that caters for
different capability time sources that might come and go as well as time
zones,  summer time etc.  I'm sure the need here is just for something
simple so an adaption of the original xAP clock application is probably
fine.  The C-Bus time application document is available for download from
their site if anyone's interested.

K





On 15/03/2010 11:03, Lehane Kellett (g8kmh) wrote:=20


Hi Neil,
I think that these wouldn't fall into BSC but into a (new) configuration
schema. Something which, from my viewpoint, is missing. This would allow
dumb/unconfigured devices to be attached to the network and remotely
configured.

The watchdog is a good idea - I think there needs to be some flexibility as
to whether it is seconds/minutes/hours/days since repeat messages aren't
something most xAP controllers/mappers perform. Therefore the behaviour
might be slightly different from your proposal in that once sent a command
with the watchdog entries, it will fallback when the timers expire. So if
the controller expects to turn off the watering after, at most, 3 hours
the=
n
the watchdog is set to that value but can turn off after period up to that.

My preference is for the controller to perform the state restores rather
than the endpoint devices and can, if it wishes, keep persistent the
previous device states. Most endpoints aren't going to have the smarts to
know how long power was off. Of course, xAP isn't predicated on the use of
controllers but most installations use one.

Just as update on my current activities. I've started working on using the
PIC32 since the cost (=A345) of the Ethernet board (Starter Kit)  is
comparable to the Modtronix one but with a much better CPU - the downside
i=
s
the connector. The implementation is using Free RTOS, so multitasking, and
my first project is a colour touchscreen controller.

Lehane



Neil Wrightson wrote:=20

=20=20



Hi All,=20
=20=20
Below are the following points that I would like to see added to the xAP
Schema.=20
=20=20

xAP Address renaming=20
This is a means of changing the instance field and the Sub Address
field.=20
Note - The UID does not change. This is specified by the manufacture of the
product.=20
The Logical human readable area of the message is what I propose that we
allow the name changing of.=20
=20=20
To Change the Instance name of a device I suggest the following schema=20
{=20
v=3D12=20
hop=3D1=20
uid=3DFF123400=20
class=3DxAPBSC.cmd=20
source=3DACME.Controller.Central=20
target=3DACME.Lighting.apartment=20
}=20
{=20
InstanceRename=3DHouse=20
}=20
=20=20
This would now mean that the device has been renamed to=20
target=3DACME.Lighting.House=20
=20=20

To Change the SubAddress name of a device I suggest the following schema=20
{=20
v=3D12=20
hop=3D1=20
uid=3DFF123405=20
class=3DxAPBSC.cmd=20
source=3DACME.Controller.Central=20
target=3DACME.Lighting.apartment:KitchenLight=20
}=20
{=20
SubAddrRename=3DHallLight=20
}=20

This would now mean that this device SubAddress  has been renamed to=20
ACME.Lighting.apartment:HallLight=20


Or would both of the above examples be better as a separate class=20
{=20
v=3D12=20
hop=3D1=20
uid=3DFF123400=20
class=3DxAPBSC.rename=20
source=3DACME.Controller.Central=20
target=3DACME.Lighting.house=20
}=20

OR=20

{=20
v=3D12=20
hop=3D1=20
uid=3DFF123405=20
class=3DxAPBSC.rename=20
source=3DACME.Controller.Central=20
target=3DACME.Lighting.apartment:KitchenLight=20
}=20



The other area I would like to look at are Watch Dog capabilities on the
BS=
C
outputs.=20
For those that aren=92t familiar with the WatchDog terminology. A example
should set the scene.=20
I have a xAP device with a relay output that is used to control the
waterin=
g
system on my garden.=20
An application on my server monitors the rain fall in the area via the
internet weather.=20
When it has been determined that the ground is probably too dry, it turns
o=
n
the xAP devices relay.=20
Half an hour later it turns the relay back off.=20
Well it was supposed to , the network switch died and the server was unable
to talk to the xAP Device and the garden has been watered for the next 6
hours until I got home and saw the mess.

However, if I had watchdog facility in the xAP device hardware, it would
have automatically turned the output off after a preset period.

So in this instance the =93WatchDog=94 functionality is a software
function=
in
the xAP device, that monitors the xAP commands received and safely puts the
outputs into a certain state.=20

See   <http://en.wikipedia.org/wiki/Watchdog_timer>
http://en.wikipedia.org/wiki/Watchdog_timer
<
<http://en.wikipedia.org/wiki/Watchdog_timer>
http://en.wikipedia.org/wiki/Watchdog_timer>
 for some further information.

So what I=92m proposing, is the following functionality be added to the BSC
commands and applies to each sub address.=20
WD_Enable                   : Boolean ;    //=20
WD_Timer_Val            : Byte ;       // Seconds=20
WD_Timeout_Val       : Byte ;       // 0/1/255=20

WD_Enable=20
If ON then this Sub address has watchdog functionality turned ON=20

WD_Timer_Val=20
This is how long to wait before changing the output to the
WD_Timeout_Value=
=20
This value is in seconds.=20

In the watering example above, if the server sent a command to turn the
device relay on every 120 seconds, than you would probably want the
WD_Timer_Val set at 240 seconds.

This allows a bit of time in case the server does a brief go slow.=20
The draw back here is that the server needs to send an output command every
two minutes for the half hour watering period, otherwise the watchdog kicks
in and turns the output off.

WD_Timeout_Val=20=20=20=20=20=20=20
This is the value the device outputs when the watchdog state has been
triggered for this device and sub address.=20
A 0 or 1 to be used for a logic output or a value from 0..255 for an
analogue output.=20

Sometimes the output would be best set to ON, to turn on an ERROR lamp to
indicate a fault or turn on minimal lighting when the server has died
instead of leaving the house in darkness.



The other BSC command is=20
RestoreLastState                : Boolean ;    //=20
RestoreLastStateTimer     : Byte ;    // Minutes=20

The idea of this, is that when a xAP device experiences a brief (say 30
second) power loss, it restores itself to the last known state.

I.e. the 240VAC mains into the house was briefly interrupted, it would be
preferable if the light outputs went back to their last known state.

RestoreLastState=20=20=20=20=20
If ON then the specified sub address is restored to its prior state=20


RestoreLastStateTimer=20
If this value is 0 then the output is restored to its previous value
regardless of how long the power was off.=20
If the value is greater than 0 and it is less than (the last known time -
the current time) then the output is restored to its last state else left
off.



Xap-TimeStamp=20
Send a timestamp message to the network at pre-defined periods.=20
This is used to synchronize any devices that are not capable of NTP.=20



Regards,=20

Neil Wrightson.=20
N.W.Electronics=20
ABN 76 768 513 867=20
Embedded Controllers and Home Automation Products=20
Skype : Neil_Wrightson=20
Web     :  <file://www.nwe.net.au> www.nwe.net.au=20








------=_NextPart_000_0231_01CAC566.6827DF20
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable





<head>

<style type=3D"text/css">
<!--

/* start of attachment style */
.ygrp-photo-title{
clear: both;
font-size: smaller;
height: 15px;
overflow: hidden;
text-align: center;
width: 75px;
}
div.ygrp-photo{
background-position: center;
background-repeat: no-repeat;
background-color: white;
border: 1px solid black;
height: 62px;
width: 62px;
}

div.photo-title=20
a,
div.photo-title a:active,
div.photo-title a:hover,
div.photo-title a:visited {
text-decoration: none;=20
}

div.attach-table div.attach-row {
clear: both;
}

div.attach-table div.attach-row div {
float: left;
/* margin: 2px;*/
}

p {
clear: both;
padding: 15px 0 3px 0;
overflow: hidden;
}

div.ygrp-file {
width: 30px;
valign: middle;
}
div.attach-table div.attach-row div div a {
text-decoration: none;
}

div.attach-table div.attach-row div div span {
font-weight: normal;
}

div.ygrp-file-title {
font-weight: bold;
}
/* end of attachment style */
-->
</style>
</head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1"
http-equiv=3DContent-Type=
>
<META name=3DGENERATOR content=3D"MSHTML
8.00.6001.18876"></HEAD>
<BODY style=3D"BACKGROUND-COLOR: #fff">


<!-- **begin egp html banner** -->

<br><br>

<!-- **end egp html banner** -->



<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT face=3DA=
rial><FONT=20
size=3D2><SPAN class=3D818191013-16032010><FONT
color=3D#0000ff>&nbsp;</FON=
T></SPAN>Hi=20
Lehane / Kevin,</FONT></FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>I'm not sure how I'm breaking a schema. Perhaps we are talk
ab=
out two=20
separate things.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>As an example</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><SPAN lang=3De=
n-au><FONT=20
size=3D2 face=3DArial>{</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2=
=20
face=3DArial>InstanceRename=3D<WBR>House</FONT></SPAN>
<BR><SPAN lang=3Den-=
au><FONT=20
size=3D2
face=3DArial>}</FONT></SPAN>&nbsp;</SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>In the message body. If the device did not know anything
about=
=20
"InstanceRename" wouldn't it just ignore this
message?</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>All I'm doing is adding some extra
parameters.</FONT></SPAN></=
DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>Are you suggesting that there should be another class
for=20
configuration? If so would this need to be two different classes then?=20
</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>One for the general xAP and one for
xAPBSC.</FONT></SPAN></DIV=
>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>I.e. class=3Dxap.config or
class=3Dxapbsc.config</FONT></SPAN>=
</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>This is because xap.config does not have=20
endpoints.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>Watchdog's versus Pulsed
outputs.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>They are TWO different
things.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
face=3DArial>I=20
use watchdog's all of the time both in the hardware sense, where it is=20
supervising the embedded processor and from a software perspective.=20
</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>The hardware watchdog is used to ensure the embedded
processor=
is=20
reset incase of lock up. Possibly due to&nbsp;a firmware bug, EMI, Sun
spot=
=20
whatever.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>The software watchdog is used&nbsp;if the main
controller (PC)=
stops=20
talking to the embedded device after a preset time. Here the embedded
devic=
e=20
turns off all outputs. </FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
face=3DArial>I=20
have been doing this style of thing for a few decades now and
believe,&nbsp=
;both=20
are required.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>This is completely different to a pulsed about, where you
send=
the=20
embedded device a signal telling it to turn on it's output for a preset
per=
iod=20
i.e. 5min, 30min whatever.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>In a watering of the garden scenario, a pulsed output of
30min=
may be=20
fine. </FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>However in a closed loop scenario,&nbsp;i.e. where a PC
is=20
controlling&nbsp;the water level in the swimming pool. The PC
interrogates =
the=20
embedded control for the water level and if the water level is too low, it
=
tells=20
the embedded device to set an output to fill the pool. The PC controller
wo=
uld=20
tell the embedded processor to turn ON (not pulsed) the water inlet valve.
=
The=20
PC must at appropriate intervals, continually&nbsp;tell the embedded
contro=
ller=20
to set the output to ON.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>Because of this continual refresh, the embedded controller
kee=
ps this=20
output&nbsp;ON until it is told to turn OFF. If&nbsp;the comms from
the PC =
dies,=20
the software watchdog in the embedded device kicks in and turns off the
out=
put=20
before the pool overflows. </FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
face=3DArial>I=20
know I'm using backyard scenarios here but in my world these apply, as
well=
as=20
systems I've done for filling truck fuel tankers, gas cylinders, grain
load=
ing=20
into ships etc. </FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>Both hardware and software watchdogs must exist.
</FONT></SPAN=
></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>However a pulsed output if a defined period, is fine to
turn o=
n the=20
veranda/porch light.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
face=3DArial>I=20
believe that the designers of xAP, intended this to be more than just a
bac=
kyard=20
controller protocol. They hoped it would move into commercial products, so
=
now=20
we need to think in a commercial real world manner. I for one, don't want
t=
o be=20
responsible for&nbsp;why the gas cylinder was over filled and=20
exploded.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>The reason I specified byte here, relates to the above. The
so=
ftware=20
watchdog is an emergency safety switch. 1..255 seconds is a bloody long
tim=
e=20
when something is overflowing etc.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial>The other thing that is always in the back of my mind, is
that=
my=20
embedded controller doesn't have 1.5TB of parameter storage :-( Only
some=20
EEPROM. Bytes count.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN
class=3D514494411-16032010><FONT size=3D2=
=20
face=3DArial></FONT></SPAN><FONT size=3D2
face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>In regard=
to the=20
watchdog's being endpoints in their own write, and concatenated
messages&nb=
sp;as=20
per your example. Sounds good.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>As far as=
the time=20
stamp goes', I'm only talking about down to the second level. Also having
a=
=20
Julian/LongInt representation in the same message might not go astray.
It's=
easy=20
to do quick comparisons on a Longint.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>RTC's for=
&nbsp;use=20
in embedded devices are quite cheap these
days.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>In regard=
to the=20
optional RestoreState facility. I see this more for reasonably
dum<FONT=20
color=3D#0000ff><SPAN class=3D818191013-16032010><FONT=20
color=3D#000000>b</FONT></SPAN><SPAN
class=3D818191013-16032010>&nbsp;</SPA=
N></FONT>=20
things, like&nbsp;light controllers. The power dies and comes back in
10=20
seconds,&nbsp;the light comes on with the
power.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010><SPAN=20
class=3D514494411-16032010><SPAN class=3D514494411-16032010>I.e.
like some =
X10=20
fittings that remember there last state. Meanwhile,
</SPAN></SPAN>10 minute=
s=20
later the server has finished booting and is in control again.=20
</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>Yes I kno=
w....=20
UPS.&nbsp;&nbsp;&nbsp; Personally,&nbsp;I have four hours
of UPS runtime dr=
iving=20
my servers but not everybody has this
luxury.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010><SPAN=20
class=3D514494411-16032010></SPAN></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010><SPAN=20
class=3D514494411-16032010></SPAN>As you also said Lehane,
"xAP is not pred=
icated=20
on the use of controllers". Just that statement says that the devices
on th=
e xAP=20
network should go back their prior
state.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>This is o=
ne of the=20
big differences between xAP and xPL. </SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN
class=3D514494411-16032010>The final=
other=20
point is, that just because some endpoint controllers don't have some=20
functionality (i.e. RTC facilities), doesn't mean we should restrict the=20
specification to the dumbest/leanest
hardware.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff size=3D2 face=3DArial><SPAN=20
class=3D514494411-16032010></SPAN></FONT>&nbsp;</DIV>
<DIV class=3DSection1>
<P><SPAN style=3D"FONT-FAMILY: Arial; FONT-SIZE:
10pt">Regards,</SPAN> </P>
<P><B><SPAN style=3D"FONT-SIZE: 13.5pt">Neil
Wrightson.</SPAN></B> <BR><B><=
I><SPAN=20
style=3D"FONT-SIZE:
13.5pt">N.W.Electronics</SPAN></I></B>
<BR><SPAN=20
style=3D"FONT-SIZE: 10pt">ABN 76 768 513 867</SPAN>
<BR><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE: 10pt">Embedded
Controllers and Home=
=20
Automation Products</SPAN> <BR>Skype : <SPAN
class=3DSpellE>Neil_Wrightson<=
/SPAN>=20
<BR><SPAN=20
style=3D"FONT-FAMILY: Arial; FONT-SIZE:
10pt">Web&nbsp;&nbsp;&nbsp;&nbsp;=20
:</SPAN><U> <SPAN style=3D"COLOR:
blue">www.nwe.net.au</SPAN></U> </P></DIV=
>
<DIV><FONT color=3D#0000ff size=3D2
face=3DArial></FONT>&nbsp;</DIV><U><FON=
T=20
color=3D#0000ff></FONT></U><BR>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px;
MARGIN-LEFT: 5p=
x; MARGIN-RIGHT: 0px">
<DIV dir=3Dltr lang=3Den-us class=3DOutlookMessageHeader
align=3Dleft>
<HR tabIndex=3D-1>
<FONT size=3D2 face=3DTahoma><B>From:</B>
xAP_developer@xxxxxxx=20
[mailto:xAP_developer@xxxxxxx]
<B>On Behalf Of </B>Kevin=20
Hawkins<BR><B>Sent:</B> Tuesday, 16 March 2010 9:47
PM<BR><B>To:</B>=20
xAP_developer@xxxxxxx<BR><B>Subject:</B> Re:
[xAP_developer] My l=
ist=20
of possible xAP Enhancements<BR></FONT><BR></DIV>
<DIV></DIV><SPAN style=3D"DISPLAY:
none">&nbsp;</SPAN>=20
<DIV id=3Dygrp-text>
<P>Hi Neill,<BR><BR>I agree with Lehane's comments below
- in particular =
the=20
need for a separate configuration schema - you couldn't implement it in t=
he=20
way you propose within BSC as it would break the existing schema specific=
ation=20
and hence all existing BSC implementations and
devices.Configurati<WBR>on=
is=20
quite an involved area that also encompasses device discovery, internal=20
parameter config, UID allocation etc as well as the renaming of
devices.&=
nbsp;=20
I would heartily welcome a thorough schema proposal
here.<BR><BR>Re the=20
watchdogs - I can see that it is useful for some devices&nbsp; Within
BSC=
it=20
could&nbsp; be done by supplementing additional parameters within a
xAPBS=
C.cmd=20
message.&nbsp; This is allowable within the existing=20
specification.&nbsp;&nbsp;&nbsp; There are some additional
aspects to con=
sider=20
such as how do you know whether the endpoint you are controlling supports=
=20
watchdogs or not and how could you recover (read) any values you had set=
=20
?<BR><BR>The watchdog is essentially a hardware feature
supplemented by a=
need=20
to configure it from software.&nbsp; As such existing controllers like
th=
e=20
very popular xAP Netiom couldn't be supported. &nbsp; A limited
software =
only=20
watchdog is possible by a controller monitoring output states but that as=
sumes=20
network connectivity remains available or is restored.
&nbsp;&nbsp;&nbsp;=
The=20
application you are using in a way is requiring a programmable pulse outp=
ut=20
with a cancel/retrigger feature .&nbsp; You could achieve this in
hardwar=
e (eg=20
a Netiom) by attaching a diode/capacitor that&nbsp; is used as a timer
in=
to a=20
highish impedance circuit.&nbsp;&nbsp;&nbsp;&nbsp; Also
Phaedrus make a d=
evice=20
called the Viom which supports pulse outputs and internal smarts although=
this=20
is not available in a xAP version.&nbsp;&nbsp;&nbsp; You could
attach thi=
s to=20
a xAP driven&nbsp; serial port , such as the one available on the xAP
Net=
iom=20
for example or roll your own hardware , as I suspect is your=20
preference.<BR><BR>Another approach instead of , or additional
to the=20
inclusion of watchdog parameters within the xAPBSC.cmd message would be t=
o=20
expose the watchdog parameters as BSC endpoints in their own
right.&nbsp;=
That=20
way you can clearly see if the device has watchdog support and you have a=
way=20
to set or read the values .=20
<BR><BR>source=3Dacme.<WBR>irrigation.<WBR>controller:<WBR>lawn.sprinkler=
<BR>source=3Dacme.<WBR>irrigation.<WBR>controller:<WBR>lawn.WD.timer<BR>sou=
rce=3Dacme.<WBR>irrigation.<WBR>controller:<WBR>lawn.WD.enable<BR>source=3D=
acme.<WBR>irrigation.<WBR>controller:<WBR>lawn.WD.timeout=20
<BR><BR>BTW I don't think there should be byte value
restrictions=20
imposed.<BR><BR>Because xAP supports concatenated messages you
could incl=
ude=20
all the xapbsc.cmd's within one xAP message which ensures that all are=20
received and actioned coincident.&nbsp; Note however that the feature
to=
=20
include a different target =3D line within each message body will be depr=
ecated=20
in xAP v1.3 and so your addressing of the differing endpoints for each bo=
dy=20
block would be achieved by means of the ID=3D parameter. &nbsp;
&nbsp; Do=
ing it=20
this way doesn't need any specific schema changes although it doesn't add=
ress=20
discovery of endpoint watchdog capabilities (aside from
naming).<BR><BR>R=
e the=20
time stamp - there is actually an existing date/time schema for xAP used =
in a=20
xAP clock application which I could dig out ( I see its schema is not lis=
ted=20
on the web site) although it might be preferable to have better resolutio=
n and=20
some accuracy / priority indication.&nbsp; Interestingly I'm
passingly=20
familiar with the C-Bus time application which handles different accuracy=
time=20
sources and master slave negotiation.&nbsp; As that attests it is
horrend=
ously=20
complex to implement in a complete way&nbsp; that caters for
different=20
capability time sources that might come and go as well as time
zones,&nbs=
p;=20
summer time etc.&nbsp; I'm sure the need here is just for something
simpl=
e so=20
an adaption of the original xAP clock application is probably
fine.&nbsp;=
The=20
C-Bus time application document is available for download from their site=
if=20
anyone's interested.<BR><BR>&nbsp;
K<BR><BR><BR><BR><BR><BR>&nbsp;On=20
15/03/2010 11:03, Lehane Kellett (g8kmh) wrote:=20
<BLOCKQUOTE cite=3Dmid:4B9E140E.7070900@xxxxxxx
type=3D"cite">Hi Neil=
,<BR>I=20
think that these wouldn't fall into BSC but into a (new) configuration=
=20
schema. Something which, from my viewpoint, is missing. This would allo=
w=20
dumb/unconfigured devices to be attached to the network and remotely=20
configured.<BR><BR>The watchdog is a good idea - I think there
needs to=
be=20
some flexibility as to whether it is seconds/minutes/<WBR>hours/days
si=
nce=20
repeat messages aren't something most xAP controllers/<WBR>mappers
perf=
orm.=20
Therefore the behaviour might be slightly different from your proposal =
in=20
that once sent a command with the watchdog entries, it will fallback wh=
en=20
the timers expire. So if the controller expects to turn off the waterin=
g=20
after, at most, 3 hours then the watchdog is set to that value but can =
turn=20
off after period up to that.<BR><BR>My preference is for the
controller=
to=20
perform the state restores rather than the endpoint devices and can, if=
it=20
wishes, keep persistent the previous device states. Most endpoints aren=
't=20
going to have the smarts to know how long power was off. Of course, xAP=
=20
isn't predicated on the use of controllers but most installations use=20
one.<BR><BR>Just as update on my current activities. I've
started worki=
ng on=20
using the PIC32 since the cost (=A345) of the Ethernet board (Starter=20
Kit)&nbsp; is comparable to the Modtronix one but with a much better
CP=
U -=20
the downside is the connector. The implementation is using Free RTOS, s=
o=20
multitasking, and my first project is a colour touchscreen=20
controller.<BR><BR>Lehane<BR><BR><BR><BR>Neil
Wrightson wrote:=20
<BLOCKQUOTE cite=3Dmid:9C0171DCCD4B472E83975812F5D6A20A@xxxxxxx=20
type=3D"cite"><SPAN>&nbsp;</SPAN>=20
<DIV id=3Dygrp-text>
<P><!-- Converted from text/rtf format --></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>Hi
All,</FONT></SPA=
N>=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>&nbsp;</FONT></SPA=
N>=20
<BR><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>Below
are the foll=
owing=20
points that I would like to see added to the xAP
Schema.</FONT></SPAN=
>=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>&nbsp;</FONT></SPA=
N> </P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>xAP
Address=20
renaming</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2 face=3DA=
rial>This=20
is a means of changing the instance field and the Sub Address=20
field.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2 face=3DAri=
al>Note -=20
The UID does not change. This is specified by the manufacture of the=
=20
product.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2 face=3DA=
rial>The=20
Logical human readable area of the message is what I propose that we =
allow=20
the name changing of.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=
=3D2=20
face=3DArial>&nbsp;</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=
=3D2=20
face=3DArial>To Change the Instance name of a device I suggest the fo=
llowing=20
schema</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2=20
face=3DArial>{</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2=20
face=3DArial>v=3D12</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=
=3D2=20
face=3DArial>hop=3D1</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=
=3D2=20
face=3DArial>uid=3DFF123400</FONT></SPAN> <BR><SPAN
lang=3Den-au><FON=
T size=3D2=20
face=3DArial>class=3DxAPBSC.<WBR>cmd</FONT></SPAN>
<BR><SPAN lang=3De=
n-au><FONT=20
size=3D2
face=3DArial>source=3DACME.<WBR>Controller.<WBR>Central</FON=
T></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>target=3DACME.<WBR>Lighting.<WBR>apartment</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> <B=
R><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>{</FONT></SPAN> <BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>InstanceRename=3D<WBR>House<=
/FONT></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> <B=
R><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>&nbsp;</FONT></SPAN> <BR><SP=
AN=20
lang=3Den-au><FONT size=3D2 face=3DArial>This would now mean that
the=
device has=20
been renamed to </FONT></SPAN><BR><SPAN
lang=3Den-au><FONT size=3D2=20
face=3DArial>target=3DACME.<WBR>Lighting.<WBR>House</FONT></SPAN>
<BR=
><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>&nbsp;</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>To
Change the SubAd=
dress name=20
of a device I suggest the following schema</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>{</FONT></SPAN> <BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>v=3D12</FONT></SPAN> <BR><SP=
AN=20
lang=3Den-au><FONT size=3D2
face=3DArial>hop=3D1</FONT></SPAN> <BR><S=
PAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>uid=3DFF123405</FONT></SPAN>=
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>class=3DxAPBSC.<WBR>cmd</FON=
T></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>source=3DACME.<WBR>Controller.<WBR>Central</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>target=3DACME.<WBR>Lighting.<WBR>apartment:<WBR>KitchenL=
ight</FONT></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> <B=
R><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>{</FONT></SPAN> <BR><SPAN=20
lang=3Den-au><FONT size=3D2=20
face=3DArial>SubAddrRename=3D<WBR>HallLight</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>This
would now mean=
that this=20
device SubAddress&nbsp; has been renamed to
</FONT></SPAN><BR><SPAN=20
lang=3Den-au><FONT size=3D2=20
face=3DArial>ACME.Lighting.<WBR>apartment:<WBR>HallLight</FONT></SPAN=
>=20
</P><BR>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>Or
would both of th=
e above=20
examples be better as a separate class</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>{</FONT></SPAN> <BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>v=3D12</FONT></SPAN> <BR><SP=
AN=20
lang=3Den-au><FONT size=3D2
face=3DArial>hop=3D1</FONT></SPAN> <BR><S=
PAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>uid=3DFF123400</FONT></SPAN>=
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>class=3DxAPBSC.<WBR>rename</=
FONT></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>source=3DACME.<WBR>Controller.<WBR>Central</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>target=3DACME.<WBR>Lighting.<WBR>house</FONT></SPAN>
<BR=
><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>OR</FONT></SPAN> </=
P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>{</FONT></SPAN> <BR=
><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>v=3D12</FONT></SPAN> <BR><SP=
AN=20
lang=3Den-au><FONT size=3D2
face=3DArial>hop=3D1</FONT></SPAN> <BR><S=
PAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>uid=3DFF123405</FONT></SPAN>=
<BR><SPAN=20
lang=3Den-au><FONT size=3D2
face=3DArial>class=3DxAPBSC.<WBR>rename</=
FONT></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>source=3DACME.<WBR>Controller.<WBR>Central</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>target=3DACME.<WBR>Lighting.<WBR>apartment:<WBR>KitchenL=
ight</FONT></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>}</FONT></SPAN> </=
P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial></FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>The
other area I wo=
uld like to=20
look at are Watch Dog capabilities on the BSC
outputs.</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>For
those that are=
n=92t=20
familiar with the WatchDog terminology. A example should set the=20
scene.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2 face=3DAri=
al>I have a=20
xAP device with a relay output that is used to control the watering s=
ystem=20
on my garden.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2=20
face=3DArial>An application on my server monitors the rain fall in th=
e area=20
via the internet weather.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT =
size=3D2=20
face=3DArial>When it has been determined that the ground is probably =
too=20
dry, it turns on the xAP devices relay.</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>Half an hour later it
turns =
the relay=20
back off. </FONT></SPAN><BR><SPAN
lang=3Den-au><FONT size=3D2 face=3D=
Arial>Well=20
it was supposed to , the network switch died and the server was unabl=
e to=20
talk to the xAP Device and the garden has been watered for the next 6=
=20
hours until I got home and saw the
mess.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>However, if I had w=
atchdog=20
facility in the xAP device hardware, it would have automatically turn=
ed=20
the output off after a preset period.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>So in
this instance=
the=20
=93WatchDog=94 functionality is a software function in the xAP device=
, that=20
monitors the xAP commands received and safely puts the outputs into a=
=20
certain state. </FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>See&nbsp; </FONT></=
SPAN><A=20
href=3D"http://en.wikipedia.org/wiki/Watchdog_timer";
moz=3D"true"><SP=
AN=20
lang=3Den-au><U><FONT color=3D#0000ff size=3D2=20
face=3DArial>http://en.wikipedia<WBR>.org/wiki/<WBR>Watchdog_<WBR>tim=
er</FONT></U></SPAN></A><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>
&lt;</FONT></SPAN><A=20
href=3D"http://en.wikipedia.org/wiki/Watchdog_timer";
moz=3D"true"><SP=
AN=20
lang=3Den-au><U><FONT color=3D#0000ff size=3D2=20
face=3DArial>http://en.wikipedia<WBR>.org/wiki/<WBR>Watchdog_<WBR>tim=
er</FONT></U></SPAN></A><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>&gt;&nbsp; for
some further=
=20
information.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>So what
I=92m propo=
sing, is the=20
following functionality be added to the BSC commands and applies to e=
ach=20
sub address.</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=3D2=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
WD_Enable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
: Boolean ;&nbsp;&nbsp;&nbsp; //</FONT></SPAN>
<BR><SPAN lang=3Den-au=
><FONT=20
size=3D2
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
WD_Timer_Val&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
: Byte ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
Seconds</FONT></SPAN>=
=20
<BR><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
WD_Timeout_Val&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
: Byte=20
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
0/1/255</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>WD_Enable</FONT></S=
PAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>If ON
then this Su=
b address=20
has watchdog functionality turned ON</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>&nbsp;WD_Timer_Val</FONT></SPAN>
<BR><SPAN lang=3Den-au>=
<FONT=20
size=3D2 face=3DArial>This is how long to wait before changing the ou=
tput to=20
the WD_Timeout_Value</FONT></SPAN> <BR><SPAN
lang=3Den-au><FONT size=
=3D2=20
face=3DArial>This value is in seconds.</FONT></SPAN>
</P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>In the
watering exa=
mple above,=20
if the server sent a command to turn the device relay on every 120=20
seconds, than you would probably want the WD_Timer_Val set at 240=20
seconds.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>This
allows a bit o=
f time in=20
case the server does a brief go slow.</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>The draw back here is
that t=
he server=20
needs to send an output command every two minutes for the half hour=20
watering period, otherwise the watchdog kicks in and turns the output=
=20
off.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>WD_Timeout_Val&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial>This=
is the=20
value the device outputs when the watchdog state has been triggered f=
or=20
this device and sub address. </FONT></SPAN><BR><SPAN
lang=3Den-au><FO=
NT=20
size=3D2 face=3DArial>A 0 or 1 to be used for a logic output or a val=
ue from=20
0..255 for an analogue output.</FONT></SPAN> </P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>Sometimes the outpu=
t would be=20
best set to ON, to turn on an ERROR lamp to indicate a fault or turn =
on=20
minimal lighting when the server has died instead of leaving the hous=
e in=20
darkness.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial></FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>The
other BSC comma=
nd=20
is</FONT></SPAN> <BR><SPAN lang=3Den-au><FONT
size=3D2=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
RestoreLastState&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
: Boolean ;&nbsp;&nbsp;&nbsp; //</FONT></SPAN>
<BR><SPAN lang=3Den-au=
><FONT=20
size=3D2
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
RestoreLastStateTim<WBR>er&nbsp;&nbsp;&nbsp;&nbsp; :
Byte=20
;&nbsp;&nbsp;&nbsp; // Minutes</FONT></SPAN>
</P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>The
idea of this, i=
s that when=20
a xAP device experiences a brief (say 30 second) power loss, it resto=
res=20
itself to the last known state.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>I.e.
the 240VAC mai=
ns into the=20
house was briefly interrupted, it would be preferable if the light ou=
tputs=20
went back to their last known state.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>RestoreLastState&nbsp;&nbsp;&nbsp;&nbsp;=20
</FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial>If O=
N then the=20
specified sub address is restored to its prior
state</FONT></SPAN>=20
</P><BR>
<P><SPAN lang=3Den-au><FONT size=3D2=20
face=3DArial>RestoreLastStateTim<WBR>er</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>If this value is 0 then
the =
output is=20
restored to its previous value regardless of how long the power was=20
off.</FONT></SPAN> <BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial=
>If the=20
value is greater than 0 and it is less than (the last known time - th=
e=20
current time) then the output is restored to its last state else left=
=20
off.</FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial></FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>Xap-TimeStamp</FONT=
></SPAN>=20
<BR><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>Send a
timestamp m=
essage to=20
the network at pre-defined periods.</FONT></SPAN>
<BR><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>This is used to
synchronize =
any devices=20
that are not capable of NTP. </FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial></FONT></SPAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2
face=3DArial>Regards, </FONT></S=
PAN></P>
<P><SPAN lang=3Den-au><FONT size=3D2 face=3DArial>Neil
Wrightson.=20
</FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial>N.W.=
Electronics=20
</FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial>ABN =
76 768 513=20
867 </FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2 face=3DArial>=
Embedded=20
Controllers and Home Automation Products
</FONT></SPAN><BR><SPAN=20
lang=3Den-au><FONT size=3D2 face=3DArial>Skype : Neil_Wrightson=20
</FONT></SPAN><BR><SPAN lang=3Den-au><FONT
size=3D2=20
face=3DArial>Web&nbsp;&nbsp;&nbsp;&nbsp; :
</FONT></SPAN><A=20
href=3D"file://www.nwe.net.au" moz=3D"true"><SPAN
lang=3Den-au><U><FO=
NT=20
color=3D#0000ff size=3D2=20
face=3DArial>www.nwe.net.<WBR>au</FONT></U></SPAN></A><SPAN
lang=3Den=
-au><FONT=20
size=3D2 face=3DArial>=20
</FONT></SPAN></P></DIV><!-- end group email
--></BLOCKQUOTE><BR>
<DIV style=3D"COLOR: white"
width=3D"1"></DIV></BLOCKQUOTE><BR>
<P></P></DIV><!-- end group email -->



<!-- **begin egp html banner** -->

<br>

=20=20=20=20
=20=20=20=20
<br>

<!-- **end egp html banner** -->


<div width=3D"1" style=3D"color: white; clear:
both;"/>__._,_.___</div>

<!-- Start Recommendations -->
<!-- End Recommendations -->



<!-- **begin egp html banner** -->

<img src=3D"http://geo.yahoo.com/serv?s=3D97476590/grpId=3D9629476/grpspI=
d=3D1705007709/msgId=3D2093/stime=3D1268745109" width=3D"1"
height=3D"1"> <=
br>

<!-- **end egp html banner** -->

=20=20=20=20
<!-- **begin egp html banner** -->

<br>
<div style=3D"font-family: verdana; font-size: 77%; border-top: 1px
s=
olid #666; padding: 5px 0;" >
Your email settings: Individual EmailTraditional <br>
<a href=3D"http://groups.yahoo.com/group/xAP_developer/join;_ylc=3DX3=
oDMTJmM2Y1aWwwBF9TAzk3NDc2NTkwBGdycElkAzk2Mjk0NzYEZ3Jwc3BJZAMxNzA1MDA3NzA5B=
HNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyNjg3NDUxMDk-">Change settings
via the We=
b</a> (Yahoo! ID required) <br>
Change settings via email: <a href=3D"mailto:xAP_developer-digest@yah=
oogroups.com?subject=3DEmail Delivery: Digest">Switch delivery to
Daily Dig=
est</a>  <a href =3D "mailto:xAP_developer-fullfeatured@xxxxxxx?su=
bject=3DChange Delivery Format: Fully Featured">Switch to Fully
Featured</a=
> <br>
<a href=3D"http://groups.yahoo.com/group/xAP_developer;_ylc=3DX3=
oDMTJkYW9oYzlrBF9TAzk3NDc2NTkwBGdycElkAzk2Mjk0NzYEZ3Jwc3BJZAMxNzA1MDA3NzA5B=
HNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjY4NzQ1MTA5">
Visit Your Group=20
</a>
<a href=3D"http://docs.yahoo.com/info/terms/";>
Yahoo! Groups Terms of Use
</a>
<a href=3D"mailto:xAP_developer-unsubscribe@xxxxxxx?subject=
=3DUnsubscribe">
Unsubscribe=20
</a>=20
<br>
</div>
<br>

<!-- **end egp html banner** -->


<div style=3D"color: white; clear:
both;"/>__,_._,___</div>
</BODY></HTML>

------=_NextPart_000_0231_01CAC566.6827DF20--


xAP_Development Main Index | xAP_Development Thread Index | xAP_Development 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.