Showing posts with label OpenHAB. Show all posts
Showing posts with label OpenHAB. Show all posts

Thursday, March 2, 2023

Home Automation

My ESP 32 based node on the Front Driver's side blew up when I hooked up a light to it and the light had an intermittant short. The ESP 32 just turns all the relays on. I am using it manually ATM.

Either the program is corrupted or the ESP 32 bricked. Either way amounts to much the same thing. 

I also built a second controller to take care of the lights on the LHS of the truck. 

I have also to install Arduino IDE on my NUC and get that running. 

Everytime I do this I forget the steps involved.  

Arduino IDE 2.0 Installation notes. 

https://www.youtube.com/watch?v=pLrKYRsJ3Eo

https://github.com/TheAssassin/AppImageLauncher/releases

 

Error compiling "blink" 

How to Solve Python ModuleNotFoundError: no module named ‘serial’

https://www.pythonreader.com/2022/08/itsmycode-modulenotfounderror-no-module_76.html

All 4 ESP32 upoaded the sketch, so the ESP 32 based node on the Front Driver's side was not "bricked" but the compiled sketch was corrupted.

I cant find the sketch anywhere so will probably have to rewrite it.  :-(



Monday, December 5, 2022

Home Automation - ESP 32 Node

 ESP 32 - Pinout

 Ref : https://create.arduino.cc/projecthub/Techatronic/how-to-set-up-esp32-in-arduino-ide-bc1d4d

Permissions error
sudo chmod a+rw /dev/ttyUSB0
Re: Ubuntu: exec: "python": executable file not found in $PATH

In order to support the ESP32, you will need to install the following packages:

Code: Select all

sudo apt update && sudo apt upgrade -y \
python-is-python3 \
python3-serial

The Arduino IDE MUST NOT be installed as a .deb or .flatpak. 
Instead, it must be installed from the .zip file downloaded from the Arduino 
downloads page (https://www.arduino.cc/en/Main/Software). 
I couldnt get the ESP 32 to establish a USB Port on Arduino IDE.. 
I could get a post on an Arduino.  

Thursday, June 11, 2020

openHAB Documentation

Ref : https://www.openhab.org/docs/installation/openhabian.html


Ref : https://www.openhab.org/docs/installation/openhabian.html#raspberry-pi-prepackaged-sd-card-image


Ref : Youtube Channel BK Hobbies

Software

Download openHABian  .img.xy

Image Writer send Image to SD Card.

Fire up in Ethernet connected Pi  and wait for autosetup to complete.

OR

(Use text editor to setup Wi Fi in openhabian.conf in the SD card boot partition before you install it in the Pi so autosetup has internet access.)

Fault : April 4 Did autosetup 3 times and got a system error each time. failed install.

Fix : I run sudo openhabian-config, then option 3 - install stable " and it’s up and running.

Notes : First time i setup openHAB I used the reconfiguration install since the whole process seemed daunting. After this it just work so I concentrate on the sitemaps.   I wanted to set up the OS so as I could use the pi for other things like monitoring voltages etc.  This work around amounts to a separate install on a Linux machine so I need to experiment with doing a manual install.

Checking IPs on network

from router  :

http://192.168.1.1/     pass e..........wif

Fixed IP : 

(Not sure that this is setup - router doesn't seem to reassign IPs anyway )
Using the TL-MR3420 Manual C 8.4 Bind the MAC and IP. This serves an unchanging IP with DHCP.

SSH into the Pi :


mark@mark-HP-15-Notebook-PC:~$ ssh openhabian@192.168.1.103


@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @


Follow the prompts to generate a new passkey. 

pass openhabian

Run openHABian setup and configuration tool for openHAB sudo openhabian-config: (Should work without this  step .... ? Timezone and Password and update.)




Configure  from Paper UI :

Web Interface http://192.168.1.103:8080/start/index

*GPIO Binding - GPIO Binding binding-gpio1 - 1.13.0
*NPT Binding


GPIO Hardware layout.





Relay Board 1


GND                  GRN

GPIO 26 - IN1   BLU

GPIO 19 - IN2   PUR

GPIO 13 - IN3   GRY

GPIO   6 - IN4   WH

VCC                   RED

Relay Board 2


GND                   GRN

GPIO   5  - IN1   BLU

GPIO   9  - IN2   PUR

GPIO  22 - IN3   GRY

GPIO  27 - IN4   WH

VCC                    RED



-----------------------------------------------------------------------------------------------------

Items and Sitemap

etc/openhab2/items/home.items
-----------------------------------------------------------------------------------------------------

 /etc/openhab2/sitemaps/demo.sitemap


Text Editor

SUDO NANO is good for getting it going.

I setup Visual Studio Code with the openHAB extension.

Fault : I still havent got SVC working properly with SAMBA.

I couldn't get it to connect directly by entering in a host IP.

Instead I accessed the files using SAMBA and opened them from my remote Computer using Visual Studio Code.  

to setup the password in VSC





It will Save provided I browse with file manager to Open - it will only Save at the last Save as location .

Parent Folder : smb://openhab.local/openhab-conf/sitemaps