Re: Arduino yun as wifi 1wire master

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

Dr. Trigon
Hello all!

Thanks for the numerous replies and suggestions to this topic! To make a long story short; I decided to not insist in a free/open solution for now and ordered a ethernet2wifi converter as I have an unused ethernet master around. For later I consider using a Raspi Zero W + level-shifting transistor + pull-up as this is an intressting option. Or may be an commercial master (USB, I2C, etc.) on the raspi.

For power, a solar panel was the solution I considered and still do. DC/DC converters are amazingly efficient nowadays... ;)

Drilling any hole - also in the proximity of the roof is not an option, as I currently live in an apartment block. Otherwise this can be a very nice solution. Actually I would prefer it, but then go outside with ethernet for a 1wire master as the 1wire could become verrry long otherwise (even though it might work).

owserver-deamon that would be needed to run on the Raspi Zero W e.g., means running 'owserver' binary, right?

The reason why I wanted to avoid running another instance of owserver in the first place, was power consumption and the fact that importing owfs instances from other machines might be a bit problematic (or connecting to other instances using the -s option). I read a few comments about this, don't know. Regarding power, I assumed the processors consumption (avr vs. arm, yun vs. raspi) and the number of processes running does matter, but if wifi dominates that might be wrong here. (And thus even an uno with wifi shield consumes the same.)

Thanks for all your comments and greetings


Am 23. Juli 2017 14:06:39 MESZ schrieb owfs-developers-request <[hidden email]>:

Send Owfs-developers mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/owfs-developers
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Owfs-developers digest..."


Today's Topics:

1. Re: Arduino yun as wifi 1wire master (Jan Kandziora)
2. Re: Arduino yun as wifi 1wire master (Stefano Miccoli)





Message: 1
Date: Sat, 22 Jul 2017 15:12:21 +0200
From: Jan Kandziora <[hidden email]>
To: [hidden email]
Subject: Re: [Owfs-developers] Arduino yun as wifi 1wire master
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

Am 22.07.2017 um 12:24 schrieb Dr. Trigon:

Raspi Zero is fine too, but someone needs
to tell me how to set the software up, how to build the stuff
together.

1. You buy a Raspberry Pi Zero W.
2. You put an Raspian image (minimal will do) from the Raspberry Pi
website onto an >2GB micro SD card and put it into the Pi.
3. You switch on the thing, connect a HDMI screen and keyboard to it,
then login into this little Linux box in front of you.
4. You configure Wifi and Internet connection to get the thing connected
to your indoors equipment and load software form the internet.
5. You apt-get the owserver package and edit the raspi's
/boot/config.txt to include the w1-gpio overlay on GPIO4. Reboot.
6. You now have a 3.3V onewire on GPIO4, available through Wifi, TCP
port 4304. This is what owserver does.
7. Your indoor devices can connect to that owserver on the Raspberry via
-s <raspi-ip>:4304 command line option.
8. Congrats. You are done.


I don't want to run another instance of owfs on those
devices as they should act as master and not owfs servers.

I don't know what weird idea you have about how owserver works but it's
designed explicitely for the thing you want to do. I use it that way in
my setups.

It is "bullshit" (to use your words) to avoid owserver just because you
? yeah, what ? don't know it better?


Basically
I could write a sketch for Arduino that emulates linkhube master and
then should be able to connect this to owserver but that would be
quite some effort given FHEM has already a solution for this... The
power btw. is no concern, if needed I can use a car battery... ;))

This means reinventing the wheel. Have fun.

Kind regards

Jan






Message: 2
Date: Sun, 23 Jul 2017 02:01:35 +0200
From: Stefano Miccoli <[hidden email]>
To: "OWFS (One-wire file system) discussion and help"
<[hidden email]>
Subject: Re: [Owfs-developers] Arduino yun as wifi 1wire master
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"


On 22 Jul 2017, at 12:24, Dr. Trigon <[hidden email]> wrote:

