otmonitor on native aarch64 (arm64)?

This Forum is about the Opentherm gateway (OTG) from Schelte

Moderator: hvxl

otmonitor on native aarch64 (arm64)?

Postby marcelr » Mon Dec 24, 2018 1:43 pm

Hi all,

Some time ago I got a nice small OTGW from cyril. I popped it into an orange pi Zero Plus H5, which was brand new on the market, then. At first it was hard to even find a proper boot image for it. Since then things have improved, but it has been lying around for a while on my desk. Yesterday I finally got started on it. It now runs the latest Armbian version, and this works smoothly. Now I want to install otmonitor, but there's only a 32-bit (armhf) version available from Schelte's site.

I could install the armhf libs and runtime linker, but that's a bit of a defeat if you ask me.
I started on building the whole shebang of tclkit and starkit, but I'm quite a noob in this area. I'm using the kitgen build system (https://sourceforge.net/projects/kbskit ... kbs/0.4.9/) from sourceforge, With a bit of patching the kbs code builds on my orange pi. I'm not even sure if this is the right code for this particular application. Information on building standalone kits with this build system is scant. Anyway, to cut a long story short: has anyone tried (and succeeded) in building otmonitor from source, for aarch64 (arm64)? If so, could you point me towards some information on how to get it done?
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby hvxl » Tue Dec 25, 2018 12:17 am

Last time I tried kbs (years ago), I was unsuccessful. I find kitcreator much easier to use. Unfortunately the online build system doesn't yet appear to be able to include Tk on Linux/AArch64 builds. But running kitcreator on the device itself should work fine. Note that you'll also need to build dbus, tdom and tls.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1126
Joined: June 2010

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Tue Dec 25, 2018 1:58 pm

Thanks, Schelte,

That did the job.
I'm currently testing with my boiler emulator and a toon2 thermostat. The OrangePi is a headless machine, so I won't test the GUI. For anyone who's interested in rolling their own, this is what I did:

1: Ordered an OrangePi Zero Plus 2 H5.
2: Ordered an OTGW plugin board from cyril.
3: Downloaded the Debian Stretch image for this device: https://dl.armbian.com/orangepizeroplus ... ch_next.7z.
4: Flashed the image to a 32GB microSD card.
5: Connected OrangePi with USB add-on board to ethernet via a USB-ethernet adapter.
6: Booted the system, found its IP address and logged in as root.
7: Configured to connect to wireless network (using armbian-config) and shut down.
8: Replaced USB add-on board with OTGW add-on.

Then, get on with the actual software:

9: Start up again and login via ssh, over wireless network.
10: Update everything.
11: Install libdbus-dev, tcl-dev, tk-dev (probably forgot some packages).
12: Download kitcreator 0.11.0 from http://www.rkeene.org/devel/kitcreator-0.11.0.tar.gz.
13: Unpack and replace version 2.0 with version 2.1 in kitcreator-0.11-0/dbus/build-kitcreator-dbus.sh.
14: Download otmonitor source from http://otgw.tclcode.com/download/otmonitor.zip.
15: Unpack the otmonitor sources.
16: Build the tclkit with kitcreator. I did this using this script, located in the kitcreator root dir:
Code: Select all
#! /bin/sh
#
# build_for_otmonitor.sh
# script for building a tclkit for OTGW

MAKE='/usr/bin/make -j4'
export MAKE
KITCREATOR=./kitcreator
KITCREATOR_FLAGS='--enable-64bit'
KITCREATOR_PKGS='tk itcl mk4tcl dbus tdom tls'
export KITCREATOR_PKGS
$KITCREATOR $KITCREATOR_FLAGS

17: After successful completion, copy the resulting tclkit to the parent directory of otmonitor.vfs/ twice, as tclkit and runtime. Make sure both are executable (chmod 755 tclkit runtime).
18 Download sdx-20110317.kit from https://code.google.com/p/tclkit/downlo ... 110317.kit, put it in the parent dir of otmonitor.vfs/ and rename it to sdx.kit.
19: Build otmonitor according to Schelte's manual, in the parent dir of otmonitor.vfs/:
Code: Select all
./tclkit sdx.kit wrap otmonitor -runtime runtime
.
20: Create a configuration file for otmonitor. I use this one:
Code: Select all
web {
enable true
port 8080
nopass true
}
connection {
device /dev/ttyUSB0
type serial
enable true
}

21: All done. You can now start testing your OTGW.
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Tue Dec 25, 2018 3:40 pm

For people who find this too much hassle, and just want to get started, the code is now available from Schelte's site:

http://otgw.tclcode.com/download/otmonitor-aarch64

(EDIT: removed the non-working link to the domotica server)
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby hvxl » Tue Dec 25, 2018 10:08 pm

That link gives me:
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I see you specified tk to be included. And if it built, it will probably work. So I expect this to also work for people who do want to use the GUI.

Would you mind providing the tclkit as well? Then I'll post both on my site, with your permission.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1126
Joined: June 2010

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Tue Dec 25, 2018 11:50 pm

Hmmm ... that's a new one. I can see the file, but cannot download it. Will check with bwired. And yes, no problem to post the tclkit as well.

edit: posted ( tclkit-8.6.8 )
Now let's wait for bwired to fix the ftp server.
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby hvxl » Wed Dec 26, 2018 9:56 am

Thanks to Marcel, the files can now be downloaded from the OTGW download page.

@Marcel: Perhaps the FTP server makes decisions based on file extension, and these have none. Maybe it works if you zip the files and then upload them (with a .zip extension).
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1126
Joined: June 2010

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Wed Dec 26, 2018 11:16 am

Good point, forgot all about that feature. Uploaded two zipped files, these can be downloaded as they should. I've removed them, your site is a more logical place for OTGW related stuff. Edited the download link in my post accordingly.
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Thu Dec 27, 2018 9:44 pm

I've been testing for a few days now, so far I had a system freeze every day, sometimes more than once per day. The software seems OK, not sure if it's the orange pi, the OTGW board, the thermostat (toon 2), or the boiler emulator.
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby Templar » Thu Dec 27, 2018 10:51 pm

Finally got otmonitor running as a daemon on a Synology DS118.

Got some dynamic library errors though. The Synology is running older OpenSSL and D-Bus versions than required.
Templar
Member
Member
 
Posts: 106
Joined: March 2011
Location: Netherlands

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Thu Dec 27, 2018 11:01 pm

This otmonitor is linked against:

libdbus-1.so.3.14.15
libssl.so.1.0.2

Upgrading may be a good idea anyway, especially for ssl.
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby Templar » Fri Dec 28, 2018 12:38 am

marcelr wrote:This otmonitor is linked against:

libdbus-1.so.3.14.15
libssl.so.1.0.2

Upgrading may be a good idea anyway, especially for ssl.


These are the files mentioned in the errors. I managed to compile OpenSSL. D-Bus I have yet to fix, otmonitor starts anyway.
libssl.so.1.1
libdbus-1.so.3

DS118 has these files installed (latest firmware):
libssl.so.1.0.0
libdbus-1.so.3.7.2
Templar
Member
Member
 
Posts: 106
Joined: March 2011
Location: Netherlands

Re: otmonitor on native aarch64 (arm64)?

Postby marcelr » Fri Dec 28, 2018 6:19 pm

libssl-1.0.0 is really old.
Is the synology debian based or openwrt (or otherwise)?
marcelr
Global Moderator
Global Moderator
 
Posts: 969
Joined: May 2012
Location: Ehv

Re: otmonitor on native aarch64 (arm64)?

Postby Templar » Mon Dec 31, 2018 3:00 pm

marcelr wrote:libssl-1.0.0 is really old.
Is the synology debian based or openwrt (or otherwise)?


I opened a support ticket to adress this issue. [EDIT] They won't fix this now, they'll do it when it's necessary.
According to the Synology forums it's a custom GNU/Linux distro.
Templar
Member
Member
 
Posts: 106
Joined: March 2011
Location: Netherlands


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron