Giter Site home page Giter Site logo

gkiefer / home2l Goto Github PK

View Code? Open in Web Editor NEW
17.0 6.0 6.0 31.91 MB

The Home2Ls - Smart Tools for a Private Home

Home Page: https://gkiefer.github.io/home2l/

License: Other

Makefile 2.37% C 46.38% C++ 12.50% Shell 1.42% Python 2.87% Java 4.43% HTML 24.38% Dockerfile 0.16% Assembly 0.04% SWIG 1.47% JavaScript 3.71% CSS 0.27%
smart-home home-automation python shell microcontroller sensor-network actors hardware attiny85 attiny84

home2l's People

Contributors

gkiefer avatar mc3 avatar pfeffix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

home2l's Issues

Basic / productive install problems

I successfully tested the demo environment with brownies and own MQTT server.
But I can't install the productive environment properly.

After the installation according to chapter 3.3 in the home2l-book, I run home2l server and get the error below:
/usr/local/bin/home2l: Line 71: home2l-server: Command not found.
 
I run the command with home2l and root user with the same result.
The directory /opt/home2l/bin/amd64/ only contains home2l-daemon*.

 
I always used a fresh install and tested with following OS:

  • Debian 11 (5.10.0-21-amd64)
  • Debian 10.13 (4.19.0-23-amd64)
     

 
Step 1:

sudo nano /etc/apt/sources.list
---
deb http://deb.debian.org/debian/ bullseye main contrib
deb-src http://deb.debian.org/debian/ bullseye main contrib
deb http://security.debian.org/debian-security bullseye-security main contrib
deb-src http://security.debian.org/debian-security bullseye-security main contrib
deb http://deb.debian.org/debian/ bullseye-updates main contrib
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib

Step 2:

sudo apt-get -y --no-install-recommends install \
      make g++ git \
      python3 swig python3-dev libreadline-dev \
      libsdl2-dev libsdl2-ttf-dev \
      gettext imagemagick inkscape \
      libmosquitto-dev \
      libmpdclient-dev \
      gcc-avr avr-libc

git clone https://github.com/gkiefer/home2l

cd home2l

Step 3:

make CFG=basic


---
OUTPUT:
############################################################
#
#       tools
#
############################################################


#### Building 'tools' - common files...

make[1]: Entering directory '/home/test/home2l/tools'
../wallclock/home2l-fpc etc/floorplan.svg
Home2L Floorplan Compiler

Reading 'etc/floorplan.svg'...
Writing 'etc/floorplan.fpo/map.conf'...
Writing 'etc/floorplan.fpo/sample-resources.conf'...
Creating 'etc/floorplan.fpo/mini.bmp'...
Creating 'etc/floorplan.fpo/full.bmp'...
make[1]: Leaving directory '/home/test/home2l/tools'



#### Building 'tools' for 'amd64'...

make[1]: Entering directory '/home/test/home2l/tools'
Updating 'config.H' and 'config.C'...
CC /tmp/home2l-build/amd64/config.C
CC ../common/base.C
CC ../common/env.C
CC home2l-daemon.C
LD home2l-daemon
make[1]: Leaving directory '/home/test/home2l/tools'



#### Building 'tools' for 'armhf'...

make[1]: Entering directory '/home/test/home2l/tools'
Updating 'config.H' and 'config.C'...
CC /tmp/home2l-build/armhf/config.C
/bin/bash: line 1: arm-linux-gnueabihf-g++: command not found
make[1]: *** [../Setup.mk:296: /tmp/home2l-build/armhf/config.o] Error 127
make[1]: Leaving directory '/home/test/home2l/tools'
make: *** [Makefile:272: build] Error 1

Step 4:

sudo make CFG=basic install


---
OUTPUT:
############################################################
#
#       tools
#
############################################################


#### Installing 'tools' - common files...

make[1]: Entering directory '/home/test/home2l/tools'
Creating /opt/home2l/VERSION...
install -Dp -m 755 -t /opt/home2l/bin home2l home2l-adb home2l-install home2l-rollout home2l-sudo home2l-demo
install -Dp -m 644 -t /opt/home2l env.sh README
install -Dp -m 755 -t /opt/home2l/install initd-home2l
install -Dp -m 755 -t /opt/home2l/bin h2l-mkdir.sh
if [ ! -e /opt/home2l/etc ]; then \
  find etc/ -type f -exec install -Dpm 644 "{}" "/opt/home2l/{}" \; ; \
  chmod a+x /opt/home2l/etc/rules-* ; \
fi
make[1]: Leaving directory '/home/test/home2l/tools'



#### Installing 'tools' for 'amd64'...

make[1]: Entering directory '/home/test/home2l/tools'
Updating 'config.H' and 'config.C'...
BIN=/opt/home2l/bin/amd64;   \
install -Dp -s -m 755 -t $BIN /tmp/home2l-build/amd64/tools/home2l-daemon;   \

make[1]: Leaving directory '/home/test/home2l/tools'


#### Installing 'tools' for 'armhf'...

make[1]: Entering directory '/home/test/home2l/tools'
Updating 'config.H' and 'config.C'...
CC /tmp/home2l-build/armhf/config.C
/bin/bash: line 1: arm-linux-gnueabihf-g++: command not found
make[1]: *** [../Setup.mk:296: /tmp/home2l-build/armhf/config.o] Error 127
make[1]: Leaving directory '/home/test/home2l/tools'
make: *** [Makefile:291: install] Error 1

Step 5:

sudo adduser --disabled-password --gecos "User for auto-started Home2L instances" home2l
sudo chown -R home2l.home2l /opt/home2l/
/opt/home2l/bin/home2l-install -i
sudo echo "export PATH=\$PATH:/opt/home2l/bin:/opt/home2l/bin/`dpkg --print-architecture`" > /home/home2l/.bashrc

Step 6:

sudo nano  /opt/home2l/etc/home2l.conf
---
rc.config="" # declare that there is no 'resources.conf' file

# Configure the Brownies driver ...
drv.brownies=1 # enable the Brownies driver
br.link=/dev/ttyUSB0 # define the i2c device (adapt as adequate)

# Configure MQTT ...
drv.mqtt=1 # enable MQTT
mqtt.broker = 192.168.178.5:1883
mqtt.username = debug
mqtt.password = password
---

Step 7:

sudo nano /opt/home2l/etc/brownies.conf
---
# 008....
---

Step 8:

home2l server

---
OUTPUT:
/usr/local/bin/home2l: line 71: home2l-server: command not found

mqtt.birthAndWill not updated during long-term interface failure

If the bus connection gets lost and recovering isn't successful, the mqtt.birthAndWill topic is not updated and stays in online state.
The brownie device status topics are correctly set to ?, during the connection lost.
If I manually stop the home2l-server, the mqtt.birthAndWill topic gets the correct offline value.
I use the latest home2l release with an ELV USB-I2C adapter on amd64 hardware with Debian 11.

home2l.conf:
mqtt.birthAndWill = status:offline:online

Debug logs:

home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2346): /dev/ttyUSB0: Not a socket: /dev/ttyUSB0 .  
home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2672): /dev/ttyUSB0: Interface problem (received neither ACK nor NACK)
home2l[448]: [home2l-server] WARNING (/brownies/brownies.C:2838): /dev/ttyUSB0: Bus connection lost: Recovering.
home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2346): /dev/ttyUSB0: Not a socket: /dev/ttyUSB0 .
home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2672): /dev/ttyUSB0: Interface problem (received neither ACK nor NACK)
home2l[448]: [home2l-server] WARNING (/brownies/brownies.C:2838): /dev/ttyUSB0: Bus connection lost: Recovering.
home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2346): /dev/ttyUSB0: Not a socket: /dev/ttyUSB0 .
home2l[448]: [home2l-server] DEBUG-1 (/brownies/brownies.C:2672): /dev/ttyUSB0: Interface problem (received neither ACK nor NACK)
home2l[448]: [home2l-server] WARNING (/brownies/brownies.C:2838): /dev/ttyUSB0: Bus connection lost: Recovering.
...continues with same messages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.