Navigation

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

    Best posts made by TimO

    • openHAB 2.0 binding

      Features

      • Serial Gateway supported (with variable baud rate)
      • Ethernet Gateway supported
      • Supported sensors: S_TEMP, S_HUM, S_VOLTAGE, S_LIGHT, S_POWER, S_BARO, S_DOOR, S_MOTION, S_SMOKE, S_DIMMER, S_COVER (Stop not implemented in OH2 yet), S_WIND, S_RAIN, S_UV, S_WEIGHT, S_DISTANCE, S_LIGHT_LEVEL
      • Request for an ID is answered (random free number is given)
      • Discovery of devices, to use it: start the scan for devices in OpenHAB 2.0 and restart your nodes

      Pictures
      Discovery:
      openhab2-mysensors-discovery-2015-07-27.png

      What is not working yet:

      • no reconnect after lost connection

      How to test:

      Visit the wiki on the GitHub Repo.

      posted in OpenHAB
      TimO
      TimO
    • [Tutorial] openHAB with serial gateway

      As it is now possible to use a serial gateway with openHAB I've written a simple (as simple as possible) entry tutorial.

      What do we need?

      • a MySensors serial gateway
      • a linux system (like a RPi, example based on Ubuntu)
      • a MySensors sensor (for example with a DHT22 and a fixed NODE_ID of 101)

      Where to start?

      Start with the serial gateway.

      Build it: http://www.mysensors.org/build/serial_gateway

      If you see something like this in the serial monitor for arduino you're done:

       0;0;3;0;14;Gateway startup complete.
      

      Connect the serial gateway to the linux system and execute "dmesg". You should see something like:

      [  186.047748] usb 2-1.5: new full-speed USB device number 7 using ehci-pci
      [  186.147030] usb 2-1.5: New USB device found, idVendor=0403, idProduct=6001
      [  186.147036] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [  186.147040] usb 2-1.5: Product: FT232R USB UART
      [  186.147044] usb 2-1.5: Manufacturer: FTDI
      [  186.147047] usb 2-1.5: SerialNumber: A40360T2
      [  186.149618] ftdi_sio 2-1.5:1.0: FTDI USB Serial Device converter detected
      [  186.149659] usb 2-1.5: Detected FT232RL
      [  186.149663] usb 2-1.5: Number of endpoints 2
      [  186.149667] usb 2-1.5: Endpoint 1 MaxPacketSize 64
      [  186.149670] usb 2-1.5: Endpoint 2 MaxPacketSize 64
      [  186.149673] usb 2-1.5: Setting MaxPacketSize 64
      [  186.150205] usb 2-1.5: FTDI USB Serial Device converter now attached to ttyUSB0
      

      As we see the serial gateway is now accessible through "ttyUSB0" like: /dev/ttyUSB0. But the Number may change. It depends on the FTDI Chip and could also be something like "/dev/ttyACM0".

      But we don't want to look for the correct name after every reboot or after we plugged out and in the serial gateway, so we add the following in "/etc/udev/rules.d/99-usb-serial.rules"

      SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A40360T2", SYMLINK+="ttyUSB99"
      

      Look at the output from "dmesg" above and change "0403", "6001" and "A40360T2" according to your hardware.

      Now plug out and plug in the serial gateway.

      The serial gateway will now be accessible through "/dev/ttyUSB99".

      Install openHAB

      It is important to install a version like or above 1.7.0. This version is not stable yet so download a snapshot from cloudbees:

      https://openhab.ci.cloudbees.com/job/openHAB/

      You need:

      distribution-1.7.0-SNAPSHOT-addons.zip
      distribution-1.7.0-SNAPSHOT-runtime.zip

      Move to the "/opt" directory and extract the files:

      cd /opt
      mkdir openhab
      cd openhab
      unzip /tmp/distribution-1.7.0-SNAPSHOT-runtime.zip
      cd addons
      unzip /tmp/distribution-1.7.0-SNAPSHOT-addons.zip org.openhab.binding.serial-1.7.0-SNAPSHOT.jar
      

      We will keep it simple and just use the serial binding.

      Configure openHAB

      At first we need to configure openHAB to use the serial binding to connect with the gateway. So we switch to the "configurations" directory:

      cd /opt/openhab/configurations
      

      There we create a file named "demo.items" in the "items" directory:

      vi items/demo.items
      

      Insert the following content:

      String Arduino "Arduino" { serial="/dev/ttyUSB99@115200" }
      Number          livingTemp01                            "Temperatur [%.1f °C]" <temperature> 
      Number          livingHum01                             "Feuchtigkeit [%.1f %%]" <temperature>
      

      We keep it simple and just assume we just want to read out a DHT22.

      Start up openHAB with "/opt/openhab/start.sh". You should see something like:

      2015-04-02 20:05:30.731 [INFO ] [runtime.busevents             ] - Arduino state updated to 0;0;3;0;14;Gateway startup complete.
      

      If that is the case: very good!!

      Now we need rules that reads the information that is received by openHAB via /dev/ttyUSB99 and show it.

      vi rules/demo.rules
      

      Content (that is the hardest part):

      import org.openhab.core.library.types.*
      import org.openhab.core.persistence.*
      import org.openhab.model.script.actions.*
      import org.joda.time.*
      import java.util.*
      import org.eclipse.xtext.xbase.lib.*
      import org.openhab.core.items.*
      
      
      var String ArduinoUpdate = ""
      var String sketchName = ""
      
      var int V_TEMP = 0
      var int V_HUM = 1
      var int V_LIGHT = 2
      var int V_DIMMER = 3
      var int V_PRESSURE = 4
      var int V_FORECAST = 5
      var int V_RAIN = 6
      var int V_RAINRATE = 7
      var int V_WIND = 8
      var int V_GUST = 9
      var int V_DIRECTION = 10
      var int V_UV = 11
      var int V_WEIGHT = 12
      var int V_DISTANCE = 13
      var int V_IMPEDANCE = 14
      var int V_ARMED = 15
      var int V_TRIPPED = 16
      var int V_WATT = 17
      var int V_KWH = 18
      var int V_SCENE_ON = 19
      var int V_SCENE_OFF = 20
      var int V_HEATER = 21
      var int V_HEATER_SW = 22
      var int V_LIGHT_LEVEL = 23
      var int V_VAR1 = 24
      var int V_VAR2 = 25
      var int V_VAR3 = 26
      var int V_VAR4 = 27
      var int V_VAR5 = 28
      var int V_UP = 29
      var int V_DOWN = 30
      var int V_STOP = 31
      var int V_IR_SEND = 32
      var int V_IR_RECEIVE = 33
      var int V_FLOW = 34
      var int V_VOLUME = 35
      var int V_LOCK_STATUS = 36
      var int V_DUST_LEVEL = 37
      var int V_VOLTAGE = 38
      var int V_CURRENT = 39
      var int msgPresentation = 0
      var int msgSet = 1
      var int msgReq = 2
      var int msgInternal = 3
      var int msgStream = 4
      var int alarmArmor = 1
      
      // Internal Commands
      
      var int I_BATTERY_LEVEL = 0
      var int I_TIME = 1
      var int I_VERSION = 2
      var int I_ID_REQUEST = 3
      var int I_ID_RESPONSE = 4
      var int I_INCLUSION_MODE = 5
      var int I_CONFIG = 6
      var int I_FIND_PARENT = 7
      var int I_FIND_PARENT_RESPONSE = 8
      var int I_LOG_MESSAGE = 9
      var int I_CHILDREN = 10
      var int I_SKETCH_NAME = 11
      var int I_SKETCH_VERSION = 12
      var int I_REBOOT = 13
      var int I_GATEWAY_READY = 14
      
      // Mappings
      var HashMap<String, String> sensorToItemsMap = newLinkedHashMap(
          "101;0;"            -> "livingHum01",
          "livingHum01"       -> "101;0;",
          "101;1;"            -> "livingTemp01",
          "livingTemp01"      -> "101;1;"
      )
          
      
      //receiving msg from mysensors gateway
      rule "Arduino sends to Openhab"
          when
              Item Arduino received update
          then
              var String lineBuffer =  Arduino.state.toString.split("\n")
              for (String line : lineBuffer) {
                  var String[] message = line.split(";")
                  var Integer nodeId = new Integer(message.get(0))
                  var Integer childId = new Integer(message.get(1))
                  var Integer msgType = new Integer(message.get(2))
                  var Integer ack = new Integer(message.get(3))
                  var Integer subType = new Integer(message.get(4))
                  var String msg = message.get(5)
                  if(msgType == 1 ){
                      if (subType == V_TEMP){
                          postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg)
                          println ("Temp item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " temp: " + msg )
                          }
                      if (subType == V_HUM){
                          postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg)
                          println ("Hum item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " hum: " + msg )
                          }
                      }    
                  // Internal Command
                  if(msgType == 3){
                      if(subType == I_SKETCH_NAME){
                              println("Sketch name: " + msg )
                              sketchName=msg
                          }
                      if(subType == I_SKETCH_VERSION){
                              println("Sketch version: " + msg )
                              postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), sketchName+" " +msg )
                              sketchName=""
                          }
                      }
                  }   
              }
      end
      

      Wow, that is hardcore! Are you still with me? Luckily there is not much to change for start.

      There is a mapping, that you may change or want to extent:

      // Mappings
      var HashMap<String, String> sensorToItemsMap = newLinkedHashMap(
          "101;0;"            -> "livingHum01",
          "livingHum01"       -> "101;0;",
          "101;1;"            -> "livingTemp01",
          "livingTemp01"      -> "101;1;"
      )
      

      Where "101" is the NODE_ID of my DHT22 Sensor. I'm using hardcoded NODE_IDs, so if your sensor has another NODE_ID already, just change the mappings in the configuration. The "0" and "1" after the "101" is the childId. Change that too if you must. Just look at the Arduino code of your sensor.

      Start openHAB if it is not already running and look for the output.

           2015-04-02 20:19:47.057 [INFO ] [runtime.busevents             ] - Arduino state updated to 0;0;3;0;9;read:101-101-0s=0,c=1,t=1,pt=7,l=5:44.7 
           101;0;1;0;1;44.7
      
      2015-04-02 20:19:47.114 [INFO ] [runtime.busevents             ] - livingHum01 state updated to 44.7
      Hum item: livingHum01 hum: 44.7
      

      If you see something like the above it is still working! 😉

      *Nearly done! *

      Know we want to show the information in a sitemap. We just create one with:

      vi sitemaps/demo.sitemap
      

      Content:

      sitemap demo label="Hauptmenü"
      {
        Frame label="Wohnzimmer" {
          Text item=livingTemp01
          Text item=livingHum01
        }
      }
      

      We keep it simple here!

      If OpenHAB is not running start it and fire up your favorite browser and open

      http://localhost:8080/openhab.app?sitemap=demo
      

      For further information have a look at this thread: http://forum.mysensors.org/topic/655/serial-gateway-connection-to-openhab/2

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @gonzalonal : I found a solution for V_STOP! It will be available soon.

      But more important: @andreacioni is doing some great work improving the stability and performance of the binding!!

      I just wanted to let you know, that the binding is currently under heavy development. 👍

      posted in OpenHAB
      TimO
      TimO
    • openHAB 2.2 binding MQTT support

      Finally I'm able to present a first alpha release of the MQTT support of the OpenHAB2 binding.
      I've done some first tests with a RGB node and it looks good, but there is still some work to do.
      So this version is for the category "Don't try this at home!". 😉

      Some important notes and things to test:

      • The binding uses the upcoming MQTT support in smarthome/OpenHAB2, not the old version 1 binding! They may work together, but we need to test that. If you're willing to test that, please let me now.
      • I've tested with OpenHAB2 snapshot #1099. I don't know how far it is compatible to old versions.
      • There is a PR in the smarthome repository to add the functionality of a MQTT broker to OpenHAB2, so a separate broker won't be needed in the future. The binding will be compatible with this addition.
      • I need to adjust logging.

      Instructions:

      1. Start OpenHAB2

      2. In karaf console:
        feature:install esh-io-transport-mqtt

      3. Download binding:
        wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.2.0-mqtt.jar

      4. Place "org.eclipse.smarthome.mqtt.cfg" in the /etc/openhab2/services or conf/services directory. New filename! (Wassn't my idea!) 😉

      Example:

      mosquitto.url=tcp://192.168.2.3:1883
      mosquitto.user=user
      mosquitto.pwd=secret
      mosquitto.retain=false
      

      (Use it like the old mqtt.cfg)

      1. Configure MQTT broker via PaperUI
        0_1512124003255_Bildschirmfoto vom 2017-12-01 11-25-59.png
        or

      via *.things file

      Bridge mysensors:bridge-mqtt:gateway [  brokerName="mosquitto", 
                                              topicPublish="mygateway1-in",
                                              topicSubscribe="mygateway1-out",
                                              startupCheckEnabled=false ] {
                                              
      }
      
      1. Configure or discover things.

      That's it!

      posted in OpenHAB
      TimO
      TimO
    • RE: Are folks here happy with Domoticz?

      I've tried Domoticz at the beginning and was amazed at how easy it is to setup.
      As other mentioned before I missed the flexibility and started with OpenHAB.

      I really like the flexibility of my setup:

      • MySensors Binding with three gateways attached (1x USB, 1x Ethernet RF24, 1x Ethernet RFM69)
      • Sonos
      • Influx / Grafana
      • node-red (for rules) https://flows.nodered.org/node/node-red-contrib-openhab or MQTT
      • Pushover
      • EbusD (heating)
      • Samsung TV
      • upcoming: Neato Vac
      • OpenHAB App

      I'm trying to combine the best out of all worlds which is really easy with OpenHAB.

      Examples:

      1. I've installed a (good looking) push button as a doorbell directly attached to the USB mysensors gateway and if the button is pressed a message is send via Pushover to our phones and the sonos in the livingroom is playing a sound while the sonos in the room of our baby girl is quite while she's sleeping.

      2. At (dawn - 120 minutes) the rollershutters (MySensors node) are closed, except the shutters of the doors to our terrace which will be delayed by 45 minutes. Additionally a light (433 MHz socket from hardware store) in the corridor and lights on the terrace (MySensors node) are switched on. Everything is switched off automatically at a given time. Rules are defined in node-red.

      3. Pressure of the heating system (Ebus) is below 1.3 bar --> send Pushover to phones

      The controller strongly depends on what you're up to. What devices are you using?

      If you're only using MySensors and maybe other devices that support Domoticz and don't need that much flexibility: stick with Domoticz. It's a good choice.

      If you have different devices, look into OpenHAB, if there's a binding.

      If you need the full flexibility go with node-red. There are many extensions available for node-red to support Pushover, Sonos .... so maybe that's the way to go.

      posted in Domoticz
      TimO
      TimO
    • RE: Serial Gateway connection to Openhab

      @CARSTEN I've compiled a modified version of the OpenHab Serial binding with a baud rate of 115200 as this is standard in mysensors.

      Download: org.openhab.binding.serial_1.6.0.201411271703.jar

      As @tboha suggested you currently have to manage all commands by yourself.

      I've attached my modified serial binding here. Please be aware, that all other configurations that depend on serial binding won't work with the modified version, because of the changed baud rate.

      I'm currently testing with this Serial Gateway:

      Serial Gateway

      Here is my OpenHab configuration for simple testing:

      demo.items: demo.items
      demo.rules: demo.rules
      demo.sitemap: demo.sitemap

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      I finally found some time to develop on the binding.

      A new version is available with the following changes:

      • On startup the binding will request I_VERSION from gateway to ensure its proper startup. Thanks @andreacioni for the PR!!

      • HVAC (V_VAR1, V_VAR2 ...) are now available. Thanks @Denke for the PR!!

      • The request for ACK feature is now available for testing. It works for light/status for me. If a message is NOT acknowledged by a node the binding retries to send the message five times. If no ACK is received after that the binding will try to revert the item to its old state. This only works, if a state is known (not NULL, for example at startup).

      Additionally I've tested the binding with multiple gateways (one EthernetGW, one SerialGW), works fine.

      posted in OpenHAB
      TimO
      TimO
    • openHAB 2.2 binding

      Dear fellow openHAB2 binding users,

      it's time for a new release of the binding. The added functionality is low, but under the hood there were a few changes, so after the refactoring @andreacioni has done at the beginning of this year, I've done some refactoring too, with the objective to fullfil the regulations for an integration into the official openhab2-addons repository.
      I've tried to improve the readability of the configuration and of the code itself.

      This leads to an important point: The current release is not backwards compatible!!
      Whatever is configured (MySensors binding related) will not work anymore with the current release.

      But why?

      • nodeId & childId were Strings in the old bindings and now are Integer
      • skipStartupCheck was renamed to startupCheckEnabled

      If you've configured the things with the *.things file you just have to do two easy steps:

      1. Look for skipStartupCheck and switch it with startupCheckEnabled and reverse the logic (true to false and vice versa)

      2. Look for nodeId="123", childId="456" and remove the quotation marks ", so it will look like: nodeId=123, childId=456

      Copy the new jar file into the addons folder, start OpenHAB2 and you're good to go.

      If you've configured the things in PaperUI the easiest way is to delete all things and rediscover them. Of course in large installations this won't be much fun.

      I hope this won't happen again in further versions! :s

      Fixed in this release:

      • RGB & RGBW corrections
      • Removed bug that prevented autodiscovery of deleted things
      • mysensors.test fragment added / tests moved
      • Static code analysis
      • Move to 2.2.0 Snapshot

      The changes in functionality were small so there is no need to install the new version asap if you are able to forgo the above mentioned functionality.

      Downloads:
      OpenHAB MySensors Binding 2.2.0

      OpenHAB MySensors Binding 2.1.0 (old binding version, with old configuration if you still need it)

      posted in OpenHAB
      TimO
      TimO
    • RE: OH3 - MySensors Binding

      For those of you willing to help testing the OH3 integration here is a link:

      Jar Download

      Please don't forget to fulfill the requirements for mqtt und serial. Installation of bindings will do.

      What's working after a quick test:

      • binding loads in OH3
      • serial gateway receives messages (ethernet gateway should work too)
      • discovery is working

      What's not working:

      • MQTT gateway: it's broken some time and needs some tinkering

      Please let me know if you found some time to test the binding.

      posted in OpenHAB
      TimO
      TimO
    • RE: German speaking members

      👍 😉

      posted in General Discussion
      TimO
      TimO
    • RE: DHT22 on Arduino Pro Mini 8Mhz 3.3V - Failed

      @Puneit-Thukral Please do a restart of OH2 after discovery of a new thing, there is a bug that prevents the thing from coming online.

      posted in Troubleshooting
      TimO
      TimO
    • RE: openHAB 2.0 binding

      What do you want to keep updated? The OH2 runtime? The binding?

      I update the link of the binding (jar-file) in the first post here whenever I add or fix something. You only have to switch this jar file in your installation. In the current alpha phase it is an good idea to delete the userdata folder, but with that you will lose all already discovered and added things. I have configured all things/items that should survive a deletion of the userdata in the thing.conf, items.conf etc.

      For the future I plan to make a pull request so that the mysensors binding will be a fixed part of OH2, but I want to ensure its stability before I do so. Additionally there are some features I would like to add before making a pull request.

      posted in OpenHAB
      TimO
      TimO
    • RE: Check messages node-gateway

      The message is send only once, indicating that the node is requesting an ACK. The controller needs to handle the ACK and send a response to the node via the gateway. The node does not resend the message if no ACK is received, that needs to be implemented in the sensor sketch, it is not part of the library.

      posted in General Discussion
      TimO
      TimO
    • RE: Node battery voltage in openHAB iOS

      @ben999 : Here's an example how to integrate the battery percent value: https://github.com/tobof/openhab2-addons/wiki/Examples
      Look for bathBat01.

      posted in OpenHAB
      TimO
      TimO
    • RE: What did you build today (Pictures) ?

      Great idea! 😄

      I've continued to work on my MyMo (MySensors Motherboard).

      0_1508442160260_IMAG0372.jpg

      The board on the right is a Atmega328p / RFM69 based motherboard with the dimensions of the Sensebender gateway. On the left there is a three channel dimmer/switch for 12 V LEDs stacked on a motherboard. In theory (because of the MYSX connector) the board should fit on the sensebender gateway if more horse power is needed. I've not tested that yet.

      posted in General Discussion
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hey @Nicklas-Starkel !
      I hope it will work out for you! 🙂

      It is not yet part of OH2 and downloadable within OH2 because my pull request is still open. A OH2 developer needs to look at it. 🙂

      posted in OpenHAB
      TimO
      TimO
    • RE: MY_NODE_ID AUTO doesn't work, what am I missing?

      I'm not aware of a controller that is able to hand out IDs via MQTT, although that is possible. So you have to use static IDs with a MQTT gateway.

      posted in Hardware
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hey @Duncan-Pullen !

      The main reason is: I'm waiting for suggestions / approval from the OH2 developers. 🙂

      The MySensors binding has grown big and a review takes some time.

      posted in OpenHAB
      TimO
      TimO
    • RE: [solved] RFM69 based nodes unable to report Lib Version

      I've tinkered a little w5100-RFM69-gateway lateley wich works with the softspi implementation I've tried to push the other day. I'll give your implementation a try at the weekend.

      posted in Bug Reports
      TimO
      TimO
    • RE: OpenHAB 2.5 MySensors Serial Gateway - How to install

      Hey!

      The MysGW Service is running with root permissions and therefore creates the device "/dev/ttyMySensorsGateway" with owner and group root.

      Please test: "sudo usermod -a -G root openhab"

      Do a restart to be sure the settings are used.

      That shouldn't be the final solution though.

      posted in OpenHAB
      TimO
      TimO
    • Humidity / Temperature Sensor

      I've build a sensor to measure humidity and temperature in my living room. It is now working for about 7 weeks.

      The sensor consists of the following components:

      • DHT22 Hum/Temp Sensor
      • MCP 1702 LDO Regulator (3.3V)
      • Atmega328P-PU PDIP-28
      • holder for batteries (4 x AAA)
      • NRF24L01+

      IMG_20150112_134926.jpg

      IMG_20150112_134939.jpg

      Here are the schematics:

      Schematics.png

      And here is a screenshot from my OpenHab-View:

      OpenHab.png

      (I'm logging the last update to ensure the sensor is still alive)

      The DHT22 needs at least 3 V to operate stable, so I thought about using a booster or a regulator and took the regulator.

      Currently I'm using rechargeable AAA, which will be switched soon, as the sensor is working fine. The Voltage has dropped 0,1 V (from 5.3V to 5.2V) in 7 weeks and the AAAs were only precharged. My multimeter is able to measure the current, but in case of this sensor it is to low, I need a better multimeter.

      The Atmega328p is running with 8 MHz internal clock and brown out detection is disabled.

      Finally the sketch:

      https://codebender.cc/sketch:67176

      posted in My Project
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Nicklas-Starkel Well no, MQTT Gateway is not yet supported. 😞
      I got distracted by my current hardware project and need to catch up on the binding. First tests of the MQTT addition to the binding look very promising and I'll include it soon.

      The current release is this one: http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar

      While preparing the code to be included in OpenHAB2 I'm currently changing some things that will break the current configuration / things files. But I will give some information about that with the release of the next version.

      posted in OpenHAB
      TimO
      TimO
    • RE: Can't link rfid node item

      Hey @ben999 !

      Thanks for reporting and your patience!
      There was a bug in the binding. Please update your binding via IoT Marketplace or by replacing the jar with THIS version.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hey @Nicklas-Starkel !

      Actually there is a PR for MQTT support which is a huge leap forward and needs testing: https://github.com/tobof/openhab2-addons/pull/75

      I'm 90% done on fulfilling the OH2 development compliance: https://github.com/openhab/openhab2-addons/pull/2066 which I'm working on since weeks (months). 😮

      My road map is:

      1. Finish the work on the compliance. (Maybe this week, for sure next week)
      2. Move repository to 2.2.0 snapshot
      3. Integrate RGB(W)
      4. Integrate MQTT

      RGB(W) needs some more attention, because there is a bug in the conversion and it needs some more testing.

      The current work is a second refactoring with many changes. Also a few options (names) have changed which need some attention by the users because configurations need to be adjusted. Hopefully the names now speak more for itself. 🙂
      I've also extended the JUnit Testing of the binding (which I'll need to quickly fix the RGB(W) bug).

      I need to catch up with the development of the openhab2-addons base. This is done after the OH2 compliance is done. At the moment I can't compile a MQTT testversion of the binding because the repository needs to be moved to 2.2.0 Snapshot.

      Sadly the process for OH2 compliance is at the moment blocking the enhancements of the binding. I had no idea this would take so long.

      mcguiresean created this issue in tobof/openhab2-addons

      closed MQTT Gateway support using openhab transport #75

      posted in OpenHAB
      TimO
      TimO
    • RE: How to let OpenHab know that mysensors actuator became unresponsive?

      Hi @rzylius !

      There are two possible solutions:

      1. Use ACK to track if a command is received by the node.

      2. Send a heartbeat (it's a library function) to the controller / gateway and use a rule on the last update channel. If no update is received within a given time, send a push notification to your smartphone (or something like that).

      posted in OpenHAB
      TimO
      TimO
    • RE: OH3 - MySensors Binding

      @Klabbe thank you for your feedback!

      posted in OpenHAB
      TimO
      TimO
    • RE: RS485/RS232/Serial transport class for mysensors.org

      @LeoDesigner : yeah, you're right, that is needed.

      But there seems to be another problem, I can't get the current development code to work. I've simply interconnected two Nanos at D8/D9. The gateway and the motion example come up fine according to serial output and the motion sensor definiatly sends something via AltSerial but the gateway doesn't seem to recognize it.

      A simple test, where I pipe the input on hardware serial of one nano to AltSerial on the second nano and from there to hardware serial works just fine, so hardware and AltSerial is working.

      Sender:

      #include <AltSoftSerial.h>
      
      AltSoftSerial altSerial;
      
      void setup() {
        Serial.begin(115200);
        Serial.println("Demo begins");
      
        altSerial.begin(115200);
      
      }
      
      void loop() {
        char c;
      
        if (Serial.available()) {
          c = Serial.read();
          altSerial.print(c);
        }
      
      }
      

      Receiver:

      #include <AltSoftSerial.h>
      
      AltSoftSerial altSerial;
      
      void setup() {
        Serial.begin(115200);
        Serial.println("Demo begins");
      
        altSerial.begin(115200);
      
      }
      
      void loop() {
        char c;
      
        if (altSerial.available()) {
          c = altSerial.read();
          Serial.print(c);
        }
      
      }
      
      posted in Development
      TimO
      TimO
    • RE: Arduino Mega + RelayWithButtonActuator sketch

      http://www.mysensors.org/download/sensor_api_14#gateway

      You have to add CSN/CE Pin with the initialization.

      Something like:

      MySensor gw(8, 53);
      
      posted in Troubleshooting
      TimO
      TimO
    • RE: A very beginner needs help - MySensors and OpenHab !

      Found it!

      "received command" not "received update"!

      rule "Light"
              when
                      Item lightBar01 received command
              then
                     if(receivedCommand == ON) {
                  sendCommand(Arduino, "101;1;1;0;2;1\n")
              }
              if(receivedCommand == OFF) {
                 sendCommand(Arduino, "101;1;1;0;2;0\n")
              }
      end
      
      
      posted in My Project
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Ok, so for those of you that would like to test a bleeding edge alpha version I've prepared a little test environment of OpenHAB 2.0.

      Please keep in mind: OpenHAB 2.0 is Alpha and my binding is in best case pre-alpha, so don't expect it to work. 😉

      What should (maybe) work:

      • Serial Gateway supported
      • Ethernet Gateway supported
      • Supported sensors: V_TEMPERATURE, V_HUMIDITY, V_VOLTAGE, V_LIGHT
      • Request for an ID is answered (random free number is given)

      What is not working yet:

      • Automatic discovery of sensors that represent themself. I've made a basic implementation and in the debug mode there will be messages which say that a new device was discovered, but that is a lie. 😉 I've found the error in the implementation but it's not that easy to change, so I've postponed that.

      How to test:

      1. Download the package from: Download
      2. Unzip the file
      3. Change in the directory openhab2
      4. Execute "start_debug.sh" (or "start_debug.bat" should work on windows too, but not tested yet)
      5. Direct your browser to http://localhost:8080
      6. Watch the video for further information.

      I've made a demo of how to set up OpenHAB 2.0: Vimeo Link

      How to give feedback:

      1. If you've made a test and it is not working, reset everything and start from scratch and try to reproduce the error. Tell me, what you've done and give me the debug output.

      2. If you want to test a type of sensor that is not implemented yet, post the messages the sensor sends or expects and I will implement it so you're able to test. Someone posted a sketch for mock-sensors, I will look in that too.

      My ToDo List

      • Get discovery of sensors working
      • implement discovery of bridges / gateways
      • implement additional sensors
      • look into items-, rules-, config-files (the OpenHAB 1.X way to implement things)
      posted in OpenHAB
      TimO
      TimO
    • RE: How to scan rf remote

      @aclertant Are you trying to receive the 433 MHz signals with the NRF24L01 module which works in the 2,4 GHz band? You need a receiver and sender for the 433 MHz frequency band.

      posted in Development
      TimO
      TimO
    • RE: Set node id. How?

      Did you send a newline at the end?

      posted in Troubleshooting
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @kolaf , @Jan-Gatzke : Thanks for testing and your feedback!!

      I've edited the first posting, which now contains the documentation on how to test and I've added a new alpha version (Download) for test.

      The sensors you requested @kolaf are ready for a test. The discovery is working now too, feel free to give it a try.

      @kolaf : I can't work with your server.log. Did you provide the right file? Did you start OpenHAB with "start_debug.sh"?

      Your questions:

      • baud rate of the serial gateway is currently fixed to 115.200. It is easy to add that option but I would like to keep it simple and because it is a little bit hardcoded in the MySensors lib I would like to omit this option. If it is easier for you to test with that option I will add it.

      • Changing the name of a new thing: works for me but this could be a bug in the runtime it is nothing I've implemented in the binding.

      • You should see everything the gateway receives in the debug output. Mine looks like this:

      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 0;0;3;0;14;Gateway startup complete.
      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 172;255;0;0;18;1.4.1
      2015-07-27 18:52:40 [DEBUG] [.m.d.MySensorsDiscoveryService:70   ] - Representation Message received
      2015-07-27 18:52:40 [DEBUG] [.m.d.MySensorsDiscoveryService:71   ] - Preparing new thing for inbox
      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 172;255;3;0;6;0
      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 172;255;3;0;11;Humidity + Temp + Relay
      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 172;255;3;0;12;1.0
      2015-07-27 18:52:40 [DEBUG] [.p.s.MySensorsSerialConnection:83   ] - 172;0;0;0;7;1.4.1
      
      • I've added the S_POWER sensor and tested it with the values you have given @kolaf . Could you please check if it works in your environment too (look at the screenshots of the first posting in this thread)?

      • Also I've added S_BARO. The value that is received by the gateway is shown as a simple string. It is ok for a start, but I would like to change that later (given set of values, change icon in dependency of the state).

      posted in OpenHAB
      TimO
      TimO
    • RE: Imperial Units

      This may be set in the gateway configuration either in PaperUI or via things-file:

      PaperUI:

      0_1515567322587_Bildschirmfoto vom 2018-01-10 07-54-36.png

      things-file:

      Wiki

      posted in Development
      TimO
      TimO
    • RE: MySensor Gateway restarts continuously

      Hi!
      Sounds like a problem with the power supply. An active USB hub may help. You could also power the nano via Vin with up to 12V and test if that will solve the problem.

      Greetings!

      posted in Troubleshooting
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hi @SiLeX !

      I would really appreciate your help!
      My Repo is up to date, there are no open code changes. I've merged my Repo with the master/upstream, so OH2 too is up to date.

      The instructions here should work just fine, although I didn't set up my environment this way:
      https://github.com/wishmoooop/openhab2/blob/master/docs/sources/development/ide.md

      There is only one step needed to activate the MySensors binding, it is an addition to the step 8 in the instructions:

      1. Click on "Run"
      2. Click on "Run Configurations ..."
      3. Select "OpenHAB_Runtime" on the left
      4. Switch to "Plug-Ins" on the right
      5. Search for "org.openhab.binding.mysensors" and mark it
        (At this step I disable yahooweather and astro so they stop to annoy me with newly discovered locations) 😉

      If "strange" errors occure while testing code changes, delete the content of the "userdata" directory in "distribution/openhabhome".

      posted in OpenHAB
      TimO
      TimO
    • RE: Raspberry Pi Zero Gateway with local Sensor

      @rex I've no experience with the Raspberry code, but my guess is, the delay() function is a problem. Replace it with a non blocking code.

      posted in Development
      TimO
      TimO
    • RE: OpenHAB Mysensors binding 2.4: cant get mqtt gateway online

      @waspie I'm testing the binding against a mosquitto in my development environment (eclipse IDE) and it is working fine there. That makes it so hard for me to debug the issue.

      posted in Troubleshooting
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @powermta : What is your problem? 🙂

      posted in OpenHAB
      TimO
      TimO
    • RE: [solved] RFM69 based nodes unable to report Lib Version

      Hey @scalz !

      My last test a few days ago was not successful with SoftSPI but I did not have the time to debug it. I'll give it another try!

      posted in Bug Reports
      TimO
      TimO
    • RE: [SOLVED] MySensors MQTT Gateway - offline

      @ribaaa What type of MQTT gateway are you using? RPi, Arduino...? I don't see it in den Mosquitto log. The Openhab side looks good, but there is no gateway responding to the requests send to Mosquitto.

      posted in Troubleshooting
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @mirko-ugolini The documentation on how to develop bindings for OH2 is rather thin. 😞
      Starting point is here: https://github.com/openhab/openhab2/blob/master/docs/sources/development/ide.md

      From that point I've looked into the existing bindings and into the eclipse smarthome documentation, that does not work all the time, but the concepts match.

      If you would like to contribute to the MySensors binding I will gladly help you to find the entrance. 🙂

      @BenCranston I will have a look at it. Thanks for testing! The queue currently is rather basic (but should work). Maybe the data is written too fast to the serial output. I have a similar problem with OH 1.X and my rules, where I need to define a delay between commands.

      Something I plan to do, is adding the ACK functionality to the binding, so if no ACK is received the command is repeated for 5 times or so.

      posted in OpenHAB
      TimO
      TimO
    • RE: Multiple gateways : Node ID unique per gateway or overall ?

      @Redguy This depends on the controller software / implementation. Within the OpenHAB 2 binding the ID has to be unique per gateway, not per controller.

      posted in General Discussion
      TimO
      TimO
    • RE: Led strip flashes when off

      Are you using the development version?

      In that case look for MY_LEDS_BLINKING_FEATURE, the LEDS are configured on pin 4/5/6.
      Just define another pin (like A0).

      Drove me crazy too. 🙂

      posted in Hardware
      TimO
      TimO
    • RE: [Tutorial] openHAB with serial gateway

      @HenryWhite The node is requesting for an id and not sending any status. You'll need to define a static id in the sketch of your node:

      http://www.mysensors.org/download/sensor_api_15#the-full-api

      Look for "Starting up the library" and the "begin()" function.

      posted in OpenHAB
      TimO
      TimO
    • RE: Possible to set up one RPi as a Gateway and a Controller?

      If Home Assistant is able to run on RPi I see no problem in running a MySensors Gateway and an MQTT broker like Mosquitto in parallel. So: Yes!

      posted in General Discussion
      TimO
      TimO
    • Level Shifter for RFM69

      I've stumbled about the level shifters recommended here: https://www.mysensors.org/build/connect_radio

      I've ordered ones that are similar to these and tried to get some details. I suppose they are a clones of these boards : https://www.adafruit.com/products/757

      With a BSS138 chip?!

      In the description I found:

      While we designed it for use with I2C, this works as well for  TTL Serial,  slow <2MHz SPI,  ...
      

      A look in the MySensors library shows:

      MySensors/drivers/RFM69/RFM69.cpp:  SPI.setClockDivider(SPI_CLOCK_DIV4);
      

      So the SPI on a 16 MHz Arduino is running with 4 MHz and above what the level shifter is capable to do.

      Anybody thought about that? I suppose it is working?! 🙂

      posted in Hardware
      TimO
      TimO
    • RE: [Tutorial] openHAB with serial gateway

      @HenryWhite You're welcome. The id is assigned by the controller, in your case OpenHAB. There is a post in the forum about how to add a rule for id assignment, but I don't use it myself.

      posted in OpenHAB
      TimO
      TimO
    • RE: MY_NODE_ID AUTO doesn't work, what am I missing?

      The ID is assigned by the controller, not by the gateway. 🙂

      posted in Hardware
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hi Tomas!

      Thanks for the hint, I will take a closer look!

      @ofverstedt said:

      I would like to send out numbers to my sensor nodes from rules.

      This is currently not possible, but it will be. It is on my ToDo list. 🙂
      The current solution with the serial binding in OH 1.X is complicated, but leaves a lot of freedom for the user and I would like to preserve as much freedom as possible.

      I've implemented some new features a while ago, like resending of messages if no ACK is received. But the Repo is out of date. I will fix that.

      posted in OpenHAB
      TimO
      TimO
    • RE: solid sate relay

      Yes, they do work and I've a few of these running fine.
      What are you trying to measure with the multimeter? Did you connect a load to the SSR? I suppose a SSR has a high impedance, so maybe you can't measure the impedance, like with a relay.
      Please keep in mind that the logic on a SSR is inverse to the logic of a relay. You have to modify your sketch.

      posted in Hardware
      TimO
      TimO
    • RE: openHAB 2.0 binding

      I've updated the first posting in this thread. You'll find the current repo there (also). 😉

      I've added a Wiki to the repo and made a brief description of the installation and configuration process.

      https://github.com/tobof/openhab2-addons/wiki

      The current binding (jar) is also in the repo now. You'll find the link in the wiki under "Installation".

      Modifications in the current version:

      • RollerShutter now supports STOP
      • Performance of the binding improved. Big thanks to @andreacioni !!
      • Stability improved. Also big thanks to @andreacioni
      • Error handling on connection loss improved
      • The baud rate of the serial gateway is now adjustable. (@andreacioni again!)
      • some code cleanup: removed not needed debug output etc.

      Please let me know if you found the time to test the binding and what the results are. 🙂

      posted in OpenHAB
      TimO
      TimO
    • RE: RF433 transistor/fet wanted

      @Boots33 I too have one fs1000 running with 9V on Vcc and 5V data. But the combination of 9V Vcc and 3.3V data (Arduino pro mini) is not working, while 5V Vcc and 3.3V data is working. 🙂

      posted in Hardware
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Denke What is it exactly what you need? Which types?
      How is the setpoint set (request/send)?

      Greetings
      Tim

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      New version of the binding available!

      • A requestTime from a node is now answered by the controller. Is anyone able to test it? (@undee )
      • The controller will answer a request for "imperial or metric" like temperature sensors might ask. We need to test that too.

      Big thanks @andreacioni for the implementation and @Francois for testing/reporting!

      I've added an example page in the wiki: https://github.com/tobof/openhab2-addons/wiki/Examples
      These are the type of things I'm currently using. (SensebenderMicro, Humidity, Temperature, Cover, Motion, Light ...)

      Has anyone additional examples yet?

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Denke: At the first and the second attempt the gnu.io library is not able to establish a connection to the COM port. As "getPortIdentifier()" is mentioned it is possible that there is a correlation with the bug mentioned earlier in this thread. The OH developers need to update this library soon!

      At the third attempt the binding does not get an answer on the I_VERSION check and therefore stops its initialization. Try skipStartupCheck=true Wiki to avoid this.

      According to the discovery with PaperUI:

      I must admit I have not worked with it for a long time. The OH core team has announced some big changes/improvements in the PaperUI and I've postponed my tests for after the release of this changes.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Denke : You're right, the pressure channel was missing in the thing definition. This is fixed in the current version!

      @dakky : Which gateway type keeps disconnecting and why? I've a serial and ethernet gateway running side by side in OH2 and both didn't get disconnected so far. The hardest part is to recognize if the connection gets down.

      posted in OpenHAB
      TimO
      TimO
    • RE: [Tutorial] openHAB with serial gateway

      @HenryWhite: Yes it is possible.
      Look at this example: https://forum.mysensors.org/topic/655/serial-gateway-connection-to-openhab/70

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Small update to the progress:

      1. Expert mode: I've added a special thing that will allow rule based parsing and sending of MySensors messages. If the binding is limiting your creativity you are now free to go. 😉 You are now able to combine/adapt rules like in this Thread with the easy process of thing/item/sensor configuration. I've added a description to the Wiki. This may solve some problems mentioned above with sensors requesting information like pulse count.

      2. Last week the OH2 core team has released beta4 of OH2. I've tested the binding against the current beta and it is working fine.

      3. I've created a PR against the official openhab2-addons repository. I'm now awaiting feedback and hope to introduce the MySensors binding as part of OH2.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Thanks @Fleischtorte!

      There already was a request for IR and I've added one for V_TEXT.

      https://github.com/tobof/openhab2-addons/issues

      @andreacioni has done some serious refactoring of the code. After looking in the refactoring I'll add the missing sensors.

      posted in OpenHAB
      TimO
      TimO
    • RE: Gateway suggestion

      The baud rate depends only on your hardware. If you're using an arduino with 16 MHz a baud rate of 115.200 is a good choice. The baud rate in the OH2 binding is adjustable and defaults to 115.200.

      If your serial gateway is running fine, you are able to check that with the serial monitor of the arduino IDE, the next step is to install OH2 and the binding.

      posted in OpenHAB
      TimO
      TimO
    • RE: Gateway suggestion

      The instructions are in the wiki on github: https://github.com/tobof/openhab2-addons/wiki

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @bentrik said:

      I managed to find an addons directory in /usr/share/openhab2/addons, but I can´t find a way to copy the .jar file there, as I get permission denied both through WinSCP in sudo mode and terminal ssh. The folder has permission 0775.

      That is the correct directory if you installed OH2 via .deb. Seems like you are using a user in WinSCP that is not allowed to write to the directory above. To circumvent this:

      1. Copy the binding jar to /tmp.
      2. Login via ssh and execute:
      sudo cp /tmp/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar /usr/share/openhab2/addons/
      

      and

      sudo chmod openhab.openhab /usr/share/openhab2/addons/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar
      

      OH2 is started/stopped/restarted with

      service openhab2 start/stop/restart
      

      To log into the karaf console do:

      ssh openhab@localhost -p 8101
      

      Password is: habopen

      Follow the guide/wiki from:

      In the console enter feature:install openhab-transport-serial
      
      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Ok, here is the corrected jar file: LINK

      The things now should update.

      I've tested it with the current snapshot on two systems / mysensors environments. I've not tested it against the curren testing (beta4). It should work, but it may throw exceptions on startup.

      At the moment please only update if you expierence problems. I would like to ensure the binding is now working.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @ben999 Thank you for your kind words and for your patience! 🙂

      I'm glad it is working now. As it is quiet for a day now, I suppose the problem is solved.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Fabien I need a little bit more time to reproduce this behaviour. I've opened an issue here: https://github.com/tobof/openhab2-addons/issues/50

      tobof created this issue in tobof/openhab2-addons

      closed Setpoint not send #50

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Ah, by the way, I forgot to mention: SmartSleep is supported since last week.

      0_1484736645455_upload-d9d8432b-4892-4c07-876a-3abd4def86a0

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @krejcarek please upgrade the binding to the most recent version. 🙂

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @ben999

      1. It is possible to discover things with PaperUI and afterwards insert them in an item and sitemap file. Just use the channel that was given due to recovery. This way you don't need the things file.

      2. You may delete the hole database or edit it with a text editor as it is a jsondb file. I'm on my phone, so I can't give you the correct location right now.

      Did you try habmin? I've seen some amazing screenshots but haven't tried it myself.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Fabien Thank you for your feedback!
      And: I've waited for that question according firmware updates to come up. 😄

      I've looked into it and I'm very interested but till now there is only the implementation in the library, I've not seen an implementation in a binding. I'll continue to look at it, but with low priority. 🙂

      Current priority list is:

      1. Include binding in OH2 repository.
      2. Test and include the big refactoring from @andreacioni .
      3. Add MQTT gateway (proof of concept working, full integration after refactoring).
      4. Add little feature requests, add sensors ...
      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hi @mlava !
      The MQTT gateway is not supported at the moment. I've done a proof of concept and it will be implemented after the refactoring we're currently working on.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @AndrewZ the message occurs right after startup and before the bridge gets connected?! Just ignore the message if everything else is working fine. 😄
      I'll release the refactored version soon. It's already available via the new IoT marketplace.

      posted in OpenHAB
      TimO
      TimO
    • RE: Can't link rfid node item

      Hi @ben999 !

      The fix you've mentioned was already merged into ESH and because of the date (23. Aug 2016) I'm pretty sure it is already merged into OpenHAB. So I suppose we need to search somewhere else.
      Please dump the complete log (in DEBUG mode) of the karaf console starting from the presentation messages arriving at the gateway till the message in your first post. I'll then try to reproduce the behaviour.

      Greetings
      Tim

      posted in OpenHAB
      TimO
      TimO
    • RE: Can't link rfid node item

      @ben999

      It was a bug in the description of the lock thing. You seem to be the first one that is using this thing type. 😉

      Here is the commit, I only had to change one word.

      It was easy to spot with your help!

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB binding

      @parachutesj According OH2: That was fixed a looooooong time ago. 😄

      Refer to: https://github.com/tobof/openhab2-addons/wiki/Examples for an example (cover).

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      Hi @Timo-Engelgeer !

      1. KWH -> kWH.

      2. VAR, VA & Power Factor added.

      3. Decimal place: Did you check your item definition? kWH should be shown with two decimal places.

      4. Is it possible for you to use the CustomSensor with var1-var5 (with a separate childId)?

      Looks like this now in PaperUI:

      0_1500273731092_openhab.png

      I'll push these changes with the next release I'm working on.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @Timo-Engelgeer

      1. Yes, of course! It's changed by now.

      2. Did you define something in the *.items file? "%d" instead of "%.2f" ?

      3. It is very easy for me to add all var1-var5 channels to all things. It's just a litte copy & paste. The reason I've not done this so far is, that all channels are displayed and configured in the control section of the PaperUI (in simple mode). So if you've a temperature sensor, you additionally get: battery, lastUpdate, var1, var2, var3, var4 and var5. All of them can be disabled easily though.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @LastSamurai Looks like the binding wassn't initialized. There should be a message in the log why the init failed. My guess: gnu.io is missing. Did you execute this step: feature:install openhab-transport-serial?

      I can't give you a timeline about the integration. There is a PR here: https://github.com/openhab/openhab2-addons/pull/2066

      It took me quite some time to fulfill all requested changes and I'm now waiting for a review by Kai Kreuzer, the owner of the Repo.

      You are able to install the binding via the IoT Marketplace: https://community.openhab.org/t/distributing-bindings-through-the-iot-marketplace/24491

      MySensors Binding:
      https://marketplace.eclipse.org/search/site/mysensors

      0_1500967184688_upload-2decf7e6-76f3-4c83-a7ba-a4c91f101920

      A big disadvantage: Requirements are not fulfilled automatically. This will be added in the future. You have to execute the command above (before installing the binding) in the karaf console: feature:install openhab-transport-serial.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @LastSamurai I haven't found the time to look at the issues lately, I'm sorry. 😕
      I'm on vacation for the next 10 days and will continue my work after after that. 🙂

      posted in OpenHAB
      TimO
      TimO
    • RE: Raspberry Pi gateway - how to reset node id allocations?

      @gadgetman Search for the file given_ids.cached usally found at: /var/lib/openhab2/mysensors/cache/given_ids.cached.

      You may delete the file or delete single entries, but don't screw up the syntax. 😄

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @LastSamurai I can't say when I'm able to solve those issues.

      According the ACK problem I need to enable ACK support in my network at home, which was something I already wanted to do a long time ago but haven't found the time yet.

      The RGBW is a tough nut for me. I don't have a RGBW node to test with and the conversion HSB <=> RGBW is driving me crazy. The algorithm for the conversion can be found here: https://github.com/tobof/openhab2-addons/blob/MySensors_Binding/addons/binding/org.openhab.binding.mysensors/src/main/java/org/openhab/binding/mysensors/converter/MySensorsRGBWTypeConverter.java

      @gonzalonal May I ask you to add an issue on github? This would allow me track those enhancement requests. Thank you!

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @gahlawathome I'm currently looking into the new MQTT implementation in smartphone. It should work without the PR above. The PR will bring us a new option to connect a MQTT binding with OpenHAB!

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @jocke4u I'll try to document an example for using rules tomorrow. I'm not yet sure about the best final solution. Maybe I'll experiment with persistence within the binding.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding MQTT support

      @masmat Just create the org.eclipse.smarthome.mqtt.cfg file. It's not created automatically. mqtt.cfg is not needed for the binding.

      posted in OpenHAB
      TimO
      TimO
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @andre_m87 & @MasMat : I have the same problem here. Looks like a change in the OpenHAB MQTT implementation.
      I'm working on it.

      posted in OpenHAB
      TimO
      TimO
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @andre_m87 & @MasMat : I found a solution and indeed the MQTT implementation in OH2 (ESH) changed. This was a hard nut to crack, so it took me a while.

      Here are the steps you need to do:

      1. Rename: org.eclipse.smarthome.mqtt.cfg to org.eclipse.smarthome.mqttbroker.cfg
      2. Change the content to:
      name=mosquitto
      host=192.168.2.3
      secure=false
      port=1883
      username=USERNAME
      password=PASSWORD
      retain=false
      

      If you're using a secure connection (SSL): change secure to true and use the correct port.

      Another intersting feature in OpenHAB 2.3 is the embedded broker, so there is no need to have a separate MQTT server up and running.

      posted in OpenHAB
      TimO
      TimO
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @jogant Indeed this looks like an error in your configuration. I suspect the MQTT configuration. Did you change the MQTT configuration according my posting above? I've also added a text to the Wiki. The name and content of the MQTT configuration differs between OpenHAB 2.2 and 2.3.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.2 binding

      @guillermo-schimmel Yes, the binding is (should) be compatible with OH 2.4 and I continue to hope for an integration in the main repository. 😉
      I've recently cleaned up the history of my git repository and will look forward to an integration in OH 2.5.

      posted in OpenHAB
      TimO
      TimO
    • RE: Gateway USB Dongle ?

      @iostreamz314 The serial gateway is what you are looking for. But it's not a ready made dongle you are able to buy. You have to build it. 😉

      posted in OpenHAB
      TimO
      TimO
    • RE: Openhab multiple gateways

      @niccodemi Yes! There is no limitation.

      posted in OpenHAB
      TimO
      TimO
    • RE: Openhab multiple gateways

      @niccodemi yes, you need to use different names for different things in Openhab. Name it as you like.
      The node id is unique per gateway, so you may use the same node id on different gateways/networks.

      posted in OpenHAB
      TimO
      TimO
    • RE: openHAB 2.0 binding

      @AndrewZ hmmmm, a child that represents itself with an id of 255 shouldn't exist. 255 is used for battery status for example. What's the message that comes in before that?

      posted in OpenHAB
      TimO
      TimO
    • RE: OH2.5.9 / ethernet gateway / autodiscovery?

      @Stefferd Don't use UDP for the connection between the gateway and Openhab, it is not supported by the binding.

      Are you able to log into the gateway via telnet?

      telnet  192.168.80.185 5003
      
      posted in OpenHAB
      TimO
      TimO
    • RE: OH2.5.9 / ethernet gateway / autodiscovery?

      @Stefferd Please fulfill the requirement for mqtt of the binding:

      feature:install openhab-transport-serial
      and
      feature:install openhab-core-io-transport-mqtt
      

      If you're starting from the scratch please consider using the MQTT Gateway instead of the binding. I've developed the binding and I am currently not quite sure if I'm able to maintain support for the binding, especially because OpenHAB3 is on its way.

      posted in OpenHAB
      TimO
      TimO