Jump to content

malaga

Members
  • Posts

    56
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. i want to dive into the creating of file-systems on Linux. so i have some ideas: can you give me some hints on these steps. can i break all down and say so: - in order to do the very first steps in creating a file system ... basically, I'm trying to do the following steps: - create a disk image of about 500MB; - create a GPT; - create a FAT32 partition in the first 300MB(I'll call it UEFI); - create a FAT32 partition in the remaining bytes(I'll call it SYSTEM); - create the following subdirectory in the UEFI partition: /EFI/BOOT/; that said we have the following things: Layouting a disk image and copying files into it mkfs.vfat /dev/md3 # Creates an empty disk image of 33MB. `dd if=/dev/zero of=uefi.img bs=1M count=330 # Formats the disk image as FAT32 mkfs.vfat uefi.img -F 32 # Creates the requested subdirectories. mmd -i uefi.img ::/EFI mmd -i uefi.img ::/EFI/BOOT look forward to hear from you
  2. hello dear TRS-80 first of all - many many thanks for the quick reply. You were right. This is not focussed on the Armbian - i am sorry that i was posting anything against the forum rules. Sorry. - i will try to figure it out - and will read some manpages. Again - sorry for the posting. I am very glad to be part of this great Community - i am a big big Armbian-Fan. have a great day.
  3. Good day dear Armbian-experts, hello everyone hope that youre all right and all goes well at your side. i want to simulate a tree command using Shell Script that displays all the directories recursively in this format: . . |-- Lorem |-- Lorem |-- Lorem |-- Lorem |-- Lorem |-- Lorem `-- Lorem how can this be achived? note: i want to do this on a MX-Linux system - well i can do this with Tree - but wait. I guess that tree has to be installed first..
  4. Hello dear Jeanhuam many thanks for the reply - and for the valuable hints - and the tipps. I will have a closer look a this link and your recommended methods and waiy. Many thanks for all! This forum is such a great place. i am so glad to be here. have a great day Yours Malaga
  5. dear community, let me express that i am very very lucky to be here - to be here and being a part of this great and awesome community. had good times working on Banana-Pi with some stuff like NAS things. But now i want to put on Raspi things that are parts of a IoT-Server. Therefore i am planning a headstart into docker! Docker is a tool that allows you to deploy applications inside of software containers. With Docker, images are used to configure the operating system and install an application's dependencies. Then from the image, containers are created to run the application. Well - running Docker on the Banana Pi seems to be very helpful and useful. It gives me options to run various applications with very little overhead. i am planing to run a pi Server which should be grounded and based on Docker: it is aimed to run it with (for example the following things and ingredients ( of let us say a IoT-server) - see my whishlist: - VPN, - Dropbox backup, - Influx-database, - Grafana, - mosquitto... and so forth ... which are some of the ingredients of a iot-server i guess that docker helps me to solve the issues and mess with all the dependecies of the above mentioned stuff. I want to manage the fuzz of having all the dependncies _ i want to use docker-containers. The apps are difficult to install and come with a bunch of dependencies. in earlier times i install the applications into the filesystem of my Banana-Pi. But this drives me nuts sometime. so i decided to go ahead and to work (in future) with docker-containers. The dockercontainers hide all the things inside and the outside of dockers are standardized. That said - i hope that the the system can handle all the containers (which themselves hold all the preconfigured and prefabricated apps like Dropbox-backup, Grafana and so forth) With the docker from docker-hub i hope to be fine - dockerhub gives me the option to automatically refresh all my applications. for example Where the container stores its configuratons, datas and the logfiles. but wait: these configuration-data are stored inside the containers. The bad thing is - we cannot access these data from the outside. well how to go round this. How to do a workaround What if, i am willing to access the data from the outside? So the question is: Is there a way to map the data from the containers to our standard Raspberry-pi system!? all i want is to do keep the setup of the installation separated from the other data. How to do that - how to achieve this setup!? i really look foward to hear from you regards Malaga
  6. hello dear Arox, hello dear lanefu, first of all: many many thanks for the answer and for the headsup. Arox: thank you Arox - youre right. Lanefu: i am not so familiar with MQTT - protocolls. But i guess youre right. We can do this with MQTT too. we could read the DHT-sensor on BananaPi and mqtt the results. But what if we do it - in other words we can read a sensor like a DHT22 or similar and mqtt the results - (sending the data to GPIO pins) So - we can read a the sensor (DHT22) and then we can MQTT the result to a MQTT broker (the broker could be a. Banana Pi/ OrangePi / RaspBerryPi or similar - (or even better): b. ESP 32 or 8266 that said: Arox and Lanefu - youre right: the MQTT broker could be the banana pi (or a raspberrypi or similar) on which i connect the DHT22 to. so if I wanted I could read it directly, but just in case I wanted to read it from another raspberry. To sume up: MQTT is a pretty nice solution. i try to work it out. i come back and if i have a bit of a structured plan. Again - many many thanks for the great ideas - and for encouraging me to do this in MQTT. this is a awesome forum. greetings Malaga update: well it could look like this... +----------------------------------+ | | | | | MQTT- Broker | | | | | | | | | | Topic | | | | | +--------------------------+ | +--------------------------+ | publish | Temperature | subscribe | | temperature |--------------------------- | |-----------------| | | | | | +--------------------------+ | +--------------------------+ | | + | | | | | | +--------------------------+ subscribe | +--------------------------+ | publish | Humidity |------------------ humidity |--------------------------- | | | | | | | | | +--------------------------+ | +--------------------------+ | | | | | | +-------------------------+ | +--------------------------+ | publish | more data | subscribe | | more data |------------------------ | |------------------| | | | | | +--------------------------+ | | | | | +-------------------------+ | | +----------------------------------+
  7. hello dear fellows, first of all: i am so glad to be here at this great place - this forum is so a great place - and i have gotten so much help here - and you all encouraged me ever and ever to a. think over my plans b. re-design my plans c. re-work the concepts. d. and to go ahead - thanks for encouraging me. - this is a awesome place. hope youre all right and everything goes well at your hometown. Hopefully youre well. Currently i work on a little SBC (Banana-Pi) project. I want to learn Python, and want to do this with some SBC (with Banana Pi and and also arduino-projects. Today: i want to get data (temperature and humidity) from DHT22 into CSV and sending them over the net I am trying to have the BananaPi doing some measurements a. read temperature and humidity from a Adafruit DHT22 sensor, b. take all the data and writing them into a .csv file, Allready i have a setup to read the sensor and print it to the csv-file. note: the formate of the CSV-file data: it should look like so: Temperature,Humidity, Date,Time ",6,5,.,6,*,F,",",7,1,.,1,%,"0,6,/,3,4,/,4,0,",",0,6,:,1,4,.,7,2," some background and preliminary-thoughts: a. why i choose the DHT22: well, basically the DHT (DHT stands for Digital Humidity & Temperature) Those sensors are pretty cheap - and we can do alot with them: they are really low cost digital sensors with capacitive humidity sensors and thermistors are just great for all measures of the surrounding air. Very good for me to go the first steps in using them with Python. A great advantage is that the sensors handle analog to digital conversion very nicely and subsequently also provide a 1-wire interface. So here we go: import os import time import csv import Adafruit_DHT DHT_SENSOR = Adafruit_DHT.DHT22 DHT_PIN = 4 def read_sensor(): #Read data from sensor h, t = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN) #Convert from C to F t = t * 9/5.0 + 32 return (t,h) if humidity is not None and temperature is not None: print("Temp={0:0.1f}*C Humidity={1:0.1f}%".format(temperature, humidity)) # note; i use this little infinite loop by using the “while TRUE:” code. i hope that i can do this here. # what is aimed: this little loop will continually run until a user tries to kills the script. # right at the beginning of every single loop, we utilize the Adafruit DHT lib to retrieve all the data: a. humidity and b. temperature else: print("Failed to retrieve data from humidity sensor") f=open("the_data_logger.csv", "a+") #Write to CSV file #If the file is empty write headers if os.stat('/home/banana/the_data_logger.csv').st_size == 0: f.write('Temperature,Humidity\r\n',Date,Time) wc=csv.writer(f) #Take 10 measurments and write them to the csv file for x in range(10): h, t = read_sensor() wc.writerow('{0},{1},{2:0.1f}*F,{3:0.1f}%\r\n'.format(t, h,time.strftime('%m/%d/%y'),time.strftime('%H:%M.%S')) time.sleep(3) f.close() Well the input into the csv is a little weird but I think it should work just. What i want to do next is to take the calc-data and send it automatically over the network to my PC; After this i should be able to input that data into a google sheet for data interpretation. But this is at the moment a bit tricky. I will muse about this job - the sending of the data over the network. My guess: guess that i can do this with ssmpt (or msmpt) while using a gmail-account; amd besides this i should use mailutils so far my current datat and thoughts. Now i am going to test the code for storing the data in the csv-file. And then i am going to make up my mind how to send the data over the net - to my pc. have a great day. your malaga **smile**
  8. hi there - good day dear Werner, dear Arox, many thanks for the quick reply. I am very glad to hear from you. I have some Orange-Pi here and besides them also a Banana Pi. So - if i am able to get started with the MQTT - protocoll on one device then i surely will implement it on those systems too. I will work it out - more thoroughly Many thanks to you both - for encouraging me. Have a great day. PS - keep up the great work - it rocks!! i am a big big fan of 'Armbian!
  9. Hello dear Armbian-experts, first of all - i hope youre all right and everything goes okay in your hometown. i am currently triyng to get started with MQTT-Protocoll. i want to use it with a RaspBerryPi - see here my diagram: +---------------------------------+ | Device 2 | | | -- | --/ | | Subsciber ---/ | | --/ | | --/ +---------------------------------+ --/ ---/ +-----------------------------+ --/ +------------------------------+ | |-/ | device 1: | | | | Publisher | | MQTT - Broker | +---------------------------------+ | | | | | | | intended measures: | | | Subsciber | Device 3 | | -Temperature | | |--------------------------| | | -Light | Message -> | | | | | -Moisture |------------------------| | | | | | | | +---------------------------------+ | | | | | | | | | | | |-\ | | | | ---\ | | | | - ---\ | | | | ---\ +------------------------------+ +-----------------------------+ Subscriber--\ +----------------------------------+ ---\ | | ---\ | Device 4 | -- | | | | | +----------------------------------+ what is planned: according to the diagram that is shown above: device 1 is my publisher and the other devices(2-3) are meant to be the subscribers. i want to do the following: device 1 publishes on a topic “RaspBerryPi/Temperature-measuremet” devices(2-4) are connected and do a subscription The devices subscribe to the same topic - “RaspBerryPi/Temperature-measuremet” In my plan the devices(2-4) are so called "receivers" and the device 1 is a so called a sender. I want to run the raspi as a broker - is that okay!?
  10. dear fellows, what is aimed: on Raspberry Pi i want monitor the CPU temp at a command line, there is the vcgencmd command. Well We can do this in bash: To read CPU temp at a command line, we can use the vcgencmd command. Example in bash: echo "The CPU is at $(vcgencmd measure_temp) degrees." The CPU is at temp=45.5'C degrees. i think that we can do this with Python as well: import re, subprocess def check_CPU_temp(): temp = None err, msg = subprocess.getstatusoutput('vcgencmd measure_temp') if not err: m = re.search(r'-?\d\.?\d*', msg) # a solution with a regex try: temp = float(m.group()) except ValueError: # catch only error needed pass return temp, msg temp, msg = check_CPU_temp() print(f"temperature {temp}°C") print(f"full message {msg}") and this will return temperatures - like so temperature (°C): 67.0 full message: temp=67.6'C I hopefully have ceated the the code right - with usage of supprocess cf: Python 3 Subprocess Examples https://queirozf.com/entries/python-3-subprocess-examples
  11. Hello dear all, I want to make some experience with linux and my rasperry-Pi. Well - on the Raspberry Pi, (alert-) messages and notifications are a great option: These messages help in any case of automation: The ways and methods being sent are various: These messages can use a broad variety on communication channels (e.g. e-mails, SMSs and i love MQTT). A bunch of APIs are at hand that help to collect data from sensors can be the source for alert emails. With the Raspberry Pi and the the setting of terminal commands. The alert-messages also are able to be configured to be sent by Cron-job. Sometimes using email, is called ugly it's insecure while parsing it is horrible, triggering on a message arriving is difficult? Sometimes much more apropiate is to send small message payloads from one computer to another like MQTT. the event and use-case: i want to send an email when the space on my Raspberry Pi smd-card is on the way to get low. On a sidenote i would like to delete old files when disk space is very full. well this could be a great use-case for testing e-mail-alerts: - sending an email would be easy in python; - the jobs the program needs to do is to check for disk space and delete the oldest files in python also. Well to do this job - i guess that We can use ssmtp and mailutils to send out emails. but i have heard that ssmtp is depreciated and outdated: With mailutils in python i am able to use os.system() orsubprocess(). Here i found a little snippet: CPU, RAM and disk monitoring using python - see the snippet here: https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=22180 what would you suggest - which method is appropiate here!?! look forward to hear from you
  12. dear friends , fellow pi-experts, i have some old 2.5 and 3.5 HDDs here - its still slightly cheaper than buying new ones off-the-shelf USB HDD drives of the same capacity. So - for the NAS i will use the old ones - and I get to select the HDD of my choice for that enclosure. i use Armbian on several systems - bananapi - udoo-quad - orange pi and others more. I love Armbian! plan; building up a NAS based on a Raspi 3 with a 3.5 " HDD. I just want to set up a samba server in linux (raspbian, armbian, or in debian, in opensuse; here we can do 95% of the config in the graphical YaST tool, only for smbpasswd the console is needed iirc), here no monster software is needed and we learn so much more about linux ;-). on a sidenote: i want to learn some Linux-methods and processes (eg. while using spin-down with hd_idle and hdparm see below) btw: I like that approach, i love to start from what i have at hands, see how it works and then start fine tuning to reach the next level :-) Assumptions; I think that i also get to select a SATA to USB interface of my choice for the enclosure as well. I don't know what kind of brand/type of HDD and/or SATA to USB interface i need here - to be installed on those of-the-shelf units. Do you? As most off-the-shelf USB HDD drives don't/never publish what HDD maker/type as well the interface type in their drives. i will have a closer looks at the drives next week - then i will post the types here and let you know what types we have here: (note ive got several). my psu: Mean Well RT-65B AC/DC-Netzteilbaustein, geschlossen 64 W ( https://www.shorturl.at/vPRU2 ) voltage: input max / Eingangsspannung (max.) 264 V/AC voltage: input min / Eingangsspannung (min.) 90 V/AC number & inputs: / Anzahl Eingänge 1 x number & outputs / Anzahl Ausgänge 3 x Power/Leistung 64 W output: Ausgangsspannung 5/12/-12 V/DC Ausgangsstrom (Details) 0.5-8/0.2-3.5/0-1 A note: what is aimed; its all about experimenting and doing some tests. question; - So is this possible? is it safe? again; I got an meanwell psu, and i was wondering if i could power my two 3.5 HDDs and the rpi3 with it? do i need to do something to protect the rpi3, or can i just plug it and and its good to go? The 5V rail on meanwell power supply should be stable enough to power the Raspberry Pi without problem. Note, however, that most switching power supplies need a minimum load to function. i guess that the safety of the whole project depends on the experience and on the care we take when connecting things. As these factors are difficult to ascertain even by by an experienced actuary, i guess that the usual recommendation is to buy a power strip and to use it. question: i need to have a SATA-USB adapter to attach a single HDD or two to a raspi. Well I can say here is that some of my friends had a NAS running 24/7 in such a configuration for quite some time without problems. on a sidenote: - 2.5" HDD only need 5v. 3.5" (and optical drives) need both 5v and 12v. - btw: some USB-SATA adapter have a socket to accept 12v but i'll need to make my own cable. Regarding the power consumptions: - the whole world is full of stories about the "power hungry" machines: - But they sit idle most of the time with a few watts.... so that said - i want to use some special methods to spin down the HDD - with HD-parm or -Idle... btw: I don't have control of what brand/type of HDD and/or SATA to USB interface installed on those of-the-shelf units. Do you? I guess that most off-the-shelf USB HDD drives don't/never publish what HDD maker/type as well the interface type in their drives. -....regarding the spin-down with some linux-techniques: a. hd-idle: b. hdparm: ....see a hd-idle: http://hd-idle.sourceforge.net/ Power management configuration :: https://wiki.archlinux.org/index.php/hdparm i am pretty sure that i can use hdparm & hd-idle to learn some more linux and to do some experiments with spin-down... How would you use these two processes - on event or how !? note - on the images beslow you see various setups - with raspi / banana pi and Udoo quad. but i have a bunch of raspis here - raspi 2 and raspi 3 - and yes: i want to go the raspi 3 way... note - on the images beslow you see various setups - with raspi / banana pi and Udoo quad. but i have a bunch of raspis here - raspi 2 and raspi 3 - and yes: i want to go the raspi 3 way... btw: how you like the mechanical - setup!?
  13. Hi there - good day dear guidol many many thanks for the quick answer - great to hear from you you saved my day - no my whole week I am very glad. Have a great day greetings, Malaga
  14. Hi there Werner many thanks for the quick reply - a big big big SORRY - i did not want to infringe your community-rulez nor anything else. i will add all the wanted infos in any further post. sorry for the posting
  15. hello dear all - good day I need a Operating-System for - Alwinner /banana Pi A 20 - Udoo Quad Makerboard Rev. D. - Orange PI Prime rev 1.0 which one to take!? btw: see the data for the UDOO - Quad Makerboard Rev. D. found the following specs Note i want to build up a NAS/ Samba server. can i do that with this UDoo quad I look forward to hear from you btw: plz keep up this great project - it rocks!
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines