Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. rgriffogoes
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by rgriffogoes

    • RE: 💬 OpenHAB

      @guillermo-schimmel Hi! Thanks a lot for your examples!

      I currently trying to upgrade my system from method 1a (old mqtt binding, lots of items with cryptic topic definitions) to a brand new installation using method 2 (in theory, organized things/channels, autodiscovery, smartsleep support). I managed to get something kind of working but I'm not sure if I'm doing int the right way.

      • In a situation that I have one arduino, with a dht sensor (providing temperature + humidity) will I have to create separates things to get both values? ( autodiscovery did like that). Or will it be possible to have a thing representing the physical node (with nodeid), with multiple channels for each of its sensors (childs ids) ?

      • Also, do you have a working example of a MySensor thing file? looks like your examples cover mqtt2 things + items + sitemap and MySensor items (taking channel from PaperUI things page, I suppose)

      Thanks again !

      posted in Announcements
      rgriffogoes
      rgriffogoes
    • RE: OpenHAB Mysensors binding 2.4: cant get mqtt gateway online

      By creating the file org.eclipse.smarthome.mqttbroker.cfg in the service folder (/usr/local/etc/openhab2/services in my case, chown to openhab), with the contents

      name=mosquitto
      host=192.168.1.69
      secure=false
      port=1883
      username=
      password=
      retain=true
      

      I was able to just create the MySensors MQTT gateway (using paperui) and it stayed online (no mqtt broker defined, but its addon is installed). I had the impressions that with the latest versions it should be possible to do everything in the PaperUI, and that the broker would use the mqtt2 addon (but in paper ui, service, config, mqtt tab, mqtt system broker connection, manage->plus button -> expert mode, I get to see the contents of the cfg file above)

      But unfortunately, it seems that the discovery services enters a endless loop (maybe I need to update my arduinos sketch to the latest mysensors code?) and I don't get any auto discovered things. If I trigger a new discovery it will stop the previous one and start again.

      Finally, I was able to manually create a thing, and link items on it. Eventually my battery level and humidity were displayed in the paper ui control page (after some weird delay, not updating once it shows in the log. the temperature didn't show up though).

      Not sure if my understanding is off (or paperui is limited in this sense) but in the "thing" creation page I only get to specify one child id. Then my multi sensors/value nodes would need to be define in multiple things? As I can't properly define channels for each child id, and I'm not sure what var1-5 are all about.

      I'll try defining things/channels/items directly in files in the following days, because so far I couldn't enjoy most of the benefits of this new version (auto discovery, logical grouping of physical device in "things", questionable "do-it-all in paper ui"), and I'm almost considering using mqtt1 binding in the new install 😞

      posted in Troubleshooting
      rgriffogoes
      rgriffogoes
    • RE: OpenHAB Mysensors binding 2.4: cant get mqtt gateway online

      Hello!

      I currently have a working Openhab2.2 with mqtt1 binding + mosquitto + MySensors MQTT gateway (+ others) installed in RPi. As I'm migrating the Openhab install to FreeNas jail I figure I should try to use the latest versions of the openhab + bindings.

      But it seems that I'm facing the same issue as others: cant get my MySensor mqtt Gateway to connect to an external mqtt broker.

      What I've tried was a clean install of Openhab 2.4 + mqtt2 binding + MySensor 2.4 binding, then configuring a Mqtt broker Thing (stays online) and finally a MySensor Gateway binding (never connects, show "No connection to broker: <whatever name I use>")

      I tried using the embedded Mqtt and the gateway was able to connect (but I didn't check if messages were coming/going as I will definitely use an external mqtt server)

      As a Java programmer myself, I tried to check the code in Github (next step will be try to create a local dev env, but for that I'll need more time to check the right steps for that) and the only odd things I notice were:

      Dependency on old mqtt1 code, e.g.: the "MySensorsMqttConnection,java" class is using the MqttService from the package org.eclipse.smarthome.io.transport.mqtt.

      1. Is this package correct? it seems that it is the old mqtt binding code. The Mqtt stuff I found in openhab2-addons seems to use openhab packages.
        a. Where would this smarthome package code be?

      Potential Class version differences:
      2. I have no idea (and didn't check the provided jar for the MySensor plugin) how the dependencies are managed in openhab runtime, but could it be that the MySensors package depends (or packs) a different version of the "core" mqtt code than the one that openhab2 runtime classloader is providing? then weird things could happen (if method signatures/classes are same I guess)

      [https://github.com/tobof/openhab2-addons/blob/MySensors_Binding/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection.java]

      posted in Troubleshooting
      rgriffogoes
      rgriffogoes