HoBo/FHEM App

Begonnen von RichardCZ, 05 Mai 2020, 12:53:27

Vorheriges Thema - Nächstes Thema

RichardCZ

https://gl.petatech.eu/root/HomeBot/-/tags/static

9.8MB, bei mir läuft es (naja ... sagen wir es startet) mit

sudo ./HoBo /opt/HomeBot/hobo.cfg

Ich sehe zumindest unter http://localhost:8083/fhem?room=all etwas ;-)

Perl 5.30.2 und Module sind mit drin, aber wird vermutlich nicht bei jedem (oder nur den wenigsten) laufen, denn
er braucht immer noch ein paar Systembibliotheken. Falls man die in ausreichender Version hat, sollte es aber tun.

$ ldd HoBo
        linux-vdso.so.1 (0x00007ffe7b3f3000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f1950722000)
        libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007f19506e8000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007f19506dd000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f1950517000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f1950c20000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f19504f5000)


edit: 12.9MB, dafür ist folgendes im Speckgürtel vorhanden:

use Attribute::Handlers
use Data::Dumper
use Digest::MD5
use Export::Attrs
use File::Copy
use IO::Socket
use JSON::XS
use MIME::Base64
use Moo
use Net::MQTT::Constants
use Net::MQTT::Message
use Net::MQTT::TopicStore
use Net::SNMP
use Net::SSLeay
use POSIX
use Protocol::WebSocket
use Readonly
use Text::Iconv
use Tie::Hash::NamedCapture
use URI::Escape
use XML::Simple

Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.

RichardCZ

Also damit keine Missverständnisse auftreten:

Diese 12+MB (tendenz steigend) App enthält den Perl Interpreter, evtl. benötigte CORE Module, ein paar zusätzlich installierte CPAN Module (inklusive deren .so Dateien)
Die Dateil läuft momentan nur unter x86_64, weil mir ne ARM-basierte VM fehlt und ich das auf meinem armen Beaglebone nicht bauen werde.

Es braucht immer noch das reguläre HoBo/FHEM Verteichnis, insbesondere mit den zur Laufzeit nachgeladennen Modulen unter FHEM (xx_Modulname), docs, www und so
Aber man spart sich eben perlbrew/Perl Interpreter, und das ganze Modulgefrickel. Ich werde jetzt mehr Speck reinbuttern, um zu sehen wie umfangreich das Environment ausfallen kann.
Schon jetzt ist das Luxus (siehe Modulliste)
Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.

rudolfkoenig

ZitatSchon jetzt ist das Luxus (siehe Modulliste)

Klar, Luxus ist ja auch relativ :)

FHEMWEB braucht Compress::ZLib, falls die Daten komprimiert werden sollen, und Digest:SHA, falls man Websocket nutzen will.
Ist IO::Socket::SSL und IO::Socket::INET6 auch dabei?
Welche SSL-Bibliothek/Version wird verwendet?

herrmannj

bei IO::Socket::INET6 erhöhe ich auf IO::Socket::IP für besseren ipv6 support.

Wie und mit welcher Technik kann man diese app Pakete denn automatisiert erstellen und idealerweise auf user seite dynamisch? Anders gefragt, wie kann man dynamisch Abhängigkeiten hinzufügen?

RichardCZ

Zitat von: rudolfkoenig am 05 Mai 2020, 13:59:17
Klar, Luxus ist ja auch relativ :)

FHEMWEB braucht Compress::ZLib, falls die Daten komprimiert werden sollen, und Digest:SHA, falls man Websocket nutzen will.
Ist IO::Socket::SSL und IO::Socket::INET6 auch dabei?
Welche SSL-Bibliothek/Version wird verwendet?

$ grep Compress::Zlib  HoBo
Binary file HoBo matches
$ grep IO::Socket::SSL  HoBo
Binary file HoBo matches
$ grep IO::Socket::INET6 HoBo
Binary file HoBo matches


Protocol::WebSocket ist ja dabei. ;-)

Ach ja und jetzt hat das Ding 21MB, weil es ist auch

https://metacpan.org/pod/CryptX

dabei. Mir ham's ja. Er will bei mir jetzt eine 1.1 SSL

$ ldd HoBo
        linux-vdso.so.1 (0x00007ffdfb22d000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007fc74c627000)
        libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007fc74c5ed000)
        librt.so.1 => /usr/lib/librt.so.1 (0x00007fc74c5e2000)
        libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007fc74c551000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007fc74c27a000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007fc74c260000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007fc74c098000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fc74cdf9000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fc74c076000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fc74c071000)


bei mir ist das momentan die openssl 1.1.1.g

@hermannj

$ grep IO::Socket::IP  HoBo
Binary file HoBo matches


Auf Userseite ist nix mit dynamisch. Das läuft der Zielsetzung konträr.
Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.

RichardCZ

#5
Fehlermeldungen sind natürlich unter aller Sau

Can't locate HoBo.pm in @INC (you may need to install the HoBo module) (@INC contains: lib . CODE(0x55e4bc05f780)) at !boot line 51.




24MB

IO::Interface::Simple und Paws::Polly dürfen noch nicht mitspielen,
ansonsten ist alles drin was FHEM braucht (grep nach uses/requires) und noch ein wenig mehr:

https://gl.petatech.eu/root/HomeBot/-/blob/4d6d6dd573ae1eb87454048781b8b17bf93f5828/resources/HoBo.bundle

Die Abhängigkeiten von jeder der gelisteten Dateien sind natürlich erfüllt. So braucht z.B. Export::Attrs -> PadWalker
etc. sind also nicht extra aufgeführt.
Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.

RichardCZ

Ist das geil ... ist das geil Aus der Prozesstabelle:

root     1629335  0.0  0.0  11632  1816 ?        Ssl  16:19   0:00 HomeBot-x86_64.AppImage hobo.cfg
root     1629338  0.2  0.2  98712 36416 pts/5    S    16:19   0:00 HomeBot-x86_64.AppImage hobo.cfg


Tut alles. :-) Auch TTS. 29MB

-rwxr-xr-x  1 root root 29712424 May  5 16:18 HomeBot-x86_64.AppImage

KEINE OS Abhängigkeit mehr.

$ ldd HomeBot-x86_64.AppImage
        not a dynamic executable


Momentan muss ich das Teil noch im Installationsverzeichnis starten, weil er mit ein paar Pfaden Probleme hat, aber Details...  :)
Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.

RichardCZ

Muhahaha! Schwarze Magie:

$ pwd
/data/proj/fhem/trunk/fhem

$ ./HomeBot-x86_64.AppImage fhem.cfg

root       1629647  0.0  0.0  11608  1776 ?        Ssl  16:26   0:00 ./HomeBot-x86_64.AppImage fhem.cfg
root       1629650  0.2  0.2  95184 33996 pts/20   S    16:26   0:00 ./HomeBot-x86_64.AppImage fhem.cfg


Witty House Infrastructure Processor (WHIP) is a modern and
comprehensive full-stack smart home framework for the 21st century.