Search the web
Sign In
New User? Sign Up
xAP_developer
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 2024 - 2054 of 2054   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries   (Group by Topic) Sort by Date ^  
#2024 From: "Edward Pearson" <edward.mailgroup@...>
Date: Thu Sep 17, 2009 10:15 pm
Subject: RE: xAP EOM identifier in xAP v1.3
erspearson
Offline Offline
Send Email Send Email
 

Fantastic stuff!

 

Have a Greeaat weekend - congratulations!

 

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Neil Wrightson
Sent: 17 September 2009 22:47
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

 

Hi,

 

I can't get into this to much at the moment, I'm supposed to be getting ready for a dirty (oops romantic) weekend with my wife.

Today is our 27th wedding anniversary.

 

I'm using Atmel AVR IC's and dependant on the device I use, my buffer size could be in the 256 byte to 1500 byte buffer size.

 

At this stage I'm writing the core drivers for xAP but the projects I have in mind are -

  1. APC UPS monitor. I have 3 UPS's all with serial interfaces and no Ethernet interfaces.
  2. RS485 Network with plug and play I/O modules. There will be a governing embedded xAP gateway that then interfaces to the RS485 nodes. Each RS485 node will have 4 plug and play I/O modules.
    Idea being that the embedded xAP device will perform an auto discovery of nodes and I/O at power up. and then report this to the xAP network.
  3. A multifunction I/O device, currently in a 19" 2U box. It has caller ID, 1Wire, working on power line X10, X10 RF Tx, X10 RF Rx, OSD onto composite video. Sound prompts via playing WAV files on a SD card. The plan is that all of this will be available via xAP.

I use all of the above hardware in my current Home Automation system. But I want to tidy all of this up into nice common interface modules.

 

 

Got to go. :-)

Regards,

Neil Wrightson.
Skype : Neil_Wrightson

 

 


From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Edward Pearson
Sent: Friday, 18 September 2009 12:55 AM
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

How big are the buffers on your device?

What is it BTW? I’m sure we’re all curious now (or have I missed/forgotten an earlier post)?

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Neil Wrightson
Sent: 17 September 2009 13:55
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

That's why I had length=nnnn    (4 digit field length, padded 0's as per my header example)

Actually, I was thinking in HEX not decimal so nnnn hex = 65535 not 9999.

This style of thing would work with TCP or UDP.

The UDP protocol does support smaller message sizes for devices that have small buffers i.e. 256 byte buffer.

This would then mean that a typical large xAP message, say 1000 bytes would be in 4 separate UDP messages.

Regards,

Neil Wrightson.
Skype : Neil_Wrightson


From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Edward Pearson
Sent: Thursday, 17 September 2009 10:47 PM
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

The trouble is that to generate such a message you need to know how long it’s going to be before you generate it and then inserting the length field could change the length.  What you need is a double-<lf> message terminator!

Are you actually seeing any cases of fragmentation?

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Neil Wrightson
Sent: 17 September 2009 13:32
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

Just out of curiosity, how many things would break if the xAP header had a message length?

I.e. add a length=nnnn line.

xap-header
{
v=12
hop=1
uid=FF123400
class=xap-temp.notification
source=ACME.thermostat.lounge
length=0128
}
temp.current
{
temp=25
units=C
}

In my embedded world, when I receive a UDP message, I also get a message size.

If I could compare this against the message size in the header area, I would know whether I had a complete xAP UDP message or it had been fragmented.

Apart from that, it also makes the loop decoding of the message a bit easier.

Regards,

Neil Wrightson.
Skype : Neil_Wrightson


From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Edward Pearson
Sent: Thursday, 17 September 2009 10:16 PM
To: xAP_developer@yahoogroups.com
Subject: RE: [xAP_developer] xAP EOM identifier in xAP v1.3

 

Sigh.

You misread. I said (or at least intended to say) enforcing the transport wrapper on >UDP< would break everything (obviously). My experience of it on TCP was good.

There’s no absolute need for the delimiter but it would help implementers especially early adopters and adoption is a good thing. If it is cruft, it’s only one little byte of it.

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Patrick Lidstone
Sent: 17 September 2009 10:51
To: xAP_developer@yahoogroups.com
Subject: Re: [xAP_developer] xAP EOM identifier in xAP v1.3

 

Cool!

I'm not sure the transport wrapper over TCP 'breaks everything' - I've used it for TCP routing of xAP over the internet framed using the transport wrapper for several years now (I even demoed it as a means of remotely accessing my home intranet via xAP at the inaugural HA weekend meet many moons ago), but perhaps I'm missing something from your requirements? All the tcp hub has to do is strip off the start and end delimiter before rebroadcast, and likewise frame any received udp messages with an <stx>, <etx> if operating bi-directionally. Admittedly it's an additional (minimal) cost that isn't present with the double-0A scheme, but the benefits of being able to detect the start of frame, and the benefits of being able to apply this approach to any async transport, not just tcp/ip, outweigh that in my mind. And it is in the spec already ;-)

Personally, I don't see a need for a delimiter at the end of a message in UDP xAP. I'm sure I'm going to be outvoted, but look at all the other UDP protocols out there - it's not common practice because it's not technically necessary, and as such it's just adding unnecessary cruft to xAP!

Cheers
Patrick




2009/9/17 Edward Pearson <edward.mailgroup@...>

You’re right, to get a connection in good time that’s not statically configured it’d need a request/offer message pair.

The experimental hub I have here is designed to address one specific problem only – unreliability over WiFi.

In runs as a master slave arrangement. In master mode it accepts incoming tcp connections on port 3639. In slave mode (deployed on the WiFi machine) it’s configured (statically) with the IP address or hostname of the master hub to which it connects over tcp. The tcp connection is used one-way only, from master to slave. The master forwards all xAP messages it receives (on udp) to all its local udp clients (as usual) and to any connected tcp clients. The slave forwards all messages received on its tcp connection to its local clients on udp. Works a treat. Now I can lie on the sofa debugging Viewer v4 (it’ll be out really, really soon now I promise) on my WiFi laptop without wondering where 15% of the messages have gone.

I mention all this mainly (and at risk of getting back to Kevin’s original point of this thread which I’m feeling guilty of hijacking horribly) because I needed to address the problem of the segregation  of messages in a stream to get this to work. So I experimented with several schemes  getting a good feel for the practical pro’s and cons of each. Initially I went for the STX/ETX method from the transport wrapper since it’s what’s in the existing spec (but opting out of the CRC). Later I used the double LF termination. The transport wrapper is somewhat easier to work with. For instance, it’s easier to re-sync to the a message start with transport wrapper; just wait for the next STX (a single byte), vs. needing match all of “xap-[header|hbeat]<lf>”. Message ends are similar: ETX (1 byte) vs <lf><lf> (2 bytes).  But all this is irrelevant in the udp world. Introducing STX/ETX here would break everything while double <lf> is nicely backwards compatible.

(and finally, my point relevant to the thread start)

I don’t think double <lf> is the right solution for Kevin’s developers’ wireless app problem; it’d help them out somewhat but I think it more than likely that it’s ‘papering over’ a bug in or around their network stack. But there is a valid need lurking in here; without message-level delimiting in the original spec, implementers of xAP commonly run up against the problem of knowing where the end of a message is while parsing messages. The double <lf> definitely helps here. So given that it’s easy to add, helps in some folks, eases adoption and causes no backwards compatibility issues, I’m happy that it should go into the v1.3 spec.

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Patrick Lidstone
Sent: 16 September 2009 12:00


To: xAP_developer@yahoogroups.com
Subject: Re: [xAP_developer] xAP EOM identifier in xAP v1.3

 

I agree that checksums are not appropriate to TCP connections, the transport wrapper already designates them as optional.

I don't think hubs currently send heartbeats? If they do, it's not explicit in the spec. (Mine doesn't). We also need a mechanism to differentiate between multiple hubs (since most people will generally run at least one hub per vm).

Is a TCP hub going to relay all traffic to all TCP endpoints? That won't scale very well... but it's also not clear how the filtering etc. will work. Administering filters manually works fine for the odd serial segment, but it's not going to be viable for a large number of endpoints.

Heartbeats are broadcast every minute or so typically, so that's going to result in start up times of up to two minutes for a tcp end point. Is that acceptable? If not, do we reduce the new tcp hub heartbeat interval? Or is there a mechanism for an endpoint to poke a hub and elicit a heartbeat?

And lastly, is there merit in some kind of referrer system to allow for load-balancing and automated failover of tcp connections across more than one hub? If so, how would this work?

Patrick

2009/9/15 Edward Pearson <edward.mailgroup@...>

I don’t mean that packet fragmentation or re-ordering are myths – just that when dealing with xAP at the IP stack (socket) interface you are dealing with datagrams not data packets so you don’t need to worry about those packet aspects. There was a design decision to limit xAP datagrams to 1500 bytes to improve the likely coverage of correctly sent datagrams in a world of IP stacks of varying quality. It’s no more important than that. Readers of the spec seem to attach more importance to it than it needs (there’s the myth aspect).  To program xAP you don’t need to worry about fragmentation and reordering – just keep your datagrams 1500 bytes or less and let the stack do its thing.

Sometimes an app goes a bit wild (xAP news has occasionally been a useful test source) and big xAP messages are generated – and they get delivered too! It’s normally the input buffer of the receiving app (eg hub) that breaks first.

On the tcp framing, I’d suggest that implementing the CRC part (irrelevant on a reliable stream) is a waste of most people’s time; by far more use will be made of tcp than any kind of serial/485/etc networks so they’d be sharing development of an implementation with nobody.

Discovery can be done simply with the existing hub heartbeat message. Just need to agree on an extra block that advertises the port number of the tcp service – which I assume, by default would be 3639.

Having read the 802.11 spec, I now understand why broadcast udp from an AP to a NIC is so un-reliable. And ad-hoc mode is a real disaster!

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Patrick Lidstone
Sent: 15 September 2009 14:15


To: xAP_developer@yahoogroups.com
Subject: Re: [xAP_developer] xAP EOM identifier in xAP v1.3

 

Hi Edward,
Please see in-line responses...

2009/9/15 Edward Pearson <edward.mailgroup@...>

The double 0x0a terminator works for me, it’s simple to implement – already done for my stuff.

...but it isn't robust unless the message is sent as a single datagram, and if it is sent as a single datagram, the os should deliver it as such -- and if it doesn't, adding an eom marker isn't going to help.

For reliable streams, such as TCP, I generally frame the messages with STX and ETX.

I thought all this business about 1500 bytes was somewhat urban myth (at least as it applies to xAP). The data packet size is not what’s important; it’s how the particular IP stack implementation deals with >datagrams< that’s the key.  


I don't understand what you are syaing here? The data packet size is inextricably linked to the IP stack. What aspect is it that you consider to be an urban myth?
 

I only have experience of the two most recent Windows stacks (XP and Vista) which I agree are likely more capable than old embedded stacks. My experiments with Wireshark show that those stacks will happily deal with fragmentation and defragmentation. 64KB in a single datagram? No problem if your receive buffer is long enough (even if you force a small MTU).

Yes, agreed, OSes perform fragmentation for you. The individual fragments have a maximum size as determined by the MTU. For pragmatic, practical reasons, xAP needs to define a maximum overall message size, and for convenience's sake that was set as equal to the 'standard' MTU size. Devices which use a smaller MTU should fragment and reassemble seamlessly provided that the correct socket options have been set to define the maximum UDP packet size. By electing to use a single MTU's worth of data, we we avoid the overhead associated with fragmentation and reassembly (principally memory buffering) which is a good thing. When reassembled, the os should deliver a datagram as a complete entity in one go (irrespective of the mtu size, assuming that the datagram falls within the maximum datagram size defined for the stack). If the sender doesn't send a message as a single datagram, then the whole thing falls apart because effectively you are then doing fragmentation and reassembly at the application layer, and that won't work because the ordering across datagrams is not guaranteed and individual datagrams may get lost.
 

If anything goes wrong (eg, missing fragment) the whole datagram is dropped. I can’t see how packet re-ordering can happen on a single LAN for broadcast UDP – there are no multiple paths and no retry mechanism. Certainly never observed it – I assume the stack would again just drop the entire datagram.


Re-ordering of datagrams can occur for multiple reasons on a single lan. A sender may send individual UDP packets in any order it chooses. This commonly occurs with fragmented packets originating from a multi-threaded sender, which can be interleaved with smaller, non-fragmented datagrams as required (optimising transient memory use, as soon as they are sent, the buffer can be released). A switch is not obliged to retransmit packets in the order in which they are received. And most fundamentally, the specs do not require UDP packets to be ordered so, even if you don't observe it, it can happen, and sooner or later interoperability issues will arise if the working assumption is made that they always arrive in order.

A bigger issue for me, and the reason for me experimenting a few times with TCP stream serving from hubs, is datagram loss over WiFi networks. This is greatly accentuated for UDP when you use broadcast (as we do) from wired to wireless (fine the other way as it’s not really a broadcast packet till it gets to the AP) as the access point and NIC can not longer apply their ack/nak procedure at the transport level. I commonly see xAP datagram loss rates from wired to wireless connections of 20%. So I’d like us to agree on a standard transport wrapper for TCP streams which a lot of platforms would find useful.

I'd suggest using the same framing as the "transport wrapper", as this then allows for code to be shared across transports. If xAP was extended to support TCP, then that should also include a formal discovery mechanism by which the IP address/characteristics of the hub can be discovered (over UDP xAP?)

Patrick
 

From: xAP_developer@yahoogroups.com [mailto:xAP_developer@yahoogroups.com] On Behalf Of Patrick Lidstone
Sent: 14 September 2009 14:19
To: xAP_developer@yahoogroups.com
Subject: Re: [xAP_developer] xAP EOM identifier in xAP v1.3

 

So the xAP delimiters for serial are defined in the 1.2 xAP spec here:
http://www.xapautomation.org/index.php?title=Protocol_definition#Transport_Wrapper

To the best of my knowledge, the MTU size for an ethernet frame is 1518 bytes, which leads to a UDP packet MTU of 1500 bytes and this is the size that is adopted by the majority of operating systems. Internet routers (i.e. ISPs) sometimes use an MTU of 576 bytes, but this wouldn't be relevant to xAP since the traffic doesn't pass over the wider net, or if it does, it's generally gatewayed via a TCP/IP connection.

If a device is receiving fragmented UDP packets, I think the same issues arise as those related to extending the xAP message size beyond 1500 bytes - what happens if a fragment gets discarded.

If you take the scenario:

Part 1(a), Part 1(b), Part 2(a), Part 2(b), Part 3(a), Part 3(b)

--- first there is no guarantee that the parts will be delivered in order, and second, if part 1(b) was dropped, and you were blindly assembling messages based on the proposed double-0a terminator, you'd end up with a message comprising part 1(a), 2(a) and 2(b) which is not only obviously corrupt, but also possibly larger than the maximum xAP message size, blowing away your buffers.

I think the solution is to probably parse incoming messages on the fly, byte-by-byte. You can then at least reset your state when you encounter the xap-header, and if you count open and close curly braces, you can tell when you have an apparently complete message. This won't solve the issue of UDP fragments being potentially received out of order, but so long as we are dealing with a single LAN, and fragmentation occurs at the receiver, we will be ok I think.

It is absolutely possible for UDP packets to be discarded, and the way we deal with this in xAP is to accept that this can happen to xAP messages, and layer application level acknowledgements where knowing that a message has been received is critically important - whether explicitly or implicitly through status messages. There are various schemes that could be adopted to allow a receiver to detect lost messages (e.g. sequence numbering), but they quickly become quite onerous, and assume that the originator keeps a copy of the original message or is able to reconstruct it - which is non-trivial for the many xAP nodes.

Perhaps you can share more of the specific details of the device(s) in question (manufacturer, docs, o/s etc), and their specific behaviour, which seems a bit anomalous?

Patrick

2009/9/13 Kevin Hawkins <yahoogroupskh@...>

One of the issues seems to be that there is conflicting views as to the
length of a a UDP data packet payload.  Some people cite 500 or 512
characters and some 1500.  Regardless in some low memory/performance
devices it is being reported, that even with UDP,  packets are being
received from the buffer either truncated or appended back to back.
The latter I assume is due to the speed of the device in servicing the
buffer.

We have an opportunity to protect against this with v1.3 and the double
'0A' seems the most compatible.   I would be loathe to support anything
that wasn't backward compatible.

  K


Patrick Lidstone wrote:
>
>
> I will dig it out - it included an optional checksum I think, and IIRC
> was framed by stx and etx (a kind of pseudo industry standard). I
> certainly used it with the PIC serial stuff and the xAP-serial bridge.
> Re.: long message truncation and concatenation: If we need to support
> messages that are larger than one UDP packet, then there are
> additional complexities and the proposed scheme won't work as intended
> as the ordering of UDP messages is not guaranteed. I'm happy to help
> refine a spec to support these capabilities, but it is moving away
> from the basic ethos of xAP somewhat, as devices would have to be able
> to buffer received messages, and that raises the bar considerably.
> Perhaps there is scope for co-existence of a long and standard message
> protocol though?
>
> Patrick
>
> 2009/9/13 Kevin Hawkins <yahoogroupskh@...

> <mailto:yahoogroupskh@...>>

>
>     ... Oh ... where is that in the spec ?  it might be all we need.
>
>        This is also tied in with some aspects of long message truncation
>     and concatenation of messages received in UDP receive buffers
>     though...
>
>      K
>
>     Patrick Lidstone wrote:
>     >
>     >
>     > The original xap spec provides extensions for framing a message over
>     > async serial which also delimit the start of the message - you don't
>     > need this 'hack' if you follow the original spec for non-UDP
>     transports.
>     >
>     > Patrick
>     >
>     > 2009/9/13 Kevin Hawkins <yahoogroupskh@...
>     <mailto:yahoogroupskh@...>

>     > <mailto:yahoogroupskh@...

>     <mailto:yahoogroupskh@...>>>
>     >
>     >       We have been asked on several occasions how to detect the
>     end of a
>     >     xAP messager as there is no unique EOM character.  Typically
>     in any
>     >     reasonable sized packet structured transport eg UDP then the
>     packet
>     >     provides such an indication but on systems with small packets or
>     >     non eg
>     >     asynchronous serial this is not useable.
>     >
>     >       In discussing this with the specification team we must
>     consider
>     >     backwards compatability and so we do not wish to alter the
>     >     specification
>     >     to include a unique EOM character.  What we do propose
>     however is that
>     >     xAP v1.3 will specify that all messages should end with two
>     >     consecutive
>     >     chr(10)'s immediately after the closing '}'
>     >
>     >     ie  ..... 7D 0A 0A
>     >
>     >      Some apps, even v1.2 ones,  already do this.  We don't
>     believe this
>     >     will cause any backwards compatibility issues and it will
>     always be
>     >     unique within a xAP message.
>     >
>     >      So, in developing xAP v1.3 apps could you therefore append
>      two 0A's
>     >     at the end of your messages , and of course handle incoming
>     messages
>     >     containing such.
>     >
>     >       K
>     >
>     >
>     >     ------------------------------------
>     >
>     >     Yahoo! Groups Links
>     >
>     >
>     >        mailto:xAP_developer-fullfeatured@yahoogroups.com
>     <mailto:xAP_developer-fullfeatured@yahoogroups.com>
>     >     <mailto:xAP_developer-fullfeatured@yahoogroups.com
>     <mailto:xAP_developer-fullfeatured@yahoogroups.com>>
>     >
>     >
>     >
>     >
>     >
>     >
>
>
>
>     ------------------------------------
>
>     Yahoo! Groups Links
>
>
>        mailto:xAP_developer-fullfeatured@yahoogroups.com
>     <mailto:xAP_developer-fullfeatured@yahoogroups.com>
>
>
>
>
>
>



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/xAP_developer/

<*> Your email settings:
   Individual Email | Traditional

<*> To change settings online go to:
   http://groups.yahoo.com/group/xAP_developer/join
   (Yahoo! ID required)

<*> To change settings via email:
   mailto:xAP_developer-digest@yahoogroups.com
   mailto:xAP_developer-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
   xAP_developer-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
   http://docs.yahoo.com/info/terms/


#2025 From: Patrick Lidstone <patrick@...>
Date: Fri Sep 18, 2009 7:50 am
Subject: Re: xAP EOM identifier in xAP v1.3
patricklidstone
Offline Offline
Send Email Send Email
 


2009/9/17 Edward Pearson <edward.mailgroup@...>


> Is a TCP hub going to relay all traffic to all TCP endpoints? That won't scale very well...

 

Yes it would forward all traffic. How does that create a scalability problem Patrick? Obviously there’s more traffic, now o(n) rather than o(1), but how many clients do you reckon you’d need to have before there’d be a problem and where do you think the problem might occur?

 

Your wifi bandwidth gets eaten up o(n) for number of wifi endpoints, the bw is contended for across all wifi endpoints of course, and depending on what else you use wifi for and how chatty your xAP network is and how many xAP endpoints you have, this could be an issue - especially on earlier 802.11b nets. If filtering is implemented as per Kevin's suggestion, the problem pretty much vanishes. Hub software wise, I think the engineering problem looks pretty similar to a web server (or xmpp server), but with longer lived connections, so I imagine a well designed hub would be able to cope with a few hundred concurrent connections before getting bogged down - and then you could just add another hub, rinse & repeat.
 

> is there merit in some kind of referrer system to allow for load-balancing and automated failover of tcp connections across more than one hub?

 

I see no more reason for those kinds of features in a tcp capable system than there are in the current (one hub per vm, udp forwarding) architecture.

 

One of the strengths of xAP is it's inherent resilience - you lose a PC somewhere and everything else carries on working apart from the locally outage on the affected PC. In moving to a tcp hub, loss of the hub not only affects the machine on which the hub is running, but all the end points which are remotely connected to that hub. Based on past experience, I think the wife would see hub fail over as a concrete requirement round these parts :-)

 P.

#2026 From: Kevin Hawkins <yahoogroupskh@...>
Date: Fri Nov 13, 2009 2:10 pm
Subject: Re: LogTemp with xAP released
ukusaconsulting
Offline Offline
Send Email Send Email
 
Hi Mikko,

     I haven't myself had an opportunity to try your application but it
looks most useful.  However one user has done so and he has encountered
some problems with the xAP TSC implemenation.  I do appreciate that xAP
TSC is quite new and hence there are very few supportive applications
that you will have been able to test against so it's very
understandable.     I'd be very happy to work with you to try and get
the schema compliant with the draft TSC specification, the main issue
being the way separate sensors are identified.

     Also I've just put out a call to xAP Developers to try and improve
TSC support within their applications.   xAPBSC has almost ubiquitous
support and this has lead to near plug and play operation between xAP
applications.   It has also unfortunately lead to many people using
xAPBSC where in fact xAPTSC or some other schema is far more appropriate.

    The situation is a little bit 'chicken & egg' so I hope that we can
make some moves forward now and get more universal support as without it
your application will have found little adoption by the xAP community.
Let's see what happens, I shall also update my applications to support
TSC directly.

    Cheers Kevin


m.rintala wrote:
> Hi,
>
> I have released LogTemp (temperature etc. monitoring program) version with xAP
protocol. It's using TCS schema but still, I am not quite happy with this.
>
> Since there are quite a lot of different schemas available,
> no standardization will take place. Everybody is using own  schemas to
fullfill their own needs, therefore there are no markets for common tools etc.
>
> Anyway, you can find software http://www.mrsoft.fi/ohj01en.htm.
>
> Best regards,
>
> Mikko Rintala
> MR Soft
>
>
>
>

#2027 From: Kevin Hawkins <yahoogroupskh@...>
Date: Fri Nov 13, 2009 2:19 pm
Subject: xAP TSC - A callup request :-)
ukusaconsulting
Offline Offline
Send Email Send Email
 
We have a bit of a Catch22 situation with xAP TSC.    Until we have
supporting applications then people don't want to write data sources and
vica versa and we can't ratify TSC into xAPTSC until it has some real
world experience...   Hence xAPBSC is being abused as non appropriate
data is shoehorned in, aprticularly by representing numeric data as a
text device.   So here's a call to xAP Developers to add support for TSC
within their existing applications and hopefully it will become as
successful as BSC.

Here's a copy of part of my response to a xAP Automation list post

    K

There is a bit of 'chicken & egg' here and so it is worth trying to see
if we can get better support for TSC within the key xAP applications -
especially the ones that already directly support BSC , as most of the
work is already done.

I know Daniel had mentioned he would look towards supporting TSC , and
it is particularly well suited towards 1-wire applications , although I
would recommend that BSC remains supported , at least transitionally.
Without such widespread adoption TSC will remain sidelined and BSC
abused instead.   Also there are few test applications to develop
against which doesn't help people like Mikko.   I remember KevinT has
some however and Lehane uses TSC extensively in his home project.

So I'll revisit my contributions and see what I can do here and
hopefully a couple of others will too.    Many applications will already
handle TSC as a generic schema as well but having the plug and play
integration in the same way that we have with TSC would be far preferable

#2028 From: "brett england" <brett@...>
Date: Fri Nov 13, 2009 2:16 pm
Subject: Repurposing an ADSL livebox as an xAP Automation Hub
dbzoo_com
Offline Offline
Send Email Send Email
 

I’ve been working on this little project off and on for a year, and it’s finally got to the point where its kind of useful.

 

http://www.dbzoo.com/wiki/livebox/livebox

 

You really want to check out the Projects section.

 

The pachube component is really cool as it allows any xAP application to feed data and be graphed using this aggregation service.

 

When combined with the currentcost xap plug-in these two work very well together.

 

Brett

 


#2029 From: Daniel Berenguer <dberenguer@...>
Date: Sun Nov 15, 2009 6:36 pm
Subject: Comments about TSC
estratosapiens
Offline Offline
Send Email Send Email
 
Following Kevin's call-up request, I've revisited the TSC (v.42)
specification draft and have found some points that I would like to
discuss here:

1. TSC.query vs TSC.request
The document mixes both classes so I understand that it's an error.
Which is the correct class?

2. TSC for numeric values - BSC for states
I understand that BSC can still be used for many applications but I
believe that TSC should be able to manage binary states too.
Otherwise, we'll be force to do dual-implementations almost in any
device. BSC's main strengths are interoperability and the fact that
it's a common schema for all. I agree that TSC is a more complete
schema that could replace BSC for most applications but having to
manage TSC for numeric and BSC for binary is a nonsense in my opinion.
Why not using value=on/off in TSC too? From my point of view, we need
simple mechanisms capable to do complex things. One schema for all is
perfect for gateways and embedded controllers. Otherwise, we'll have
to manage with queries/commands from different schemas, send
duplicated events/infos, ... I also agree that we'll have to keep BSC
for backward compatibility in current designs but once TSC will be
widely adopted, TSC is a perfect candidate for becoming the main xAP
interoperable schema for control and telemetry applications.

3. Response to TSC.cmd resets
The specification states that the response to a TSC.cmd (counter)
reset has to be a TSC.info after having reseted the counter. This
breaks BSC's command/event query/info mechanisms and, will force us to
manage a exception when receiving RESET commands. Why not sending a
TSC.event after reseting the counter? Reseting a counter means that
the endpoint will change its value (if not 0 before that).

There are a lot of common points between BSC and TSC and I appreciate
this as it will simplify the adoption of the later schema. On the
other hand, all my suggestions are targeted to simplify the
implementation (lines of code and processing speed) and give more
power to TSC. Instead of creating a new schema, I'd have preferred to
enrich BSC with new fields but the creation of TSC is something good
because we have now the opportunity to customize this schema for M2M
apps. On the other hand, implementing new protocosl or schemas is
something time-costly so we'll have to be very precise and effective
in our work.

I vote for one schema for all in the M2M area. TSC for M2M and BSC for
basic home automation stuff. Isn't it too late for coming here with
such arguments?

Thanks for your time,

--
Daniel Berenguer
http://www.usapiens.com
http://www.opnode.org

#2030 From: "estratosapiens" <dberenguer@...>
Date: Sun Nov 15, 2009 6:39 pm
Subject: Re: xAP TSC - A callup request :-)
estratosapiens
Offline Offline
Send Email Send Email
 
Hi Kevin,

I can't speak for others but I was waiting for a wider adoption of TSC before
doing the jump :-)

Anyway, I agree that xAP applications will never adopt TSC if no device is using
this schema so it's maybe time to do something on this issue. I could try to
work on a TSC implementation for my new designs (opn-mbs, ...) as a way of
getting in touch with this new schema. Later, once TSC will be ratified, I could
port the work to older designs (opn-one and opn-max).

