Page 1 of 1

OneWireClient

Posted: Thu Oct 03, 2013 6:06 am
by krambriw
Latest version always here:
http://sto.hopto.org/Release/OneWireClient/

Maybe you have heard or read about OneWire?
http://owfs.org/

OneWire is a very useful alternative or complement to wireless solutions, especially for measurements and small control systems in a family house. I have used this myself for a while and it has worked out very well so I am now feeling confident that the plugin I have created and named 'OneWireClient' is working reliable.

For the OneWire network, there are so many different type of modules available to fulfill many needs.

What you need to make this happen:

HW:
- OneWire wired modules of your own need (like temperature and humidity sensors, I/O modules etc)
- An OneWire controller like the USB variant DS9490R
- A wired network (4 wire twisted pair)
Image1.png
Image1.png (12.05 KiB) Viewed 3414 times
SW:
- owserver running and connected to the adapter above http://owfs.org/index.php?page=owserver_protocol
- the OneWireClient plugin configured and connected to the owserver
- some OneWireClient actions configured according to you needs

I personally run the owserver in a Raspberry Pi but you can run it in other environments as well like Windows, MacOSX, Linux, FreeBSD, check out the descriptions on the owfs.org site.

In the next I will describe how to configure the plugin and it's actions

Re: OneWireClient

Posted: Thu Oct 03, 2013 6:26 am
by krambriw
This is the configuration settings for the plugin. It is rather self instructive, you have to insert ip and port number to the owserver. In addition, you can select if the OneWireClient shall poll in the configured actions selected read attributes.
Image3.png
Image3.png (6.81 KiB) Viewed 3413 times
This is the configuration of a read attribute action. If you are correctly connected to the OneWire network, the drop downs will be filled with details of your sensors and you can just pick and select.
- first you have to select the proper path to the sensor
- secondly you pick and select the attribute of interest
- check the box if you like to have this attribute included in the polling handled by the plugin
- give the action a descriptive name and save
Image5.png
Image5.png (7.94 KiB) Viewed 3413 times
The configuration of a write attribute action. As for the above, if you are connected, the drop downs will be populated with details.
- select the proper path to the sensor
- pick and select the attribute of interest
- type in the value you would like to write to the attribute
- finally, give the action a descriptive name and save
Image7.png
Image7.png (7.05 KiB) Viewed 3413 times
Continued...

Re: OneWireClient

Posted: Thu Oct 03, 2013 6:31 am
by krambriw
In addition there is one more action, the 'ClearSensorStatus' action. This is only to reset the current statuses of polled sensor attributes in the plugin.

If you are interested in reading and writing sensor attributes from a python script, this is very easy as the examples below shows you

Reading an attribute python sample:

Code: Select all

print eg.plugins.OneWireClient.ReadAttribute(u'Give me a name', u'/20.09F40C000000', u'PIO.A', False, 10.0, 0)
Writing an attribute python sample:

Code: Select all

print eg.plugins.OneWireClient.WriteAttribute(u'Give me a name', u'/20.09F40C000000', u'PIO.A', u'0')
I hope you enjoy and have use for this, I do my myself for sure

Best regards, Walter

Re: OneWireClient

Posted: Sat Oct 05, 2013 4:14 am
by kkl
krambriw wrote:
Thanks so much for writing and sharing this. I've been wanting to try out 1-wire technology. Perhaps this will give me the incentive I need to get started.

Re: OneWireClient

Posted: Sat Oct 05, 2013 9:41 am
by Pako
It looks very nice.
It is a pity that I have no use for it.
I did some time ago (for home use) constructed a thermostat with OneWire sensor Dallas DS18B20.
Note: It has very few visits because I've never publish a link to it.

If all of this (especially Raspbbery Pi) existed back then, I'd probably conceived differently.
But now it is no longer worthwhile to redo it.

Pako

Re: OneWireClient

Posted: Sat Oct 05, 2013 10:31 am
by krambriw
Very nice what you have done!

You are right, most would go for wireless nowadays but wired has some advantages also (more type of available sensors, cheaper).

For wireless I think Z-Wave is best option but it is still too expensive, I hope prices will drop in future

Best regards and thank you, Walter