http://pvlng.com/api.php?action=feedcontributions&user=KKoPV&feedformat=atomPhotoVoltaic Logger new generation - User contributions [en]2024-03-29T09:28:33ZUser contributionsMediaWiki 1.30.0http://pvlng.com/index.php?title=Telegram&diff=1622Telegram2020-09-12T15:54:41Z<p>KKoPV: /* Installation */</p>
<hr />
<div>[[Category:Scripts]]<br />
# Script to send status messages to a telegram chat<br />
<br />
== Installation ==<br />
<br />
Location: [https://github.com/KKoPV/PVLng-scripts/tree/master/bin Scripts repository]<br />
<br />
=== Register your bot ===<br />
<br />
https://core.telegram.org/bots#botfather<br />
<br />
/newbot<br />
<br />
Remember the token given by @BotFather!<br />
<br />
=== Send 1st a test message to your bot via client or web. ===<br />
<br />
This is needed to find out the chat id afterwards with<br />
<br />
$ curl -X POST <nowiki>https://api.telegram.org/bot</nowiki><span style="color:red">&lt;token&gt;</span>/getUpdates<br />
<br />
=== Find and remember the chat id like this: ===<br />
<br />
{"ok":true,"result":...<span style="color:red">"chat":{"id":'''1234567890'''</span>,...<br />
<br />
=== Usage ===<br />
<br />
# ./telegram.sh token chat message ...<br />
# ./telegram.sh token chat @filename<br />
<br />
=== References ===<br />
<br />
* https://core.telegram.org/bots<br />
* https://core.telegram.org/bots/api<br />
* https://core.telegram.org/bots/samples</div>KKoPVhttp://pvlng.com/index.php?title=Telegram&diff=1621Telegram2020-09-11T12:48:06Z<p>KKoPV: Created page with "Category:Scripts # Script to send status messages to a telegram chat == Installation == Location: [https://github.com/KKoPV/PVLng-scripts/tree/master/bin Scripts reposit..."</p>
<hr />
<div>[[Category:Scripts]]<br />
# Script to send status messages to a telegram chat<br />
<br />
== Installation ==<br />
<br />
Location: [https://github.com/KKoPV/PVLng-scripts/tree/master/bin Scripts repository]<br />
<br />
https://core.telegram.org/bots#botfather<br />
<br />
/newbot<br />
<br />
Remember the token given by @BotFather!<br />
<br />
## Send 1st a test message to your bot via client or web.<br />
<br />
This is needed to find out the chat id afterwards with<br />
<br />
$ curl -X POST https://api.telegram.org/bot<token>/getUpdates<br />
<br />
## Find and remember the chat id like this:<br />
<br />
{"ok":true,"result":..."chat":{"id":1234567890,...<br />
<br />
## Usage<br />
<br />
$ ./telegram.sh token chat message ...<br />
$ ./telegram.sh token chat @filename<br />
<br />
### References<br />
<br />
- https://core.telegram.org/bots<br />
- https://core.telegram.org/bots/api<br />
- https://core.telegram.org/bots/samples</div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16201-Wire Hub2020-09-11T05:34:02Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a '''physical''' star wiring from a central hub - but '''electrically''' I have only one long data bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an [https://www.amazon.de/s?k=J-Y%28St%29Y+2x2x0.8mm J-Y(St)Y 2x2x0.8mm²]<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16191-Wire Hub2020-09-11T05:31:06Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a '''physical''' star wiring from a central hub - but '''electrically''' I have only one long data bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an [https://www.amazon.de/s?k=J-Y%28St%29Y+2x2x0.8mm²]<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16181-Wire Hub2018-05-10T17:31:12Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a '''physical''' star wiring from a central hub - but '''electrically''' I have only one long data bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an [https://www.amazon.de/s/field-keywords=J-Y(St)Y+2x2x0.8 J-Y(St)Y 2x2x0.8mm²]<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16171-Wire Hub2018-02-01T11:56:39Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a '''physical''' star wiring from a central hub - but '''electrically''' I have only one long data bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an J-Y(ST)Y 2x2x0.8mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16161-Wire Hub2018-02-01T11:56:03Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a '''physical''' star wiring from a central hub - but I have only one '''electrical''' long bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an J-Y(ST)Y 2x2x0.8mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16151-Wire Hub2017-11-15T20:28:22Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a star wiring from a central hub - but physically I have only one long bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, e.g. an J-Y(ST)Y 2x2x0.8mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16141-Wire Hub2017-11-15T20:27:54Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I'm able to build a star wiring from a central hub - but physically I have only one long bus.<br />
<br />
For the star wires I used a bit thicker telefon J-Y(ST)Y 2x2x0.8mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=File:1-WireLongStar.png&diff=1613File:1-WireLongStar.png2017-11-15T20:27:10Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16121-Wire Hub2017-11-15T20:26:43Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I' able to build a star wiring from a central hub but physically I have only one long bus.<br />
<br />
For the star wires I used a bit thicker telefon J-Y(ST)Y 2x2x0.8mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16111-Wire Hub2017-11-15T20:26:03Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
And here comes the trick to build the recommended long wire bus.<br />
<br />
<br />
[[File:1-WireLongStar.png]]<br />
<br />
With this topology I' able to build a star wiring from a central hub but physically I have only one long bus.<br />
<br />
For the star wires I used a bit thicker telefon wire, abt. 0.6mm²<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16101-Wire Hub2017-11-15T20:06:56Z<p>KKoPV: </p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches<ref>https://www.digitemp.com/documentation.shtml</ref> you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16091-Wire Hub2017-11-12T15:26:45Z<p>KKoPV: /* Hub v2 */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
= Hub v2 =<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16081-Wire Hub2017-11-12T15:26:29Z<p>KKoPV: /* Build */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
== Hub v2 ==<br />
<br />
On the [[1-Wire Hub v2|v2 of this hub]] you can connect 6 sensors.<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16071-Wire Hub2017-11-12T15:12:14Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and diode included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16061-Wire Hub2017-11-12T15:11:22Z<p>KKoPV: /* Build */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and transistor included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
= Build =<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16051-Wire Hub2017-11-12T15:11:02Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
Here are also the recommended resistor and transistor included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
== Build ==<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16041-Wire Hub2017-11-12T15:10:33Z<p>KKoPV: /* Normal mode */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
<br />
Here are also the recommended resistor and transistor included.<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
== Build ==<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=File:1-WireLong.png&diff=1603File:1-WireLong.png2017-11-12T15:09:21Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=File:1-WireNormal.png&diff=1602File:1-WireNormal.png2017-11-12T15:07:47Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16011-Wire Hub2017-11-12T15:07:26Z<p>KKoPV: /* Draft */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Normal mode ==<br />
<br />
Typical wiring looks like this.<br />
<br />
<br />
[[File:1-WireNormal.png]]<br />
<br />
<br />
But Dallas recommends a long wire, so I adapted the wirng to this scheme.<br />
<br />
<br />
[[File:1-WireLong.png]]<br />
<br />
<br />
= Draft =<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
== Build ==<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=16001-Wire Hub2017-11-12T11:56:38Z<p>KKoPV: /* Draft */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Draft ==<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:''''' Mind the '''diode''' and the '''resistor'''!<br />
<br />
== Build ==<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=Channel_attributes&diff=1599Channel attributes2017-06-26T17:59:25Z<p>KKoPV: /* Offset */</p>
<hr />
<div>{{TOCright}}<br />
Channels can have the following attributes. Not each channel have all, only if the attribute makes sense.<br />
<br />
=== Name ===<br />
* '''required'''<br />
* Type : string<br />
<br />
Unique channel name, will be shown in tree definition overview and charts definition view.<br />
<br />
=== Description ===<br />
* Type : string<br />
<br />
Long description, will be shown in tree definition overview and charts definition view.<br />
<br />
=== Serial ===<br />
* Type : string<br />
<br />
Unique sensor serial number, if supported or required by channel type.<br />
<br />
=== Channel ===<br />
* Type : string<br />
<br />
Channel name for multi sensors.<br />
<br />
=== Resolution ===<br />
* '''required'''<br />
* Type : numeric<br />
* Default : 1<br />
<br />
On data readout the stored/calculated reading will multiplied with this factor.<br />
<br />
=== Unit ===<br />
* Type : string<br />
<br />
Channel unit, will be shown in tree definition overview and charts definition view.<br />
<br />
=== Decimals ===<br />
* Type : integer<br />
* Default : 2<br />
<br />
Decimals for value output and charting.<br />
<br />
The [[API]] will always return raw data, not rounded!<br />
<br />
=== Meter ===<br />
* Type : numeric (boolean)<br />
* Default : 0<br />
<br />
Meter channels stores raising values.<br />
<br />
This attribute must be defined manually only for a few channels, most [[channel type]]s pre-define this.<br />
<br />
=== Numeric ===<br />
* Type : numeric (boolean)<br />
* Default : 1<br />
<br />
Channels can have numeric or alphanumeric data.<br />
<br />
=== Offset ===<br />
* Type : numeric<br />
<br />
This offset will be applied during data storage to the actual reading values to correct them.<br />
<br />
=== Adjust ===<br />
* Type : numeric (boolean)<br />
* Default : 0<br />
<br />
Adjust channel offset '''(for meter channels only)''' automatic, if the actual reading value is lower than last reading but <> 0.<br />
<br />
Use this, if your measuring equipment sometimes looses/resets its counter.<br />
<br />
=== Cost ===<br />
* Type : numeric<br />
<br />
Cost per unit, for meter channels only.<br />
<br />
=== Threshold ===<br />
* Type : numeric<br />
<br />
A reading is only accepted, if the value is ± threshold from last reading, only relevant for writable channels.<br />
<br />
=== Valid from ===<br />
* Type : numeric<br />
<br />
Readings are only valid if they are greater or equal this limit.<br />
<br />
For writable channels invalid values skipped on saving, for calculated channels they will be skipped on readout.<br />
<br />
=== Valid to ===<br />
* Type : numeric<br />
<br />
Readings are only valid if they are lower or equal this limit.<br />
<br />
For writable channels invalid values skipped on saving, for calculated channels they will be skipped on readout.<br />
<br />
=== Public ===<br />
* Type : numeric (boolean)<br />
* Default : 1<br />
<br />
Non public channels are not accessible for not logged in visitors or without API key.<br />
<br />
=== Tags ===<br />
* Type : text<br />
<br />
Internal data, not visible anywhere else.<br />
<br />
Some channels use this for special settings.<br />
<br />
=== Comment ===<br />
* Type : text<br />
<br />
Internal comment, not visible anywhere else.<br />
<br />
[[Dashboard_module|Dashboard]] channels use this for special settings.<br />
<br />
[[Category:Channel]]</div>KKoPVhttp://pvlng.com/index.php?title=MQTT&diff=1598MQTT2017-05-17T20:07:08Z<p>KKoPV: /* Terminal 1 - Start subscriber */</p>
<hr />
<div>{{TOCright}}PVLng can listen to a MQTT broker running on any server.<br />
<br />
<blockquote>MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. -- [http://mqtt.org/ MQTT]</blockquote><br />
<br />
PVLng scripts can send to any MQTT broker.<br />
<br />
== Setup your own mosquitto broker ==<br />
<br />
sudo apt-get update<br />
sudo apt-get install mosquitto<br />
<br />
If you run the PVLng scripts also on this host or on remote equipment running the scripts only you need only the clients scripts<br />
<br />
sudo apt-get update<br />
sudo apt-get install mosquitto-clients<br />
<br />
== Configure MQTT broker ==<br />
<br />
Put the following into <tt>/etc/mosquitto/conf.d/local.conf</tt><br />
<br />
cat <<EOT | sudo tee /etc/mosquitto/conf.d/local.conf<br />
log_type error<br />
log_type warning<br />
log_type notice<br />
log_type information<br />
connection_messages true<br />
log_timestamp true<br />
EOT<br />
<br />
And restart<br />
<br />
sudo /etc/init.d/mosquitto restart<br />
<br />
Test your broker best with 2 terminals<br />
<br />
=== Terminal 1 - Start subscriber ===<br />
<br />
Wait for 1 message, print verbose message and exit<br />
<br />
# mosquitto_sub -d -v -i test-subscriber -t test -C 1<br />
Client test-subscriber sending CONNECT<br />
Client test-subscriber received CONNACK<br />
Client test-subscriber sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0)<br />
Client test-subscriber received SUBACK<br />
Subscribed (mid: 1): 0<br />
<br />
=== Terminal 2 - Publish a zero length test message ===<br />
<br />
# mosquitto_pub -d -n -i test-publisher -h localhost -t test<br />
Client test-publisher sending CONNECT<br />
Client test-publisher received CONNACK<br />
Client test-publisher sending PUBLISH (d0, q0, r0, m1, 'test', ... (0 bytes))<br />
Client test-publisher sending DISCONNECT<br />
<br />
=== Terminal 1 - Received the message? ===<br />
<br />
...<br />
Client test-subscriber received PUBLISH (d0, q0, r0, m0, 'test', ... (0 bytes))<br />
test (null)<br />
Client test-subscriber sending DISCONNECT<br />
<br />
== Run PVLng MQTT subscriber ==<br />
<br />
The script is <tt>tools/mqtt-subscribe.sh</tt><br />
<br />
Start it at reboot via cron<br />
<br />
cat <<EOT | sudo tee /etc/cron.d/mqtt-subscribe<br />
# MQTT listener, wait for mosquitto broker<br />
@reboot root sleep 60 && /path/to/PVLng/tools/mqtt-subscribe.sh start >/dev/null<br />
# And check at least each hour<br />
0 * * * * root /path/to/PVLng/tools/mqtt-subscribe.sh start >/dev/null<br />
EOT<br />
<br />
Check for safety reasons each hour.<br />
<br />
To store data into PVLng database send a message to topic<br />
<br />
pvlng/<API key>/data/<Channel GUID><br />
<br />
== Configure PVLng scripts ==<br />
<br />
The scripts check for configured MQTT broker and use it, otherwise the default curl method is used as before.<br />
<br />
You need only set the MQTT broker in <tt>PVLng.conf</tt> and uncomment the line.<br />
<br />
##############################################################################<br />
### Send to mosquitto broker running on $mosquittoServer<br />
##############################################################################<br />
### <Sever>[:<port>]<br />
#mosquittoServer=$PVLngDomain:1883<br />
<br />
If you test your scripts and send data, you can watch the stream in a terminal with<br />
<br />
mosquitto_sub -v -t pvlng/+/data/#<br />
<br />
This will give you something like this (2 temperature sensors)<br />
<br />
pvlng/df9adc61-e81b-1e12-8fc7-8a1f000a3025/data/72f9-9c42-36c5-c2af-3c01-cd95-67a1-98d1 {"data":"29.5","timestamp":"1495051260"}<br />
pvlng/df9adc61-e81b-1e12-8fc7-8a1f000a3025/data/bef9-6e8b-29a1-15a3-4100-58d2-69b8-3bdb {"data":"24.1875","timestamp":"1495051260"}<br />
<br />
<br />
[[Category:Software]]</div>KKoPVhttp://pvlng.com/index.php?title=MQTT&diff=1597MQTT2017-05-17T20:06:23Z<p>KKoPV: Created page with "{{TOCright}}PVLng can listen to a MQTT broker running on any server. <blockquote>MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designe..."</p>
<hr />
<div>{{TOCright}}PVLng can listen to a MQTT broker running on any server.<br />
<br />
<blockquote>MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. -- [http://mqtt.org/ MQTT]</blockquote><br />
<br />
PVLng scripts can send to any MQTT broker.<br />
<br />
== Setup your own mosquitto broker ==<br />
<br />
sudo apt-get update<br />
sudo apt-get install mosquitto<br />
<br />
If you run the PVLng scripts also on this host or on remote equipment running the scripts only you need only the clients scripts<br />
<br />
sudo apt-get update<br />
sudo apt-get install mosquitto-clients<br />
<br />
== Configure MQTT broker ==<br />
<br />
Put the following into <tt>/etc/mosquitto/conf.d/local.conf</tt><br />
<br />
cat <<EOT | sudo tee /etc/mosquitto/conf.d/local.conf<br />
log_type error<br />
log_type warning<br />
log_type notice<br />
log_type information<br />
connection_messages true<br />
log_timestamp true<br />
EOT<br />
<br />
And restart<br />
<br />
sudo /etc/init.d/mosquitto restart<br />
<br />
Test your broker best with 2 terminals<br />
<br />
=== Terminal 1 - Start subscriber ===<br />
<br />
Wait for 1 message, print verbose message and exit<br />
<br />
# mosquitto_sub -d -v -i test-subscriber -t test -c -C 1<br />
Client test-subscriber sending CONNECT<br />
Client test-subscriber received CONNACK<br />
Client test-subscriber sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0)<br />
Client test-subscriber received SUBACK<br />
Subscribed (mid: 1): 0<br />
<br />
=== Terminal 2 - Publish a zero length test message ===<br />
<br />
# mosquitto_pub -d -n -i test-publisher -h localhost -t test<br />
Client test-publisher sending CONNECT<br />
Client test-publisher received CONNACK<br />
Client test-publisher sending PUBLISH (d0, q0, r0, m1, 'test', ... (0 bytes))<br />
Client test-publisher sending DISCONNECT<br />
<br />
=== Terminal 1 - Received the message? ===<br />
<br />
...<br />
Client test-subscriber received PUBLISH (d0, q0, r0, m0, 'test', ... (0 bytes))<br />
test (null)<br />
Client test-subscriber sending DISCONNECT<br />
<br />
== Run PVLng MQTT subscriber ==<br />
<br />
The script is <tt>tools/mqtt-subscribe.sh</tt><br />
<br />
Start it at reboot via cron<br />
<br />
cat <<EOT | sudo tee /etc/cron.d/mqtt-subscribe<br />
# MQTT listener, wait for mosquitto broker<br />
@reboot root sleep 60 && /path/to/PVLng/tools/mqtt-subscribe.sh start >/dev/null<br />
# And check at least each hour<br />
0 * * * * root /path/to/PVLng/tools/mqtt-subscribe.sh start >/dev/null<br />
EOT<br />
<br />
Check for safety reasons each hour.<br />
<br />
To store data into PVLng database send a message to topic<br />
<br />
pvlng/<API key>/data/<Channel GUID><br />
<br />
== Configure PVLng scripts ==<br />
<br />
The scripts check for configured MQTT broker and use it, otherwise the default curl method is used as before.<br />
<br />
You need only set the MQTT broker in <tt>PVLng.conf</tt> and uncomment the line.<br />
<br />
##############################################################################<br />
### Send to mosquitto broker running on $mosquittoServer<br />
##############################################################################<br />
### <Sever>[:<port>]<br />
#mosquittoServer=$PVLngDomain:1883<br />
<br />
If you test your scripts and send data, you can watch the stream in a terminal with<br />
<br />
mosquitto_sub -v -t pvlng/+/data/#<br />
<br />
This will give you something like this (2 temperature sensors)<br />
<br />
pvlng/df9adc61-e81b-1e12-8fc7-8a1f000a3025/data/72f9-9c42-36c5-c2af-3c01-cd95-67a1-98d1 {"data":"29.5","timestamp":"1495051260"}<br />
pvlng/df9adc61-e81b-1e12-8fc7-8a1f000a3025/data/bef9-6e8b-29a1-15a3-4100-58d2-69b8-3bdb {"data":"24.1875","timestamp":"1495051260"}<br />
<br />
<br />
[[Category:Software]]</div>KKoPVhttp://pvlng.com/index.php?title=Software_hints&diff=1596Software hints2017-04-07T08:49:45Z<p>KKoPV: /* Nginx */</p>
<hr />
<div>{{TOCright}}[[Category:Software]]<br />
== PHP ==<br />
I'm not really sure, which extensions really required, but with this configuration it works for me:<br />
<br />
~ # php -v<br />
PHP 5.4.4-14+deb7u14 (cli) (built: Aug 21 2014 09:43:31)<br />
Copyright (c) 1997-2012 The PHP Group<br />
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies<br />
<br />
~ # php -m<br />
[PHP Modules]<br />
bcmath<br />
bz2<br />
calendar<br />
Core<br />
ctype<br />
curl<br />
date<br />
dba<br />
dom<br />
ereg<br />
exif<br />
fileinfo<br />
filter<br />
ftp<br />
gd<br />
gettext<br />
hash<br />
iconv<br />
imagick<br />
imap<br />
intl<br />
json<br />
libxml<br />
mbstring<br />
mcrypt<br />
memcache<br />
mhash<br />
ming<br />
mysql<br />
mysqli<br />
newrelic<br />
openssl<br />
pcntl<br />
pcre<br />
PDO<br />
pdo_mysql<br />
Phar<br />
posix<br />
ps<br />
pspell<br />
recode<br />
Reflection<br />
session<br />
shmop<br />
SimpleXML<br />
snmp<br />
soap<br />
sockets<br />
SPL<br />
standard<br />
sysvmsg<br />
sysvsem<br />
sysvshm<br />
tidy<br />
tokenizer<br />
wddx<br />
xml<br />
xmlreader<br />
xmlrpc<br />
xmlwriter<br />
xsl<br />
zip<br />
zlib<br />
<br />
[Zend Modules]<br />
<br />
== Web server ==<br />
<br />
Make sure, that your installed files are owned by the user '''which runs the web server''', especially if you '''installed as an other user'''!<br />
<br />
Let's say, your document root is <tt>/var/www</tt> and the user is <tt>www-data</tt> (with group <tt>www-data</tt>) run the following command afterwards:<br />
<br />
# chown -R www-data:www-data /var/www<br />
<br />
=== Apache ===<br />
<br />
For correct front end function, the following modules '''must''' be enabled:<br />
* <tt>mod_rewrite</tt><br />
* <tt>mod_expires</tt><br />
* <tt>mod_headers</tt><br />
<br />
=== Nginx ===<br />
<br />
There is a template config for Nginx in [https://github.com/KKoPV/PVLng/blob/master/config/pvlng.nginx.conf.dist <tt>config/pvlng.nginx.conf.dist</tt>]<br />
<br />
See comments for needed adjustments.</div>KKoPVhttp://pvlng.com/index.php?title=1-Wire_Hub&diff=15951-Wire Hub2017-04-03T13:17:16Z<p>KKoPV: /* Build */</p>
<hr />
<div>{{TOCright}}[[Category:1-Wire]][[Category:Hardware]]<br />
I monitor here 3 1-Wire DS18B20<ref>http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf</ref> based temperature sensors.<br />
<br />
As I looked at commercial solutions and their prices, I decided to construct my own 1-Wire hub.<br />
<br />
The DS18B20 temperature sensor can be powered by an external supply on the V<sub>DD</sub> pin, or it can operate in "parasite power" mode, which allows the DS18B20 to function without a local external supply<ref>http://openenergymonitor.org/emon/buildingblocks/DS18B20-temperature-sensing</ref>.<br />
<br />
* In '''normal mode''', each sensor is connected between a power line (V<sub>DD</sub> pin 3) and ground (GND pin 1), and the data output (DQ pin 2) connects to a third, data, line. The data output is a 3-state or open-drain port (DQ pin 2) and a 4.7 kΩ pull-up resistor to the power line is required.<br />
* '''Parasite power mode''' requires both DS18B20 GND (pin 1) and V<sub>DD</sub> (pin 3) to be connected to ground. The DQ pin (pin 2 - the middle pin) is the data/parasite power line. The data line requires also a pull-up resistor of 4.7 kΩ connected to +5 V.<br />
<br />
If you have long 1-Wire network runs and are having problems with glitches you should add a Schottky diode to the end of your network. Typically a 1N5817 diode reverse biased across sensors will achieve this. Solder the side with the stripe to data output (DQ pin 2) and the other side to ground (GND pin 1) of the DS18S20.<br />
<br />
== Draft ==<br />
[[File:DS1820.png|right]]<br />
<br />
So put all together to get an imagination.<br />
<br />
<br />
[[File:1-WireHubDraft.png]]<br />
<br />
<br />
(You can also bridge all not used D+ & D- connection points.)<br />
<br />
{{Note|The trick to build a linear topology is, that each sensor is connected with 4 wires. The DQ data pin 2 is connected with '''2 wires''' of the cable, to build a single long line.}}<br />
<br />
'''''Please note:'''''<br />
* Mind the '''diode''' and the '''resistor'''!<br />
<br />
== Build ==<br />
<br />
* As small as possible<br />
* Simple to build > breadboard platine<br />
* Stable > Normal mode<br />
* Linear topology (according to [http://www.maximintegrated.com/app-notes/index.mvp/id/148 this guidelines]) > more stable than star topologies<br />
<br />
Put it all together and minimize.<br />
<br />
Next [[1-Wire_Hub_v2|Version 2]] will fit into a case for a cap rails.<br />
<br />
<br />
[[File:1-WireHubBreadboard.png]]<br />
<br />
<br />
(View from top, printed circuits and soldering on the bottom)<br />
<br />
The '''cyan''', '''red''' and '''black''' thick dots are the soldering points for the upstream '''Data''', '''+5V''' and '''GND''' wires.<br />
<br />
Use a bit thicker telephone cable J-Y(St)Y 2x2x0.8mm for lower loop impedance.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Parts list !! Source of supply !! Price<br />
|-<br />
| Lötbare Schraubklemme, RM 5.0mm || [http://www.conrad.de/ce/de/product/731817 Conrad] || € 0.33<br />
|-<br />
| Lötstreifenrasterplatte || [http://www.conrad.de/ce/de/product/527742 Conrad] || € 2.94<br />
|-<br />
| Schottky-Diode 1N5817RLG<br />alternative: Diode 1N4001 50V/1A || [http://www.conrad.de/ce/de/product/168274 Conrad]<br />[http://www.conrad.de/ce/de/product/162213 Conrad] || € 0.25<br />€ 0.06<br />
|-<br />
| Kohleschicht-Widerstand 4,7 kΩ || [http://www.conrad.de/ce/de/product/403334 Conrad] || € 0.10<br />
|-<br />
| Universal-Gehäuse 120x65x40 BOXE || [http://www.conrad.de/ce/de/product/522615 Conrad] || € 3.98<br />
|-<br />
| Telefoninnenkabel J-Y(ST)Y 2x2x0.8mm || [http://www.conrad.de/ce/de/product/600611 Conrad], [http://search.ebay.de/J-Y(St)Y+2x2x0.8mm eBay] || € 1.19/m<br />
|}<br />
<br />
----<br />
<references /></div>KKoPVhttp://pvlng.com/index.php?title=File:Raspi-s0-gpio.png&diff=1594File:Raspi-s0-gpio.png2016-10-23T14:09:23Z<p>KKoPV: KKoPV uploaded a new version of &quot;File:Raspi-s0-gpio.png&quot;</p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=S0_GPIO_reader&diff=1593S0 GPIO reader2016-10-23T14:08:56Z<p>KKoPV: </p>
<hr />
<div>{{TOCright}}[[Category:Hardware]][[Category:Software]]<br />
To read S0 impulses from e.g. energy meters, a program and a [[S0 reader script|script]] to store this into PVLng is included.<br />
<br />
The energy meter meter as source is the same as described in [[S0 serial reader]].<br />
<br />
Here the S0 is connected to Pins '''Ground''' and '''GPIO23''' of a Raspberry Pi B+.<br />
<br />
[[File:Raspi-s0-1.png|600px]]<br />
<br />
[[File:Raspi-s0-gpio.png|600px]]<br />
<br />
[http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/ Simple Guide to the RPi GPIO Header and Pins]<br />
<br />
More in detail<br />
<br />
[[File:Raspi-s0-2.png]]</div>KKoPVhttp://pvlng.com/index.php?title=File:Raspi-s0-gpio.png&diff=1592File:Raspi-s0-gpio.png2016-10-23T14:05:32Z<p>KKoPV: KKoPV uploaded a new version of &quot;File:Raspi-s0-gpio.png&quot;</p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=S0_GPIO_reader&diff=1591S0 GPIO reader2016-10-23T14:03:12Z<p>KKoPV: </p>
<hr />
<div>{{TOCright}}[[Category:Hardware]][[Category:Software]]<br />
To read S0 impulses from e.g. energy meters, a program and a [[S0 reader script|script]] to store this into PVLng is included.<br />
<br />
The energy meter meter as source is the same as described in [[S0 serial reader]].<br />
<br />
Here the S0 is connected to Pins '''GROUND''' and '''GPIO23''' of a Raspberry Pi B+.<br />
<br />
[[File:Raspi-s0-1.png|600px]]<br />
<br />
[[File:Raspi-s0-gpio.png|600px]]<br />
<br />
[http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/ Simple Guide to the RPi GPIO Header and Pins]<br />
<br />
More in detail<br />
<br />
[[File:Raspi-s0-2.png]]</div>KKoPVhttp://pvlng.com/index.php?title=S0_GPIO_reader&diff=1590S0 GPIO reader2016-10-23T14:02:52Z<p>KKoPV: Created page with "{{TOCright}}Category:HardwareCategory:Software To read S0 impulses from e.g. energy meters, a program and a script to store this into PVLng is inc..."</p>
<hr />
<div>{{TOCright}}[[Category:Hardware]][[Category:Software]]<br />
To read S0 impulses from e.g. energy meters, a program and a [[S0 reader script|script]] to store this into PVLng is included.<br />
<br />
The energy meter meter as source is the same as described in [S0 serial reader].<br />
<br />
Here the S0 is connected to Pins '''GROUND''' and '''GPIO23''' of a Raspberry Pi B+.<br />
<br />
[[File:Raspi-s0-1.png|600px]]<br />
<br />
[[File:Raspi-s0-gpio.png|600px]]<br />
<br />
[http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/ Simple Guide to the RPi GPIO Header and Pins]<br />
<br />
More in detail<br />
<br />
[[File:Raspi-s0-2.png]]</div>KKoPVhttp://pvlng.com/index.php?title=File:Raspi-s0-gpio.png&diff=1589File:Raspi-s0-gpio.png2016-10-23T13:59:47Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=File:Raspi-s0-1.png&diff=1588File:Raspi-s0-1.png2016-10-23T13:56:09Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=File:Raspi-s0-2.png&diff=1587File:Raspi-s0-2.png2016-10-23T13:54:35Z<p>KKoPV: </p>
<hr />
<div></div>KKoPVhttp://pvlng.com/index.php?title=S0_serial_reader&diff=1585S0 serial reader2016-10-23T13:42:52Z<p>KKoPV: KKoPV moved page S0 over USB reader to S0 serial reader</p>
<hr />
<div>{{TOCright}}[[Category:Hardware]][[Category:Software]]<br />
To read S0 impulses from e.g. energy meters, a program and a [[S0 reader script|script]] to store this into PVLng is included.<br />
<br />
== Hardware requirements ==<br />
<br />
=== Energy meter ===<br />
<br />
You need a energy meter with S0 interface, best for 3 phases.<br />
<br />
[[File:B-Watt.png|240px]]<br />
<br />
[http://www.amazon.de/gp/product/B0032ON5YE/ref=oh_details_o06_s00_i00 B-Watt Swissnox 3x5(80A)]<br />
<br />
=== Serial port adapter ===<br />
<br />
If your computer not more have a serial port (like mine), you need a USB serial adapter.<br />
<br />
The best choice is an adapter with a FTDI or a FT232RL chip set.<br />
<br />
[[File:DigitusDA70156.png]]<br />
<br />
[http://www.amazon.com/Digitus-DA-70156-USB-Seriell-Adapter/dp/B0030IT780/ Digitus DA-70156 USB to Serial Adapter, USB 2.0]<br />
<br />
During prototyping a gender changer (female/female) is '''recommended'''.<br />
<br />
Connect your S0 port like this to your serial interface:<br />
<br />
[[File:S0SerialPins.png]]<br />
<br />
Or you recycle an old serial mouse cable...<br />
<br />
[[File:S0SerialMouse.png]]<br />
<br />
=== USB to TTL Serial Cable ===<br />
<br />
I found also a bit cheaper possibility, a USB to TTL Adapter with at least 6 pins in various forms.<br />
<br />
This cable is originally used for Arduino compatible boards but it works perfect also for S0 signals.<br />
<br />
[[File:FTDI-FT232-USBtoTTL.jpg|280px]] [[File:FTDI-FT232-USBtoTTL-2.jpg|280px]]<br />
{{Note|'''''Please note:''''' You need a cable with '''6 pins''', not only '''4 pins''', although we need only 2 of them!}}<br />
<br />
Mostly I found these pin - wire associations:<br />
<br />
<tt><br />
{|<br />
|-<br />
| Wire: || &nbsp; || Red || &nbsp; || Black || &nbsp; || '''''White''''' || &nbsp; || Green || &nbsp; || '''''Yellow''''' || &nbsp; || Blue<br />
|-<br />
| Signal: || || 5V || || GND || || '''''RXD''''' || || TXD || || '''''RTS''''' || || CTS<br />
|}<br />
</tt><br />
<br />
[[File:FTDI-Breakout1.jpg|240px]] [[File:FTDI-Breakout2.jpg|240px]] [[File:FTDI-Breakout3.jpg|240px]]<br />
<br />
You can find them on [http://search.ebay.de/FTDI+USB+TTL+6+Pin eBay] for abt. $7, shipping from China to Germany took abt. 3 weeks.<br />
<br />
{{Note|Double check to have the '''RTS''' signal included!}}<br />
<br />
=== Test ===<br />
<br />
<small>(adapted from [[Volkszähler:hardware/controllers/s0-an-rs232|Volkszähler Wiki]])</small><br />
<br />
You should test your setup, to make sure, the signals will be correct detected. A simple test can be done with [http://unixhelp.ed.ac.uk/CGI/man-cgi?stty stty].<br />
<br />
* Configure your device (50 Baud, return direct every character)<br />
<br />
# stty time 1 min 1 -icanon < /dev/'''ttyUSB0'''<br />
<br />
* Read each character and create a timestamp:<br />
<br />
# strace -ttt -e read cat < /dev/'''ttyUSB0''' > /dev/null<br />
<br />
* With a bit more code you can better check the results<br />
<br />
# (strace -ttt -e read cat < /dev/'''ttyUSB0''' > /dev/null) 2>&1 | \<br />
awk 'NR==1{t0=$1; next}{t=$1; print 3600e3 /(t-t1)/'''2000''', t-t0, t-t1, $0; t1=t}'<br />
<br />
Adjust the '''device''' and the '''2000''' to the impulse rate of '''your''' watt meter!<br />
<br />
<br />
{| class="wikitable"<br />
|-<br />
! Column !! Result<br />
|-<br />
| 1 || Power in watt<br />
|-<br />
| 2 || Current time in seconds<br />
|-<br />
| 3 || Time difference since last impulse<br />
|-<br />
| 4 || Original trace output with timestamp<br />
|}<br />
<br />
== Channel definition ==<br />
<br />
Please put the device where your energy meter is connected to into the [[Channel attributes#channel| channel attribute]] like this:<br />
<br />
[[File:S0PowerSensorChannel.png]]<br />
<br />
It is '''strongly recommended''' to define a [[Fixed name for USB device|fixed name]] for your device!<br />
<br />
== Software ==<br />
<br />
The software for storing the power data is splited into 2 parts<br />
<br />
=== 1. Daemon ===<br />
<br />
An energy meter with S0 interface sends depending of the actual power usage an amount of impulses per kilo watt hour.<br />
<br />
A common frequency is 1000 or 2000 per kilo watt hour, or 800 as for our energy meter.<br />
<br />
The [https://github.com/KKoPV/PVLng-scripts/tree/master/S0/bin daemon] runs in Background and detects these impulses. It converts them to power usage in watt.<br />
<br />
These power values are written into log file.<br />
<br />
Compile the daemon for your system like this, it will also "strip" the binary afterwards.<br />
<br />
# cd S0/bin<br />
# ./compile<br />
<br />
Afterwards just test it to make sure all works fine.<br />
<br />
=== Test ===<br />
<br />
# ./S0<br />
<br />
Usage: bin/S0 -d <device> [options]<br />
<br />
Options:<br />
<br />
-d <device> Serial port device, required<br />
-r <resolution> Impulses per kWh (kilo watt hour), default 1000<br />
-f <format> Output format, must fit printf(), default "%f"<br />
-l <filename> Log file, default /tmp/S0.log<br />
-v Verbosity level: info<br />
-vv Verbosity level: debug<br />
-F Don't daemonize, run in foreground<br />
-h Show this help<br />
<br />
If program runs in foreground, measuring data are written to <tt>stdout</tt> instead<br />
of log file.<br />
<br />
### Run for test very verbose in foreground<br />
# ./S0 -d /dev/usb-ftdi-1 -r 800 -Fvv<br />
[22-Mar 22:35:18][-d ] Device : /dev/usb-ftdi-1<br />
[22-Mar 22:35:18][-r ] Resolution: 800<br />
[22-Mar 22:35:18][-f ] Format : %f<br />
[22-Mar 22:35:18][-l ] Log file : /tmp/S0.log<br />
[22-Mar 22:35:18][-v ] Verbosity : 2<br />
[22-Mar 22:35:18][-F ] Foreground: yes<br />
[22-Mar 22:35:18] Device /dev/usb-ftdi-1 opened<br />
[22-Mar 22:35:18] Start listening<br />
[22-Mar 22:35:18] Press Ctrl+C to abort ...<br />
[22-Mar 22:35:18] Skip 1st impulse<br />
[22-Mar 22:35:23] 1395524123.582 - 976.773414<br />
[22-Mar 22:35:28] 1395524128.188 - 976.974449<br />
[22-Mar 22:35:32] 1395524132.802 - 975.276735<br />
[22-Mar 22:35:37] 1395524137.393 - 980.170497<br />
[22-Mar 22:35:41] 1395524141.984 - 980.166868<br />
[22-Mar 22:35:46] 1395524146.588 - 977.398846<br />
[22-Mar 22:35:51] 1395524151.210 - 973.802969<br />
Ctrl+C<br />
<br />
'''1<sup>st</sup> value''' is the float timestamp and the '''2<sup>nd</sup> value''' is the actual watt usage.<br />
<br />
The 1<sup>st</sup> impulse will be skipped and used as defined starting timestamp.<br />
<br />
=== 2. Shell script ===<br />
<br />
The [[S0 reader script]] run each minute via cron, analyses the log file and calculates the average.<br />
<br />
This average value will then pushed to the PVLng API.</div>KKoPVhttp://pvlng.com/index.php?title=S0_over_USB_reader&diff=1586S0 over USB reader2016-10-23T13:42:52Z<p>KKoPV: KKoPV moved page S0 over USB reader to S0 serial reader</p>
<hr />
<div>#REDIRECT [[S0 serial reader]]</div>KKoPVhttp://pvlng.com/index.php?title=S0_reader_script&diff=1584S0 reader script2016-10-23T13:42:30Z<p>KKoPV: </p>
<hr />
<div>{{TOCright}}[[Category:Scripts]]<br />
<br />
# cd /path/to/PVLng-scripts/S0-serial/<br />
<br />
The script uses outputs of the [[S0 serial reader]] daemon.<br />
<br />
=== Configuration ===<br />
<br />
Please refer to <tt>dist/S0.conf</tt> to configure your environment regarding interfaces and channels.<br />
<br />
# cp dist/S0.conf .<br />
<br />
=== Test ===<br />
<br />
To test your configuration, run<br />
<br />
# ./S0.sh -tv<br />
<br />
=== Run with cron ===<br />
<br />
Edit your crontab<br />
<br />
### run S0 reader each minute<br />
* * * * * /path/to/PVLng-scripts/S0-serial/S0.sh</div>KKoPVhttp://pvlng.com/index.php?title=S0_serial_reader&diff=1582S0 serial reader2016-10-23T13:39:38Z<p>KKoPV: KKoPV moved page S0 reader to S0 over USB reader</p>
<hr />
<div>{{TOCright}}[[Category:Hardware]][[Category:Software]]<br />
To read S0 impulses from e.g. energy meters, a program and a [[S0 reader script|script]] to store this into PVLng is included.<br />
<br />
== Hardware requirements ==<br />
<br />
=== Energy meter ===<br />
<br />
You need a energy meter with S0 interface, best for 3 phases.<br />
<br />
[[File:B-Watt.png|240px]]<br />
<br />
[http://www.amazon.de/gp/product/B0032ON5YE/ref=oh_details_o06_s00_i00 B-Watt Swissnox 3x5(80A)]<br />
<br />
=== Serial port adapter ===<br />
<br />
If your computer not more have a serial port (like mine), you need a USB serial adapter.<br />
<br />
The best choice is an adapter with a FTDI or a FT232RL chip set.<br />
<br />
[[File:DigitusDA70156.png]]<br />
<br />
[http://www.amazon.com/Digitus-DA-70156-USB-Seriell-Adapter/dp/B0030IT780/ Digitus DA-70156 USB to Serial Adapter, USB 2.0]<br />
<br />
During prototyping a gender changer (female/female) is '''recommended'''.<br />
<br />
Connect your S0 port like this to your serial interface:<br />
<br />
[[File:S0SerialPins.png]]<br />
<br />
Or you recycle an old serial mouse cable...<br />
<br />
[[File:S0SerialMouse.png]]<br />
<br />
=== USB to TTL Serial Cable ===<br />
<br />
I found also a bit cheaper possibility, a USB to TTL Adapter with at least 6 pins in various forms.<br />
<br />
This cable is originally used for Arduino compatible boards but it works perfect also for S0 signals.<br />
<br />
[[File:FTDI-FT232-USBtoTTL.jpg|280px]] [[File:FTDI-FT232-USBtoTTL-2.jpg|280px]]<br />
{{Note|'''''Please note:''''' You need a cable with '''6 pins''', not only '''4 pins''', although we need only 2 of them!}}<br />
<br />
Mostly I found these pin - wire associations:<br />
<br />
<tt><br />
{|<br />
|-<br />
| Wire: || &nbsp; || Red || &nbsp; || Black || &nbsp; || '''''White''''' || &nbsp; || Green || &nbsp; || '''''Yellow''''' || &nbsp; || Blue<br />
|-<br />
| Signal: || || 5V || || GND || || '''''RXD''''' || || TXD || || '''''RTS''''' || || CTS<br />
|}<br />
</tt><br />
<br />
[[File:FTDI-Breakout1.jpg|240px]] [[File:FTDI-Breakout2.jpg|240px]] [[File:FTDI-Breakout3.jpg|240px]]<br />
<br />
You can find them on [http://search.ebay.de/FTDI+USB+TTL+6+Pin eBay] for abt. $7, shipping from China to Germany took abt. 3 weeks.<br />
<br />
{{Note|Double check to have the '''RTS''' signal included!}}<br />
<br />
=== Test ===<br />
<br />
<small>(adapted from [[Volkszähler:hardware/controllers/s0-an-rs232|Volkszähler Wiki]])</small><br />
<br />
You should test your setup, to make sure, the signals will be correct detected. A simple test can be done with [http://unixhelp.ed.ac.uk/CGI/man-cgi?stty stty].<br />
<br />
* Configure your device (50 Baud, return direct every character)<br />
<br />
# stty time 1 min 1 -icanon < /dev/'''ttyUSB0'''<br />
<br />
* Read each character and create a timestamp:<br />
<br />
# strace -ttt -e read cat < /dev/'''ttyUSB0''' > /dev/null<br />
<br />
* With a bit more code you can better check the results<br />
<br />
# (strace -ttt -e read cat < /dev/'''ttyUSB0''' > /dev/null) 2>&1 | \<br />
awk 'NR==1{t0=$1; next}{t=$1; print 3600e3 /(t-t1)/'''2000''', t-t0, t-t1, $0; t1=t}'<br />
<br />
Adjust the '''device''' and the '''2000''' to the impulse rate of '''your''' watt meter!<br />
<br />
<br />
{| class="wikitable"<br />
|-<br />
! Column !! Result<br />
|-<br />
| 1 || Power in watt<br />
|-<br />
| 2 || Current time in seconds<br />
|-<br />
| 3 || Time difference since last impulse<br />
|-<br />
| 4 || Original trace output with timestamp<br />
|}<br />
<br />
== Channel definition ==<br />
<br />
Please put the device where your energy meter is connected to into the [[Channel attributes#channel| channel attribute]] like this:<br />
<br />
[[File:S0PowerSensorChannel.png]]<br />
<br />
It is '''strongly recommended''' to define a [[Fixed name for USB device|fixed name]] for your device!<br />
<br />
== Software ==<br />
<br />
The software for storing the power data is splited into 2 parts<br />
<br />
=== 1. Daemon ===<br />
<br />
An energy meter with S0 interface sends depending of the actual power usage an amount of impulses per kilo watt hour.<br />
<br />
A common frequency is 1000 or 2000 per kilo watt hour, or 800 as for our energy meter.<br />
<br />
The [https://github.com/KKoPV/PVLng-scripts/tree/master/S0/bin daemon] runs in Background and detects these impulses. It converts them to power usage in watt.<br />
<br />
These power values are written into log file.<br />
<br />
Compile the daemon for your system like this, it will also "strip" the binary afterwards.<br />
<br />
# cd S0/bin<br />
# ./compile<br />
<br />
Afterwards just test it to make sure all works fine.<br />
<br />
=== Test ===<br />
<br />
# ./S0<br />
<br />
Usage: bin/S0 -d <device> [options]<br />
<br />
Options:<br />
<br />
-d <device> Serial port device, required<br />
-r <resolution> Impulses per kWh (kilo watt hour), default 1000<br />
-f <format> Output format, must fit printf(), default "%f"<br />
-l <filename> Log file, default /tmp/S0.log<br />
-v Verbosity level: info<br />
-vv Verbosity level: debug<br />
-F Don't daemonize, run in foreground<br />
-h Show this help<br />
<br />
If program runs in foreground, measuring data are written to <tt>stdout</tt> instead<br />
of log file.<br />
<br />
### Run for test very verbose in foreground<br />
# ./S0 -d /dev/usb-ftdi-1 -r 800 -Fvv<br />
[22-Mar 22:35:18][-d ] Device : /dev/usb-ftdi-1<br />
[22-Mar 22:35:18][-r ] Resolution: 800<br />
[22-Mar 22:35:18][-f ] Format : %f<br />
[22-Mar 22:35:18][-l ] Log file : /tmp/S0.log<br />
[22-Mar 22:35:18][-v ] Verbosity : 2<br />
[22-Mar 22:35:18][-F ] Foreground: yes<br />
[22-Mar 22:35:18] Device /dev/usb-ftdi-1 opened<br />
[22-Mar 22:35:18] Start listening<br />
[22-Mar 22:35:18] Press Ctrl+C to abort ...<br />
[22-Mar 22:35:18] Skip 1st impulse<br />
[22-Mar 22:35:23] 1395524123.582 - 976.773414<br />
[22-Mar 22:35:28] 1395524128.188 - 976.974449<br />
[22-Mar 22:35:32] 1395524132.802 - 975.276735<br />
[22-Mar 22:35:37] 1395524137.393 - 980.170497<br />
[22-Mar 22:35:41] 1395524141.984 - 980.166868<br />
[22-Mar 22:35:46] 1395524146.588 - 977.398846<br />
[22-Mar 22:35:51] 1395524151.210 - 973.802969<br />
Ctrl+C<br />
<br />
'''1<sup>st</sup> value''' is the float timestamp and the '''2<sup>nd</sup> value''' is the actual watt usage.<br />
<br />
The 1<sup>st</sup> impulse will be skipped and used as defined starting timestamp.<br />
<br />
=== 2. Shell script ===<br />
<br />
The [[S0 reader script]] run each minute via cron, analyses the log file and calculates the average.<br />
<br />
This average value will then pushed to the PVLng API.</div>KKoPVhttp://pvlng.com/index.php?title=S0_reader&diff=1583S0 reader2016-10-23T13:39:38Z<p>KKoPV: KKoPV moved page S0 reader to S0 over USB reader</p>
<hr />
<div>#REDIRECT [[S0 over USB reader]]</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1581Installation2016-08-06T19:23:36Z<p>KKoPV: /* Core repository */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== Core repository ===<br />
Your can upgrade your installation at any time with<br />
<br />
$ tools/upgrade.git<br />
<br />
Upgrade your installation to lastest state from Github.<br />
<br />
Usage: tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== Scripts repository ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1580Installation2016-08-06T19:23:15Z<p>KKoPV: /* Core repository */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== Core repository ===<br />
Your can upgrade your installation at any time with<br />
<br />
$ tools/upgrade.git<br />
<br />
Upgrade your installation to lastest state from Github.<br />
<br />
Usage tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== Scripts repository ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1579Installation2016-08-06T19:22:56Z<p>KKoPV: /* Core repository */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== Core repository ===<br />
Your can upgrade your installation at any time with<br />
<br />
# tools/upgrade.git<br />
<br />
Upgrade your installation to lastest state from Github.<br />
<br />
Usage tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== Scripts repository ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1578Installation2016-08-06T19:21:51Z<p>KKoPV: /* PVLng scripts */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== Core repository ===<br />
Your can upgrade your installation at any time with<br />
<br />
tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== Scripts repository ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1577Installation2016-08-06T19:21:38Z<p>KKoPV: /* PVLng core */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== Core repository ===<br />
Your can upgrade your installation at any time with<br />
<br />
tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== PVLng scripts ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1576Installation2016-08-06T19:21:05Z<p>KKoPV: /* PVLng frontend */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== PVLng core ===<br />
Your can upgrade your installation at any time with<br />
<br />
tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== PVLng scripts ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1575Installation2016-08-06T19:20:45Z<p>KKoPV: /* Upgrade PVLng frontend */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade ==<br />
=== PVLng frontend ===<br />
Your can upgrade your installation at any time with<br />
<br />
tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any<br />
<br />
=== PVLng scripts ===<br />
<br />
Just pull the latest changes from GitHub<br />
git checkout master<br />
or<br />
git checkout develop<br />
and<br />
git pull</div>KKoPVhttp://pvlng.com/index.php?title=Installation&diff=1574Installation2016-08-06T19:18:58Z<p>KKoPV: /* Installation */</p>
<hr />
<div>{{TOCright}}<br />
== Software requirements ==<br />
* Operating system with support of periodic job scheduling (for example *nix with cron)<br />
* MySQL ≥ 5.1 (supports table partitions, views, trigger, functions, procedures and events)<br />
* PHP ≥ 5.3<br />
* Web server with PHP support, tested with Nginx (recommended), Apache and Litespeed<br />
<br />
'''See also these [[Software hints|hints]] for details!'''<br />
<br />
== Hardware requirements ==<br />
* A server, which fits the software requirements :-)<br />A Raspberry B with a 4 GB SD card works fine for me as scripts server connected to a central frontend/API sever.<br />
* Some sensors, like [[1-Wire sensor]]s, watt meters with [[S0 reader|S0]] or [[D0 reader|D0]] outputs<br />
* Solar inverter which supports either<br />
** live query of data ([[SMA Webbox]], [[Grouping models#Fronius\SolarNet|Fronius]], [[Grouping models#Kaco|Kaco]], [[Grouping models#Kostal|Kostal]])<br />
** write data in short intervals (quasi-live) somewhere<br />
<br />
== Installation ==<br />
<br />
The system is devided into 2 repositories, the PVLng core repo with [[:Category:Web_frontend|web frontend]] and [[API]] and the [[:Category:Scripts|PVLng-Scripts]] repo with the data aquisition and extraction scripts.<br />
<br />
* [[Core repository installation instructions|Installation instructions]] for {{PVLngRepo}}<br />
* [[Scripts repository installation instructions|Installation instructions]] for {{PVLngScriptsRepo}}<br />
<br />
[[Category:Hardware]]<br />
[[Category:Software]]<br />
<br />
== Upgrade PVLng frontend ==<br />
<br />
Your can upgrade your installation at any time with<br />
<br />
tools/upgrade.git <branch><br />
<br />
This works with <tt>master</tt> and <tt>develop</tt><br />
* Checkout the lastest changes from GitHub<br />
* Apply outstanding database patches if any</div>KKoPVhttp://pvlng.com/index.php?title=Database_reset&diff=1573Database reset2016-08-06T12:47:35Z<p>KKoPV: </p>
<hr />
<div>[[Category:Web frontend]][[Category:Example]]<br />
If you start with PVLng and you come to a point after testing, that you must reset all measuring data in database, do it like this:<br />
<br />
[[File:ResetDatabase1.png|Master data > Settings]]<br />
<br />
Read '''carefully''' the last point of Core section:<br />
<br />
[[File:ResetDatabase2.png|Reset database]]<br />
<br />
=== Step 1 ===<br />
<br />
Enable function and save the settings.<br />
<br />
[[File:ResetDatabase3.png|Reset database]]<br />
<br />
=== Step 2 ===<br />
<br />
Now the real Button to start deleting is visible.<br />
<br />
[[File:ResetDatabase4.png|Button]]<br />
<br />
Click to delete and ...<br />
<br />
=== Step 3 ===<br />
<br />
... confirm with another click within 8 seconds.<br />
<br />
[[File:ResetDatabase5.png|Button]]<br />
<br />
The option is reset afterwards automatic to '''No'''.</div>KKoPV