I believe that TSC brings some important improvements to the control&monitoring
scenario with regards to the old BSC schema. On the other hand, maintaining
multiple protocols/schemas in an embedded device is something costly in my
opinion. This was my case for the first versions of opn-one and opn-x10 where
xAP BSC, xAP X10 and xPL shared a common place in both gateways. Later, I
decided to switch to xAP BSC only because it was far easier to maintain and
simpler to understand by non-xAP people. This is the key in my opinion, xAP
needs to be something easy to understand and wasy to work with.

There are some other features about TSC that would need to be reconsidered IMHO
and I'll try to address these points from a different thread. I understand that
TSC (v42) is just a draft so I'll try to introduce my point of view (if it's not
too late...)

Regards,

Daniel.


--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> We have a bit of a Catch22 situation with xAP TSC.    Until we have
> supporting applications then people don't want to write data sources and
> vica versa and we can't ratify TSC into xAPTSC until it has some real
> world experience...   Hence xAPBSC is being abused as non appropriate
> data is shoehorned in, aprticularly by representing numeric data as a
> text device.   So here's a call to xAP Developers to add support for TSC
> within their existing applications and hopefully it will become as
> successful as BSC.
>
> Here's a copy of part of my response to a xAP Automation list post
>
>    K
>
> There is a bit of 'chicken & egg' here and so it is worth trying to see
> if we can get better support for TSC within the key xAP applications -
> especially the ones that already directly support BSC , as most of the
> work is already done.
>
> I know Daniel had mentioned he would look towards supporting TSC , and
> it is particularly well suited towards 1-wire applications , although I
> would recommend that BSC remains supported , at least transitionally.
> Without such widespread adoption TSC will remain sidelined and BSC
> abused instead.   Also there are few test applications to develop
> against which doesn't help people like Mikko.   I remember KevinT has
> some however and Lehane uses TSC extensively in his home project.
>
> So I'll revisit my contributions and see what I can do here and
> hopefully a couple of others will too.    Many applications will already
> handle TSC as a generic schema as well but having the plug and play
> integration in the same way that we have with TSC would be far preferable
>

#2031 From: James <james.traynor@...>
Date: Sun Nov 15, 2009 6:58 pm
Subject: Re: xAP TSC - A callup request :-), Floorplan TSC
JamesTraynor
Offline Offline
Send Email Send Email
 




Hopefully this is a start.  It supports TSC pretty much the same way it does with BSC devices. Auto discovery so no need to setup anything. Send commands to set value or setpoints, I would of added setting of alarmhi and alarmlo but I couldn't see a suitable schema although it's probably just the same as setpoint though.
All the usual scripts, events, links etc. are there. Display is pretty much like BSC  in the config pages, as in sorted by xAP source address. On the main pages a new Telemetry tab which groups found devices by type, eg Temperature,Voltage etc, it also has a simple plot of current value/setpoint/alarm range/min max to make for a simple overview.
New Functions for scripts
Function GetUnit(xAPName) As String
Function GetTSCType(xAPName) As String
Function GetTSCAlarmLo(xAPName) As String
Function GetTSCAlarmHi(xAPName) As String

Should just install over an existing copy.

I am sure once in use with other apps and devices that extra functionality will be needed just as like the BSC support evolved but as this is built on top of the existing BSC structure it has a better start.

It will use TSC. and xAPTSC  (spec .42, the one on the wiki)  class of messages but it won't work with the previously mentioned off spec TSC schema that didn't use sub address  and rather used a name= parameter.


Anyway let me know if you have any suggestions



James




On 13 Nov 2009, at 14:19, Kevin Hawkins wrote:

 

We have a bit of a Catch22 situation with xAP TSC. Until we have
supporting applications then people don't want to write data sources and
vica versa and we can't ratify TSC into xAPTSC until it has some real
world experience... Hence xAPBSC is being abused as non appropriate
data is shoehorned in, aprticularly by representing numeric data as a
text device. So here's a call to xAP Developers to add support for TSC
within their existing applications and hopefully it will become as
successful as BSC.

Here's a copy of part of my response to a xAP Automation list post

K

There is a bit of 'chicken & egg' here and so it is worth trying to see
if we can get better support for TSC within the key xAP applications -
especially the ones that already directly support BSC , as most of the
work is already done.

I know Daniel had mentioned he would look towards supporting TSC , and
it is particularly well suited towards 1-wire applications , although I
would recommend that BSC remains supported , at least transitionally.
Without such widespread adoption TSC will remain sidelined and BSC
abused instead. Also there are few test applications to develop
against which doesn't help people like Mikko. I remember KevinT has
some however and Lehane uses TSC extensively in his home project.

So I'll revisit my contributions and see what I can do here and
hopefully a couple of others will too. Many applications will already
handle TSC as a generic schema as well but having the plug and play
integration in the same way that we have with TSC would be far preferable



#2032 From: "estratosapiens" <dberenguer@...>
Date: Sun Nov 15, 2009 5:54 pm
Subject: Re: xAP TSC - A callup request :-)
estratosapiens
Offline Offline
Send Email Send Email
 
Hi Kevin,

I can't speak for others but I was waiting for a wider adoption of TSC before
doing the jump :-)

Anyway, I agree that xAP applications will never adopt TSC if no device is using
this schema so it's maybe time to do something on this issue. I could try to
work on a TSC implementation for my new designs (opn-mbs, ...) as a way of
getting in touch with this new schema. Later, once TSC will be ratified, I could
port the work to older designs (opn-one and opn-max).

I believe that TSC brings some important improvements to the control&monitoring
scenario with regards to the old BSC schema. On the other hand, maintaining
multiple protocols/schemas in an embedded device is something costly in my
opinion. This was my case for the first versions of opn-one and opn-x10 where
xAP BSC, xAP X10 and xPL shared a common place in both gateways. Later, I
decided to switch to xAP BSC only because it was far easier to maintain and
simpler to understand by non-xAP people. This is the key in my opinion, xAP
needs to be something easy to understand and wasy to work with.

There are some other features about TSC that would need to be reconsidered IMHO
and I'll try to address these points from a different thread. I understand that
TSC (v42) is just a draft so I'll try to introduce my point of view (if it's not
too late...)

Regards,

Daniel.


--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> We have a bit of a Catch22 situation with xAP TSC.    Until we have
> supporting applications then people don't want to write data sources and
> vica versa and we can't ratify TSC into xAPTSC until it has some real
> world experience...   Hence xAPBSC is being abused as non appropriate
> data is shoehorned in, aprticularly by representing numeric data as a
> text device.   So here's a call to xAP Developers to add support for TSC
> within their existing applications and hopefully it will become as
> successful as BSC.
>
> Here's a copy of part of my response to a xAP Automation list post
>
>    K
>
> There is a bit of 'chicken & egg' here and so it is worth trying to see
> if we can get better support for TSC within the key xAP applications -
> especially the ones that already directly support BSC , as most of the
> work is already done.
>
> I know Daniel had mentioned he would look towards supporting TSC , and
> it is particularly well suited towards 1-wire applications , although I
> would recommend that BSC remains supported , at least transitionally.
> Without such widespread adoption TSC will remain sidelined and BSC
> abused instead.   Also there are few test applications to develop
> against which doesn't help people like Mikko.   I remember KevinT has
> some however and Lehane uses TSC extensively in his home project.
>
> So I'll revisit my contributions and see what I can do here and
> hopefully a couple of others will too.    Many applications will already
> handle TSC as a generic schema as well but having the plug and play
> integration in the same way that we have with TSC would be far preferable
>

#2033 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sun Nov 15, 2009 7:10 pm
Subject: Re: Re: xAP TSC - A callup request :-)
ukusaconsulting
Offline Offline
Send Email Send Email
 
It's certainly not too late Daniel,  I think we have to have a few real
implementations of TSC to see if it is actually fit for purpose and then
we can look to ratify and promote it more.

It was surprising how awkward even a simple schema like BSC became as
little nuances crept in , and of course this was partly due to people
trying to use it for purposes that it wasn't intended for.   TSC is very
heavilly based on BSC and so I'm kinda hoping that people who implement
TSC will also be able to support BSC without too much extra effort, and
vica versa. Certainly the core should be the same.  As to whether BSC
will, or should, eventually be replaced by TSC I'm not sure... maybe
over time but I had assumed they'd both continue to be used

There are some other aspects we need to address as well - including
implementing relative changes eg +10% and multiple choice / enumerated
devices and perhaps some sort of menu driven type mode, that may be
another schema derived from BSC.   Edward has a way of integrating
choice devcies within BSC which I use too - but it's non standard so we
haven't promoted it too much.

Whilst the true power of xAP comes from the ability to abstract complex
device functionality into schema I also recognise that the simple schema
- specifically BSC has been a great sucess and agree that we should
refine and expand this simple schema adoption to be both suitable and
easy to be adopted.

So let's get the discussion opened and get some devices and controllers
using the initial TSC proposal and see where we can refine it.

    K




tratosapiens wrote:
> Hi Kevin,
>
> I can't speak for others but I was waiting for a wider adoption of TSC before
doing the jump :-)
>
> Anyway, I agree that xAP applications will never adopt TSC if no device is
using this schema so it's maybe time to do something on this issue. I could try
to work on a TSC implementation for my new designs (opn-mbs, ...) as a way of
getting in touch with this new schema. Later, once TSC will be ratified, I could
port the work to older designs (opn-one and opn-max).
>
> I believe that TSC brings some important improvements to the
control&monitoring scenario with regards to the old BSC schema. On the other
hand, maintaining multiple protocols/schemas in an embedded device is something
costly in my opinion. This was my case for the first versions of opn-one and
opn-x10 where xAP BSC, xAP X10 and xPL shared a common place in both gateways.
Later, I decided to switch to xAP BSC only because it was far easier to maintain
and simpler to understand by non-xAP people. This is the key in my opinion, xAP
needs to be something easy to understand and wasy to work with.
>
> There are some other features about TSC that would need to be reconsidered
IMHO and I'll try to address these points from a different thread. I understand
that TSC (v42) is just a draft so I'll try to introduce my point of view (if
it's not too late...)
>
> Regards,
>
> Daniel.
>
>
> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
>> We have a bit of a Catch22 situation with xAP TSC.    Until we have
>> supporting applications then people don't want to write data sources and
>> vica versa and we can't ratify TSC into xAPTSC until it has some real
>> world experience...   Hence xAPBSC is being abused as non appropriate
>> data is shoehorned in, aprticularly by representing numeric data as a
>> text device.   So here's a call to xAP Developers to add support for TSC
>> within their existing applications and hopefully it will become as
>> successful as BSC.
>>
>> Here's a copy of part of my response to a xAP Automation list post
>>
>>    K
>>
>> There is a bit of 'chicken & egg' here and so it is worth trying to see
>> if we can get better support for TSC within the key xAP applications -
>> especially the ones that already directly support BSC , as most of the
>> work is already done.
>>
>> I know Daniel had mentioned he would look towards supporting TSC , and
>> it is particularly well suited towards 1-wire applications , although I
>> would recommend that BSC remains supported , at least transitionally.
>> Without such widespread adoption TSC will remain sidelined and BSC
>> abused instead.   Also there are few test applications to develop
>> against which doesn't help people like Mikko.   I remember KevinT has
>> some however and Lehane uses TSC extensively in his home project.
>>
>> So I'll revisit my contributions and see what I can do here and
>> hopefully a couple of others will too.    Many applications will already
>> handle TSC as a generic schema as well but having the plug and play
>> integration in the same way that we have with TSC would be far preferable
>>
>>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2034 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sun Nov 15, 2009 7:12 pm
Subject: Re: xAP TSC - A callup request :-), Floorplan TSC
ukusaconsulting
Offline Offline
Send Email Send Email
 
Hey - great James - it's amazing you go quiet for a few hours and then
great things happen :-)

     K

James wrote:
>
>
>
>
> http://mi4.biz/files/xapfloorplan/floorplantsctest.zip
>
>
> Hopefully this is a start.  It supports TSC pretty much the same way
> it does with BSC devices.
>>
>>
>
>
>
>

#2035 From: "estratosapiens" <dberenguer@...>
Date: Mon Nov 16, 2009 10:08 am
Subject: Re: Comments about TSC
estratosapiens
Offline Offline
Send Email Send Email
 
4. I'd prefer to do

unit=(unit designation)
-- desirable

rather than

unit=(unit designation)
-- mandatory

Thus, instead of doing unit=arb, the sender wouldn't include this field in the
body. This is a way of compacting information a little more, mainly if my second
suggestion gets somehow accepted :-)

Daniel.

--- In xAP_developer@yahoogroups.com, Daniel Berenguer <dberenguer@...> wrote:
>
> Following Kevin's call-up request, I've revisited the TSC (v.42)
> specification draft and have found some points that I would like to
> discuss here:
>
> 1. TSC.query vs TSC.request
> The document mixes both classes so I understand that it's an error.
> Which is the correct class?
>
> 2. TSC for numeric values - BSC for states
> I understand that BSC can still be used for many applications but I
> believe that TSC should be able to manage binary states too.
> Otherwise, we'll be force to do dual-implementations almost in any
> device. BSC's main strengths are interoperability and the fact that
> it's a common schema for all. I agree that TSC is a more complete
> schema that could replace BSC for most applications but having to
> manage TSC for numeric and BSC for binary is a nonsense in my opinion.
> Why not using value=on/off in TSC too? From my point of view, we need
> simple mechanisms capable to do complex things. One schema for all is
> perfect for gateways and embedded controllers. Otherwise, we'll have
> to manage with queries/commands from different schemas, send
> duplicated events/infos, ... I also agree that we'll have to keep BSC
> for backward compatibility in current designs but once TSC will be
> widely adopted, TSC is a perfect candidate for becoming the main xAP
> interoperable schema for control and telemetry applications.
>
> 3. Response to TSC.cmd resets
> The specification states that the response to a TSC.cmd (counter)
> reset has to be a TSC.info after having reseted the counter. This
> breaks BSC's command/event query/info mechanisms and, will force us to
> manage a exception when receiving RESET commands. Why not sending a
> TSC.event after reseting the counter? Reseting a counter means that
> the endpoint will change its value (if not 0 before that).
>
> There are a lot of common points between BSC and TSC and I appreciate
> this as it will simplify the adoption of the later schema. On the
> other hand, all my suggestions are targeted to simplify the
> implementation (lines of code and processing speed) and give more
> power to TSC. Instead of creating a new schema, I'd have preferred to
> enrich BSC with new fields but the creation of TSC is something good
> because we have now the opportunity to customize this schema for M2M
> apps. On the other hand, implementing new protocosl or schemas is
> something time-costly so we'll have to be very precise and effective
> in our work.
>
> I vote for one schema for all in the M2M area. TSC for M2M and BSC for
> basic home automation stuff. Isn't it too late for coming here with
> such arguments?
>
> Thanks for your time,
>
> --
> Daniel Berenguer
> http://www.usapiens.com
> http://www.opnode.org
>

