سؤال

I have a 1-Wire USB adapter (that bluish one) and wanted to use it from a small Linux box to monitor temperatures. The Linux box is out of order right now, so in the meantime I wanted to use my .NET-based monitoring software on my Windows desktop to log the temperatures. But there doesn't seem to exist a single usable .NET library for .NET out there. The one that ships with the Maxim SDK requires J# which I do not have and want to use. I'm not even sure if I can use it with my .NET 4.0-based application since J# is discontinued AFAIK. The other "open-source effort" on SourceForge (owdotnet) is dated 2008 and looks pretty dead. There's not even any information page about it. The Maxim SDK also comes with a "Compact .NET" version which can at least find a device attached to the adapter, but I'd need to implement the whole 1-Wire protocol myself it seems (sending raw bytes, waiting a short while, and that sort of stuff). So that doesn't help much right now. Google didn't find anything else. Do you?

I have the impression that the whole 1-Wire thing is pretty dead. It can only be used on Linux systems (with owfs, which is like huge to compile), and the whole products ecosystem isn't exactly active. What other solutions are there to measure temperatures, environmental parameters (humidity, water, pressure, and the like) and states (like open doors) and maybe even do switch things (turn lights on and off) that don't cost a fortune (as with "home automation")? And are preferably also accessible from .NET code?

هل كانت مفيدة؟

المحلول

Alright, for the sake of answering questions, this question has been here long enough.

I have come to the conclusion that there is no such library available.

Just add your answer if you find something, please, so I can update things here.

نصائح أخرى

You don't need OWFS, although I can see why it would make life easier. I tried it in the past but it didn't do what I wanted it to as I had some devices which were unsupported.

I currently use OWW which I am running on a Raspberry Pi at the moment and it works very well indeed. However, it is linux based only.

I am sorry but I cannot help with your .net query as I have never used it. It does seem that there is nothing else .net based that I can find apart from the Maxim one.

I am not sure to know enough of your probleme to give you a proper answer (but it's a start, and it's possible that we will be able to improve it together.)

I understand that you have something in J# which does the work.

A J# application compiles into a normal .NET assembly. Do you have the J# code (in this case you could compile it into a Library using the old J# compiler, then reference this Library in your .NET app to use it from any .NET language) or do you have already ab assembly, in which case feel free to use it with any language.

Otherwise, you could find a native Library, then create a .NET wrapper around it using C++/CLI. This option works really well from my experience. The main gotcha is the 32/64 bit compatibility: Your .NET app will need to be restricted to the native dll format (64 bit or 32 bit)

I'd run in the same trouble with my last project on work.

I've used OW.NET and provided a svn patch file some weeks ago in the sourceforge project for the Container41 class. With my patch, mostly all functionallity for this device family should be supported.

But yes, there is no complete library. And the J# library from Maxim is a bad joke.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top