I don't want to run another instance of owfs on those devices as they should act as master and not owfs servers.


What you need is an IP protocol that allows you to access a remote 1-wire network: owserver (the protocol) was designed exactly to address this problem, see http://owfs.org/index.php?page=owserver-protocol

Documentation and terminology are ? a little hard to understand, so let my try to explain it here.

First one should understand that ?owserver? has many meanings:

- owserver-protocol: the TCP messaging protocol used by OWFS components to communicate over IP
- owserver-server: an agent that plays the server role in an owserver-protocol message exchange
- owserver-client: an agent that plays the client side in the owserver-protocol
- owserver-daemon: the program, which is the main OWFS owserver-server, but that can act also as an owserver-client.

The OWFS way to solve your problem is that on each remote 1-wire network you should have an owserver-daemon running (Please note: only the owserver-daemon, not the full stack of owhttp, owftp, owfs, etc.) Each owserver-daemon controls one or more 1-wire masters, and acts as an owserver-server, over a common IP network, say a WiFi LAN. Owserver-clients can query over IP the various owserver-daemons (acting as owserver-servers) about the remote 1-wire networks they are controlling.

To make things a little bit more complicated, you should know that an owserver-daemon can be configured to be an owserver-client of a remote owserver-server: this means that the owserver-daemon is now able to present the remote 1-wire devices as local ones? Please see http://owfs.org/index.php?page=loop-suppression for different owserver-server network topologies examples and the built-in loop suppression mechanism.

This is what OWFS has to offer: if you keep it simple (owserver-daemons acting only as owserver-servers) it is quite simple to configure and manage. Of course owserver-clients should know which owserver-server query. However if you prefer, you can merge all remote 1-wire networks into a single ?virtual? 1-wire network, by using the owserver-daemon client capabilities, so that your to your clients all 1-wire devices are presented as if they were on a single 1-wire network.

Of course you can invent your own 1-wire-over-IP protocol and implement it in the micro-controller of your choice, or even emulate the LINK protocol. But it is much, much more complicated that having multiple owserver-daemons running on your network.

Hope my explanation was at least understandable.

Bye

Stefano

---

BTW the Y?n is a 65? device in which you have two parallel environments talking to each other: Arduino and Linux (Linino OS, based on OpenWRT). Linux specs are really minimal: 64MB DDR2 RAM, 400MHz clock speed.

On the contrary the Pi Zero W is a 10? device, which runs a full-fledged Linux (or windows 10, if you prefer) with 1GB Ram, running at 1GHz.

Spending 55? just for having an Arduino bit-banging the 1-wire protocol makes no sense to me.

-------------- next part --------------
An HTML attachment was scrubbed...






Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




Subject: Digest Footer



Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers





End of Owfs-developers Digest, Vol 133, Issue 9
***********************************************

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

Jan Kandziora
Am 01.08.2017 um 20:09 schrieb Dr. Trigon:
>
> owserver-deamon that would be needed to run on the Raspi Zero W e.g.,
> means running 'owserver' binary, right?
>
Yes,sure.


> The reason why I wanted to avoid running another instance of owserver
> in the first place, was power consumption
>
Wifi is going to eat your battery. The CPU does mostly nothing and will
eat <1/10 of Wifi.

Also, if you want to save energy, you should use one of the "commercial"
Onewire host adapters, e.g. the DS2483. Bitbanging wakes up the CPU on
every bit sent and this will eat a lot of energy. (But still *nothing*
compared to Wifi.)


> and the fact that importing
> owfs instances from other machines might be a bit problematic (or
> connecting to other instances using the -s option). I read a few
> comments about this, don't know.
>
These most likely came from people who have problems setting their stuff
up correctly and mixing up things.


> Regarding power, I assumed the
> processors consumption (avr vs. arm, yun vs. raspi) and the number of
> processes running does matter, but if wifi dominates that might be
> wrong here. (And thus even an uno with wifi shield consumes the
> same.)
>
With only one core, there is only one process running. All the other
processes are waiting in the scheduler queue. What effects energy
consumption of the CPU in a non-number-crunching application is the
number of interrupts to service. That is because each interrupt means
waking up the CPU from sleep. All other effects are neglible.

