PI or NAS

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
har0543
Posts: 12
Joined: Wednesday 06 January 2016 12:34
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Aalten netherlands
Contact:

PI or NAS

Post by har0543 » Tuesday 14 November 2017 10:31

Hi,
I have Domoticz running on a Raspberry pi. This works ok although I have some "database disk image is malformed" errors sometimes.

I also have an Synology NAS. I installed Domoticz on it and changed one sensor to it.
This works.

Question is now: What is the best system to run Domoticz on a Pi or a NAS, in therms of energy consumption and reliability?

Harry

User avatar
EdwinK
Posts: 883
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: PI or NAS

Post by EdwinK » Tuesday 14 November 2017 10:37

Energy-wise I would say the PI is using less power then the Synology. Realibily wise I think they both are the same.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

gordonb3
Posts: 551
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: PI or NAS

Post by gordonb3 » Tuesday 14 November 2017 17:15

That would depend on whether you ever shut down the NAS. If you don't then running the Pi as well will cause you to consume more power. As far as reliability goes, flash memory is known to have a limited life time when used for running an Operating System and/or frequent writing like Domoticz will do if you have any sensors connected to it. Mechanical drives are still suited best for this purpose, however you should stay away from `green` drives as these are configured to park themselves after just a few seconds of inactivity and this also causes rapid ageing and breaking. In essence this means you cannot use a USB drive like WD Passport as a storage facility for your Pi.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

User avatar
Siewert308SW
Posts: 495
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: PI or NAS

Post by Siewert308SW » Tuesday 14 November 2017 17:40

For 1.5 years i run my root from a Seagate 1TB Expansion HDD on my Pi3.
No need for extra powered HUB and never saw any corrupt database or anything else.
Made this choice after 2 corrupt sd-cards in 6 months and happy a turned over.
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

User avatar
EdwinK
Posts: 883
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: PI or NAS

Post by EdwinK » Tuesday 14 November 2017 17:56

Siewert308SW wrote:
Tuesday 14 November 2017 17:40
For 1.5 years i run my root from a Seagate 1TB Expansion HDD on my Pi3.
That will be the next step. Still got a 2TB Seagate drive somewhere. Can be used for this. First figure out how-to do this
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

User avatar
Siewert308SW
Posts: 495
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: PI or NAS

Post by Siewert308SW » Tuesday 14 November 2017 18:02

EdwinK wrote:
Tuesday 14 November 2017 17:56
Siewert308SW wrote:
Tuesday 14 November 2017 17:40
For 1.5 years i run my root from a Seagate 1TB Expansion HDD on my Pi3.
That will be the next step. Still got a 2TB Seagate drive somewhere. Can be used for this. First figure out how-to do this
Depends on how many amps the HDD is asking.
My Seagate drive ask for .48 amps so it is usable without a extra powered USB hub.
Some drive do ask more then you have to use a USB powered hub.
As for a how to:
viewtopic.php?t=14525
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

gordonb3
Posts: 551
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: PI or NAS

Post by gordonb3 » Tuesday 14 November 2017 19:49

Siewert308SW wrote:
Tuesday 14 November 2017 17:40
For 1.5 years i run my root from a Seagate 1TB Expansion HDD on my Pi3.
No need for extra powered HUB and never saw any corrupt database or anything else.
Made this choice after 2 corrupt sd-cards in 6 months and happy a turned over.
Beware! If you hear a `ping` or clicking noise at regular intervals (say ~10 seconds) then you're drive is killing itself. You may also be able to feel the associated movement inside the drive by touching the encasing. To verify you can run the following command:

Code: Select all

smartctl -d ata -a /dev/sda
(or whatever device designation the drive received)

Watch for the line that says `Load_Cycle_Count`. You will likely see a ridiculously high number there that may already be far above the manufacturer's life expectancy specifications. What this means is that your drive may die on you any second now. If you want to run your Pi (or a plug computer) like this you shoud use a proper encasing with passive cooling and a NAS specification drive. Which will effectively even use less power than the `green` expansion drive, even though the specifications may state otherwise.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

User avatar
Siewert308SW
Posts: 495
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: PI or NAS

Post by Siewert308SW » Tuesday 14 November 2017 20:16

gordonb3 wrote:
Tuesday 14 November 2017 19:49
Siewert308SW wrote:
Tuesday 14 November 2017 17:40
For 1.5 years i run my root from a Seagate 1TB Expansion HDD on my Pi3.
No need for extra powered HUB and never saw any corrupt database or anything else.
Made this choice after 2 corrupt sd-cards in 6 months and happy a turned over.
Beware! If you hear a `ping` or clicking noise at regular intervals (say ~10 seconds) then you're drive is killing itself. You may also be able to feel the associated movement inside the drive by touching the encasing. To verify you can run the following command:

Code: Select all

smartctl -d ata -a /dev/sda
(or whatever device designation the drive received)

Watch for the line that says `Load_Cycle_Count`. You will likely see a ridiculously high number there that may already be far above the manufacturer's life expectancy specifications. What this means is that your drive may die on you any second now. If you want to run your Pi (or a plug computer) like this you shoud use a proper encasing with passive cooling and a NAS specification drive. Which will effectively even use less power than the `green` expansion drive, even though the specifications may state otherwise.
Drive never clicks, runs smoothly for 1,5 years now.
I did a lot of rebooting and APM is disabled each time my Pi reboots since 2 months.
I bought the drive somewhere in 2014 so the stats don't worry me.
Although the Load_cycle_count is 377441 isn't something i worry about as the expected Load_cycle_count is approx at 600000

Code: Select all

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Momentus SpinPoint M8 (AF)
Device Model:     ST1000LM024 HN-M101MBB
Serial Number:    S30CJ9CG347506
LU WWN Device Id: 5 0004cf 20f76a5b3
Firmware Version: 2BA30003
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Nov 14 19:11:43 2017 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(12060) seconds.
Offline data collection
capabilities: 			 (0x5b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 201) minutes.
SCT capabilities: 	       (0x003f)	SCT Status supported.
					SCT Error Recovery Control supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   051    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0026   055   055   000    Old_age   Always       -       11003
  3 Spin_Up_Time            0x0023   092   090   025    Pre-fail  Always       -       2672
  4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1335
  5 Reallocated_Sector_Ct   0x0033   252   252   010    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   252   252   051    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0024   252   252   015    Old_age   Offline      -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       9070
 10 Spin_Retry_Count        0x0032   252   252   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       356
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1336
191 G-Sense_Error_Rate      0x0022   100   100   000    Old_age   Always       -       629
192 Power-Off_Retract_Count 0x0022   099   099   000    Old_age   Always       -       1215
194 Temperature_Celsius     0x0002   064   057   000    Old_age   Always       -       31 (Min/Max 21/44)
195 Hardware_ECC_Recovered  0x003a   100   100   000    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   252   252   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   252   252   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   252   252   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0036   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x002a   100   100   000    Old_age   Always       -       19255
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       356
225 Load_Cycle_Count        0x0032   063   063   000    Old_age   Always       -       377441

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%      9070         -
# 2  Short offline       Completed without error       00%      9070         -
# 3  Extended offline    Interrupted (host reset)      50%      8365         -
# 4  Extended offline    Completed without error       00%      4119         -
# 5  Short offline       Completed without error       00%      4116         -
# 6  Extended offline    Aborted by host               90%      4116         -

SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Completed [00% left] (0-65535)
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

User avatar
HansieNL
Posts: 326
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi
Domoticz version: Stable
Location: NL
Contact:

Re: PI or NAS

Post by HansieNL » Tuesday 14 November 2017 22:22

Running Domoticz on a Raspberry Pi with a external SSD. Rasbian is installed via BerryBoot to SSD and then installed Domoticz. Running smoothly for more than a year now.
I had a read-only sd-card twice before, that's why I choose for a SSD solution.
Blah blah blah

freakshock
Posts: 53
Joined: Friday 14 April 2017 13:39
Target OS: NAS (Synology & others)
Domoticz version:
Location: The Netherlands
Contact:

Re: PI or NAS

Post by freakshock » Tuesday 14 November 2017 22:26

So is there any reason not to run Domoticz on a NAS like a Synology if it runs 24/7 anyway?

User avatar
Siewert308SW
Posts: 495
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: PI or NAS

Post by Siewert308SW » Tuesday 14 November 2017 22:32

freakshock wrote:
Tuesday 14 November 2017 22:26
So is there any reason not to run Domoticz on a NAS like a Synology if it runs 24/7 anyway?
If your keen on power consumption, maybe?
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

User avatar
Egregius
Posts: 2431
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: PI or NAS

Post by Egregius » Tuesday 14 November 2017 23:11

If the Syno runs 24/7 anyway and it isn't one of those cheap models run it there.
Otherwise a Pi is a good solution if you keep good backups in case of SD failure.
I used both but switched to a Intel Nuc, running Debian in a container on Proxmox. Hasn't ran faster than this before AND it's very easy to take complete system snapshots.

gordonb3
Posts: 551
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: PI or NAS

Post by gordonb3 » Wednesday 15 November 2017 14:39

Siewert308SW wrote:
Tuesday 14 November 2017 20:16
Drive never clicks, runs smoothly for 1,5 years now.
I did a lot of rebooting and APM is disabled each time my Pi reboots since 2 months.
I bought the drive somewhere in 2014 so the stats don't worry me.
Although the Load_cycle_count is 377441 isn't something i worry about as the expected Load_cycle_count is approx at 600000
Okay, just so you know.