#2036 From: "estratosapiens" <dberenguer@...>
Date: Wed Nov 18, 2009 2:39 pm
Subject: Re: Comments about TSC
estratosapiens
Offline Offline
Send Email Send Email
 
Following my own considerations...

We could implement point 2 without altering the current spec as follows:

value=[0, 1]
min=0
max=1

Thus we get a nice binary signal through TSC.

Daniel.


--- In xAP_developer@yahoogroups.com, "estratosapiens" <dberenguer@...> wrote:
>
> 4. I'd prefer to do
>
> unit=(unit designation)
> -- desirable
>
> rather than
>
> unit=(unit designation)
> -- mandatory
>
> Thus, instead of doing unit=arb, the sender wouldn't include this field in the
body. This is a way of compacting information a little more, mainly if my second
suggestion gets somehow accepted :-)
>
> Daniel.
>
> --- In xAP_developer@yahoogroups.com, Daniel Berenguer <dberenguer@> wrote:
> >
> > Following Kevin's call-up request, I've revisited the TSC (v.42)
> > specification draft and have found some points that I would like to
> > discuss here:
> >
> > 1. TSC.query vs TSC.request
> > The document mixes both classes so I understand that it's an error.
> > Which is the correct class?
> >
> > 2. TSC for numeric values - BSC for states
> > I understand that BSC can still be used for many applications but I
> > believe that TSC should be able to manage binary states too.
> > Otherwise, we'll be force to do dual-implementations almost in any
> > device. BSC's main strengths are interoperability and the fact that
> > it's a common schema for all. I agree that TSC is a more complete
> > schema that could replace BSC for most applications but having to
> > manage TSC for numeric and BSC for binary is a nonsense in my opinion.
> > Why not using value=on/off in TSC too? From my point of view, we need
> > simple mechanisms capable to do complex things. One schema for all is
> > perfect for gateways and embedded controllers. Otherwise, we'll have
> > to manage with queries/commands from different schemas, send
> > duplicated events/infos, ... I also agree that we'll have to keep BSC
> > for backward compatibility in current designs but once TSC will be
> > widely adopted, TSC is a perfect candidate for becoming the main xAP
> > interoperable schema for control and telemetry applications.
> >
> > 3. Response to TSC.cmd resets
> > The specification states that the response to a TSC.cmd (counter)
> > reset has to be a TSC.info after having reseted the counter. This
> > breaks BSC's command/event query/info mechanisms and, will force us to
> > manage a exception when receiving RESET commands. Why not sending a
> > TSC.event after reseting the counter? Reseting a counter means that
> > the endpoint will change its value (if not 0 before that).
> >
> > There are a lot of common points between BSC and TSC and I appreciate
> > this as it will simplify the adoption of the later schema. On the
> > other hand, all my suggestions are targeted to simplify the
> > implementation (lines of code and processing speed) and give more
> > power to TSC. Instead of creating a new schema, I'd have preferred to
> > enrich BSC with new fields but the creation of TSC is something good
> > because we have now the opportunity to customize this schema for M2M
> > apps. On the other hand, implementing new protocosl or schemas is
> > something time-costly so we'll have to be very precise and effective
> > in our work.
> >
> > I vote for one schema for all in the M2M area. TSC for M2M and BSC for
> > basic home automation stuff. Isn't it too late for coming here with
> > such arguments?
> >
> > Thanks for your time,
> >
> > --
> > Daniel Berenguer
> > http://www.usapiens.com
> > http://www.opnode.org
> >
>

#2037 From: "per.malmberg@..." <per.malmberg@...>
Date: Fri Nov 20, 2009 11:47 pm
Subject: MSure goes xAP
per.malmberg...
Offline Offline
Send Email Send Email
 
Greetings all,

Let me introduce myself; the name's Per Malmberg and I'm the author of MSure
(pronounced 'measure'), an application that serves as a foundation to a
Windows-based HA system.

I am happy to announce that MSure is currently in the process of gaining xAP
support, or at least partial support, which is the reason I'm posting here
today.

Although I am aware that the TSC schema wasn't finalized yet, I opted to use
that schema as it seemed to fit quite well with the data I'm publishing.

However, based on the recent discussions regarding this schema I am wondering
where it is headed, and if I should stay with it. I don't mind supporting this
schema although it is not finalized, but if there are major changes coming I
very much would like to know that so I can 'take a step back' and wait a while
with the release of my xAP Gateway module, or at least add support for another
schema, such as BSC.

Also, the specification isn't clear on all points as to what is required to be
compliant with the schema. For example, are .cmd and .query mandatory?

That's all for now. You can find the website here: http://www.msure.se and
specifics on the xAP Gateway module here:
http://www.msure.se/wiki/index.php5?title=Manual:Modules/xAP_Gateway

Regards,

Per

#2038 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sat Nov 21, 2009 4:42 pm
Subject: Re: MSure goes xAP
ukusaconsulting
Offline Offline
Send Email Send Email
 
Welcome Per, nice to have you on board.

      As you say we are in early days re the adoption of TSC - we do need
some real world implementation feedback so that we know that the schema
meets the purpose it is designed for.   We also of course need more
applications to support it - but in turn they need data sources to test
against. Having your application available will be another helpful
part.  My recommendation would be to continue with TSC as I think you
will find it much more appropriate for your application than BSC.

     I hope that developers do add support for TSC and James has just
released a xAP Floorplan build that already does and I have provisional
support in my HomeVision/C-Bus/IHC gateway.  Most control applications
already have the ability to support custom schema so TSC data can be
recovered but more specific support makes this so much tidier.

     TSC is derived from BSC and so you may well find that you are able
to support BSC very easily alongside TSC which will maximise existing
support and adoption for your application.  BSC is pervasively supported
by nearly all xAP control applications and controllers.  It is possible
to report sensor data and their measurement units using BSC by abusing a
text device rather than a level device , and this approach has been used
by several developers, but this practice will I hope be superceded by TSC.

     From a database logging aspect then it looks like you are already
fairly able to support any schema which is great.  BSC would be one of
the key schema found here.

     Re Any major changes to TSC  - I am not aware of any.  I am acutely
aware there is still no formal xAP v1.3 specification out there but as
long as you are aware of the UID change for v1.3 that is essentially the
only aspect that has an impact on TSC.

     Re .cmd and .query support within TSC.   My view would be that any
TSC device that has listening ability and codespace should support
.query and any device that has controllable outputs should support .cmd
messages.   The  .query is required for any controller at startup to
synch it's status with your device and also has uses for device
discovery.   Wildcarding is another aspect that you need to consider and
although not so critical in terms of input only devices (as you can
return all sensor information regardless) it is most important that it
works correctly for outputs  .   Partial TSC/BSC implementations only
lead to confusion and frustration from users.

    Any questions I'm more than happy to try and help - and I'm sure
others who worked with TSC will chime in too....   TSC is an interactive
(bi-directional) schema which takes a little more care in getting it
just right but the results merit the investment.

   Looking forward to the results..

     cheers Kevin



per.malmberg@... wrote:
> Greetings all,
>
> Let me introduce myself; the name's Per Malmberg and I'm the author of MSure
(pronounced 'measure'), an application that serves as a foundation to a
Windows-based HA system.
>
> I am happy to announce that MSure is currently in the process of gaining xAP
support, or at least partial support, which is the reason I'm posting here
today.
>
> Although I am aware that the TSC schema wasn't finalized yet, I opted to use
that schema as it seemed to fit quite well with the data I'm publishing.
>
> However, based on the recent discussions regarding this schema I am wondering
where it is headed, and if I should stay with it. I don't mind supporting this
schema although it is not finalized, but if there are major changes coming I
very much would like to know that so I can 'take a step back' and wait a while
with the release of my xAP Gateway module, or at least add support for another
schema, such as BSC.
>
> Also, the specification isn't clear on all points as to what is required to be
compliant with the schema. For example, are .cmd and .query mandatory?
>
> That's all for now. You can find the website here: http://www.msure.se and
specifics on the xAP Gateway module here:
http://www.msure.se/wiki/index.php5?title=Manual:Modules/xAP_Gateway
>
> Regards,
>
> Per
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2039 From: "Per" <per.malmberg@...>
Date: Sat Nov 21, 2009 10:16 pm
Subject: Re: MSure goes xAP
per.malmberg...
Offline Offline
Send Email Send Email
 
Ok, I will stick with the TSC schema, and add .query and .cmd support.

I'll likey be back soon with more questions!



Cheers,

Per


--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...>
wrote:
>
> Welcome Per, nice to have you on board.
>
> As you say we are in early days re the adoption of TSC - we do need
> some real world implementation feedback so that we know that the
schema
> meets the purpose it is designed for. We also of course need more
> applications to support it - but in turn they need data sources to
test
> against. Having your application available will be another helpful
> part. My recommendation would be to continue with TSC as I think you
> will find it much more appropriate for your application than BSC.
>
> I hope that developers do add support for TSC and James has just
> released a xAP Floorplan build that already does and I have
provisional
> support in my HomeVision/C-Bus/IHC gateway. Most control applications
> already have the ability to support custom schema so TSC data can be
> recovered but more specific support makes this so much tidier.
>
> TSC is derived from BSC and so you may well find that you are able
> to support BSC very easily alongside TSC which will maximise existing
> support and adoption for your application. BSC is pervasively
supported
> by nearly all xAP control applications and controllers. It is possible
> to report sensor data and their measurement units using BSC by abusing
a
> text device rather than a level device , and this approach has been
used
> by several developers, but this practice will I hope be superceded by
TSC.
>
> From a database logging aspect then it looks like you are already
> fairly able to support any schema which is great. BSC would be one of
> the key schema found here.
>
> Re Any major changes to TSC - I am not aware of any. I am acutely
> aware there is still no formal xAP v1.3 specification out there but as
> long as you are aware of the UID change for v1.3 that is essentially
the
> only aspect that has an impact on TSC.
>
> Re .cmd and .query support within TSC. My view would be that any
> TSC device that has listening ability and codespace should support
> .query and any device that has controllable outputs should support
.cmd
> messages. The .query is required for any controller at startup to
> synch it's status with your device and also has uses for device
> discovery. Wildcarding is another aspect that you need to consider and
> although not so critical in terms of input only devices (as you can
> return all sensor information regardless) it is most important that it
> works correctly for outputs . Partial TSC/BSC implementations only
> lead to confusion and frustration from users.
>
> Any questions I'm more than happy to try and help - and I'm sure
> others who worked with TSC will chime in too.... TSC is an interactive
> (bi-directional) schema which takes a little more care in getting it
> just right but the results merit the investment.
>
> Looking forward to the results..
>
> cheers Kevin
>
>
>
> per.malmberg@... wrote:
> > Greetings all,
> >
> > Let me introduce myself; the name's Per Malmberg and I'm the author
of MSure (pronounced 'measure'), an application that serves as a
foundation to a Windows-based HA system.
> >
> > I am happy to announce that MSure is currently in the process of
gaining xAP support, or at least partial support, which is the reason
I'm posting here today.
> >
> > Although I am aware that the TSC schema wasn't finalized yet, I
opted to use that schema as it seemed to fit quite well with the data
I'm publishing.
> >
> > However, based on the recent discussions regarding this schema I am
wondering where it is headed, and if I should stay with it. I don't mind
supporting this schema although it is not finalized, but if there are
major changes coming I very much would like to know that so I can 'take
a step back' and wait a while with the release of my xAP Gateway module,
or at least add support for another schema, such as BSC.
> >
> > Also, the specification isn't clear on all points as to what is
required to be compliant with the schema. For example, are .cmd and
.query mandatory?
> >
> > That's all for now. You can find the website here:
http://www.msure.se and specifics on the xAP Gateway module here:
http://www.msure.se/wiki/index.php5?title=Manual:Modules/xAP_Gateway
> >
> > Regards,
> >
> > Per
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2040 From: "Per" <per.malmberg@...>
Date: Sat Nov 21, 2009 10:47 pm
Subject: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Hello,

I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.

Based on the following xAP message, what would be the correct ID value to set
the latch on channel 1 to False be? I'd say ABCD, but that'd be four characters
and the spec limits it to two.

Maybe I've missunderstood the sub addressing rules?

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:D100000003AE661F
Uid=FF.000001:ABCD
Class=TSC.info
}
info.state
{
Channel=0
ActivityDetected=True
DetectedLevel=True
LatchState=False
DateTime=20091121233600
}
info.state
{
Channel=1
ActivityDetected=True
DetectedLevel=True
LatchState=True
DateTime=20091121233600
}
presence.status
{
connected=True
}

#2041 From: Edward Pearson <xap@...>
Date: Sat Nov 21, 2009 11:17 pm
Subject: Re: TSC.cmd / id
erspearson
Offline Offline
Send Email Send Email
 
The spec has not been updated to reflect the extended UID in v1.3.
The ID is indeed the same as the sub part of the UID. ABDC in this case.
The same appiles to BSC.

#2042 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sun Nov 22, 2009 12:24 am
Subject: Re: TSC.cmd / id
ukusaconsulting
Offline Offline
Send Email Send Email
 
Hi Per

      I think you have two sensors reporting here , channel 0 and 1 ,
although both are possibly within the same physical device.  Best for
TSC  if each sensor had a unique UID - and then the sub address would
perforce also be different for each , and so would the ID e.g ID=ABCD
ID=ABCE ... or ABCD01 ABCD02 or whatever

You can't include two identically named blocks within one xAP message
either so as a rule these would have to be indexed as below

info.state.1
info.state.2   etc

However the BSC and TSC schema do not require (or support) duplicate
blocknames so if you create separate sub addresses for these endpoints
they would then be sent as separate messages

presence.status is not a defined part of the TSC schema either but could
be included should you wish  (as you can supplement whatever custom
blocks you like) but these might be better presented as an additional
xAP schema/message of your own design.

  Late night Saturday work eh...  most impressed :-) - my comments are
post several wine bottles of wine and a party  so I hope they are valid.

     cheers  K

  parameterPer wrote:
> Hello,
>
> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
>
> Based on the following xAP message, what would be the correct ID value to set
the latch on channel 1 to False be? I'd say ABCD, but that'd be four characters
and the spec limits it to two.
>
> Maybe I've missunderstood the sub addressing rules?
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> Uid=FF.000001:ABCD
> Class=TSC.info
> }
> info.state
> {
> Channel=0
> ActivityDetected=True
> DetectedLevel=True
> LatchState=False
> DateTime=20091121233600
> }
> info.state
> {
> Channel=1
> ActivityDetected=True
> DetectedLevel=True
> LatchState=True
> DateTime=20091121233600
> }
> presence.status
> {
> connected=True
> }
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2043 From: "Per" <per.malmberg@...>
Date: Sun Nov 22, 2009 10:05 am
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Kevin,

Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:

Message Body Policy: ...Multiple message blocks may share the same name if, and
only if, they use the same schema. In array type situations, it is recommended
that message blocks are labelled with an index...

So, while it is recommended, it is not mandatory.

You say that

"However the BSC and TSC schema do not require (or support) duplicate
blocknames"

All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?

Based on your statement, one might make the conclusion that the TSC schema takes
precedence over the protocol specification. That can't be right, can it?

Regards,

Per


--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> Hi Per
>
>      I think you have two sensors reporting here , channel 0 and 1 ,
> although both are possibly within the same physical device.  Best for
> TSC  if each sensor had a unique UID - and then the sub address would
> perforce also be different for each , and so would the ID e.g ID=ABCD
> ID=ABCE ... or ABCD01 ABCD02 or whatever
>
> You can't include two identically named blocks within one xAP message
> either so as a rule these would have to be indexed as below
>
> info.state.1
> info.state.2   etc
>
> However the BSC and TSC schema do not require (or support) duplicate
> blocknames so if you create separate sub addresses for these endpoints
> they would then be sent as separate messages
>
> presence.status is not a defined part of the TSC schema either but could
> be included should you wish  (as you can supplement whatever custom
> blocks you like) but these might be better presented as an additional
> xAP schema/message of your own design.
>
>  Late night Saturday work eh...  most impressed :-) - my comments are
> post several wine bottles of wine and a party  so I hope they are valid.
>
>     cheers  K
>
>  parameterPer wrote:
> > Hello,
> >
> > I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
> >
> > Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> >
> > Maybe I've missunderstood the sub addressing rules?
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> > Uid=FF.000001:ABCD
> > Class=TSC.info
> > }
> > info.state
> > {
> > Channel=0
> > ActivityDetected=True
> > DetectedLevel=True
> > LatchState=False
> > DateTime=20091121233600
> > }
> > info.state
> > {
> > Channel=1
> > ActivityDetected=True
> > DetectedLevel=True
> > LatchState=True
> > DateTime=20091121233600
> > }
> > presence.status
> > {
> > connected=True
> > }
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2044 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sun Nov 22, 2009 11:47 am
Subject: Re: Re: TSC.cmd / id
ukusaconsulting
Offline Offline
Send Email Send Email
 
Hi Per,

     Using the BSC or TSC schema the issue with including several blocks
within one message  is that the identifier for the endpoint that is
being reported is contained in the header,  as both a named sub address
(the portion of the address after the : ) and the last few digits of the
UID.  Hence all the block(s) content can only relate to this one
endpoint and not more.     You had blocks for different endpoints in one
message.

     This approach is strongly recommended in xAP now - i.e. as much
addressing information as possible is contained in the header.  Some
early schema were designed differently and the 'context' of the block
was set by a parameter within the block, eg the device= in the X10 one
below.    We found that this approach , whilst often understandable by a
person when they read the schema, was difficult for computers
recognition without recourse to an electronic schema repository.  You
can still design a schema this way should you wish of course, it's just
not so intuitive to interpret.

     xap-x10.event
     {
     command=on
     device=B3
      }

    example.event
     {
     light=red
     ident=flashing
     }

        Not a brilliant example (still suffering from the wine last
night)  but in the latter case it is unclear if the red light is now
flashing or if the flashing light has been turned to a red colour

    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
support the target= address being wildcarded and then we support
multiple indexed blocks within one message and each contains an ID=
parameter to determine which endpoint is being addressed.  This was
included to allow coincident changes to be made to a device and it also
means that all or none of the changes happen (should a cmd fail to reach
a destination).

     So back to your point about the block indexing being 'recommended
rather than mandatory' the point is that indexing is a recognised way
for code to interpret the content of blocks as being identical.
Additionally we do not (currently) apply any time based inference to
parameters eg that earlier blocks or parameters within those blocks
should be actioned before later ones.  This allows the message to be
broken apart and stored in a structured way and just queried for
parameter values.  Indexing identical blocks preserves some integrity of
order.

     Lastly the comment about the schema specification and it's
precedence over the v1.2 protocol specification.   The protocol spec is
defining  the allowable construction of all possible variants of a  xAP
message , however not all variants of a message are going to be useful
or approriate in all schema .  For example many schema , including the
X10 one above,  do not use sub addressing at all.    If the schema uses
sub addressing, as TSC does, then by definition that message content
must only relate to the addressed endpoint from source=  .

     Schema can just be seen as a higher layer protocol using xAP as a
transport - nothing would actually break in xAP at the protocol layer if
you did add more blocks but it would not be logical or valid at the
schema level.    The same is seen with high level protocols sitting on
top of TCP for example.

    cheers Kevin


Per wrote:
> Kevin,
>
> Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:
>
> Message Body Policy: ...Multiple message blocks may share the same name if,
and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
>
> So, while it is recommended, it is not mandatory.
>
> You say that
>
> "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
>
> All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
>
> Based on your statement, one might make the conclusion that the TSC schema
takes precedence over the protocol specification. That can't be right, can it?
>
> Regards,
>
> Per
>
>
> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
>> Hi Per
>>
>>      I think you have two sensors reporting here , channel 0 and 1 ,
>> although both are possibly within the same physical device.  Best for
>> TSC  if each sensor had a unique UID - and then the sub address would
>> perforce also be different for each , and so would the ID e.g ID=ABCD
>> ID=ABCE ... or ABCD01 ABCD02 or whatever
>>
>> You can't include two identically named blocks within one xAP message
>> either so as a rule these would have to be indexed as below
>>
>> info.state.1
>> info.state.2   etc
>>
>> However the BSC and TSC schema do not require (or support) duplicate
>> blocknames so if you create separate sub addresses for these endpoints
>> they would then be sent as separate messages
>>
>> presence.status is not a defined part of the TSC schema either but could
>> be included should you wish  (as you can supplement whatever custom
>> blocks you like) but these might be better presented as an additional
>> xAP schema/message of your own design.
>>
>>  Late night Saturday work eh...  most impressed :-) - my comments are
>> post several wine bottles of wine and a party  so I hope they are valid.
>>
>>     cheers  K
>>
>>  parameterPer wrote:
>>
>>> Hello,
>>>
>>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
>>>
>>> Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
>>>
>>> Maybe I've missunderstood the sub addressing rules?
>>>
>>> xap-header
>>> {
>>> v=13
>>> hop=1
>>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
>>> Uid=FF.000001:ABCD
>>> Class=TSC.info
>>> }
>>> info.state
>>> {
>>> Channel=0
>>> ActivityDetected=True
>>> DetectedLevel=True
>>> LatchState=False
>>> DateTime=20091121233600
>>> }
>>> info.state
>>> {
>>> Channel=1
>>> ActivityDetected=True
>>> DetectedLevel=True
>>> LatchState=True
>>> DateTime=20091121233600
>>> }
>>> presence.status
>>> {
>>> connected=True
>>> }
>>>
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2045 From: Kevin Hawkins <yahoogroupskh@...>
Date: Sun Nov 22, 2009 12:17 pm
Subject: Re: TSC.cmd / id
ukusaconsulting
Offline Offline
Send Email Send Email
 
Per - I'm sure you already know - but you could use the 1-wire ID as the
end portion of the UID should you wish ..  and then use a name for the
device in the source= line.   1-wire devices like this that have
multiple endpoints within them could be expanded by a couple of digits -
if used as part of the UID.  It does mean you having to use the longer
value for ID= in TSC.cmd messages however.

Or you could keep an internal table for the 1-wire ID and hence use less
digits.  Using less digits in the UID is recommended if possible as some
small embedded devcies might not have enough space for 16 or 18 digit
values.    Your approach has advantages here as you were only using 4 digits

Source=MSure.xAPGateway.Bigboy:D100000003AE661F
Uid=FF.000001:ABCD


Source=MSure.xAPGateway.Bigboy:Fan
Uid=FF.000001:D100000003AE661F


Source=MSure.xAPGateway.Bigboy:Fan.main
Uid=FF.000001:D100000003AE661F01

    Cheers K


Per wrote:
> Hello,
>
> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
>
> Based on the following xAP message, what would be the correct ID value to set
the latch on channel 1 to False be? I'd say ABCD, but that'd be four characters
and the spec limits it to two.
>
> Maybe I've missunderstood the sub addressing rules?
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> Uid=FF.000001:ABCD
> Class=TSC.info
> }
> info.state
> {
> Channel=0
> ActivityDetected=True
> DetectedLevel=True
> LatchState=False
> DateTime=20091121233600
> }
> info.state
> {
> Channel=1
> ActivityDetected=True
> DetectedLevel=True
> LatchState=True
> DateTime=20091121233600
> }
> presence.status
> {
> connected=True
> }
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2046 From: "Per" <per.malmberg@...>
Date: Sun Nov 22, 2009 5:30 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Ok, tanks for clearing that up, Edward.

--- In xAP_developer@yahoogroups.com, Edward Pearson <xap@...> wrote:
>
> The spec has not been updated to reflect the extended UID in v1.3.
> The ID is indeed the same as the sub part of the UID. ABDC in this case.
> The same appiles to BSC.
>

#2047 From: "Per" <per.malmberg@...>
Date: Sun Nov 22, 2009 5:29 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Kevin,

Ok, so as much as possible of the adressing in the header, which implies one
message for each separate endpoint - unless the target is using a wildcard, at
which time the ID pair is used to determine the final endpoint for each
individual block.

I'll have a go at implementing more strictly according to TSC, I'll likely be
back soon!

Cheers,

Per

--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> Hi Per,
>
>     Using the BSC or TSC schema the issue with including several blocks
> within one message  is that the identifier for the endpoint that is
> being reported is contained in the header,  as both a named sub address
> (the portion of the address after the : ) and the last few digits of the
> UID.  Hence all the block(s) content can only relate to this one
> endpoint and not more.     You had blocks for different endpoints in one
> message.
>
>     This approach is strongly recommended in xAP now - i.e. as much
> addressing information as possible is contained in the header.  Some
> early schema were designed differently and the 'context' of the block
> was set by a parameter within the block, eg the device= in the X10 one
> below.    We found that this approach , whilst often understandable by a
> person when they read the schema, was difficult for computers
> recognition without recourse to an electronic schema repository.  You
> can still design a schema this way should you wish of course, it's just
> not so intuitive to interpret.
>
>     xap-x10.event
>     {
>     command=on
>     device=B3
>      }
>
>    example.event
>     {
>     light=red
>     ident=flashing
>     }
>
>        Not a brilliant example (still suffering from the wine last
> night)  but in the latter case it is unclear if the red light is now
> flashing or if the flashing light has been turned to a red colour
>
>    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
> support the target= address being wildcarded and then we support
> multiple indexed blocks within one message and each contains an ID=
> parameter to determine which endpoint is being addressed.  This was
> included to allow coincident changes to be made to a device and it also
> means that all or none of the changes happen (should a cmd fail to reach
> a destination).
>
>     So back to your point about the block indexing being 'recommended
> rather than mandatory' the point is that indexing is a recognised way
> for code to interpret the content of blocks as being identical.
> Additionally we do not (currently) apply any time based inference to
> parameters eg that earlier blocks or parameters within those blocks
> should be actioned before later ones.  This allows the message to be
> broken apart and stored in a structured way and just queried for
> parameter values.  Indexing identical blocks preserves some integrity of
> order.
>
>     Lastly the comment about the schema specification and it's
> precedence over the v1.2 protocol specification.   The protocol spec is
> defining  the allowable construction of all possible variants of a  xAP
> message , however not all variants of a message are going to be useful
> or approriate in all schema .  For example many schema , including the
> X10 one above,  do not use sub addressing at all.    If the schema uses
> sub addressing, as TSC does, then by definition that message content
> must only relate to the addressed endpoint from source=  .
>
>     Schema can just be seen as a higher layer protocol using xAP as a
> transport - nothing would actually break in xAP at the protocol layer if
> you did add more blocks but it would not be logical or valid at the
> schema level.    The same is seen with high level protocols sitting on
> top of TCP for example.
>
>    cheers Kevin
>
>
> Per wrote:
> > Kevin,
> >
> > Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:
> >
> > Message Body Policy: ...Multiple message blocks may share the same name if,
and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
> >
> > So, while it is recommended, it is not mandatory.
> >
> > You say that
> >
> > "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
> >
> > All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
> >
> > Based on your statement, one might make the conclusion that the TSC schema
takes precedence over the protocol specification. That can't be right, can it?
> >
> > Regards,
> >
> > Per
> >
> >
> > --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@> wrote:
> >
> >> Hi Per
> >>
> >>      I think you have two sensors reporting here , channel 0 and 1 ,
> >> although both are possibly within the same physical device.  Best for
> >> TSC  if each sensor had a unique UID - and then the sub address would
> >> perforce also be different for each , and so would the ID e.g ID=ABCD
> >> ID=ABCE ... or ABCD01 ABCD02 or whatever
> >>
> >> You can't include two identically named blocks within one xAP message
> >> either so as a rule these would have to be indexed as below
> >>
> >> info.state.1
> >> info.state.2   etc
> >>
> >> However the BSC and TSC schema do not require (or support) duplicate
> >> blocknames so if you create separate sub addresses for these endpoints
> >> they would then be sent as separate messages
> >>
> >> presence.status is not a defined part of the TSC schema either but could
> >> be included should you wish  (as you can supplement whatever custom
> >> blocks you like) but these might be better presented as an additional
> >> xAP schema/message of your own design.
> >>
> >>  Late night Saturday work eh...  most impressed :-) - my comments are
> >> post several wine bottles of wine and a party  so I hope they are valid.
> >>
> >>     cheers  K
> >>
> >>  parameterPer wrote:
> >>
> >>> Hello,
> >>>
> >>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
> >>>
> >>> Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> >>>
> >>> Maybe I've missunderstood the sub addressing rules?
> >>>
> >>> xap-header
> >>> {
> >>> v=13
> >>> hop=1
> >>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> >>> Uid=FF.000001:ABCD
> >>> Class=TSC.info
> >>> }
> >>> info.state
> >>> {
> >>> Channel=0
> >>> ActivityDetected=True
> >>> DetectedLevel=True
> >>> LatchState=False
> >>> DateTime=20091121233600
> >>> }
> >>> info.state
> >>> {
> >>> Channel=1
> >>> ActivityDetected=True
> >>> DetectedLevel=True
> >>> LatchState=True
> >>> DateTime=20091121233600
> >>> }
> >>> presence.status
> >>> {
> >>> connected=True
> >>> }
> >>>
> >>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2048 From: "Per" <per.malmberg@...>
Date: Sun Nov 22, 2009 3:45 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Actually, I've never thought of it. But as you say, using 4 instead of 16 or
more characters will make it more compatible with embedded devices.

