@sdetweil said in Question about backup script:
how to use git config
OK, thanks.
I had understood that this is a config of your scripts, sorry.
@sdetweil said in Question about backup script:
how to use git config
OK, thanks.
I had understood that this is a config of your scripts, sorry.
@sdetweil said in Question about backup script:
if i find extra files i need a place to store them, so the module name for a folder is created
Thanks for this explanation - this is what I had assumed.
Regards,
Ralf
@sdetweil said :
you could use git config to save those, and avoid the prompts
Sounds cool.
How can I do this?
Thanks!
Ralf
@sdetweil said in Question about backup script:
hm… I did
Dear Sam (@sdetweil),
yes - this worked for me as well :-)
Now figured out how it works:
Have issued
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror-backup-restore/main/mm_backup.sh)" -r https://github.com/rkorell/MagicMirror -p
Then I was asked for username and password (twice) and git upload worked…
It seems git upload now contains a copy of local directory mm_backup.
If I check both, there are only a few directoris in Github as well as locally - much fewer than total number of installed modules…
What is the criterium for a module to “earn” a directory or not?
Thanks a lot!
Warmest regards,
Ralf
last trial (after digging in your script I understand that -p is not that correct…)
So I’ve figured out that reponame and username have their own prefix.
A prefix for the token is not present, so I assume user:token could be feasible.
So I came to
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror-backup-restore/main/mm_backup.sh) -p -r MagicMirror -u rkorell:ghpthisismyverylongandcryptictokenforgithub"
But this doesn’t work either…
So I’m desparately looking for the right place to put in the right parameters in the right manner.
Sorry for being this dumb…
Regards,
Ralf
@crowimu - Just a quick question: Have you considered to use a newer version of a Pi? A 4B or even 5?
Pi2 is somewhat old - may there is a kind of a root cause?
Regards,
Ralf
@sdetweil Dear Sam,
seen backup/restore days ago and as the question arises here - I struggle with the commend line :-(
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror-backup-restore/main/mm_backup.sh)" -h
works - I get some hints - same as on your github repo.
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror-backup-restore/main/mm_backup.sh)" -p
doesn’t work?
"illegal option '- ’ " is the error message.
Where can I place the -p option?
(inside the brackets I get an errormessage from curl …)
This is also true if I add repo- and username and the token.
There is my second question: how to pass the parameters?
I’ve tried
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror-backup-restore/main/mm_backup.sh)" -p MagicMirror rkorell ghp_thisismyverylongandcryptictokenforgithub
But with no luck.
MagicMirror is a fresh created repo, rkorell is my username on GitHub - token is fresh created private token according your guidance in module description.
Can you please help?
Thanks a LOT -as always,
Ralf
I had tried a Hannspree Touch monitor which worked out of the box with Raspian OS - without any driver installation.
So it should work with MagicMirror as well.
Video is connected via HDMI and touch is realized via USB.
I do not use it for my MagigMirror - it‘s to small for my use-case.
If you really want to realize a MIRROR keep in mind that every capacitative touch functionality will NOT work behind a reflecting surface.
For this use case you have to consider IR-Frames around your mirror.
If you just want to use the monitor - fine …
Regards,
Ralf
@crowimu Found in completely different context another hint to onoff - also related to GPIO (in concrete a GPIO related implemetation of a rotary decoder).
There was a suggestion
npm install --save onoff@6.0.0
I currently only „assume“ that @6.0.0 is the version - cause the cited post is from 2021 there could be a new version.
A quick google delivers this page and this one stated
npm install onoff
Will do the trick…
Good luck.
Ralf
@crowimu Last thought - after some googeling…
Axled (the author has a thread about his module.
In one of his posting he stated
“rotation and click (Button press) uses the same library (onOff).”.
“node_modules/onoff/onoff” is part of your error-listing.
So I can imagine you need this onoff -library to read the GPIO-output.
Further research on this let me assume that onoff in some kind is associated to node.js (@sdetweil for sure knows more on this than me…).
At least one onoff library in this context is this one - but I’m not sure if this is the right one.
May you give it a try…
edit: I’ve just checked - on my own mirror there is NO onoff directory in “MagicMirror/node_modules/”
Good luck.
Ralf
@crowimu
Only thing that comes in my mind that you have either put cable on wrong GPIO or cable is broken.

As per default you have either to use GPIOPins: [26,20,19]//rotary cw, rotary ccw, rotary press (BCM Numbering - marked yellow in the above picture) or (if occupied) enter the correct BCM (!) numbers in config of module.
If this is all correct, module should work.
@crowimu
I‘m not using this module and I do not know which of GPIO‘s you are using for your rotary encoder -
In the module‘s description the author mentioned an eventually necessary modification for some of the PI‘s:
On some Raspberry Pis it is neccesary to put the following line to /boot/config.txt for the GPIO where "rotary press (SW)" is connected:
gpio=19=ip,pu
Background: Sets your GPIO 19 as input (ip) and pull up (pu) Change the entry according to the GPIO pin you use.
Have you double checked this?
Your error-listing shows „invalid argument , write“ in some context to GPIO…
May there is a topic for further investigation….
Good luck!
Regards,
Ralf
@sdetweil OK, have pulled update and disabled debug options again.
Keep you posted.
THANKS for your effort!
Ralf
Dear Sam, @sdetweil ,
Just for your information - no action necessary:
Unfortunately problem re-appears if I take the debug and debugging option out.
But: No worries - with these options enabled, birthdaylist doesn’t disappear, so for me it “works” …
Thanks for your great work!
Ralf
@sdetweil :-)
Just yesterday I made some other minor changes and with this I‘ve deactivated the debug parameters for your module.
Will keep this in my eyes and report back, if problem re-appears or not.
Thanks so far !
Ralf
@newbi asked
can i develope on my Laptop or do i need to create a developement environment on my raspy
Dear @newbi ,
neither, nor :-)
You can “develop” physically on your laptop but the files (should) remain on the Raspi.
On the Raspi therefore you do not need a “development” environment.
You need a FTP Browser - connect this one via SFTP to the Raspi (SSH should be enabled on the Raspi - then SFTP works inherently).
Than you click right on the remote (Raspi) File(s) you need to modify and open the file(s) with a (Laptop) local editor of your choice.
When changes are done, save the file and restart the mirror - then you see the changes.
At least this is the way as I do those things - currently NOT programming but changing custom.css and config.js.
I am on a Windows laptop in most cases and I use BitVize for FTP and SSH and Sublime as Editor (which is for “programmers” because several “languages” are marked up nicely).
For a quick view on the result I use VNC-Viewer which gives me a better view because I have my display in portrait format which isn’t displayed nicely in Webbrowser).
HTH
Regards,
Ralf
@mediahypno
I guess to get both - easyness and cheapness is not possible…
As far as I have seen pictures around and read several comments here in this forum I got the impression that best result will be with glass - this is kind of expensive.
The cheaper version with Acrylic is not that “brilliant” and there are may some restrictions in the viewing angle.
The least expensive so cheapest version is the foil - this is the far most complicated one because you have to apply the foil on some kind of Acrylic or glass which often fails due to bubbles, scratches, dust or whatever.
I definitely wanted to go for glass.
In the meantime I have decided to build up a “Magic Signage” not a mirror.
This is caused by the fact that the already build up prototype is present since several weeks in our living room and we visit this beauty several times a day.
So the final version will stay nearby - at least in the living room and a mirror at this place doesn’t make any sense to us.
(initially planned was to replace the mirror in the hallway but this becomes obsolete for the above reasons)
HTH,
Regards,
Ralf