On 06.01.2016 16:18, Ursin Soler wrote: > What I personally would love to see/have/get is a 1wire slave code template > that would allow me (or others) to create their own 1wire slave(s). Of course first we would need to define a general set of commands that allows to transmitt and receive any kind of values between the slave and owfs.
That's exactly what MoaT does. Well, except for the "general" part. :-P I could of course add some pre-defined "add your code here" channel which you'd only have to hook into. However, IMHO it's much more useful to add the feature to MoaT as something distinct. Thus if you add, say, an ultrasonic distance measurement device or two to your slave, MoaT would export distance.1 … distance.N, which means that the server-side code does not need to care about the implementation details on the slave side of things. An additional advantage of this approach is alarm handling. You do not want to poll your devices, that's much too slow. Instead, you want to get notified (via Conditional Search) when something interesting happens. Thus the distance thing will alert your master as soon as something is e.g. 5m away, after which your app will say, OK, good to know, now tell me again when it's either gone away or moved to at most 4.5m. -- -- Matthias Urlichs ------------------------------------------------------------------------------ _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers