openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

[exec] Android App Failure using Selection Element with Number Item #4943

Closed aaronc100 closed 7 years ago

aaronc100 commented 7 years ago

I am using a selection element to manipulate a number item with an exec binding. The exec binding is being used to call a shell script, which calls a python script to read and manipulate a 7 segment display. This works great on my Safari browser, but does not increase or decrease the value from the Android Openhab App.

Exec binding.

Expected Behavior

The numeric value should increase or decrease from both the Android Openhab App and the Safari web app.

Current Behavior

Instead of increasing or decreasing the numeric value, nothing happens from the Android openhab app.

Possible Solution

No clear solution, I haven't debugged it that far. My personal solution was to not use a Selection, but a Setpoint instead, which works well from both the Safari web app/page and the Android openhab app.

Steps to Reproduce (for bugs)

  1. Create a selection bound to a numeric item and use the exec binding to manipulate a value...here is my example (which is bound to a script as described): Number sevenseg_value_select "Seven Segment Display Value: " { exec="<[/etc/openhab/configurations/scripts/sevenseg_script.sh:2500:REGEX(([0-9]+))] >[0:/etc/openhab/configurations/scripts/sevenseg_script.sh 0] >[1:/etc/openhab/configurations/scripts/sevenseg_script.sh 1] >[2:/etc/openhab/configurations/scripts/sevenseg_script.sh 2] >[3:/etc/openhab/configurations/scripts/sevenseg_script.sh 3] >[4:/etc/openhab/configurations/scripts/sevenseg_script.sh 4] >[5:/etc/openhab/configurations/scripts/sevenseg_script.sh 5] >[6:/etc/openhab/configurations/scripts/sevenseg_script.sh 6] >[7:/etc/openhab/configurations/scripts/sevenseg_script.sh 7] >[8:/etc/openhab/configurations/scripts/sevenseg_script.sh 8] >[9:/etc/openhab/configurations/scripts/sevenseg_script.sh 9] >[*:/etc/openhab/configurations/scripts/sevenseg_script.sh]" }
  2. From an Android phone, browse your site where this is setup using the openhab app (not using Chrome from which it works fine.)

Context

Prevents me from using a selection through the android openhab app.

Your Environment

Android version 7.1.1, Security patch level December 5, 2016. Baseband version: angler-03.78. Openhab Android App updated as of 28 December, 2016.

My Openhab server setup:

9037568 commented 7 years ago

So it sounds like this is probably an issue in habdroid. But I guess we should try to get a look at a debug log to confirm this.