Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
staehlerS

staehler

@staehler
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MySensors 2.0: can't get openhab item definition
    staehlerS staehler

    Is nobody using openhab 1 in combination with MySensors2.0?

    OpenHAB

  • 💬 Raspberry PI NRF24l01+ hat
    staehlerS staehler

    Do you have a part list? And maybe you can sell one of your PCBs? ;-)
    I assume, the wiring is regarding to https://www.mysensors.org/build/raspberry, so that no coding work is necessary, correct? Are the activity LEDs onboard and what is the buzzer for?
    I'm really keen on this board ...

    OpenHardware.io raspberry nrf24l01 gpio

  • MySensors 2.0: can't get openhab item definition
    staehlerS staehler

    Hi,
    I'm running openhab 1.8.3 and a mys-mqtt gatway (Version1.5). Everything works fine, but I want to upgrade to MySensors 2.0.
    I built the raspberry mys-mqtt gateway version 2.0, which seems to work fine, as it finds some of my sensors. At the moment I'm not sure, why it doesn't see all sensors, might be because of the small antenna.
    The question is: how do the openhab items have to be defined.
    The gateway shows this output for my pressure sensor:

    mysGateway: Sending message on topic: MyMQTT/0/255/0/0/18
    mysGateway: TSF:MSG:READ,27-27-0,s=5,c=1,t=4,pt=7,l=5,sg=0:1026
    mysGateway: Sending message on topic: MyMQTT/27/5/1/0/4
    mysGateway: Message arrived on topic: MyMQTT/27/5/1/0/4
    mysGateway: TSF:MSG:SEND,0-0-27-27,s=5,c=1,t=4,pt=0,l=4,sg=0,ft=0,st=OK:1026
    
    

    The mosquitto shows me:

    MyMQTT/27/5/1/0/4 1026
    

    The corrsponding openhab item (which works for my mqtt gateway version 1.5) looks like:

    Number node27_pressure	"Luftdruck [%.1f hPa]"	<sensor>  (gMySensors,gInfluxDB)	{mqtt="<[mysensor:MyMQTT/27/5/V_PRESSURE:state:default]"}
    

    I fear, this old item definition isn't compatible with mysensors 2.0 any more, right?
    Regarding to the documentation and the mqtt message I think the mqtt-part in the items definition needs to be changed. Is there already a documentation available?

    My assumption is for MyMQTT/27/5/1/0/4
    27= nodeID (obvious)
    5 = sensorID (obvious, too)
    1 = message-type (set), when do I need req?
    0 = ack (no idea, what this is for)
    4 = variable definition (4=V_PRESSURE)

    Provided, my assumtion is correct: when do I need to use set and req (message-type). Which value do I need for ack?
    I also have items, which send commands from openhab to actuator, like

    Switch node24_sw0	"Schalter Ringleitung" 	<socket> (gMySensors,gInfluxDB,gAbstellkammer)	{mqtt=">[mysensor:MyMQTT/24/0/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/24/0/V_LIGHT:command:OFF:0]"}
    

    How do I need to set the mqtt part than?

    Thanks for every tipp!

    OpenHAB

  • Custom power meter
    staehlerS staehler

    Where do I get the calibration of a SCT-013-000 from. I found this description https://openenergymonitor.org/emon/buildingblocks/ct-and-ac-power-adaptor-installation-and-calibration-theory but unfortunately, I've no idea how to measure the correct calibration.
    As far as I understand this article, there could be a total error of 19.5% in uncalibrated case.
    Can anybody help an non-electrician ;-)

    Troubleshooting

  • Use of mqtt gateway from other sensors
    staehlerS staehler

    Great, I'm going to follow your advice. Hopefully with no further questions ;-)
    Thanks a lot for your help!

    I assume, you mean this
    https://github.com/mysensors/Arduino/tree/development/libraries/PubSubClient/examples/mqtt_publish_in_callback
    as I coulnd't find anything else, which would match better your explanation, right?

    OpenHAB

  • Use of mqtt gateway from other sensors
    staehlerS staehler

    Thanks a lot for your advice. I'm quite newbe. What does it mean, to go your recommended way: "use the MQTT client gateway (which I would recommend), then you can point it at the mosquitto broker like any normal client"
    Is there a switch or forward server IP I have to give the mysensors mqtt-gateway code. How can I convert the mysensors mqtt server to mqtt client, which forwards to mosquitto broker?

    OpenHAB

  • Use of mqtt gateway from other sensors
    staehlerS staehler

    Hi,
    is it possible to use the mqtt broker (on mqtt-gateway) to post messages from sensor different to mysensors? I have some sensors on my homeserver and want to post this messages to the broker as well, which should be processed by openhab.
    With
    mosquitto_pub -h ...
    I had no success :-(

    First: when I connect via mosquitto_sub to the mysensors broker, the connection to openhab terminates and doesn't reconnect. This message appears immediately in the openhab.log:

    > 2015-09-16 16:06:19.584 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to broker was lost
    > org.eclipse.paho.client.mqttv3.MqttException: Unerwarteter Fehler
    >         at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:115) ~[na:na]
    >         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
    > 2015-09-16 16:06:19.585 [ERROR] [o.i.t.m.i.MqttBrokerConnection] - MQTT connection to 'mysensor' was lost: Unerwarteter Fehler : ReasonCode 6 : Cause : Unknown
    > 2015-09-16 16:06:19.585 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mysensor'
    > 2015-09-16 16:06:29.586 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection 'mysensor'
    

    This must be a bug, as a mosquitto server doesn't show this behaviour. openhab doesn't loose its connection to the mosquitto server, even when I subscribe with mosquitto_sub.

    Second: when I start a mosquitto_pub, openhab looses its connection to mysensors mqtt broker as well. Same error as above.

    Third: When I publish a message to the broker ignoring the error on openhab

    /usr/bin/mosquitto_pub -h 192.168.2.10 -p 1883 -t MyMQTT/19/1/V_TEMP -m 23
    

    I see this in the mosquitto_sub terminal

    Client mosqsub/28854-server received CONNACK
    Client mosqsub/28854-server sending SUBSCRIBE (Mid: 2, Topic: MyMQTT/#, QoS: 0)
    Client mosqsub/28854-server received SUBACK
    Subscribed (mid: 2): 0
    

    A regular message from a sensor looks like:

    Client mosqsub/27168-server received PUBLISH (d0, q0, r0, m0, 'MyMQTT/22/0/V_HUM', ... (4 bytes))
    MyMQTT/22/0/V_HUM 50.9
    

    What am I doing wrong?

    To First und Second I fear. there is a bug.
    To Third I have no idea, why I can not post a mqtt message.

    Would be very nice, if someone could have a look at it or give me a hint.

    Michael

    OpenHAB
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular