@aunrea
What is happening is that npm can’t find config:check in /home/pi/
You have to move into the Magicmirror folder before running
npm run config:check
South Texas Chick who likes to drink margaritas, float on the river, ride horses, ranch (yes I can work cattle), leave my Christmas lights up all year, adopt tech early before it's barely out of beta, build things, make things, 3d print things, laser cut and etch things, tinker with things, hack things, solder things, weave, sew, knit (only on machines) and more. If all that makes me a Maker then that is what I am. Oh, and I like refurbing 100+ year old circular sock knitting machines. And making socks.
@aunrea
What is happening is that npm can’t find config:check in /home/pi/
You have to move into the Magicmirror folder before running
npm run config:check
@karsten13 that is exactly what I did. I like having it outside the config.js so the config.js doesn’t grow to be a huge file. And so if I mess up when I add to the compliments.json, I won’t break the entire mirror.
I’m adding a whole lot of birthdays and lots of family specific dates. I like having the remoteFile setting so I can keep this data out of config.js.
Thank you for all you have done! I am a newbie to MagicMirror (two months since I started playing with it and figuring it out) and I have installed several of your modules. I’m learning so much about node.js and javascript by tweaking their configurations and I’m impressed. I just found this note from you saying you were going to move on to new things as life has been changing so much for you.
I found MM and your modules because I was creating change in my life. Good LUCK and may you find interesting challenges and satisfaction whatever you end up doing.
And… Thank you!
p.s. I hope you do lurk from time to time and check in on us. You will be missed for sure.
This is my first working module. I wanted to make one button do more than one thing. This module uses a python script to poll the button state. The button can be pressed and released or it can be held down for a long period of approx 4 seconds.
I am currently using MMM-OneButton with the MMM-Pages module to PAGE_INCREMENT the pages upon a button press.
And to ARTICLE_NEXT for the default news module when the button is held.
I have to give Sam kudo for all his examples he has posted on this forum. He’s really helped me a lot.
I plan on making it even more useful by adding in the obligatory screen on/off. reboot pi, etc. But I am excited that I’m finally figuring this stuff out enough to actually make a working module.
If you want to try it out and give me some feedback, it’s located at
https://github.com/Kayakbabe/MMM-OneButton
Sam,
Thank you for this MMM-PythonPrint. More than the sample module this really helped me follow how to wrap my head around how the script.js node_helper and anything else work together. The way you worded the variables and the input and output text really made sense and made it easy to follow what is happening. I am learning a lot. Again, Thank you.
Kelly
@Mykle1 Yes you are a F****** genius! Way to go Pops!
I haven’t coded in python since my first attempt at a magic mirror. In the past couple of months I’ve built 2, a working one for my Dad and now another for me. First I decided that I needed to rewrite the MMM-Flick module because it was crashing my mirror. So, I dove into that. I abandoned the Flick because it really isn’t very reliable and am replacing that with buttons that turn the mirror display on and off and a small adafruit gesture sensor for changing screens. Python was a must. I made a mess but a working mess at that.
Last week, I decided I liked all of Erik Flowers weather icons and that the default weather just didn’t use enough of them. Thus I needed to change the default weather module so it uses the openweathermap weather.id instead of the weather.icon. I’ve been working intermittently for a week and being super frustrated. Today I got the brilliant idea (DUH!) to use a syntax checker on it. Python syntax check… BOOM! DUH! I was putting python in a javascript. DUH! It doesn’t work. DUH!
Just had to share that. 'Cause I laughed so hard my soda squirted through my nose. So now I have a mess of code to clean up and a wet puddle on my desk.
I’m getting a cleaning rag after I hug myself in sympathy pains and pat myself on the back for figuring it out. If I could only figure out how to get 7 evenings of my life back now…
@ember1205 look at the css for text . You want Shadow . It can help with this problem a lot. Won’t make it go away. But help a lot.
@korey_sed Another css tip is not to use “fixed” sizes for things like fonts and widths of div containers or images.
I prefer to use units which are relative in size like em and vh and vw which are relative size units. so 1em on a phone versus 1em on a high rez computer screen will be different sizes relative to the media display. better than pixels which are a fixed size and do not scale with the display.
For instance, I use vw and vh for images, because i actually move my pi around to different size monitors. vw is view height and vh is view width. So for my module that shows an random image (that can change from portrait or landscaped and size everyday), I set the css up for max-width: 50vw which translates to 50% of the view port size and 30vh. (vh is view height.) That way an image in that module will never be bigger than 50% of the width or 30% height of the screen. I find relative sizing really useful for websites that have to support a lot of different devices looking at it. No beans about it, MagicMirror is definitely a website.
You might want to google about relative css units. here is a links to get you started if you want to try it.
@sdetweil even better! Then it’ll run on many more operating systems!
@kayakbabe if you can get it working with python, I’m thinking maybe the python package pyserial would be enought.
@rubberduck that should be totally doable with python. And the mirror and python can be done. There are several module that use python scripts. Are you wanting to just turn the tv on and off?
your tv will need to be able to restart on the same hdmi port you have your video from your pi feeding into. just a thought.
If you want to just keep the tv on, but blacken the screen, your tv might have a screen saver or something … some do.
@BKeyport If you want to spin your own, take a look at Sams MMM-PythonPrint example he has posted in these forums. It can run any python script with little tweaking. It sure helped me get off the ground with this.
I’m going to flesh my OneButtons out to do many actions with just one button (or many actions with several buttons) and add the tv cec or lcd commands to sleep and wake up. And shutdown and Reboot. It can send any notification that is useful to the Mirror or modules running. I am thinking of having it do something fun like if double clicked fast… pop up a screaming halloween face… My brother likes to try to “Break” thinks. I want to give him a surprise.
I think it’s possible to do one button with maybe 6 or seven different actions. I’ve got four working so far and when I get it where I think it’s stable, I’ll put it out on git hub for some feedback.
This is my first working module. I wanted to make one button do more than one thing. This module uses a python script to poll the button state. The button can be pressed and released or it can be held down for a long period of approx 4 seconds.
I am currently using MMM-OneButton with the MMM-Pages module to PAGE_INCREMENT the pages upon a button press.
And to ARTICLE_NEXT for the default news module when the button is held.
I have to give Sam kudo for all his examples he has posted on this forum. He’s really helped me a lot.
I plan on making it even more useful by adding in the obligatory screen on/off. reboot pi, etc. But I am excited that I’m finally figuring this stuff out enough to actually make a working module.
If you want to try it out and give me some feedback, it’s located at
https://github.com/Kayakbabe/MMM-OneButton
@OldSunGuy Thats really cool! I’ll have to check that device out.
@sdetweil I’m looking at the configuration variable repetative and trying to figure out what it is for.
is this correct logic for true and false?
repetative: true
if your python script runs in a loop forever by itself so the spawn in node helper will just keep its connection to the python script open
repetative: false
if your python script runs one time, and you need node_helper to keep spawning over and over so you can get the info from the python script over and over
@OldSunGuy That’s because the browser software itself built into older TV’s and (even firestick, chromecast, appletv if they aren’t ever updated by their owners ) etc might not be compliant with the full newer html spec.
You also can find the situation where a web browser app on one of those older devices might have newer software insdie the app so it can display a website, that the builtin browser of the tv itself can’t display.
If that old TV/app/computer is running a really old browser software, it isn’t going to be able to execute the newer javascript versions.
So using the built in browser on older equipment is a crap shoot at best - especially with older televisions and old hardware that can’t be updated.
In those cases “casting” the output from the hardware running the serverside and clientside software over to the television is the only way to get it on the tv. The quality of the “casting” device is going to matter a LOT. Hardwiring with direct cables is always going to be the best.
But screen casting is really good now days. That said if you device only casts 720 and you have a 4k computer output and a 4k monitor it will look like crap. The screencast device can’t push the 4k info through it and will downgrade the signal to 720.
If you get a casting setup that matches the computer and monitor, it will look a lot better.
My old screen cast device looked horrible on my new 4k tv. So I gave it away and got a newer J5create screencast device that matches the output display on my pi and the capabilities of my best tv.
I can cast anything I want to the tv and it looks good.
many Chromecast /roku/hulu type devices are capable of recieving… but you might need a dongle added to your computer to send to it. I don’t use chromecast,firestick, etc.
Becuase I run the same software locally on my laptop and I just use the J5create to send the screen to my tv.