|
Post by jimkernsjr on Mar 16, 2017 1:17:43 GMT
pscp...wow,that is a upload, download nightmare. Set up the samba share, and you can literally change all the files on the fly, or point Smarthome designer right to this file share, and you can get syntax checking! Just click save in your notepad++ or designer and the changes will take place in OpenHAB instantly!
ALERT! Windows and Linux do store files in a somewhat different manner. NEVER use Word or Wordpad to edit these files, always Notepad or Notepad++ CRLF is handled differently on Windows/Linux. Notepad++ always is best.
|
|
|
Post by papa on Mar 16, 2017 1:41:06 GMT
PS, jimkernsjr, I moved your interesting post about irrigation automation to the thread about that subject & I responded there.
"pscp, wow,that is a upload, download nightmare." Indeed. What you suggest sounds much better.
Yes, I learned NOT to edit OH files with Windows editors, but rather Designer or Notepad++
|
|
|
Post by papa on Mar 16, 2017 19:15:26 GMT
jimkernsjr, Update: I successfully set up editing Pi OH config files via my Windows desktop.
You gave me a good start with an error or so (like sudo chmod -R ... instead of sudo chmod -r .... (I changed this in your post ^^ )
I also researched & found I had some other things to do like some edits to smb.conf
But now I am editing the files much more conveniently. Thanks for the nudge & hints.
============================== Update 3/23/2017
See this post from jimkernsjr about how to avoid filling up limited disk space on an older Linux machine or a Raspberry Pi
|
|
|
Post by jimkernsjr on May 10, 2017 2:00:19 GMT
No problem! sorry about the -R, I type it by habit and dont even double check myself anymore. PS..you shouldnt have to adjust smb.conf at all if you set up webmin - that is the purpose of it to provide a web based interface to modifying all the text files. I set up a couple and on the last 3 I couldnt even tell you what my smb.conf looks like! And to think I used to do all that with vim!!! P.S. when using webmin, you have to start and stop the samba server and I found sometimes even after initial permissions change reboot. you shouldnt have to, but I never reseached why. Generally I set the system up all in one shot, and it's not a problem for me. For anyone really into PI's and linux, check out Peter Scargills "The Script": tech.scargill.net/a-christmas-script/I never used it, but everyone rants how great it is and if you look at everything it sets up automagically, it's great! I intend to set up another virtual machine and give it a shot and report back...
|
|
|
Post by papa on Jan 21, 2018 14:13:58 GMT
For OpenHAB or most anything, a Raspberry Pi needs an operating system. Typically one follows directions at raspberrypi.org to download (.zip file) & install NOOBS, which then let us choose & install an operating system like Raspbian (well documented for OpenHAB). Or one can download a (much larger) image of Raspbian & install that on the Pi's SD card. Towards setting up an instance of OpenHAB 2 on a new Raspberry Pi 3B, I had several failed (& slow on a fast broadband connection) downloads of NOOBS to install Raspbian. I especially had trouble with the larger .tar.xz files being corrupted & not working. I never got a successful .zip file from just raspberrypi.org. The torrent of the NOOBS .zip file downloaded much faster & apparently more accurately. The .zip from that torrent did not produce the published sha1sum checksum, but at least the resulting NOOBS file successfully (so far) installed Raspbian. Of course, to download the torrent, one needs a suitable program, like the free uTorrent or BitTorrent. PS Using these programs is legal, just not to download copyrighted material. My recommendation is to download the NOOBS .zip file via a torrent. Or since the torrent download is much faster (& perhaps more accurate), a torrent download of the large Raspbian image file might be fast enough & in the long run produce a faster, successful Raspbian install. The above recommendation is where I was tonight. That recommendation changed the next day. Next, OpenHABIan: An Easier Way to Install OpenHAB / Mosquitto on a Raspberry Pi
|
|
|
Post by papa on Jan 22, 2018 2:57:29 GMT
OpenHABIan: An Easier Way to Install OpenHAB / Mosquitto on a Raspberry PiLast night (after I finally torrent downloaded a decent NOOBS .zip) & today, I successfully installed NOOBS, Raspbian, & OpenHAB. Remembering that OpenHAB 2's prerequisites included Java 8 at least revision 101, I checked my Java version. It was Java 8, but only revision 65. Looking into upgrading Java, I found that the Raspbian repository only had revision 65. I started searching what I needed to do to install a satisfactory version. I bumped into OpenHABian, a compressed Raspbian / OpenHAB image of only 242MB (downloads fast) that one flashes to the Pi's SD card. When the Pi with the flashed SD card & internet connection is powered, OpenHABian is installed over 15 to 45 minutes. Unlike NOOBS, OpenHABian does not (by default) boot up displaying itself on a connected HDMI monitor. By default, OpenHABian has no graphical interface. One can setup a graphical interface, but that is discouraged. It's meant to be used "headless" via SSH (like PuTTY) from another computer on the same local network. "Headless" means the Pi has no keyboard, mouse, or monitor just a local network connection via Ethernet Cable or WiFi. Again, unlike NOOBS or Raspbian, OpenHABian does not boot up displaying itself on a connected monitor. So how does one find out that the OpenHABian install is finished during that 15 to 45 minute possibility? In another computer's browser, enter the address http://[Your Pi's IP Address]:8080 If your Pi's IP address is 192.168.1.105 you enter the address http://192.168.1.105:8080 When the Pi's OpenHABian install is ready, that address will produce the "Welcome to openHAB 2 - Initial Setup" screen. In the SSH window on another computer, one can use the usual Linux commands on OpenHABian. Also there one can enter the OpenHABian Configuration Tool using the Linux command sudo openhabian-config This "elevated" command will ask for the password which is the default openhabian. Later the system will nag you to change that default password. One option in the OpenHABian Configuration Tool is " Optional Components," which is where one can install Mosquitto. Installing OpenHABian is documented fairly nicely on this page. OpenHABian is a much better way to get a successful OpenHAB / Mosquitto installation.By the way in the SSH window to OpenHABian, I executed the Linux command java -version I got the acceptable results: openjdk version "1.8.0_152" that is, Java 8, revision 152
|
|
|
Post by papa on Jan 22, 2018 16:15:22 GMT
Odds & Ends about Using OpenHABian
Is our "headless" (no monitor, keyboard, or mouse) OpenHABian Raspberry Pi running or off? If OpenHABian is running, its green LED will blink near the power connector & near the red power LED. If OpenHABian is off, but still connected to power, only the red LED will be steadily on.
How do we restart or shutdown a "headless" OpenHABian Raspberry Pi? In the OpenHAB Community forum, I found: "sudo shutdown -h now" for a shutdown and "sudo shutdown -r now" for a reboot has always worked for me. papa: Those commands worked for me, too.
After we shutdown or restart an OpenHABian Raspberry Pi, to re-enter OpenHABian, (replace xx & zzz from your Pi's address) we SSH (maybe via PuTTY on Windows) to the Pi's IP address (192.168.xx.zzz) Then we will see login as: [& we respond openhabian] then we see openhabian@192.168.xx.xxx's password: [& we blind type the password]
If you are still using the default password (openhabian), as I said above, you'll see the nag: "The default password was detected on your system! That's a serious security concern. Others or malicious programs in your subnet are able to gain root access! │Please set a strong password by typing the command 'passwd'"
So, to change the main openhabian password, enter this at a Linux command prompt: passwd Then we see Changing password for openhabian. (current) UNIX password: [blind type the old password, like the default, openhabian] Enter new UNIX password: [blind type the new password] Retype new UNIX password: [blind type the same new password] passwd: password updated successfully
From then on, log in as the user openhabian & give the new password as set above. Also to give permission for an elevated Linux command (maybe starting with sudo), blind type the new password.
|
|