You don't have to count processes, you have to count interrupts. Wifi
produces a lot. Timer produces an awful lot when the CPU has to bitbang
things.

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

Jan Kandziora
In reply to this post by Dr. Trigon
Am 01.08.2017 um 20:09 schrieb Dr. Trigon:
>
> Regarding power, I assumed the
> processors consumption (avr vs. arm, yun vs. raspi)
>
The Arduino Yun has an ARM processor, too. It's called "Wifi shield",
but it's the main processor of that board. The AVR is on-board to be
able to call it "Arduino", it seems.

Kind regards

        Jan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

CReese
In reply to this post by Dr. Trigon
I reiterate that I think this is shoving a round peg into a square hole. You requirements scream to me that you should be using an RF node that beams your data into a gateway Pi behind closed doors and attached to the wall. Low power + existing libraries for 1Wire. This RF unit (I use Moteinos) would cost you about $20. The gateway unit would also cost you about $20. I send things around encrypted, data format json strings, and it's very easy to manage. If you want to shove this into 1Wire, do it on the gateway node as data is received.

You can even very cheaply get power management boards (called Mightyboost, ~$20, attaches directly to Moteino) that will allow you to charge batteries attached to your RF unit, although with their ridiculously low power consumption, I don't even think this would be an issue. They'll run on a single battery for a long long time.

I have code for all of this including the Pi serial handler if you are interested.

Colin

On Tue, Aug 1, 2017 at 11:09 AM, Dr. Trigon <[hidden email]> wrote:
Hello all!

Thanks for the numerous replies and suggestions to this topic! To make a long story short; I decided to not insist in a free/open solution for now and ordered a ethernet2wifi converter as I have an unused ethernet master around. For later I consider using a Raspi Zero W + level-shifting transistor + pull-up as this is an intressting option. Or may be an commercial master (USB, I2C, etc.) on the raspi.

For power, a solar panel was the solution I considered and still do. DC/DC converters are amazingly efficient nowadays... ;)

Drilling any hole - also in the proximity of the roof is not an option, as I currently live in an apartment block. Otherwise this can be a very nice solution. Actually I would prefer it, but then go outside with ethernet for a 1wire master as the 1wire could become verrry long otherwise (even though it might work).

owserver-deamon that would be needed to run on the Raspi Zero W e.g., means running 'owserver' binary, right?

The reason why I wanted to avoid running another instance of owserver in the first place, was power consumption and the fact that importing owfs instances from other machines might be a bit problematic (or connecting to other instances using the -s option). I read a few comments about this, don't know. Regarding power, I assumed the processors consumption (avr vs. arm, yun vs. raspi) and the number of processes running does matter, but if wifi dominates that might be wrong here. (And thus even an uno with wifi shield consumes the same.)

Thanks for all your comments and greetings


Am 23. Juli 2017 14:06:39 MESZ schrieb owfs-developers-request <[hidden email]>:

Send Owfs-developers mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/owfs-developers
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Owfs-developers digest..."


Today's Topics:

1. Re: Arduino yun as wifi 1wire master (Jan Kandziora)
2. Re: Arduino yun as wifi 1wire master (Stefano Miccoli)





Message: 1
Date: Sat, 22 Jul 2017 15:12:21 +0200
From: Jan Kandziora <[hidden email]>
To: [hidden email]
Subject: Re: [Owfs-developers] Arduino yun as wifi 1wire master
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

Am 22.07.2017 um 12:24 schrieb Dr. Trigon:

Raspi Zero is fine too, but someone needs
to tell me how to set the software up, how to build the stuff
together.

