[SOLVED] Reading value from shell script, Tinkerforge Outdoor Weather Station

I see, then i think there are some options

  1. making the script to only return one set of values and then end
  2. Post an issue for adding this feature to the binding https://github.com/openhab/openhab1-addons/issues
  3. Use tinkerforges mqtt proxy https://www.tinkerforge.com/de/doc/Software/Brick_MQTT_Proxy.html with the mqtt binding https://docs.openhab.org/addons/bindings/mqtt1/readme.html

I somehow think 2 would be nice, 3 would be best as it is available now but would mean getting into mqtt etc.

I would not recomment to run the Python script in a continous loop, this will block resources for openhab. And also not to restart it in intervalls when it was not ended beforehand with timeout.

Tried Nr. 1: I came to no solution. I know little about the internal mechanism of tinkerforge. (Callback and so on.)

Nr.2: Should it be instead for Openhab2 (not 1)?

3.Tried that! :slight_smile: But the Tinkerforge MQTT is not yet ready for this Outdoor Weather Bricklet. :-o This solution would be nice, because my neighboor could also use my station. (I’m searching for an MQTT Server: simple, secure)

Hi Josar,

still using the worked out solution from above and still happy with it!
One issue is bothering me: every second my KNX Bus receives a new post containing a temperature value.

1. within the terminal, the command only runs once and then quit:

/home/user/tinkerforge/tinkerforge --host 192.168.178.xyz --port 4223 call outdoor-weather-bricklet Es8 get-sensor-data 24
temperature=59
humidity=93
last-change=20633

in the thing configuration:

Thing exec:command:get_tinkerforge_weather [command="/home/user/tinkerforge/tinkerforge --host 192.168.178.xyz --port 4223 call outdoor-weather-bricklet Es8 get-sensor-data 24", interval=60, timeout=5, autorun=false]

i tried several combinations of interval values and autorun modes.
Perhaps the rule from above is triggered every second from something else …?

My thoughts are: to use a shell script which saves the values once a minute (every 10 Minutes) to a file, and OpenHAB ist reading the file. Hmmm…

2. OpenHAB Binding
Theo is writing a binding and is looking forward to publish it in a few months. :slight_smile:

3. Tinkerforge wrote, they will develop a new MQTT System … in the next few months … :slight_smile:
The existing MQTT Proxy Script is not working together with the Outdoor Weather Device.
The new system will work together with every Tinkerforge Device (Brick and Bricklets)

Best wishes
Richard

And here it is: https://www.tinkerforge.com/en/blog/go-bindings-release-mqtt-bindings-beta/

It is not beta anymore. The newest release ist 2.0.3.