Thanks

// Per

--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> Per - I'm sure you already know - but you could use the 1-wire ID as the
> end portion of the UID should you wish ..  and then use a name for the
> device in the source= line.   1-wire devices like this that have
> multiple endpoints within them could be expanded by a couple of digits -
> if used as part of the UID.  It does mean you having to use the longer
> value for ID= in TSC.cmd messages however.
>
> Or you could keep an internal table for the 1-wire ID and hence use less
> digits.  Using less digits in the UID is recommended if possible as some
> small embedded devcies might not have enough space for 16 or 18 digit
> values.    Your approach has advantages here as you were only using 4 digits
>
> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> Uid=FF.000001:ABCD
>
>
> Source=MSure.xAPGateway.Bigboy:Fan
> Uid=FF.000001:D100000003AE661F
>
>
> Source=MSure.xAPGateway.Bigboy:Fan.main
> Uid=FF.000001:D100000003AE661F01
>
>    Cheers K
>
>
> Per wrote:
> > Hello,
> >
> > I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
> >
> > Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> >
> > Maybe I've missunderstood the sub addressing rules?
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> > Uid=FF.000001:ABCD
> > Class=TSC.info
> > }
> > info.state
> > {
> > Channel=0
> > ActivityDetected=True
> > DetectedLevel=True
> > LatchState=False
> > DateTime=20091121233600
> > }
> > info.state
> > {
> > Channel=1
> > ActivityDetected=True
> > DetectedLevel=True
> > LatchState=True
> > DateTime=20091121233600
> > }
> > presence.status
> > {
> > connected=True
> > }
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2050 From: "Per" <per.malmberg@...>
Date: Wed Nov 25, 2009 6:42 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
I'm not sure what happened to my reply I sent 10min ago, so sorry if this is a
double post.

I had some minutes left yesterday so I changed the output, it now looks as
follows:

--Temperature device
xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.bathroom
Uid=FF.000001:0004
Class=TSC.info
}
info.temperature
{
value=19,875
datetime=20091125191200
unit=c
name=bathroom
}

--Switch device. Two of two messages shown. Currently using the BSC schema, but
although that one supports on/off devices there are some added pairs. These
devices also support both in- and output on the same pin...any suggestions on
best practice here?

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.D100000003AE661F.0
Uid=FF.000001:0027
Class=xAPBSC.info
}
info.state
{
ActivityDetected=1
DetectedLevel=On
LatchState=Off
DateTime=20091125191000
}

--Counter device, two of four messages shown.
xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.0
Uid=FF.000001:002C
Class=TSC.event
}
event.Count
{
Value=0
DateTime=20091125192700
}

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.1
Uid=FF.000001:002D
Class=TSC.event
}
event.Count
{
Value=1
DateTime=20091125192800
}

-- A/D converter. Two of three messages shown.
xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.0
Uid=FF.000001:0029
Class=TSC.event
}
event.voltage
{
Value=4,73
DateTime=20091125193500
}

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.1
Uid=FF.000001:002A
Class=TSC.event
}
event.voltage
{
Value=3,11
DateTime=20091125193500
}

Lasty, the A/D converter also has a temperature sensor, which is currently not
reported as a subnode as the voltages:

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic
Uid=FF.000001:000F
Class=TSC.event
}
event.temperature
{
value=8,78125
datetime=20091125193900
unit=c
name=humidityattic
}

The reason is that the device interfaces (temperature, A/D) are read separatly
and thus translated separate from eachother. I'm not sure how to best handle
this, but had thoughts to add anotehr layer to all nodes; <name>.temperature;
<name>.analog etc. Any comments on this?

Cheers,

Per

--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> Hi Per,
>
>     Using the BSC or TSC schema the issue with including several blocks
> within one message  is that the identifier for the endpoint that is
> being reported is contained in the header,  as both a named sub address
> (the portion of the address after the : ) and the last few digits of the
> UID.  Hence all the block(s) content can only relate to this one
> endpoint and not more.     You had blocks for different endpoints in one
> message.
>
>     This approach is strongly recommended in xAP now - i.e. as much
> addressing information as possible is contained in the header.  Some
> early schema were designed differently and the 'context' of the block
> was set by a parameter within the block, eg the device= in the X10 one
> below.    We found that this approach , whilst often understandable by a
> person when they read the schema, was difficult for computers
> recognition without recourse to an electronic schema repository.  You
> can still design a schema this way should you wish of course, it's just
> not so intuitive to interpret.
>
>     xap-x10.event
>     {
>     command=on
>     device=B3
>      }
>
>    example.event
>     {
>     light=red
>     ident=flashing
>     }
>
>        Not a brilliant example (still suffering from the wine last
> night)  but in the latter case it is unclear if the red light is now
> flashing or if the flashing light has been turned to a red colour
>
>    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
> support the target= address being wildcarded and then we support
> multiple indexed blocks within one message and each contains an ID=
> parameter to determine which endpoint is being addressed.  This was
> included to allow coincident changes to be made to a device and it also
> means that all or none of the changes happen (should a cmd fail to reach
> a destination).
>
>     So back to your point about the block indexing being 'recommended
> rather than mandatory' the point is that indexing is a recognised way
> for code to interpret the content of blocks as being identical.
> Additionally we do not (currently) apply any time based inference to
> parameters eg that earlier blocks or parameters within those blocks
> should be actioned before later ones.  This allows the message to be
> broken apart and stored in a structured way and just queried for
> parameter values.  Indexing identical blocks preserves some integrity of
> order.
>
>     Lastly the comment about the schema specification and it's
> precedence over the v1.2 protocol specification.   The protocol spec is
> defining  the allowable construction of all possible variants of a  xAP
> message , however not all variants of a message are going to be useful
> or approriate in all schema .  For example many schema , including the
> X10 one above,  do not use sub addressing at all.    If the schema uses
> sub addressing, as TSC does, then by definition that message content
> must only relate to the addressed endpoint from source=  .
>
>     Schema can just be seen as a higher layer protocol using xAP as a
> transport - nothing would actually break in xAP at the protocol layer if
> you did add more blocks but it would not be logical or valid at the
> schema level.    The same is seen with high level protocols sitting on
> top of TCP for example.
>
>    cheers Kevin
>
>
> Per wrote:
> > Kevin,
> >
> > Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:
> >
> > Message Body Policy: ...Multiple message blocks may share the same name if,
and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
> >
> > So, while it is recommended, it is not mandatory.
> >
> > You say that
> >
> > "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
> >
> > All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
> >
> > Based on your statement, one might make the conclusion that the TSC schema
takes precedence over the protocol specification. That can't be right, can it?
> >
> > Regards,
> >
> > Per
> >
> >
> > --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@> wrote:
> >
> >> Hi Per
> >>
> >>      I think you have two sensors reporting here , channel 0 and 1 ,
> >> although both are possibly within the same physical device.  Best for
> >> TSC  if each sensor had a unique UID - and then the sub address would
> >> perforce also be different for each , and so would the ID e.g ID=ABCD
> >> ID=ABCE ... or ABCD01 ABCD02 or whatever
> >>
> >> You can't include two identically named blocks within one xAP message
> >> either so as a rule these would have to be indexed as below
> >>
> >> info.state.1
> >> info.state.2   etc
> >>
> >> However the BSC and TSC schema do not require (or support) duplicate
> >> blocknames so if you create separate sub addresses for these endpoints
> >> they would then be sent as separate messages
> >>
> >> presence.status is not a defined part of the TSC schema either but could
> >> be included should you wish  (as you can supplement whatever custom
> >> blocks you like) but these might be better presented as an additional
> >> xAP schema/message of your own design.
> >>
> >>  Late night Saturday work eh...  most impressed :-) - my comments are
> >> post several wine bottles of wine and a party  so I hope they are valid.
> >>
> >>     cheers  K
> >>
> >>  parameterPer wrote:
> >>
> >>> Hello,
> >>>
> >>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
> >>>
> >>> Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> >>>
> >>> Maybe I've missunderstood the sub addressing rules?
> >>>
> >>> xap-header
> >>> {
> >>> v=13
> >>> hop=1
> >>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> >>> Uid=FF.000001:ABCD
> >>> Class=TSC.info
> >>> }
> >>> info.state
> >>> {
> >>> Channel=0
> >>> ActivityDetected=True
> >>> DetectedLevel=True
> >>> LatchState=False
> >>> DateTime=20091121233600
> >>> }
> >>> info.state
> >>> {
> >>> Channel=1
> >>> ActivityDetected=True
> >>> DetectedLevel=True
> >>> LatchState=True
> >>> DateTime=20091121233600
> >>> }
> >>> presence.status
> >>> {
> >>> connected=True
> >>> }
> >>>
> >>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2051 From: "Per" <per.malmberg@...>
Date: Wed Nov 25, 2009 5:57 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Hello again,

I got some minutes over last night and changed the output. They now looks as
follows. I would very much like some feedback :)

-- Switch-device with four I/O. Two out of four messages shown. Unique UID for
each. Currently using the the BSC schema since it supports on/off devices, but
that's not sufficient since these devices supports both in- and output mode,
with level and activity detection. Suggestions on how to handle them?

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.LCDSmallHallway.0
Uid=FF.000001:001F
Class=xAPBSC.info
}
info.state
{
ActivityDetected=0
DetectedLevel=On
LatchState=On
DateTime=20091125182957
}

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.LCDSmallHallway.1
Uid=FF.000001:0020
Class=xAPBSC.info
}
info.state
{
ActivityDetected=0
DetectedLevel=On
LatchState=On
DateTime=20091125182957
}

--Temperature device
xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.freshair
Uid=FF.000001:0009
Class=TSC.info
}
info.temperature
{
value=11,5
datetime=20091125182900
unit=c
name=freshair
}

--A/D converter, one of three messages shown. Unique UID for each.
xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.0
Uid=FF.000001:0029
Class=TSC.event
}
event.voltage.0
{
Value=4,71
DateTime=20091125184000
}

And lastly, an issue I'm not sure how I should handle. The A/D converter also
has a temperature sensor which is currently being reported as:

xap-header
{
v=13
hop=1
Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic
Uid=FF.000001:000F
Class=TSC.info
}
info.temperature
{
value=8,3125
datetime=20091125184800
unit=c
name=humidityattic
}

As you can see, it is not marked as a subnode to the 1-Wire.humidityattic source
like the voltage-messages. Is this valid or do I have to make it a subnode too?
The reason it is not already, is that each device interface (temperature, A/D)
are internally published separately and thus translated into xAP separated from
each other.

Cheers,

Per

#2052 From: Kevin Hawkins <yahoogroupskh@...>
Date: Thu Nov 26, 2009 12:38 am
Subject: Re: Re: TSC.cmd / id
ukusaconsulting
Offline Offline
Send Email Send Email
 
Hi Per,

     The first few posts by new members of the group are moderated on
Yahoo groups - and I was out tonight - I guess the other moderators were
too.   I think it's the first five posts but regardless I have manually
changed you to non moderated now so your posts should appear fairly
quickly in the future.

     It's very late tonight now so I'll look over the TSC messages  in
the morning .

     Just quickly I did look at the BSC message and  the block must be
named input.state.  Within that block it is mandatory to have a state=
parameter and then none or either (but not both) of level= or text= .
Lastly you can include an optional DisplayText= parameter.    Extra
parameters will not break anything in xAP but also will not be
recognised by most devices or software.

     If you have a device that has input and output on the same pin then
it will have to be an output device as otherwise you can't control
it.    Not quite sure how such a pin works but if it is either/or then
you could report according to it's mode - or alternatively break it into
two endpoints (even though it is actually only one phsical pin) .

     Cheers Kevin

Per wrote:
> I'm not sure what happened to my reply I sent 10min ago, so sorry if this is a
double post.
>
> I had some minutes left yesterday so I changed the output, it now looks as
follows:
>
> --Temperature device
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.bathroom
> Uid=FF.000001:0004
> Class=TSC.info
> }
> info.temperature
> {
> value=19,875
> datetime=20091125191200
> unit=c
> name=bathroom
> }
>
> --Switch device. Two of two messages shown. Currently using the BSC schema,
but although that one supports on/off devices there are some added pairs. These
devices also support both in- and output on the same pin...any suggestions on
best practice here?
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.D100000003AE661F.0
> Uid=FF.000001:0027
> Class=xAPBSC.info
> }
> info.state
> {
> ActivityDetected=1
> DetectedLevel=On
> LatchState=Off
> DateTime=20091125191000
> }
>
> --Counter device, two of four messages shown.
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.0
> Uid=FF.000001:002C
> Class=TSC.event
> }
> event.Count
> {
> Value=0
> DateTime=20091125192700
> }
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.1
> Uid=FF.000001:002D
> Class=TSC.event
> }
> event.Count
> {
> Value=1
> DateTime=20091125192800
> }
>
> -- A/D converter. Two of three messages shown.
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.0
> Uid=FF.000001:0029
> Class=TSC.event
> }
> event.voltage
> {
> Value=4,73
> DateTime=20091125193500
> }
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.1
> Uid=FF.000001:002A
> Class=TSC.event
> }
> event.voltage
> {
> Value=3,11
> DateTime=20091125193500
> }
>
> Lasty, the A/D converter also has a temperature sensor, which is currently not
reported as a subnode as the voltages:
>
> xap-header
> {
> v=13
> hop=1
> Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic
> Uid=FF.000001:000F
> Class=TSC.event
> }
> event.temperature
> {
> value=8,78125
> datetime=20091125193900
> unit=c
> name=humidityattic
> }
>
> The reason is that the device interfaces (temperature, A/D) are read separatly
and thus translated separate from eachother. I'm not sure how to best handle
this, but had thoughts to add anotehr layer to all nodes; <name>.temperature;
<name>.analog etc. Any comments on this?
>
> Cheers,
>
> Per
>
> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
>> Hi Per,
>>
>>     Using the BSC or TSC schema the issue with including several blocks
>> within one message  is that the identifier for the endpoint that is
>> being reported is contained in the header,  as both a named sub address
>> (the portion of the address after the : ) and the last few digits of the
>> UID.  Hence all the block(s) content can only relate to this one
>> endpoint and not more.     You had blocks for different endpoints in one
>> message.
>>
>>     This approach is strongly recommended in xAP now - i.e. as much
>> addressing information as possible is contained in the header.  Some
>> early schema were designed differently and the 'context' of the block
>> was set by a parameter within the block, eg the device= in the X10 one
>> below.    We found that this approach , whilst often understandable by a
>> person when they read the schema, was difficult for computers
>> recognition without recourse to an electronic schema repository.  You
>> can still design a schema this way should you wish of course, it's just
>> not so intuitive to interpret.
>>
>>     xap-x10.event
>>     {
>>     command=on
>>     device=B3
>>      }
>>
>>    example.event
>>     {
>>     light=red
>>     ident=flashing
>>     }
>>
>>        Not a brilliant example (still suffering from the wine last
>> night)  but in the latter case it is unclear if the red light is now
>> flashing or if the flashing light has been turned to a red colour
>>
>>    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
>> support the target= address being wildcarded and then we support
>> multiple indexed blocks within one message and each contains an ID=
>> parameter to determine which endpoint is being addressed.  This was
>> included to allow coincident changes to be made to a device and it also
>> means that all or none of the changes happen (should a cmd fail to reach
>> a destination).
>>
>>     So back to your point about the block indexing being 'recommended
>> rather than mandatory' the point is that indexing is a recognised way
>> for code to interpret the content of blocks as being identical.
>> Additionally we do not (currently) apply any time based inference to
>> parameters eg that earlier blocks or parameters within those blocks
>> should be actioned before later ones.  This allows the message to be
>> broken apart and stored in a structured way and just queried for
>> parameter values.  Indexing identical blocks preserves some integrity of
>> order.
>>
>>     Lastly the comment about the schema specification and it's
>> precedence over the v1.2 protocol specification.   The protocol spec is
>> defining  the allowable construction of all possible variants of a  xAP
>> message , however not all variants of a message are going to be useful
>> or approriate in all schema .  For example many schema , including the
>> X10 one above,  do not use sub addressing at all.    If the schema uses
>> sub addressing, as TSC does, then by definition that message content
>> must only relate to the addressed endpoint from source=  .
>>
>>     Schema can just be seen as a higher layer protocol using xAP as a
>> transport - nothing would actually break in xAP at the protocol layer if
>> you did add more blocks but it would not be logical or valid at the
>> schema level.    The same is seen with high level protocols sitting on
>> top of TCP for example.
>>
>>    cheers Kevin
>>
>>
>> Per wrote:
>>
>>> Kevin,
>>>
>>> Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:
>>>
>>> Message Body Policy: ...Multiple message blocks may share the same name if,
and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
>>>
>>> So, while it is recommended, it is not mandatory.
>>>
>>> You say that
>>>
>>> "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
>>>
>>> All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
>>>
>>> Based on your statement, one might make the conclusion that the TSC schema
takes precedence over the protocol specification. That can't be right, can it?
>>>
>>> Regards,
>>>
>>> Per
>>>
>>>
>>> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@> wrote:
>>>
>>>
>>>> Hi Per
>>>>
>>>>      I think you have two sensors reporting here , channel 0 and 1 ,
>>>> although both are possibly within the same physical device.  Best for
>>>> TSC  if each sensor had a unique UID - and then the sub address would
>>>> perforce also be different for each , and so would the ID e.g ID=ABCD
>>>> ID=ABCE ... or ABCD01 ABCD02 or whatever
>>>>
>>>> You can't include two identically named blocks within one xAP message
>>>> either so as a rule these would have to be indexed as below
>>>>
>>>> info.state.1
>>>> info.state.2   etc
>>>>
>>>> However the BSC and TSC schema do not require (or support) duplicate
>>>> blocknames so if you create separate sub addresses for these endpoints
>>>> they would then be sent as separate messages
>>>>
>>>> presence.status is not a defined part of the TSC schema either but could
>>>> be included should you wish  (as you can supplement whatever custom
>>>> blocks you like) but these might be better presented as an additional
>>>> xAP schema/message of your own design.
>>>>
>>>>  Late night Saturday work eh...  most impressed :-) - my comments are
>>>> post several wine bottles of wine and a party  so I hope they are valid.
>>>>
>>>>     cheers  K
>>>>
>>>>  parameterPer wrote:
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
>>>>>
>>>>> Based on the following xAP message, what would be the correct ID value to
set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
>>>>>
>>>>> Maybe I've missunderstood the sub addressing rules?
>>>>>
>>>>> xap-header
>>>>> {
>>>>> v=13
>>>>> hop=1
>>>>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
>>>>> Uid=FF.000001:ABCD
>>>>> Class=TSC.info
>>>>> }
>>>>> info.state
>>>>> {
>>>>> Channel=0
>>>>> ActivityDetected=True
>>>>> DetectedLevel=True
>>>>> LatchState=False
>>>>> DateTime=20091121233600
>>>>> }
>>>>> info.state
>>>>> {
>>>>> Channel=1
>>>>> ActivityDetected=True
>>>>> DetectedLevel=True
>>>>> LatchState=True
>>>>> DateTime=20091121233600
>>>>> }
>>>>> presence.status
>>>>> {
>>>>> connected=True
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------
>>>>>
>>>>> Yahoo! Groups Links
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>

#2053 From: "Per" <per.malmberg@...>
Date: Thu Nov 26, 2009 6:21 am
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
Hm, the posting-page only gave a 'moderator-warning' for new threads, nothing
was indicated for replies. Ah well, I guess that's sorted now :)

The two-way I/O pin is a standard open drain I/O with added internal sensor used
in most ICs. See Figure 11 in http://datasheets.maxim-ic.com/en/ds/DS2406.pdf

You're right of course regarding the BSC block; shamefull I didn't get that
right.

// Per

--- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@...> wrote:
>
> Hi Per,
>
>     The first few posts by new members of the group are moderated on
> Yahoo groups - and I was out tonight - I guess the other moderators were
> too.   I think it's the first five posts but regardless I have manually
> changed you to non moderated now so your posts should appear fairly
> quickly in the future.
>
>     It's very late tonight now so I'll look over the TSC messages  in
> the morning .
>
>     Just quickly I did look at the BSC message and  the block must be
> named input.state.  Within that block it is mandatory to have a state=
> parameter and then none or either (but not both) of level= or text= .
> Lastly you can include an optional DisplayText= parameter.    Extra
> parameters will not break anything in xAP but also will not be
> recognised by most devices or software.
>
>     If you have a device that has input and output on the same pin then
> it will have to be an output device as otherwise you can't control
> it.    Not quite sure how such a pin works but if it is either/or then
> you could report according to it's mode - or alternatively break it into
> two endpoints (even though it is actually only one phsical pin) .
>
>     Cheers Kevin
>
> Per wrote:
> > I'm not sure what happened to my reply I sent 10min ago, so sorry if this is
a double post.
> >
> > I had some minutes left yesterday so I changed the output, it now looks as
follows:
> >
> > --Temperature device
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.bathroom
> > Uid=FF.000001:0004
> > Class=TSC.info
> > }
> > info.temperature
> > {
> > value=19,875
> > datetime=20091125191200
> > unit=c
> > name=bathroom
> > }
> >
> > --Switch device. Two of two messages shown. Currently using the BSC schema,
but although that one supports on/off devices there are some added pairs. These
devices also support both in- and output on the same pin...any suggestions on
best practice here?
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.D100000003AE661F.0
> > Uid=FF.000001:0027
> > Class=xAPBSC.info
> > }
> > info.state
> > {
> > ActivityDetected=1
> > DetectedLevel=On
> > LatchState=Off
> > DateTime=20091125191000
> > }
> >
> > --Counter device, two of four messages shown.
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.0
> > Uid=FF.000001:002C
> > Class=TSC.event
> > }
> > event.Count
> > {
> > Value=0
> > DateTime=20091125192700
> > }
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.1
> > Uid=FF.000001:002D
> > Class=TSC.event
> > }
> > event.Count
> > {
> > Value=1
> > DateTime=20091125192800
> > }
> >
> > -- A/D converter. Two of three messages shown.
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.0
> > Uid=FF.000001:0029
> > Class=TSC.event
> > }
> > event.voltage
> > {
> > Value=4,73
> > DateTime=20091125193500
> > }
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.1
> > Uid=FF.000001:002A
> > Class=TSC.event
> > }
> > event.voltage
> > {
> > Value=3,11
> > DateTime=20091125193500
> > }
> >
> > Lasty, the A/D converter also has a temperature sensor, which is currently
not reported as a subnode as the voltages:
> >
> > xap-header
> > {
> > v=13
> > hop=1
> > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic
> > Uid=FF.000001:000F
> > Class=TSC.event
> > }
> > event.temperature
> > {
> > value=8,78125
> > datetime=20091125193900
> > unit=c
> > name=humidityattic
> > }
> >
> > The reason is that the device interfaces (temperature, A/D) are read
separatly and thus translated separate from eachother. I'm not sure how to best
handle this, but had thoughts to add anotehr layer to all nodes;
<name>.temperature; <name>.analog etc. Any comments on this?
> >
> > Cheers,
> >
> > Per
> >
> > --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@> wrote:
> >
> >> Hi Per,
> >>
> >>     Using the BSC or TSC schema the issue with including several blocks
> >> within one message  is that the identifier for the endpoint that is
> >> being reported is contained in the header,  as both a named sub address
> >> (the portion of the address after the : ) and the last few digits of the
> >> UID.  Hence all the block(s) content can only relate to this one
> >> endpoint and not more.     You had blocks for different endpoints in one
> >> message.
> >>
> >>     This approach is strongly recommended in xAP now - i.e. as much
> >> addressing information as possible is contained in the header.  Some
> >> early schema were designed differently and the 'context' of the block
> >> was set by a parameter within the block, eg the device= in the X10 one
> >> below.    We found that this approach , whilst often understandable by a
> >> person when they read the schema, was difficult for computers
> >> recognition without recourse to an electronic schema repository.  You
> >> can still design a schema this way should you wish of course, it's just
> >> not so intuitive to interpret.
> >>
> >>     xap-x10.event
> >>     {
> >>     command=on
> >>     device=B3
> >>      }
> >>
> >>    example.event
> >>     {
> >>     light=red
> >>     ident=flashing
> >>     }
> >>
> >>        Not a brilliant example (still suffering from the wine last
> >> night)  but in the latter case it is unclear if the red light is now
> >> flashing or if the flashing light has been turned to a red colour
> >>
> >>    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
> >> support the target= address being wildcarded and then we support
> >> multiple indexed blocks within one message and each contains an ID=
> >> parameter to determine which endpoint is being addressed.  This was
> >> included to allow coincident changes to be made to a device and it also
> >> means that all or none of the changes happen (should a cmd fail to reach
> >> a destination).
> >>
> >>     So back to your point about the block indexing being 'recommended
> >> rather than mandatory' the point is that indexing is a recognised way
> >> for code to interpret the content of blocks as being identical.
> >> Additionally we do not (currently) apply any time based inference to
> >> parameters eg that earlier blocks or parameters within those blocks
> >> should be actioned before later ones.  This allows the message to be
> >> broken apart and stored in a structured way and just queried for
> >> parameter values.  Indexing identical blocks preserves some integrity of
> >> order.
> >>
> >>     Lastly the comment about the schema specification and it's
> >> precedence over the v1.2 protocol specification.   The protocol spec is
> >> defining  the allowable construction of all possible variants of a  xAP
> >> message , however not all variants of a message are going to be useful
> >> or approriate in all schema .  For example many schema , including the
> >> X10 one above,  do not use sub addressing at all.    If the schema uses
> >> sub addressing, as TSC does, then by definition that message content
> >> must only relate to the addressed endpoint from source=  .
> >>
> >>     Schema can just be seen as a higher layer protocol using xAP as a
> >> transport - nothing would actually break in xAP at the protocol layer if
> >> you did add more blocks but it would not be logical or valid at the
> >> schema level.    The same is seen with high level protocols sitting on
> >> top of TCP for example.
> >>
> >>    cheers Kevin
> >>
> >>
> >> Per wrote:
> >>
> >>> Kevin,
> >>>
> >>> Regarding the naming of the message blocks the xAP protocol specification,
1.2-9, states:
> >>>
> >>> Message Body Policy: ...Multiple message blocks may share the same name
if, and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
> >>>
> >>> So, while it is recommended, it is not mandatory.
> >>>
> >>> You say that
> >>>
> >>> "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
> >>>
> >>> All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
> >>>
> >>> Based on your statement, one might make the conclusion that the TSC schema
takes precedence over the protocol specification. That can't be right, can it?
> >>>
> >>> Regards,
> >>>
> >>> Per
> >>>
> >>>
> >>> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@>
wrote:
> >>>
> >>>
> >>>> Hi Per
> >>>>
> >>>>      I think you have two sensors reporting here , channel 0 and 1 ,
> >>>> although both are possibly within the same physical device.  Best for
> >>>> TSC  if each sensor had a unique UID - and then the sub address would
> >>>> perforce also be different for each , and so would the ID e.g ID=ABCD
> >>>> ID=ABCE ... or ABCD01 ABCD02 or whatever
> >>>>
> >>>> You can't include two identically named blocks within one xAP message
> >>>> either so as a rule these would have to be indexed as below
> >>>>
> >>>> info.state.1
> >>>> info.state.2   etc
> >>>>
> >>>> However the BSC and TSC schema do not require (or support) duplicate
> >>>> blocknames so if you create separate sub addresses for these endpoints
> >>>> they would then be sent as separate messages
> >>>>
> >>>> presence.status is not a defined part of the TSC schema either but could
> >>>> be included should you wish  (as you can supplement whatever custom
> >>>> blocks you like) but these might be better presented as an additional
> >>>> xAP schema/message of your own design.
> >>>>
> >>>>  Late night Saturday work eh...  most impressed :-) - my comments are
> >>>> post several wine bottles of wine and a party  so I hope they are valid.
> >>>>
> >>>>     cheers  K
> >>>>
> >>>>  parameterPer wrote:
> >>>>
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd body.
> >>>>>
> >>>>> Based on the following xAP message, what would be the correct ID value
to set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> >>>>>
> >>>>> Maybe I've missunderstood the sub addressing rules?
> >>>>>
> >>>>> xap-header
> >>>>> {
> >>>>> v=13
> >>>>> hop=1
> >>>>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> >>>>> Uid=FF.000001:ABCD
> >>>>> Class=TSC.info
> >>>>> }
> >>>>> info.state
> >>>>> {
> >>>>> Channel=0
> >>>>> ActivityDetected=True
> >>>>> DetectedLevel=True
> >>>>> LatchState=False
> >>>>> DateTime=20091121233600
> >>>>> }
> >>>>> info.state
> >>>>> {
> >>>>> Channel=1
> >>>>> ActivityDetected=True
> >>>>> DetectedLevel=True
> >>>>> LatchState=True
> >>>>> DateTime=20091121233600
> >>>>> }
> >>>>> presence.status
> >>>>> {
> >>>>> connected=True
> >>>>> }
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> ------------------------------------
> >>>>>
> >>>>> Yahoo! Groups Links
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>

#2054 From: "Per" <per.malmberg@...>
Date: Thu Nov 26, 2009 9:43 pm
Subject: Re: TSC.cmd / id
per.malmberg...
Offline Offline
Send Email Send Email
 
I got an idea this evening, on how to handle the 1-Wire-to-xAP conversion
without restricting the support for one single schema for published messages
(much like the xAP-to-database feature). xAP commands will of course still need
to follow the respective schema. A discussion is currently taking place on the
forum here: http://www.msure.se/forum/index.php/topic,618.msg5635.html#msg5635

Feel free to join in.

Cheers,

Per

--- In xAP_developer@yahoogroups.com, "Per" <per.malmberg@...> wrote:
>
> Hm, the posting-page only gave a 'moderator-warning' for new threads, nothing
was indicated for replies. Ah well, I guess that's sorted now :)
>
> The two-way I/O pin is a standard open drain I/O with added internal sensor
used in most ICs. See Figure 11 in
http://datasheets.maxim-ic.com/en/ds/DS2406.pdf
>
> You're right of course regarding the BSC block; shamefull I didn't get that
right.
>
> // Per
>
> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@> wrote:
> >
> > Hi Per,
> >
> >     The first few posts by new members of the group are moderated on
> > Yahoo groups - and I was out tonight - I guess the other moderators were
> > too.   I think it's the first five posts but regardless I have manually
> > changed you to non moderated now so your posts should appear fairly
> > quickly in the future.
> >
> >     It's very late tonight now so I'll look over the TSC messages  in
> > the morning .
> >
> >     Just quickly I did look at the BSC message and  the block must be
> > named input.state.  Within that block it is mandatory to have a state=
> > parameter and then none or either (but not both) of level= or text= .
> > Lastly you can include an optional DisplayText= parameter.    Extra
> > parameters will not break anything in xAP but also will not be
> > recognised by most devices or software.
> >
> >     If you have a device that has input and output on the same pin then
> > it will have to be an output device as otherwise you can't control
> > it.    Not quite sure how such a pin works but if it is either/or then
> > you could report according to it's mode - or alternatively break it into
> > two endpoints (even though it is actually only one phsical pin) .
> >
> >     Cheers Kevin
> >
> > Per wrote:
> > > I'm not sure what happened to my reply I sent 10min ago, so sorry if this
is a double post.
> > >
> > > I had some minutes left yesterday so I changed the output, it now looks as
follows:
> > >
> > > --Temperature device
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.bathroom
> > > Uid=FF.000001:0004
> > > Class=TSC.info
> > > }
> > > info.temperature
> > > {
> > > value=19,875
> > > datetime=20091125191200
> > > unit=c
> > > name=bathroom
> > > }
> > >
> > > --Switch device. Two of two messages shown. Currently using the BSC
schema, but although that one supports on/off devices there are some added
pairs. These devices also support both in- and output on the same pin...any
suggestions on best practice here?
> > >
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.D100000003AE661F.0
> > > Uid=FF.000001:0027
> > > Class=xAPBSC.info
> > > }
> > > info.state
> > > {
> > > ActivityDetected=1
> > > DetectedLevel=On
> > > LatchState=Off
> > > DateTime=20091125191000
> > > }
> > >
> > > --Counter device, two of four messages shown.
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.0
> > > Uid=FF.000001:002C
> > > Class=TSC.event
> > > }
> > > event.Count
> > > {
> > > Value=0
> > > DateTime=20091125192700
> > > }
> > >
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.counterboilerroom.1
> > > Uid=FF.000001:002D
> > > Class=TSC.event
> > > }
> > > event.Count
> > > {
> > > Value=1
> > > DateTime=20091125192800
> > > }
> > >
> > > -- A/D converter. Two of three messages shown.
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.0
> > > Uid=FF.000001:0029
> > > Class=TSC.event
> > > }
> > > event.voltage
> > > {
> > > Value=4,73
> > > DateTime=20091125193500
> > > }
> > >
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic.1
> > > Uid=FF.000001:002A
> > > Class=TSC.event
> > > }
> > > event.voltage
> > > {
> > > Value=3,11
> > > DateTime=20091125193500
> > > }
> > >
> > > Lasty, the A/D converter also has a temperature sensor, which is currently
not reported as a subnode as the voltages:
> > >
> > > xap-header
> > > {
> > > v=13
> > > hop=1
> > > Source=MSure.xAPGateway.Bigboy:1-Wire.humidityattic
> > > Uid=FF.000001:000F
> > > Class=TSC.event
> > > }
> > > event.temperature
> > > {
> > > value=8,78125
> > > datetime=20091125193900
> > > unit=c
> > > name=humidityattic
> > > }
> > >
> > > The reason is that the device interfaces (temperature, A/D) are read
separatly and thus translated separate from eachother. I'm not sure how to best
handle this, but had thoughts to add anotehr layer to all nodes;
<name>.temperature; <name>.analog etc. Any comments on this?
> > >
> > > Cheers,
> > >
> > > Per
> > >
> > > --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@>
wrote:
> > >
> > >> Hi Per,
> > >>
> > >>     Using the BSC or TSC schema the issue with including several blocks
> > >> within one message  is that the identifier for the endpoint that is
> > >> being reported is contained in the header,  as both a named sub address
> > >> (the portion of the address after the : ) and the last few digits of the
> > >> UID.  Hence all the block(s) content can only relate to this one
> > >> endpoint and not more.     You had blocks for different endpoints in one
> > >> message.
> > >>
> > >>     This approach is strongly recommended in xAP now - i.e. as much
> > >> addressing information as possible is contained in the header.  Some
> > >> early schema were designed differently and the 'context' of the block
> > >> was set by a parameter within the block, eg the device= in the X10 one
> > >> below.    We found that this approach , whilst often understandable by a
> > >> person when they read the schema, was difficult for computers
> > >> recognition without recourse to an electronic schema repository.  You
> > >> can still design a schema this way should you wish of course, it's just
> > >> not so intuitive to interpret.
> > >>
> > >>     xap-x10.event
> > >>     {
> > >>     command=on
> > >>     device=B3
> > >>      }
> > >>
> > >>    example.event
> > >>     {
> > >>     light=red
> > >>     ident=flashing
> > >>     }
> > >>
> > >>        Not a brilliant example (still suffering from the wine last
> > >> night)  but in the latter case it is unclear if the red light is now
> > >> flashing or if the flashing light has been turned to a red colour
> > >>
> > >>    You will see that when we send xAPBSC.cmd  or TSC.cmd messages we
> > >> support the target= address being wildcarded and then we support
> > >> multiple indexed blocks within one message and each contains an ID=
> > >> parameter to determine which endpoint is being addressed.  This was
> > >> included to allow coincident changes to be made to a device and it also
> > >> means that all or none of the changes happen (should a cmd fail to reach
> > >> a destination).
> > >>
> > >>     So back to your point about the block indexing being 'recommended
> > >> rather than mandatory' the point is that indexing is a recognised way
> > >> for code to interpret the content of blocks as being identical.
> > >> Additionally we do not (currently) apply any time based inference to
> > >> parameters eg that earlier blocks or parameters within those blocks
> > >> should be actioned before later ones.  This allows the message to be
> > >> broken apart and stored in a structured way and just queried for
> > >> parameter values.  Indexing identical blocks preserves some integrity of
> > >> order.
> > >>
> > >>     Lastly the comment about the schema specification and it's
> > >> precedence over the v1.2 protocol specification.   The protocol spec is
> > >> defining  the allowable construction of all possible variants of a  xAP
> > >> message , however not all variants of a message are going to be useful
> > >> or approriate in all schema .  For example many schema , including the
> > >> X10 one above,  do not use sub addressing at all.    If the schema uses
> > >> sub addressing, as TSC does, then by definition that message content
> > >> must only relate to the addressed endpoint from source=  .
> > >>
> > >>     Schema can just be seen as a higher layer protocol using xAP as a
> > >> transport - nothing would actually break in xAP at the protocol layer if
> > >> you did add more blocks but it would not be logical or valid at the
> > >> schema level.    The same is seen with high level protocols sitting on
> > >> top of TCP for example.
> > >>
> > >>    cheers Kevin
> > >>
> > >>
> > >> Per wrote:
> > >>
> > >>> Kevin,
> > >>>
> > >>> Regarding the naming of the message blocks the xAP protocol
specification, 1.2-9, states:
> > >>>
> > >>> Message Body Policy: ...Multiple message blocks may share the same name
if, and only if, they use the same schema. In array type situations, it is
recommended that message blocks are labelled with an index...
> > >>>
> > >>> So, while it is recommended, it is not mandatory.
> > >>>
> > >>> You say that
> > >>>
> > >>> "However the BSC and TSC schema do not require (or support) duplicate
blocknames"
> > >>>
> > >>> All this makes me wonder about the relationship between the xAP protocol
specification and the different schemas. Correct me if I'm wrong, but isn't the
protocol spec. what defines how a xAP message is built and parsed, and the
schema defines which elements/block names that are to be used?
> > >>>
> > >>> Based on your statement, one might make the conclusion that the TSC
schema takes precedence over the protocol specification. That can't be right,
can it?
> > >>>
> > >>> Regards,
> > >>>
> > >>> Per
> > >>>
> > >>>
> > >>> --- In xAP_developer@yahoogroups.com, Kevin Hawkins <yahoogroupskh@>
wrote:
> > >>>
> > >>>
> > >>>> Hi Per
> > >>>>
> > >>>>      I think you have two sensors reporting here , channel 0 and 1 ,
> > >>>> although both are possibly within the same physical device.  Best for
> > >>>> TSC  if each sensor had a unique UID - and then the sub address would
> > >>>> perforce also be different for each , and so would the ID e.g ID=ABCD
> > >>>> ID=ABCE ... or ABCD01 ABCD02 or whatever
> > >>>>
> > >>>> You can't include two identically named blocks within one xAP message
> > >>>> either so as a rule these would have to be indexed as below
> > >>>>
> > >>>> info.state.1
> > >>>> info.state.2   etc
> > >>>>
> > >>>> However the BSC and TSC schema do not require (or support) duplicate
> > >>>> blocknames so if you create separate sub addresses for these endpoints
> > >>>> they would then be sent as separate messages
> > >>>>
> > >>>> presence.status is not a defined part of the TSC schema either but
could
> > >>>> be included should you wish  (as you can supplement whatever custom
> > >>>> blocks you like) but these might be better presented as an additional
> > >>>> xAP schema/message of your own design.
> > >>>>
> > >>>>  Late night Saturday work eh...  most impressed :-) - my comments are
> > >>>> post several wine bottles of wine and a party  so I hope they are
valid.
> > >>>>
> > >>>>     cheers  K
> > >>>>
> > >>>>  parameterPer wrote:
> > >>>>
> > >>>>
> > >>>>> Hello,
> > >>>>>
> > >>>>> I'm a bit confused regarding the mandatory ID pair in the TSC.cmd
body.
> > >>>>>
> > >>>>> Based on the following xAP message, what would be the correct ID value
to set the latch on channel 1 to False be? I'd say ABCD, but that'd be four
characters and the spec limits it to two.
> > >>>>>
> > >>>>> Maybe I've missunderstood the sub addressing rules?
> > >>>>>
> > >>>>> xap-header
> > >>>>> {
> > >>>>> v=13
> > >>>>> hop=1
> > >>>>> Source=MSure.xAPGateway.Bigboy:D100000003AE661F
> > >>>>> Uid=FF.000001:ABCD
> > >>>>> Class=TSC.info
> > >>>>> }
> > >>>>> info.state
> > >>>>> {
> > >>>>> Channel=0
> > >>>>> ActivityDetected=True
> > >>>>> DetectedLevel=True
> > >>>>> LatchState=False
> > >>>>> DateTime=20091121233600
> > >>>>> }
> > >>>>> info.state
> > >>>>> {
> > >>>>> Channel=1
> > >>>>> ActivityDetected=True
> > >>>>> DetectedLevel=True
> > >>>>> LatchState=True
> > >>>>> DateTime=20091121233600
> > >>>>> }
> > >>>>> presence.status
> > >>>>> {
> > >>>>> connected=True
> > >>>>> }
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> ------------------------------------
> > >>>>>
> > >>>>> Yahoo! Groups Links
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>
> > >>>
> > >>> ------------------------------------
> > >>>
> > >>> Yahoo! Groups Links
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> >
>

Messages 2024 - 2054 of 2054   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help