BTW the math says you're doing an average of about 1 LCC per minute, meaning you'll hit the 600.000 mark somewhere on April 18 next year.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

koowee
Posts: 73
Joined: Thursday 29 December 2016 19:17
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Finland
Contact:

Re: PI or NAS

Post by koowee » Wednesday 15 November 2017 15:54

Do you have any experience of these small SSD drives with RPi or is this about same that normal USB memory stick?

https://www.amazon.com/Kingspec-Speed-S ... B00JF0AVJ6

User avatar
EdwinK
Posts: 883
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: PI or NAS

Post by EdwinK » Wednesday 15 November 2017 18:05

Those look nice. And cheap. No experence with any ssd. Hope they are good, then i might buy me one.
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

har0543
Posts: 12
Joined: Wednesday 06 January 2016 12:34
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Aalten netherlands
Contact:

Re: PI or NAS

Post by har0543 » Wednesday 15 November 2017 21:27

Hi,
Thanks for all the kind responses.

As my NAS is always on I changed to the NAS version.
In the NAS are two WD Red WD40EFRX, 4TB drives.

Is it wise to use an USB drive for the database and/or backups to reduce the use of the drives in the NAS

regards,
Harry

gordonb3
Posts: 551
Joined: Friday 22 January 2016 11:15
Target OS: Linux
Domoticz version: custom
Location: The Netherlands
Contact:

Re: PI or NAS

Post by gordonb3 » Wednesday 15 November 2017 22:42

No. WD Red is perfect for this job. It is the green drives that you'll find in USB expansion encasements that are a problem when used this way. And while most of these drives can be flashed to behave like a NAS spec drive, that is most likely a bad idea as well if you leave it inside the original casing because the drive is bound to generate more heat in this mode.
Excito B3 running Gentoo Linux, P1, Rfxtrx433 to read and control TFA, KaKu, EvoHome RFG100
Custom patched Domoticz v3.8000

User avatar
heggink
Posts: 317
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.7067
Location: NL
Contact:

Re: PI or NAS

Post by heggink » Wednesday 15 November 2017 23:25

Wd have a pi specific drive which I use for 2 pi's. Power much better than 3.5 drive since it's a 2.5". As to green vs red, there is a wd setting to disable the idle timer on greens (wdidle3) . Did that for my freenas system. Whilst the red's are sold for nas, they are internally identical and over priced (for the exact same URE rate). Worked great and has been running for years with no increase in LCC.
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

User avatar
BakSeeDaa
Posts: 495
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: PI or NAS

Post by BakSeeDaa » Thursday 16 November 2017 9:42

Siewert308SW wrote:
Tuesday 14 November 2017 17:40
Made this choice after 2 corrupt sd-cards in 6 months and happy a turned over.
Just curious, I never had problems with any SD card ever. What brand/model of SD card did you use? Was it really a class 10 of good quality or was it one of those cheap chinese "no name" SD-cards that gets bundled for free? (No need to say, the latter is useless of course)

Personally I would never use anything else but Sandisk Extreme PRO micro SD when it comes to SD-cards. (Not, "Ultra", not just "Extreme" but "Extreme PRO") But that's me. It would typically cost you a few bucks more.
mdmobcmKD2P296GEaNLHJhg.jpg
mdmobcmKD2P296GEaNLHJhg.jpg (11.47 KiB) Viewed 209 times
Cheers!
Best wishes

// บักสีดา

User avatar
Siewert308SW
Posts: 495
Joined: Monday 29 December 2014 16:47
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands - Zoutkamp (gn)
Contact:

Re: PI or NAS

Post by Siewert308SW » Thursday 16 November 2017 11:08

BakSeeDaa wrote:
Thursday 16 November 2017 9:42
Siewert308SW wrote:
Tuesday 14 November 2017 17:40
Made this choice after 2 corrupt sd-cards in 6 months and happy a turned over.
Just curious, I never had problems with any SD card ever. What brand/model of SD card did you use? Was it really a class 10 of good quality or was it one of those cheap chinese "no name" SD-cards that gets bundled for free? (No need to say, the latter is useless of course)

Personally I would never use anything else but Sandisk Extreme PRO micro SD when it comes to SD-cards. (Not, "Ultra", not just "Extreme" but "Extreme PRO") But that's me. It would typically cost you a few bucks more.

mdmobcmKD2P296GEaNLHJhg.jpg

Cheers!
No Chinese stuff.
Had SanDisk class 10 32gb ultra and a Samsung class 10
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz
1x RPi3 - PIco hv3.0A Plus / PiHole
1x RFXtrx433E / Aeotec ZW090
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/z-wave stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests