Navigation

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

    Posts made by jogant

    • RE: IEC 62056-21 Energy meter

      @bns unfortunately not really. What I learned from reading alot on different internet pages is that there are many proprietary implementations of the standard IEC 62056-21 protocol.
      The Landis & Gyr UH550 expects 40 NUL chars before the initial sequence "/?!<CR><LF>". This seems to be a kind of wake up of the IR interface and has to be sent with 7 bit and 300 baud. After that the meter answers with its model number and than switches to 2400 baud with 7 bits and parity and then sends the rest of its current values. But unfortunately not common used OBIS datagrams but only the correct form with own OBIS number format.
      Hope this is of any help.

      posted in Development
      jogant
      jogant
    • RE: IEC 62056-21 Energy meter

      @diogoc do you have a working sketch? I worked on the same topic for a landys & gyr uh50 heat counter. It's not a real 62056-21 protocol, initialization is different.
      Best regards

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

      @masmat I just wanted to understand your configuration. So I read through whole thread and saw your problems began with upgrade to OH2.3.
      I mentioned eventbus as you wrote something about eventbus.cfg.
      You need eventbus only if you want to send all oh events to mqtt broker.
      I wanted to see your mqtt bridge configuration. You can either configure dynamicly via paper ui or you set it up via things file. The later is what I did. So here is my things file with bridge configuration.

      
      Bridge mysensors:bridge-mqtt:gateway [  brokerName="mosquittomys",
                                              topicPublish="mysensors1/in",
                                              topicSubscribe="mysensors1/out",
                                              startupCheckEnabled=true ] {
      
      }
      

      Here the brokername has to be the same as in mqttbroker.cfg. Fix topic names to match your mysensors gateway.
      Hope this is of any help.

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

      @masmat two things come to my mind: I have two different broker-names for eventbus connection and mysensors connection. For eventbus binding you need classic mqtt1 binding with its own configuration like this:

      mosquitto.url=tcp://127.0.0.1:1883
      mosquitto.retain=false
      mosquitto.clientId=openhab
      mosquitto.user=user
      mosquitto.pwd=pwd
      

      And second: can you show your mysensors bridge configuration? Not shure but debug log looks like an ethernet bridge and not a mqtt bridge.

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

      @timo I found the fault in my configuration: it was the missing secure=false config flag in the org.eclipse.smarthome.mqttbroker.cfg config file. I have no idea what happens when the flag is missing but without it one doesn't achieve a valid connection.

      name=mosquittomys
      host=192.168.96.8
      port=1883
      secure=false  <-- important !
      
      

      So now I have a working 2.3 installation! Thanks alot for your support.

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

      @timo with 2.2 I had two configurations which were very similar.
      I have one mosquitto mqtt broker on localhost, version 1.5.
      The mqtt1 binding is for my mqtt-eventbus connection is called mosquitto and the config file (mqtt.cfg) is as follows:

      mosquitto.url=tcp://192.168.96.8:1883
      mosquitto.retain=false
      mosquitto.clientId=openhab
      mosquitto.user=user
      mosquitto.pwd=pwd
      

      With OH2.2 this configuration works. It also works with 2.3 as I can see all openhab events on my mosquitto.
      My mysonsors binding is configured by org.eclipse.smarthome.mqttbroker.cfg config file which looks as follows:

      name=mosquittomys
      host=192.168.96.8
      port=1883
      retain=false
      username=username
      password=password
      clientId=openhabMys
      

      I also tried without authentication and also without clientId, all to no succuess.
      I cleaned /var/lib/openhab2/cache/ folder and /var/lib/openhab2/tmp/ folder.
      I looked at /var/lib/openhab2/config folder for resulting runtime configuration, but all looks fine. Do you have any further idea?

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

      @timo unfortunately this also does not work for me. I followed your manual very well but I always get errors. It starts after installing feature:install esh-io-transport-mqtt and mysensors binding:

      16:59:57.772 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - Reason unknown
      16:59:57.806 [INFO ] [o.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.96.8' with clientid paho1135997459230242 and file store '/var/lib/openhab2/mqtt/192.168.96.8'
      16:59:57.867 [ERROR] [protocol.mqtt.MySensorsMqttConnection] - MQTT connection offline - {}
      org.eclipse.paho.client.mqttv3.MqttException: MqttException
              at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:38) [229:org.eclipse.paho.client.mqttv3:1.0.2]
              at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:604) [229:org.eclipse.paho.client.mqttv3:1.0.2]
              at java.lang.Thread.run(Thread.java:748) [?:?]
      Caused by: java.net.SocketException: Connection reset
              at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:?]
              at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:?]
              at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:?]
              at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:?]
              at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983) ~[?:?]
              at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385) ~[?:?]
              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413) ~[?:?]
              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397) ~[?:?]
              at org.eclipse.paho.client.mqttv3.internal.SSLNetworkModule.start(SSLNetworkModule.java:89) ~[?:?]
              at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:590) ~[?:?]
              ... 1 more
      
      

      and reconection starts every 10 seconds.
      It must be interference with mqtt1 bindung that I use for eventbus.
      The mqtt-bridge remains Offline.
      What is wrong?

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

      @TimO : are there any news concerning compatibility to version 2.3?
      Thanks for your work!

      posted in OpenHAB
      jogant
      jogant
    • RE: openHAB 2.3 (stable) MQTT binding troubleshooting

      @madelle-kamois this issue is already discussed in this thread. In 2.3 mqtt Implementation has basically changed. Develloper @TimO is working on it.

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

      @crankycoder in 2.2 with appropriate binding mysensors is working pretty well. All variables are presented with mysensors lib 2.2.
      I only updated openhab to 2.3 as this release was presented on my debian system. But I didn't get 2.3 working with mysensors mqtt.

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

      @crankycoder Unfortunately there are still issues with the mqtt implementation. I reverted back to 2.2 yesterday as all my fiddling didn't help.

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

      @timo unfortunately this solution doesn't work for me.
      After update oh to version 2.3 I don't get mqtt to work. Prior I used mqtt for mysensors and for eventbus. I configured two broker connections and set up a mysensors-mqtt-bridge via things-file. In the broker all events from openhab arrived and all mysensors-messages arrived in openhab.
      After update mysensors doesn't work at all, allthough I followed your instructions. If I setup mqtt1 binding I can see eventbus messages in mqtt broker but my mysensors-mqtt-gateway remains initializing.

      What I'm doing wrong?

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

      @timo I enabled debugging and could see that all mqtt messages are received correct. I had a problem with caching through jsondb. I deleted some things and links and now everything is fine. So nothing wrong in the binding. Thanks for your helpful hint.

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

      hi,
      first I would say thanks for the binding. Generally I got it working, but I build a special sensor for my district heating counter. It has two sensors in one node, power and watermeter. The power sensor also sends messages for value types VAR1-5. Unfortunately these value seem to have a problem. I see them in the mosquitto broker but in openhab I can't see them. In the logging there are some warnings concerning these values.
      Is it a known problem?

      thanks and best regards
      Joachim

      posted in OpenHAB
      jogant
      jogant
    • RE: openHAB 2.0 binding

      I had the same error messages on first boot of OH. After finishing upgrade procedure and restarting OH once again error message is gone. New version of the binding is working well. No hickups at the moment.

      posted in OpenHAB
      jogant
      jogant
    • RE: !TSM:RADIO:FAIL - Newby with Mini NRF24L01 + Mini Pro

      Another thing is that sensor and gateway need a minimum distance. I had gateway and sensor on my desktop for testing and had problems. So I put away the gateway 2 meters and problems are gone. Just a try.

      posted in Troubleshooting
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO

      now I tried the new combination of a recent OH2 snapshot as of 2016-12-21 with the recent mysensors binding. I had to restart the gateway and every single node but then everything works well. The nodes were found in the inbox and could be acknowledged as new things. Values are transmitted regularly and my relay node follows the switch items as desired. So no glitch at the moment.
      Well done @TimO.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO
      yesterday I tried the new binding with OH2 b4 and I have exactly the faulty behavior as described before. The gateway goes in online state but none of the mysensor node items goes online. They remain uninitialized. I restored the older binding and everything works well again. As it is the same behavior that @pentti12 describes I think it has to with the binding itself.

      @pentti12 : please try attached binding as that works for me. 0_1482134888619_org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jar
      it is an older snapshot from November, 7th.
      Good luck

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @carlyler
      The issue with the oh2 binding is known. You have to restart oh2 or just the binding through oh console and binding:restart
      Maybe an update of the binding may help but I didn't try yet.

      posted in OpenHAB
      jogant
      jogant
    • RE: openHAB 2.0 binding

      @tademet
      as stated in the configuration wiki https://github.com/tobof/openhab2-addons/wiki/Configuration you have to define the bridge in your thing-configuration, depending on the type of your gateway serial or ethernet.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12
      "connection skipped" message occurs frequently, usually every 10 seconds. That is normal and ok. But you should see messages from the gateway everytime the sensor nodes send updates, except the value is the same as before.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      slowly my image gets complete. Online/Offline status is resolved by OH2 binding via polling during initialization. Value updates are sent spontaneous by the gateway via callback, afair. So the gateway needs to know the address and mask of the controller to send values.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @Jic
      what do you mean with "start gateway manually -d option"? My gateway is a standalone device, ethernet connector on one side, nrf24 on the other, arduino in the middle connecting the other two parts.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      the gateway is the server. You should succeed with telnet <ip_of_mysensors_gw> 5003

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12
      everytime you see a SEND message in the node debug log, you should also see a READ message in your gateway. And than you should also see a SEND message to the controller and a message coming in in your openhab binding.
      So would you mind start logging all three stages of the message at the same time as I showed several posts before? If you don't see incoming messages in the binding log there is something wrong with your ethernet connection. Otherwise it's only guessing whats wrong.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO
      ok, I'm using OH2 b4, that is definitely older than 11 days.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @TimO
      funny that it works for me 😃

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      here you see a snippet from my log while in DEBUG mode for mysensors binding:

      10:57:19.269 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:57:29.271 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:57:39.273 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:57:39.820 [INFO ] [marthome.event.ItemStateChangedEvent] - RTemp_EG_WZ_R_signal changed from -50 to -51
      10:57:42.145 [DEBUG] [rs.internal.protocol.MySensorsReader] - 2;255;3;0;21;0
      10:57:42.171 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 2 to 2016-11-22T10:57:42.169+0100
      10:57:42.174 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 2 to 2016-11-22T10:57:42.172+0100
      10:57:49.274 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:57:50.476 [INFO ] [marthome.event.ItemStateChangedEvent] - RTemp_UG_Ki_Li_signal changed from -61 to -60
      10:57:59.276 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:57:59.465 [INFO ] [marthome.event.ItemStateChangedEvent] - RTemp_UG_SZ_signal changed from -68 to -67
      10:58:09.278 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:58:19.280 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:58:29.282 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      10:58:30.810 [DEBUG] [rs.internal.protocol.MySensorsReader] - 1;0;1;0;23;80
      10:58:30.817 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 1 to 2016-11-22T10:58:30.815+0100
      10:58:30.824 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 1 to 2016-11-22T10:58:30.822+0100
      10:58:30.833 [DEBUG] [ternal.handler.MySensorsThingHandler] - Setting last update for node 1 to 2016-11-22T10:58:30.831+0100
      10:58:30.837 [INFO ] [marthome.event.ItemStateChangedEvent] - Lightlevel changed from 81 to 80
      10:58:39.284 [DEBUG] [al.protocol.ip.MySensorsIpConnection] - Bridge is connected, connection skipped
      

      Here is the mysensors part my default.things

      Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.96.9", tcpPort=5003, sendDelay=200 ] {
           /** define things connected to that bridge here */
        }
      
      

      0_1479809074466_upload-a4b1d17f-3056-4c44-9f95-13fbeccae68b

      0_1479809140350_upload-320df1cc-3f4d-4893-8a5e-dc44d0045cba

      and the mysensors part of my items:

      /* mysensors Licht/Temp/Hum */
      Number Lightlevel "Helligkeit [%.0f %%]" <sun> (gLicht)                         { channel="mysensors:light-level:gateway:Light_level_1_0:light-level" }
      Number mySensors1Hum "Luftfeuchte [%.1f %%]" <water>                            { channel="mysensors:humidity:gateway:Humidity_1_1:hum" }
      Number mySensors1Temp "Temperatur [%.1f °C]" <temperature>                      { channel="mysensors:temperature:gateway:Temperature_1_2:temp" }
      
      

      Maybe this is of any help as I don't have an idea what's wrong with your config.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      ahh, try to leave out thing definition in config file and let OH discover things. After discovery remember to restart mysensors binding like @TimO explained. Then link discovered things to items and see if that works.
      Are you shure about your sonsor IDs? Usually they are numbered starting with 0.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12
      you are right, your serial log looks ok. So at least your mysensors network is up and running. In the moment the gateway receives an update from a sensor you should also see an incoming message in OH log. If this is not the case there might be something wrong with your binding config. You know https://github.com/tobof/openhab2-addons/wiki? There are valuable hints. Only difference to my setup is that I'm using mysensors 2.0.1 beta. No idea whether this makes any difference. Besides that I have no further idea. Sorry.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      ok, but you have to see mysensor messages in the log file on a regularly basis. At least the default sketch for temperature and humidity sends updates every minute. Maybe your temperature is very constant then you will see updates every hour I think. Try to heat the node and let it cool down again.
      And connect your node or the gateway to the serial monitor. There you will see the mysensors activity. You should see OK for status updates and not to much NACK. Then you have a problem with your mysensors network.

      good luck ...

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      At least the last 6 lines suggest that the initialization was successful. Seems that before mysensors has not been initialized completely and therefore dispose failed. Dispose is invoked through binding restart I think. So you can ignore theses failures.
      Are you now able to link items? Do you see incoming mysensors messages in the cycle you defined in the node?

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      did you debug your sensor? Does it transmit correct values for both temperature and humidity?
      I recognized that sometimes the initialization of the OH binding is not complete. So what I did was first restart mysensors binding via OH console (bundle:restart <mysensors binding number>), made a reset of the gateway and a reset of the sensor node. Then sensor node remains online with valid values.
      Or try to increase OH debugging and see what happens in OH logs. log:set DEBUG org.openhab.binding.mysensors and log:tail
      There you should see mysensor messages coming in. What do you see there?

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      depends on what you want. At the moment there is no separate OH2 MQTT binding. You can use OH1 MQTT binding through compatibility layer but you will lose some features of OH2 like autodetection.
      To see values from a sensor in UI you have to define an item and link it to the thing whereas a thing can have lot of different sensors (two in your example) and you have to define an item for each sensor. You also can use autogeneration of items for new detected things. This is also a feature of OH2.
      If you use MQTT there is no autodetection. You have to define things through things configuration file(s) and also have to link items to thing-values. But you have to do it by hand.
      MQTT is the better choice if you plan to share your mysensors values with other controllers like node-red or similar. If you only use openhab then I would prefer using mysensors binding. That's what I did.

      posted in OpenHAB
      jogant
      jogant
    • RE: MySensors Ethernet Gateway goes to OFFLINE state

      @pentti12

      I think we should clarify what should be setup. If you want to use mqtt gateway the have a look at https://forum.mysensors.org/topic/3605/can-t-get-openhab2-to-see-my-mqtt-messages
      Besides that I have the same setup like you. Openhab2 be, mysensors ethernet gateway. Works very reliable for four weeks now without any drops. I prefer this as we have a real oh2 binding with autodetection of things etc.

      Best regards
      jogant

      posted in OpenHAB
      jogant
      jogant
    • Problems with NRF24L01+ with external antenna if sensor node is to close

      I don't know if this is a known feature or behaviour but I found that if gateway node with external antenna and sensor node (pcb antenna) are too close (< 1-2 m) pairing will not finish and node will not work.
      my setup: ethernet gateway with W5100 and NRF24L01+ radio with external antenna like this:
      0_1478680973067_s-l1600.png

      two sensor nodes, one light sensor and on relay sensor with two relays, all placed on my working desk
      As these are my first sensors I thought I did something wrong but no pairing was finished. Eventually I screw off the external antenna and both sensors immediately connected to the gateway. I tested with different 2.4 GHz antennas, same result. I had to move sensor node to another room, then I could attach antenna and communication is ok.

      Do I have to reduce transmit power?
      Did anyone made similar findings?
      I'm using mysensors-2.0.1-beta, but same result with other versions.

      Best regards
      jogant

      posted in Troubleshooting
      jogant
      jogant