Hi Paul and Sven,

Did you guys ever get this to work?

I am running version 2.8p15 on a Raspberry Pi that was installed via apt-get 
and I’m try ing to figure out how to interface an external non-1-wire device 
into owfs.

Googling around I found references to this "External Sensors” capability 
described here:

        http://owfs.org/index.php?page=external-sensor-design 
<http://owfs.org/index.php?page=external-sensor-design>

And I found this email thread and the two attached files:
        owexternal.sh
        owexternal-test.conf

After rereading the various sources of information several times, I think I 
understand what is intended to happen here, but before I dive deeper into this 
I’d like to ask if you were able to get your examples to work in a stable 
fashion?

All I want to do is create an interface to a device (PID Temperature 
Controller) that provides 2 values:

1) ProcessVariable (PV) which is a read-only temperature value

2) SetPointVariable (SV) which is a read/write temperature value     

This looks to be quite within the capability of this "External Sensor" function 
and I’ve got a python script that can currently read the PV, so I’m kinda 
hoping that this might be a viable way to achieve my goal.

Comments

Alex Shepherd

> On 29/11/2014, at 11:18 am, Sven Giermann <sven.gierm...@gmail.com> wrote:
> 
> 
> ---------- Forwarded message ----------
> 
> And the show goes on...
> 
> I found the reason for familiy/type properties not being able to be read. Not 
> for the crashes, but making after applying the attached patch to 
> 'ow_read_external.c', it no longer crashed for me.
> 
> I found another mistake in the sources: the write script is never being used, 
> instead the read script is being called - find the patch in 
> 'ow_write_external.c'.
> 
> Further observations: the last property parameter (called "other") seems 
> never to be used. For everyone to test in real life, I created an example 
> config (just append to your owfs.conf) and a bash script to deliver some 
> memory and disk statistics.
> It is working for me with debian version "2.8p15", because of the trainling 
> comma in the configuration. Writing is not implemented yet.
> 
> BUT be careful - owserver often crashes without any (obvious) reason. It 
> worked stable before adding the external script, so I will probably remove it 
> again.
> 
> 
> So what's next?
> How could I debug those memory access errors that lead to the crash?
> I tried DDD without success so far :(
> 
> Sven
> 
> 
> 2014-11-28 20:02 GMT+01:00 Sven Giermann <sven.gierm...@gmail.com 
> <mailto:sven.gierm...@gmail.com>>:
> Hi Paul,
> 
> thanks for these hints. I have to add, that is is sufficient to have a line 
> 'external' in the configuration file, which removes the need for an 
> additional argument (easier with preconfigured start scripts).
> 
> I figured out some errors in handling external sensors:
> 
> 1. parsing the parameters does not trim new-line and tab characters, 
> resulting in the last parameter ending with a new-line and probably a quote, 
> when quoted (the starting quote is being removed) - find my patch attached.
> WORKAROUND for existing binary installations: just add another comma at the 
> end of your sensor and script definitions.
> 
> 2. owserver crashes when configuring an external sensor with a well-formed 
> 1-Wire ID (i.e. "17.FEEDDEADBEAF") while the same ID with non-hex characters 
> is working ("17.FILLDEADBEEF"). Seems as if the external sensors are only 
> handled by aliasing?
> WORKAROUND: Do not use valid IDs for external sensors!
> 
> 3. owserver crashes when reading the type/family properties of external 
> sensors.
> WORKAROUND: Do not read these, do not open path to external sensors with 
> owhttpd.
> But apart from that, I have multiple crashes for unknown reasons. I always 
> get an "memory access error" :-(
> 
> 
> I will continue testing on another system, since owfs (without external 
> sensors) is running stable for some days there.
> Until then I don't have a clue where to look for those crashes on reading 
> family and type properties on external sensors...
> 
> Sven
> 
> 2014-11-27 12:45 GMT+01:00 Paul Alfille <paul.alfi...@gmail.com 
> <mailto:paul.alfi...@gmail.com>>:
> Svan,
> 
> I'm busy with guests today, but a quick perusal of the code suggests:
> 
> 1. add --external to the command line arguments of owserver
> 2. Add the SENSOR: and PROPERTY lines to the configuration file
> 
> See if it works at all.
> 
> Paul
> 
> On Thu, Nov 27, 2014 at 5:21 AM, Sven Giermann <sven.gierm...@gmail.com 
> <mailto:sven.gierm...@gmail.com>> wrote:
> Paul, thanks for the quick reply!
> 
> 
> 2014-11-27 1:08 GMT+01:00 Paul Alfille <paul.alfi...@gmail.com 
> <mailto:paul.alfi...@gmail.com>>:
> owexternal is actually already built into owserver. It isn't well tested 
> since I had no actual use case, so your help will be very appreciated.
> 
> This is the documentation:
> http://owfs.org/index.php?page=external-sensor-design 
> <http://owfs.org/index.php?page=external-sensor-design>
> 
> I read this, but it's exactly what I don't understand... I don't have any 
> 'owexternal' binary, maybe I have to compile it from source with 
> "--enable-owexternal"?
> But even after this - where do I put those configuration options mentioned in 
> the "example syntax"?
> Are those 2 separate text files, one for sensors, one for families?
> Or do I simply include those lines in owfs.conf, maybe without the need of an 
> additional owexternal binary?
> 
> And what is the fourth sensor field (/dev/ttyUSB0), the actual parameter to 
> the read/write scripts?
> 
> To give a general use case, I could simply write a bash script to display the 
> current memory usage, disk free space and so on.
> If one has a LED or beeper in its system, there would also be a use case for 
> write operations...
> 
> 
> 
> 
> On Wed, Nov 26, 2014 at 3:25 PM, Sven Giermann <sven.gierm...@gmail.com 
> <mailto:sven.gierm...@gmail.com>> wrote:
> Hi,
> 
> I just thought about writing my own "owserver" to support a simple relay card 
> with a serial connection. I already have a binary to read and set relay 
> states but need a way to access it from other software.
> Now the idea was to clone owserver by providing the same interface to allow 
> use of every owfs capable client. While starting to read the code I stunbled 
> across "owexternal" and found some threads in this list.
> 
> But nothing I could really understand to try it on my own.
> So I wanted to ask: what is the current development status of "owexternal"?
> 
> Even if it's still unstable/untested I would be interested in contributing to 
> it - but I need a starting point. What needs to be configured and where?
> What does the (Perl?) script need to support?
> 
> Any ideas where to start?
> 
> Thx, Sven.
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk 
> <http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net 
> <mailto:Owfs-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
> <https://lists.sourceforge.net/lists/listinfo/owfs-developers>
> 
> 
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk 
> <http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net 
> <mailto:Owfs-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
> <https://lists.sourceforge.net/lists/listinfo/owfs-developers>
> 
> 
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk 
> <http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net 
> <mailto:Owfs-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
> <https://lists.sourceforge.net/lists/listinfo/owfs-developers>
> 
> 
> 
> 
> 
> <ow_parse_external.diff><ow_read_external.diff><ow_write_external.diff><owexternal-test.conf><owexternal.sh>------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

Regards

Alex Shepherd

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to