Search found 59 matches
- Sat Feb 03, 2018 4:35 pm
- Forum: General discussion
- Topic: USB Stick w/Video Files In => HDMI Video Out?
- Replies: 2
- Views: 1104
USB Stick w/Video Files In => HDMI Video Out?
Somebody has a Sony KDL-32bx320. It has USB inputs, but only supports .mpg files and I would like to be able to give them other-format files like .avi, .mkv, .mp4, and so-forth on a USB stick But it also has an HDMI input, so I am thinking that maybe a Pi could act as middle man: - Switch the Sony T...
- Fri Jun 09, 2017 1:06 pm
- Forum: Interfacing (DSI, CSI, I2C, etc.)
- Topic: Weather Info Using SwitchDoc's "WeatherPiArdinuo V3" ??
- Replies: 1
- Views: 571
Weather Info Using SwitchDoc's "WeatherPiArdinuo V3" ??
I have one of these: https://www.amazon.com/gp/product/B00QVN51AE/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1 plus a weather vane, anemometer, and Pi-3. And somewhere along the line, I thought I needed an Analog-to-Digital conversion board: https://www.amazon.com/gp/product/B00SK8JHHQ/ref=oh_aui...
- Fri Feb 10, 2017 9:42 pm
- Forum: Python
- Topic: Mochad: Command Line OK, Python No-Go ?
- Replies: 3
- Views: 1225
Re: Mochad: Command Line OK, Python No-Go ?
Got it. It was something about choosing the variable/pointer name "Socket". I changed the name from "Socket" to "mySocket" and now the code works. viz: # ====================================================================== # PURPOSE: - To issue a continuous series of ...
- Fri Feb 10, 2017 5:33 pm
- Forum: Python
- Topic: Mochad: Command Line OK, Python No-Go ?
- Replies: 3
- Views: 1225
Re: Mochad: Command Line OK, Python No-Go ?
Do you need to send the newline char in your send command? The basic echo will be doing it and so does the Tkinter code Sock.sendall("rf F2 on\n") Good catch.... but that was not it. Being clueless about what /n was, I had tried it both with and without... just happened that the code samp...
- Thu Feb 09, 2017 10:34 pm
- Forum: Python
- Topic: Mochad: Command Line OK, Python No-Go ?
- Replies: 3
- Views: 1225
Mochad: Command Line OK, Python No-Go ?
I've finally got Mochad working for me from a command line: pi@303_Pi_B:~/python_source $ echo "rf F2 on" | nc localhost 1099 02/09 17:24:54 Tx RF HouseUnit: F2 Func: On pi@303_Pi_B:~/python_source $ echo "rf F2 off" | nc localhost 1099 02/09 17:25:04 Tx RF HouseUnit: F2 Func: Of...
- Sun Jan 29, 2017 2:36 pm
- Forum: Python
- Topic: Mochad: Connection Refused ?
- Replies: 3
- Views: 1876
Re: Mochad: Connection Refused ?
What happens when you type "nc localhost 1099". If it just returns to a linux prompt, then mochad is not running. If mochad is running then it will just go to a blank line. When in the blank line mode, press a button on a X10 remote and it should display your command. To exit, just CTRL C...
- Fri Jan 27, 2017 10:15 pm
- Forum: Python
- Topic: Mochad: Connection Refused ?
- Replies: 3
- Views: 1876
Mochad: Connection Refused ?
Mochad being a middleman between Pi and X10 modules... I went through all the installation instructions on YuriBelenitsky's page (http://yuriybelenitsky.blogspot.com/2012/10/x10-home-automation-with-raspberry-pi.html) and also per http://x10linux.blogspot.com/2012/08/installing-mochad-on-raspberry-...
- Wed Dec 21, 2016 9:55 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
Re: "CD /": Works on Command Line, not in script ?
Tangentially, does anybody have a simple method for making this .sh file execute at startup time? I have tried adding lines to home/pi/.config/lxsession/LXDE-pi/autostart and etc/rc.local , but no joy so far. e.g. @lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-spla...
- Wed Dec 21, 2016 4:39 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
Re: "CD /": Works on Command Line, not in script ?
That seemed to do the trick - with one caveat: Bash did not like the "-r" option.SkyRise wrote:Try Paeryn's suggestion above
What did work was replacing "r" with "d":
Code: Select all
pi@303_Pi:~/pjcShellScripts $ tr -d "\r" <xLaunchMongoBox.sh> LaunchMongoBox.sh
- Wed Dec 21, 2016 3:11 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
Re: "CD /": Works on Command Line, not in script ?
Try this: $ od -bc thefile.sh pi@303_Pi:~/pjcShellScripts $ od -bc LaunchMongoBox.sh 0000000 143 144 040 057 015 012 143 144 040 150 157 155 145 057 160 151 c d / \r \n c d h o m e / p i 0000020 057 160 171 164 150 157 156 137 163 157 165 162 143 145 015 012 / p y t h o n _ s o u r c e \r \n 000004...
- Tue Dec 20, 2016 4:16 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
Re: "CD /": Works on Command Line, not in script ?
No, but I failed to mention something in the OP:Martin Frezman wrote:Was this script edited on a Windows system by any chance?
Code: Select all
@303_Pi:~/pjcShellScripts $ sudo chmod 755 LaunchMongoBox.sh
- Tue Dec 20, 2016 4:09 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
Re: "CD /": Works on Command Line, not in script ?
Trying to execute a python routine.
I truncated the script at the 2 CD commands so as not to confuse the issue.
Full script:
The rest of the agenda is to make that script execute automagically whenever the Pi starts up.
I truncated the script at the 2 CD commands so as not to confuse the issue.
Full script:
Code: Select all
cd /
cd home/pi/python_source
sudo python mongobox.py
- Tue Dec 20, 2016 4:03 pm
- Forum: General discussion
- Topic: "CD /": Works on Command Line, not in script ?
- Replies: 13
- Views: 3576
"CD /": Works on Command Line, not in script ?
The script: cd / cd home/pi/python_source When I execute that script, it throws: pi@303_Pi:~/pjcShellScripts $ sh LaunchMongoBox.sh LaunchMongoBox.sh: 1: cd: can't cd to / LaunchMongoBox.sh: 2: cd: can't cd to home/pi/python_source ': [Errno 2] No such file or directory OTOH, if I copy/paste those c...
- Thu Dec 15, 2016 7:02 pm
- Forum: General discussion
- Topic: USB Port Power ?
- Replies: 5
- Views: 1233
Re: USB Port Power ?
"lsusb" - lists all working usb devices...."dmesg" - prints out all kernel messages related to hardware.. pi@303_Pi:~/temperv14 $ lsusb Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Micr...
- Thu Dec 15, 2016 3:55 pm
- Forum: General discussion
- Topic: USB Port Power ?
- Replies: 5
- Views: 1233
USB Port Power ?
I have a "TemPer" USB thermometer plugged into my Pi, but it does not seem to be getting recognized.
viz: http://tinyurl.com/znb5vzt
The Pi's USB ports are powered, right?
If so, I would think the TemPer's requirments would be minimal.
What am I missing?
viz: http://tinyurl.com/znb5vzt
The Pi's USB ports are powered, right?
If so, I would think the TemPer's requirments would be minimal.
What am I missing?
- Wed Nov 30, 2016 9:38 pm
- Forum: Camera board
- Topic: Semi-OT: Multiple WebCams, Continuous Recording ?
- Replies: 0
- Views: 400
Semi-OT: Multiple WebCams, Continuous Recording ?
I see many Pi projects involving one or more webcams and motion detection. But what I am thinking about is a sort of Dashcam-On-Steroids where I use the Pi's 4 USB ports to connect four of something like this: http://www.bestbuy.com/site/logitech-hd-webcam-c615-black/2588445.p?skuId=2588445 With the...
- Tue Nov 15, 2016 6:28 pm
- Forum: Python
- Topic: Reading multiple DS18B20 with Python
- Replies: 16
- Views: 30708
Re: Reading multiple DS18B20 with Python
For better or worse, here's something that is working right now under Python 2.7.9 and which monitors 2 sensors using Timo's W1ThermSensor library. One sensor measures temperature within a backup file server's case and the other measures the temperature within the garden shed that the server lives i...
- Fri Nov 11, 2016 2:26 pm
- Forum: Python
- Topic: "No Such File" Error - opening as "w"?
- Replies: 7
- Views: 4789
Re: "No Such File" Error - opening as "w"?
When I restart the script, the error does not occur. So I figured I would add a try/except block that waits 5 seconds and then re-attempts the Open..... but no luck... it still fails with the same error message. Is there a way to reset whatever is associated with that file open request? .. i.e. mimi...
- Thu Nov 10, 2016 10:49 pm
- Forum: General discussion
- Topic: Python: Can Run Multiple Instances of Script Concurrently ?
- Replies: 4
- Views: 5088
Python: Can Run Multiple Instances of Script Concurrently ?
In testing it is looking to me like Python can run multiple instances of the same script at the same time. To Wit: - I connect to the Pi via JuicySSH and kick off a script named Mongobox.py - Then I close JuicySSH , telling it to contunue running in the background - I TeamViewer into the Pi, open up...
- Wed Nov 09, 2016 3:06 pm
- Forum: Python
- Topic: "No Such File" Error - opening as "w"?
- Replies: 7
- Views: 4789
Re: "No Such File" Error - opening as "w"?
Got it.... Thanks again.PeterO wrote:No, just use the return value from os.path.exists directly like this:PeterOCode: Select all
if os.path.exists(myLogFile24h_Name):
- Wed Nov 09, 2016 2:48 pm
- Forum: Python
- Topic: "No Such File" Error - opening as "w"?
- Replies: 7
- Views: 4789
Re: "No Such File" Error - opening as "w"?
For the "one more thing" this time ;), for Python best practices, never use == True . The result of os.path.exists is a boolean, use it directly. (But, in this case, the test goes away if you just use open(name, 'a') all the time). Not to be dense... but is that to say use 1 for true and ...
- Tue Nov 08, 2016 4:50 pm
- Forum: General discussion
- Topic: File Open for Writing: Data Not Available to Other Apps?
- Replies: 6
- Views: 1159
Re: File Open for Writing: Data Not Available to Other Apps?
For what it's worth, your lines setting myTempPi and myLogFileLine could be replaced with the single statement below - str.join will put your delimiter between the fields for you - it's more efficient and less error prone than alternating them by hand. Not to mention less prone to line wrapping in ...
- Tue Nov 08, 2016 4:43 pm
- Forum: Python
- Topic: "No Such File" Error - opening as "w"?
- Replies: 7
- Views: 4789
"No Such File" Error - opening as "w"?
The Code: 205 if os.path.exists(myLogFile24h_Name) == True: 206 logFile24h = open(myLogFile24h_Name, "a") 207 else: 208 logFile24h = open(myLogFile24h_Name, "w") 209 logFile24h.write(myFileHeader1) 210 logFile24h.write(myFileHeader2) The Error: File "python_source/mongobox.p...
- Tue Nov 08, 2016 1:03 am
- Forum: General discussion
- Topic: File Open for Writing: Data Not Available to Other Apps?
- Replies: 6
- Views: 1159
Re: File Open for Writing: Data Not Available to Other Apps?
Three, close the file and reopen it periodically. ...this third method (closing and reopening the file) is basically unstoppable. In this scenario, you will want to be sure you append to the file, rather that overwriting it. Bingo! Works like a charm.... from another PC, just open the file Read-Onl...
- Tue Nov 08, 2016 12:45 am
- Forum: General discussion
- Topic: Seek Hardware: 120v AC Switch That Defaults to "On"
- Replies: 4
- Views: 1053
Seek Hardware: 120v AC Switch That Defaults to "On"
Pi running unaddended & headless. Every so often something happens and things grind to a halt - to be remedied by pulling the plug and re-starting. Yes, the Good-Right-And-Holy path is to find out what is causing this in the first place but until then..... I'm thinking some sort of switch where,...