Git Product home page Git Product logo

openhab-snap's Introduction

openHAB 1 Add-ons

Project Status: Inactive โ€“ The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.

This repository contains add-ons that are using openHAB 1.x APIs. Earlier branches of this repo also contain the 1.x runtime and designer, which are no longer maintained.

Note that all information about openHAB itself, the IDE setup and the contribution processes can be found in the openhab-distro project, so please go there for any further details!

openhab-snap's People

Contributors

kaikreuzer avatar kubiko avatar r2geo avatar wborn avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-snap's Issues

openhab-snap and openhabian

Hey guys, Hey @kubiko,

you might know openHABian. Its aim is to make setting up a device for openHAB as "hassle-free" as possible.

In the community forum a user asked for Ubuntu Core support: https://community.openhab.org/t/openhabian-v1-2-supports-pi0w-with-new-base/25195/2

I did not yet have a deeper look into the whole core/snap topic. Do you see any ground and/or need for integration? How much does a Ubuntu Core system differ from a normal Ubuntu system and which tasks could openHABian still fulfill?

Best! Thomas

Installation on Ubuntu 18.04 odroid-c2

Tried to install as normal user. Also tried edge branch but same issue.

error: cannot perform the following tasks:

  • Run install hook of "openhab" snap if present (run hook "install": cannot apply seccomp profile: Invalid argument)

Chart in sitemap not working

Using a chart element in openhab sitemaps doesn't work. Access to http://localhost:8080/chart?groups=exampleGroup fails.

Affected version: 4.1.0 2023-12-23 (2474)

Stacktrace:

2024-01-02 17:31:18.361 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /chart
java.lang.InternalError: java.lang.reflect.InvocationTargetException
        at sun.font.FontManagerFactory$1.run(Unknown Source) ~[?:?]
        at java.security.AccessController.doPrivileged(Unknown Source) ~[?:?]
        at sun.font.FontManagerFactory.getInstance(Unknown Source) ~[?:?]
        at java.awt.Font.getFont2D(Unknown Source) ~[?:?]
...
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:?]
        ... 60 more
Caused by: java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration
        at sun.awt.FontConfiguration.getVersion(Unknown Source) ~[?:?]
        at sun.awt.FontConfiguration.readFontConfigFile(Unknown Source) ~[?:?]
        at sun.awt.FontConfiguration.init(Unknown Source) ~[?:?]
        at sun.awt.X11FontManager.createFontConfiguration(Unknown Source) ~[?:?]
        at sun.font.SunFontManager$2.run(Unknown Source) ~[?:?]
        at sun.font.SunFontManager$2.run(Unknown Source) ~[?:?]
        at java.security.AccessController.doPrivileged(Unknown Source) ~[?:?]
        at sun.font.SunFontManager.<init>(Unknown Source) ~[?:?]
        at sun.awt.FcFontManager.<init>(Unknown Source) ~[?:?]
        at sun.awt.X11FontManager.<init>(Unknown Source) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:?]
        ... 60 more

Thanks

Snap package OpenHAB 2 outdated

@kubiko @r2geo
When trying to install the OpenHAB 2 snap package from the command line it appears only version 2.0.0 is published as Stable while the website advertises version 2.1.0 to be the latest Stable available:

[b@machine~] sudo snap info openhab 
name:      openhab
summary:   "openHAB smart home server"
publisher: openhab
contact:   [email protected]
description: |
  openHAB - a vendor and technology agnostic open source automation software for
  your home.
  
snap-id: WpdPxW72JupkC8XTgaJsig3LEHdrR56x
commands:
  - openhab.clean
  - openhab.client
  - openhab.debug
  - openhab.help
  - openhab.start
  - openhab.status
  - openhab.stop
tracking:    stable
installed:   2.0.0 (167) 85MB -
refreshed:   2017-03-09 01:35:32 +0100 CET
channels:                         
  stable:    2.0.0          (167) 85MB -
  candidate: 2.0.0          (180) 85MB -
  beta:      2.0.0-SNAPSHOT (179) 85MB -
  edge:      2.1.0-SNAPSHOT (190) 86MB -

I've also read somewhere that version 2.2.0 is in development now. Should that not be the one that should be in the Edge channel?

Is it possible to update the packages in the snap store to the latest and greatest?

Thank you for your help.

See original issue

Can't run influxdb on ARM64

Starting openhab on Rasberry PI3 64bits fails:

# snap logs openhab
2020-07-02T19:19:33Z systemd[1]: snap.openhab.influxd.service: Scheduled restart job, restart counter is at 1435.
2020-07-02T19:19:33Z systemd[1]: Stopped Service for snap application openhab.influxd.
2020-07-02T19:19:33Z systemd[1]: Started Service for snap application openhab.influxd.
2020-07-02T19:19:39Z openhab.influxd[1246774]: /snap/openhab/359/bin/read-config: line 54: /snap/openhab/359/bin/influxd: cannot execute binary file: Exec format error
2020-07-02T19:19:39Z openhab.influxd[1246774]: /snap/openhab/359/bin/read-config: line 54: /snap/openhab/359/bin/influxd: Success
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Main process exited, code=exited, status=126/n/a
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Failed with result 'exit-code'.
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Scheduled restart job, restart counter is at 1436.
2020-07-02T19:19:39Z systemd[1]: Stopped Service for snap application openhab.influxd.
2020-07-02T19:19:39Z systemd[1]: Started Service for snap application openhab.influxd.

Looks influxdb is compiled for arch 32bits:

file /var/lib/snapd/snap/openhab/current/bin/influxd
/var/lib/snapd/snap/openhab/current/bin/influxd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=6YwKlnYX3AvxnbN34er6/XGDZ35dwDApP1qcRn6zC/y6HuqaUTHLTxE-2GXIK5/1BP4ZoAwWJbwU797yfaW, not stripped

I'm running on Archlinux, ARM64 (Rasberry PI 3):

# cat /proc/version
Linux version 5.6.3-1-ARCH (builduser@leming) (gcc version 9.2.0 (GCC)) #1 SMP Sun Apr 12 15:53:26 UTC 2020

Thanks

Chart is not working in sitemap

Both 2.0.0 and 2.1.0.-SNAPSHOT affected.

2017-02-20 06:43:48.782 [WARN ] [eclipse.jetty.servlet.ServletHandler] - Error for /chart java.lang.Error: Probable fatal error:No fonts found. at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1236)[:1.8.0_112] ...
(I don't think full stack dump is helpful)

2.1.0: config directory missing

Seems like a config directory is missing or not linked to the writable section:

$ openhab.status
/snap/openhab/212/bin/openhab-control: line 4: /snap/openhab/212/snap/config: No such file or directory
status: Ignoring predefined value for KARAF_HOME
 Running ...

add iputils-arping to stage-packages?

Perhaps I'm missing something obvious, but following the docs on configuring openHAB at https://www.openhab.org/docs/tutorial/configuration.html, it says:

Please make sure that the computer(server) running openhab has arping installed, as ping does not reliable detect some mobile devices.

The openHAB snap does not have iputils-arping installed, so I cannot find my mobile phone on the same WiFi network as the openHAB device.

Where is UUID and Secret located in snap?

I've not been able to locate the UUID and Secret for openhab.org registration using the snap.

Obviously, these locations aren't correct:

uuid: cat /var/lib/openhab/uuid
secret: cat /var/lib/openhab/openhabcloud/secret

Any help is appreciated!

Manual for InfluxDB setup and config

Tried to find any manual about setting up and configuring influxdb on Ubuntu Core Opanhab snap with no luck.
Can't start them working together.
Service openhab.influxd is enabled and active.
I can't find login and password and can't find where to write them to configure InfluxDB Persistence.

P.S. Sorry for my English!

openhab tries to access directories in /var

dear all,
I'm migrating from openhabian to the snap based version running on fedora 34 using snap version 3.1.0
openhab works stable, but I always try to configure the software so that no errors or warings appear in the logs...

to avoid following warnings it would be possible to bind-mount the directories, but I guess a better way would be introducing ENV-variables to the corresponding locations.

regards
Thomas

2021-07-16 19:53:46.615 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please
create it.
2021-07-16 19:53:46.620 [ERROR] [org.apache.felix.fileinstall ] - Cannot create folder /var/lib/openhab/tmp/bundle
s. Is the folder write-protected?
2021-07-16 19:53:46.621 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedServiceFactory, id=4
6, bundle=17/mvn:org.apache.felix/org.apache.felix.fileinstall/3.6.8]: Unexpected problem updating configuration org.apac
he.felix.fileinstall.b3da1233-6c5e-43bc-a5d4-17a379b0c397
java.lang.RuntimeException: Cannot create folder: /var/lib/openhab/tmp/bundles
at org.apache.felix.fileinstall.internal.DirectoryWatcher.prepareDir(DirectoryWatcher.java:647) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.prepareTempDir(DirectoryWatcher.java:627) ~[?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.(DirectoryWatcher.java:179) ~[?:?]
at org.apache.felix.fileinstall.internal.FileInstall.updated(FileInstall.java:250) ~[?:?]
at org.apache.felix.fileinstall.internal.FileInstall$ConfigAdminSupport$Tracker.updated(FileInstall.java:380) ~[?
:?]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) ~[
bundleFile:?]
at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker
.java:93) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:12
64) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1208)
[bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) [bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) [bundleFile:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2021-07-16 19:53:48.656 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2021-07-16 19:53:48.667 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '48.724256518112874,9.0953431851
81266'.
2021-07-16 19:53:48.668 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2021-07-16 19:53:51.107 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'yamahareceiver.items'
2021-07-16 19:53:51.288 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'smartphone.items'
2021-07-16 19:53:51.303 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'HOME_Location.items'
2021-07-16 19:53:51.320 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Astro.items'
2021-07-16 19:53:51.327 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Tobei_virt_mqtt_Schalter.items'
2021-07-16 19:53:51.332 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'tasmota.items'
2021-07-16 19:53:51.349 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Gis_O_Mat.items'
2021-07-16 19:53:51.360 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Ikea_zigbee_Remot:::::
:::::

OH 3.0 - no access to Z-Wave stick

Dear all!

After upgrade to OH 3.1.0 (was 2.5) I have no access to z-wave stick. Before upgrade it was working out-of-the-box.
I have "Z-Wave Binding" installed.
If I create Thing "Z-Wave Serial Controller", it's always in OFFLINE status.

demison@rpi4-openhab:~$ snap version
snap    2.51.3
snapd   2.51.3
series  16
kernel  5.3.0-1040-raspi2
demison@rpi4-openhab:~$ snap list openhab
Name     Version  Rev   Tracking       Publisher  Notes
openhab  3.1.0    1124  latest/stable  openhab    -
demison@rpi4-openhab:~$ ll /dev/ttyA*
crw-rw-rw- 1 root dialout 166,  0 Aug 15 10:00 /dev/ttyACM0
crw-rw-rw- 1 root dialout 204, 64 Aug 15 10:00 /dev/ttyAMA0
demison@rpi4-openhab:~$ snap connections openhab
Interface       Plug                    Slot                   Notes
gpio            openhab:gpio            -                      -
home            openhab:home            -                      -
i2c             openhab:i2c             -                      -
mount-observe   openhab:mount-observe   :mount-observe         -
network         openhab:network         :network               -
network-bind    openhab:network-bind    :network-bind          -
raw-usb         openhab:raw-usb         :raw-usb               -
serial-port     openhab:serial-port     :aeotecz-stickgen5zw0  manual
spi             openhab:spi             -                      -
system-observe  openhab:system-observe  :system-observe        -

I see that OH tries to locate the stick. I thing, there's an error in apparmor profile.

demison@rpi4-openhab:~$ dmesg
[416482.496273] audit: type=1400 audit(1629038061.686:78194): apparmor="DENIED" operation="open" profile="snap.openhab.openhab" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/idVendor" pid=19058 comm="OH-usb-serial-d" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

I've tried to correct it, but the Thing is still offline.

In Karaf logs I see only one WARN that's repeated 15 seconds:
17:36:37.407 [WARN ] [xsysfs.internal.SysfsUsbSerialScanner] - Could not extract USB device information for serial port org.openhab.core.config.discovery.usbserial.linuxsysfs.internal.SysfsUsbSerialScanner$SerialPortInfo@2bfbe54c: /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/idVendor

I don't understand if I do something wrong?

Best regards,
Dmitry

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.