1. You buy a Raspberry Pi Zero W.
2. You put an Raspian image (minimal will do) from the Raspberry Pi
website onto an >2GB micro SD card and put it into the Pi.
3. You switch on the thing, connect a HDMI screen and keyboard to it,
then login into this little Linux box in front of you.
4. You configure Wifi and Internet connection to get the thing connected
to your indoors equipment and load software form the internet.
5. You apt-get the owserver package and edit the raspi's
/boot/config.txt to include the w1-gpio overlay on GPIO4. Reboot.
6. You now have a 3.3V onewire on GPIO4, available through Wifi, TCP
port 4304. This is what owserver does.
7. Your indoor devices can connect to that owserver on the Raspberry via
-s <raspi-ip>:4304 command line option.
8. Congrats. You are done.


I don't want to run another instance of owfs on those
devices as they should act as master and not owfs servers.

I don't know what weird idea you have about how owserver works but it's
designed explicitely for the thing you want to do. I use it that way in
my setups.

It is "bullshit" (to use your words) to avoid owserver just because you
? yeah, what ? don't know it better?


Basically
I could write a sketch for Arduino that emulates linkhube master and
then should be able to connect this to owserver but that would be
quite some effort given FHEM has already a solution for this... The
power btw. is no concern, if needed I can use a car battery... ;))

This means reinventing the wheel. Have fun.

Kind regards

Jan






Message: 2
Date: Sun, 23 Jul 2017 02:01:35 +0200
From: Stefano Miccoli <[hidden email]>
To: "OWFS (One-wire file system) discussion and help"
<[hidden email]>
Subject: Re: [Owfs-developers] Arduino yun as wifi 1wire master
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"


On 22 Jul 2017, at 12:24, Dr. Trigon <[hidden email]> wrote:

I don't want to run another instance of owfs on those devices as they should act as master and not owfs servers.


What you need is an IP protocol that allows you to access a remote 1-wire network: owserver (the protocol) was designed exactly to address this problem, see http://owfs.org/index.php?page=owserver-protocol

Documentation and terminology are ? a little hard to understand, so let my try to explain it here.

First one should understand that ?owserver? has many meanings:

- owserver-protocol: the TCP messaging protocol used by OWFS components to communicate over IP
- owserver-server: an agent that plays the server role in an owserver-protocol message exchange
- owserver-client: an agent that plays the client side in the owserver-protocol
- owserver-daemon: the program, which is the main OWFS owserver-server, but that can act also as an owserver-client.

The OWFS way to solve your problem is that on each remote 1-wire network you should have an owserver-daemon running (Please note: only the owserver-daemon, not the full stack of owhttp, owftp, owfs, etc.) Each owserver-daemon controls one or more 1-wire masters, and acts as an owserver-server, over a common IP network, say a WiFi LAN. Owserver-clients can query over IP the various owserver-daemons (acting as owserver-servers) about the remote 1-wire networks they are controlling.

To make things a little bit more complicated, you should know that an owserver-daemon can be configured to be an owserver-client of a remote owserver-server: this means that the owserver-daemon is now able to present the remote 1-wire devices as local ones? Please see http://owfs.org/index.php?page=loop-suppression for different owserver-server network topologies examples and the built-in loop suppression mechanism.

This is what OWFS has to offer: if you keep it simple (owserver-daemons acting only as owserver-servers) it is quite simple to configure and manage. Of course owserver-clients should know which owserver-server query. However if you prefer, you can merge all remote 1-wire networks into a single ?virtual? 1-wire network, by using the owserver-daemon client capabilities, so that your to your clients all 1-wire devices are presented as if they were on a single 1-wire network.

Of course you can invent your own 1-wire-over-IP protocol and implement it in the micro-controller of your choice, or even emulate the LINK protocol. But it is much, much more complicated that having multiple owserver-daemons running on your network.

Hope my explanation was at least understandable.

Bye

Stefano

---

BTW the Y?n is a 65? device in which you have two parallel environments talking to each other: Arduino and Linux (Linino OS, based on OpenWRT). Linux specs are really minimal: 64MB DDR2 RAM, 400MHz clock speed.

On the contrary the Pi Zero W is a 10? device, which runs a full-fledged Linux (or windows 10, if you prefer) with 1GB Ram, running at 1GHz.

Spending 55? just for having an Arduino bit-banging the 1-wire protocol makes no sense to me.

-------------- next part --------------
An HTML attachment was scrubbed...






Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot




Subject: Digest Footer



Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers





End of Owfs-developers Digest, Vol 133, Issue 9
***********************************************

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

Dr. Trigon
In reply to this post by Dr. Trigon
Hi Colin

>wall. Low power + existing libraries for 1Wire. This RF unit (I use
>Moteinos) would cost you about $20. The gateway unit would also cost
>you
>about $20. I send things around encrypted, data format json strings,
>and
>it's very easy to manage. If you want to shove this into 1Wire, do it
>on
>the gateway node as data is received.

So Moteino = Arduino+RF correct? That would mean I would have to write sketches for it and some script for the gateway raspi using externals mechanism in owfs, right? I would like to have a generic 1wire master - so would think about OneWireFirmata - don't know. (By "generic master" I mean something where I can just connect sensors without having to write or modify code.)

>I have code for all of this including the Pi serial handler if you are
>interested.

If you have some more info at hand, I intressted in having a look for future changes in my setup but for now I am happy with my solution.

Thanks and greetings

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

Andrew Errington
All the cool kids are using ESP8266 modules these days.

Andrew

On Aug 2, 2017 4:14 PM, "Dr. Trigon" <[hidden email]> wrote:
Hi Colin

>wall. Low power + existing libraries for 1Wire. This RF unit (I use
>Moteinos) would cost you about $20. The gateway unit would also cost
>you
>about $20. I send things around encrypted, data format json strings,
>and
>it's very easy to manage. If you want to shove this into 1Wire, do it
>on
>the gateway node as data is received.

So Moteino = Arduino+RF correct? That would mean I would have to write sketches for it and some script for the gateway raspi using externals mechanism in owfs, right? I would like to have a generic 1wire master - so would think about OneWireFirmata - don't know. (By "generic master" I mean something where I can just connect sensors without having to write or modify code.)

>I have code for all of this including the Pi serial handler if you are
>interested.

If you have some more info at hand, I intressted in having a look for future changes in my setup but for now I am happy with my solution.

Thanks and greetings

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Arduino yun as wifi 1wire master

CReese
They're great, but WiFi is terrible for power, and RF916 (or even LoRa) are great for range where Bluetooth is not. Pin compatibility with power module, a well-developed ecosystem ... I've done my research on this, and for low-power remote nodes these are the goods. They're also great for power management for Pi projects where intermittent power is an issue. Graceful shutdowns with a little 800mAh LiPo (the power boards have a boost DC/DC) save my OS. Autoboot when power is back. It's truly great. I use them in all sorts of commercial installs. 

C

On Aug 2, 2017, at 9:23 AM, Andrew Errington <[hidden email]> wrote:

All the cool kids are using ESP8266 modules these days.

Andrew

On Aug 2, 2017 4:14 PM, "Dr. Trigon" <[hidden email]> wrote:
Hi Colin

>wall. Low power + existing libraries for 1Wire. This RF unit (I use
>Moteinos) would cost you about $20. The gateway unit would also cost
>you
>about $20. I send things around encrypted, data format json strings,
>and
>it's very easy to manage. If you want to shove this into 1Wire, do it
>on
>the gateway node as data is received.

So Moteino = Arduino+RF correct? That would mean I would have to write sketches for it and some script for the gateway raspi using externals mechanism in owfs, right? I would like to have a generic 1wire master - so would think about OneWireFirmata - don't know. (By "generic master" I mean something where I can just connect sensors without having to write or modify code.)

>I have code for all of this including the Pi serial handler if you are
>interested.

If you have some more info at hand, I intressted in having a look for future changes in my setup but for now I am happy with my solution.

Thanks and greetings

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers