Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 593|Reply: 5

HDMI switch?

[Copy link]

2

Threads

7

Posts

28

Credits

Novice

Rank: 1

Credits
28
Post time 2020-4-19 05:06:51 From the mobile phone | Show all posts |Read mode
I'm using an Orange Pi Prime to build a Magic Mirror.  The module I'm trying to install is for switching the HDMI on/off with a PIR sensor.  The module is called MMM-PIR-Sensor.  The readme file it says to execute this command sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt.  The result I get is:chmod: cannot access '/opt/vc/bin/tvservice': No such file or directory.  I believe the module is set up for Raspberry pi and the issue I'm having is due to disconnected libraries?  Anyways, I'm relatively a novice so any help to figure this thing out is greatly appreciated.  The OS I'm using is Armbian 20.02.1.  Let me know if there is any other info needed because I think this is a tough problem.  I've searched quite a bit with no good answers

2

Threads

7

Posts

28

Credits

Novice

Rank: 1

Credits
28
 Author| Post time 2020-4-21 10:10:02 | Show all posts
Hey I may have stumbled on another solution?  https://github.com/xfce-mirror/xfce4-power-manager
I'm not sure if Armbian is a XFCE desktop though.  A quick google search seems promising but let me know what you think.  If it is I'll have to look into those requirements.

31

Threads

241

Posts

1075

Credits

Gold member

Rank: 6Rank: 6

Credits
1075
Post time 2020-4-19 07:13:56 | Show all posts
NYgrule56,

  Like you, I'm a novice.
  Is that directory and file in/on the drive?  "/opt/vc/bin/tvservice"  "/bin/chvt"  And are those files there?  chvt/tvservice?  I think those are supposed to be files.
There are so many instructions on creating different mirrors; I'm not sure which you are looking at nor if it is relavant I look.

I looked for the project you are following online and I don't think I was able to locate it. I did find one by mr Price.  
http://blog.dylanjpierce.com/raspberrypi/magicmirror/tutorial/2015/12/27/build-a-magic-mirror.html
And another here.
https://www.instructables.com/id/How-to-Make-a-Magic-Mirror/

However, there is a OS like raspberry pi in the downloads of the PRIME boards section.
https://drive.google.com/drive/folders/1wldPfbB5h1DsEYQw8rSf1ipBJPtsDROQ

I guess the question is, who installed these modules? Are they OS native or something needed installed for the sensor?

What about switching PIR sensors? https://www.seeedstudio.com/blog/2019/08/03/pir-sensor-introduction-and-how-pir-motion-sensor-works-with-arduino-and-raspberry-pi/

Got Info?  



Thanks  [url=http://www.orangepi.org/orangepibbsen/static/image/smiley/default/biggrin.gif]http://ww

2

Threads

7

Posts

28

Credits

Novice

Rank: 1

Credits
28
 Author| Post time 2020-4-21 09:41:26 | Show all posts
Narly9999,
Hey thanks again for the response!  You know what I'm not totally sure about the tvservice if that is a file or command?  Either way it seems what I can find is that it is related to the RasPi.  I'm not sure if there is an equivalent file/command that I can use for the Orange Pi or Armbian.  It's funny you found that instructables article.  That's exactly what started me out with the whole thing and trying to get this running on an Orange Pi.  Anyways, I can give you the quick idea of how the whole thing works.  After you install an OS on the device (Orange Pi) then you download the main program from this site:
https://magicmirror.builders/
This program comes with a config file and some out of the box modules you can play around with and learn the basics of how to set up what you want to display and get the mirror running.  Also, there are several 3rd party modules you can clone from GitHub.  They all run the same way.  You clone the module and place a config string into the MM config file.  So long story short, this HDMI sleep module is a 3rd party deal.  It specifically states right on step 4:
4. Execute `sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt` to allow turning on/off the hdmi output.
See when I start having problems with stuff that is supposed to work the coding noob starts to show...lol.

31

Threads

241

Posts

1075

Credits

Gold member

Rank: 6Rank: 6

Credits
1075
Post time 2020-5-4 12:55:43 | Show all posts
Edited by Narly9999 at 2020-5-3 23:59

NYgrule56,

  You should be able to switch which ever desktop to xfce.   I've seen the different desktops are switchable if I did understand correctly.  I beleive you just run: sudo apt install (desktop install utility of choice)

Did a search for tvservice and I see one site is saying there are three diffrent commands/modules that will do this.  vcgencmd, tvservice and cec-client.  Relavent or not, I dunno.  But it does appear to be a module which might be avilable from the repository.  I.E. sudo apt install tvservice
  Should I try that first?  Hmmm,, Hang on a sec.   I was able to find cec-utils was availble for install on Ubuntu Mate.  I typed in the commands from the terminal command line. I.E.  username@computer:-$  tvservice, username@computer:-$ cec-client and username@computer:-$ vcgencmd  The other two commands returned, command not found, but the cec-client returned it was able to be installed.  These results will be diffrent or the same for you.  As I am runing this on an odroid XU4 with Ubuntu MATE, it might be uncompatible yet that doesn't mean unconfigurable.  Wait, I guess I could try on an ARMBIAN box.  Let me switch.  Okay, the same results on ARMBIAN as are on Ubuntu MATE.   

I did some google searches for the cec-client and cec-utils.  Lots of returns.  Not sure of it's specific application to turn the monitor on and off.  Maybe it's in the docs some palce.

Eventhough they are discussing respberry pi, many of these commands should work on other linux systems.  It's just that raspberry pi is the go to for many as a well traveled road.

Well, that's my findings.  I wonder if I can find the command to dim the tv.   Well there is a command that pours out all the commands it understands.  Hmmm,

Dogs want fed. I'll check back later.
Thanks  [url=http://www.orangepi.org/orangepibbsen/static/image/smiley/default/biggrin.gif]http://ww

31

Threads

241

Posts

1075

Credits

Gold member

Rank: 6Rank: 6

Credits
1075
Post time 2020-5-4 13:01:48 | Show all posts
Edited by Narly9999 at 2020-5-4 00:09

I also found this interesting.  https://en.wikipedia.org/wiki/Consumer_Electronics_Control
A remote control utility? You say?  Hmm, I'd imagine if you know the commands you could fake the command of the remote from somewhere.  Just a thought

Then there was this.  https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/tvservice/tvservice.c
Thanks  [url=http://www.orangepi.org/orangepibbsen/static/image/smiley/default/biggrin.gif]http://ww
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2020-8-7 06:01 GMT+8 , Processed in 0.032350 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list