Go to advanced search

by bmattila55
Fri Nov 09, 2018 1:48 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

nothing, but then you need to know there is a module (or know python enough to know where to search for modules)., given the talk above I'm guessing they don't know python at all. :-) CEC https://pypi.org/search/?q=cec email https://pypi.org/search/?q=email twitter is often better as it can be moni...
by bmattila55
Fri Nov 09, 2018 1:47 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

DougieLawson wrote:
Thu Nov 08, 2018 5:12 pm
Why are you running a shell command and parsing the output? what's wrong with using a python interface to libcec?

https://github.com/trainman419/python-cec
There is a python interface!!! I had no idea. Thanks man
by bmattila55
Thu Nov 08, 2018 3:37 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

Idahowalker wrote:
Thu Nov 08, 2018 2:18 am
I went to gmail, made a gmail account, for my RPi, and use Python to log into the account and send email through.
Thanks
by bmattila55
Thu Nov 08, 2018 3:36 am
Forum: Advanced users
Topic: Assign diff IP to eth0 than wlan0 on 3B+ ?
Replies: 9
Views: 683

Re: Assign diff IP to eth0 than wlan0 on 3B+ ?

without a make/model number of your camera its tricky to advise, but in my limited experience with a few home wifi gadgets, when a device starts up offering an AP it can often be a setup portal for configuring your networks wifi credentials and sometimes even allow the setting of a static ip. A com...
by bmattila55
Thu Nov 08, 2018 12:26 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

Anyone have any insight in how I would mail a message? I am guessing if I use the bash commands for mail I can have it set up in a for or while loop. Does the pi have to have an email account setup first or does it just need a connection to the mail server? Or, because I am directly plugged into via...
by bmattila55
Thu Nov 08, 2018 12:24 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

Inside the status variable will be a ':'. The ':' and all the words to the left are not needed, so I'd split on the ':' with something like status = status.split( ":") which will give most of the answer you are looking for. Next, status[1] will contain the info you are looking for. Status[1] will c...
by bmattila55
Thu Nov 08, 2018 12:23 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

OK, this kind of thing. import subprocess cmd = ['echo', '''opening a connection to the CEC adapter... power status: on 0'''] p = subprocess.Popen(cmd, stdout=subprocess.PIPE) reslt = p.stdout.read().decode('ascii') # split() works on strings res_lines = reslt.split('\n') res_words = res_lines[1].s...
by bmattila55
Thu Nov 08, 2018 12:21 am
Forum: Advanced users
Topic: Assign diff IP to eth0 than wlan0 on 3B+ ?
Replies: 9
Views: 683

Re: Assign diff IP to eth0 than wlan0 on 3B+ ?

I've confused myself into a corner. Trying to hook up a security cam in the garage to a Pi 3B+ running MotionEye application (not O/S) on Stretch. The cam has a built-in wireless access point (AP) and an Ethernet connection for wired access. Simplistically, that tells me that it wants to be "the se...
by bmattila55
Tue Nov 06, 2018 2:17 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

paddyg wrote:
Tue Nov 06, 2018 1:11 am
It's not too difficult. You need to use stdout=PIPE or, in your case something like communicate() would probably do.

PS then parse out the bits you want using split()
Would you be able to give an example of this just to get me on the right track? Thanks
by bmattila55
Tue Nov 06, 2018 12:23 am
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Re: Isolate part of Python Output

What generates this output? Can you show the code for this so we can see if it’s a variable / OS call / Print etc... This is the whole code, import subprocess status = subprocess.call(["bash", "tv-status"]) print status The bash script this is calling has the code of echo pow 0 | cec-client -s -d 1
by bmattila55
Mon Nov 05, 2018 10:57 pm
Forum: Python
Topic: Isolate part of Python Output
Replies: 17
Views: 1111

Isolate part of Python Output

Hi, When I run my python script I get this output opening a connection to the CEC adapter... power status: on 0 OR opening a connection to the CEC adapter... power status: standby 0 Is there anyway to just take the on or standby values out of that for evaluation. Ideally I want it to run in a loop a...
by bmattila55
Mon Nov 05, 2018 10:36 pm
Forum: Advanced users
Topic: cec-client not turning off tv
Replies: 7
Views: 1047

Re: cec-client not turning off tv

Andyroo wrote:
Mon Nov 05, 2018 3:31 pm
Apologies - what I meant was for you to try sending the

Code: Select all

echo "on 0" | cec-client -s
to the TV again and see if that will power it down.

You could also try without the '-s' and see if anything comes back in the debug :-)
Oh good ideas, I'll try that.
by bmattila55
Sun Nov 04, 2018 10:38 pm
Forum: Advanced users
Topic: Wake On Lan
Replies: 9
Views: 1223

Re: Wake On Lan

No Raspberry Pi model supports Wake-on-LAN. People always say the Ethernet chip supports it, but the respective WoL pins are not wired up to anything. No Raspberry Pi has a dedicated low-power standby mode from which it can be woken up by different external triggers anyway. It can only be reset fro...
by bmattila55
Sun Nov 04, 2018 10:37 pm
Forum: Advanced users
Topic: Wake On Lan
Replies: 9
Views: 1223

Re: Wake On Lan

Hi, Anyone been able to get Wake On Lan working for their pi? Just been investigating this and alternative methods to hopefully have this working. Thanks An alternative is to switch on the RPi (prior to 3B+ models) via PoE, the TPLink Kit provides 5V 2A, though you will need to buy the cables at an...
by bmattila55
Sun Nov 04, 2018 10:35 pm
Forum: Advanced users
Topic: cec-client not turning off tv
Replies: 7
Views: 1047

Re: cec-client not turning off tv

Some TVs have a toggle for the power in IR remotes. You could try turning it on again :!: :roll: You should be able to get a full list of cec commands and try other power ones from echo h | cec-client -s -d 1 I don't have a remote for the tv, I just use the power button on there. I'll test out the ...
by bmattila55
Sun Nov 04, 2018 10:34 pm
Forum: Advanced users
Topic: cec-client not turning off tv
Replies: 7
Views: 1047

Re: cec-client not turning off tv

It may be your tv that doesn't support turning off via cec or it may respond to another code to turn off., and alias' are not permanent unless you make them permanent. See here for help. https://www.cyberciti.biz/faq/create-permanent-bash-alias-linux-unix/ https://elinux.org/CEC_(Consumer_Electroni...
by bmattila55
Fri Nov 02, 2018 2:27 am
Forum: Advanced users
Topic: Wake On Lan
Replies: 9
Views: 1223

Wake On Lan

Hi,

Anyone been able to get Wake On Lan working for their pi?

Just been investigating this and alternative methods to hopefully have this working.

Thanks
by bmattila55
Fri Nov 02, 2018 2:24 am
Forum: Advanced users
Topic: Backend GUI Remote Connection
Replies: 6
Views: 353

Re: Backend GUI Remote Connection

.... .. Um just a quick question. On the second screen when I open up a program it doesn't load onto that screen but loads on the main display. Any reason/fix for why this is? Thanks again What program? Did you connect with the correct session number? IP_Address :1 Yeah I did the :1 address and it ...
by bmattila55
Thu Nov 01, 2018 11:34 pm
Forum: Advanced users
Topic: Backend GUI Remote Connection
Replies: 6
Views: 353

Re: Backend GUI Remote Connection

.... .. Um just a quick question. On the second screen when I open up a program it doesn't load onto that screen but loads on the main display. Any reason/fix for why this is? Thanks again What program? Did you connect with the correct session number? IP_Address :1 Yeah I did the :1 address and it ...
by bmattila55
Thu Nov 01, 2018 11:32 pm
Forum: Advanced users
Topic: cec-client not turning off tv
Replies: 7
Views: 1047

cec-client not turning off tv

Hi, I have my pi connected up to a Benq TV. The cec-client works well to turn it on and to check tv status but the code to turn it off does not work. The code I am running is, echo "standby 0" | cec-client -s Also, I am having issues setting up an alias for them. If that doesn't work can I put them ...
by bmattila55
Thu Nov 01, 2018 11:22 pm
Forum: Advanced users
Topic: Time and Date of Switched off Pi
Replies: 17
Views: 713

Re: Time and Date of Switched off Pi

That looks good, I will try that out. Anyway to change it from minutes to any other time (just in case I need to customize it or whatever. Thanks The timing is done here def tick(): global minuteOK time1 = time.strftime('%S') time2 = time.strftime('%M') if (time1 == "59"): minuteOK = 0 if (time1 ==...
by bmattila55
Thu Nov 01, 2018 4:50 am
Forum: Advanced users
Topic: Backend GUI Remote Connection
Replies: 6
Views: 353

Re: Backend GUI Remote Connection

Hi, I can already use VNC to connect to my pi, however everything I do is shown on screen, not ideal in this circumstance. Is there someway I can connect to a graphical interface that is separate to what is shown on the display (kind of like a hidden second screen?) I can already use SSH but I need...
by bmattila55
Thu Nov 01, 2018 4:48 am
Forum: Advanced users
Topic: Backend GUI Remote Connection
Replies: 6
Views: 353

Re: Backend GUI Remote Connection

Hi, I can already use VNC to connect to my pi, however everything I do is shown on screen, not ideal in this circumstance. Is there someway I can connect to a graphical interface that is separate to what is shown on the display (kind of like a hidden second screen?) I can already use SSH but I need...
by bmattila55
Thu Nov 01, 2018 4:06 am
Forum: Advanced users
Topic: Backend GUI Remote Connection
Replies: 6
Views: 353

Backend GUI Remote Connection

Hi, I can already use VNC to connect to my pi, however everything I do is shown on screen, not ideal in this circumstance. Is there someway I can connect to a graphical interface that is separate to what is shown on the display (kind of like a hidden second screen?) I can already use SSH but I need ...
by bmattila55
Thu Nov 01, 2018 3:35 am
Forum: Advanced users
Topic: Time and Date of Switched off Pi
Replies: 17
Views: 713

Re: Time and Date of Switched off Pi

If the TV supports it you may be able to get it using cec-utils and the cec-client as shown https://www.endpoint.com/blog/2012/11/08/using-cec-client-to-control-hdmi-devices Sorry it’s an old post but it may give you a starting point. Of course if the TV supports it you should be able to turn it ba...

Go to advanced search