This page last changed on Dec 10, 2014 by szejkindudi.

Hello,

It is possible to synchronize slider position and value between two controls devices? Now I have configuration sensor range 0 - 100 to control light and command null|LightCommand=$(param). When I change value on the first smartfon on the second nothing happen (zero position).Tested on IPod , Android 4.1.2 and webconsole.

I think the should be in sync. What command do you use to read the status of the slider? Does that have a polling interval specified?

Posted by pz1 at Dec 11, 2014 11:03

Thank you for fast feedback.
SLIDER use
SENSOR with RANGE TYPE -> properties min "0" max "100" and COMMAND

null|StateOutput6=

(give me feedback "0" to "100")
SETVALUE with COMMAND
null|StateOutput6=$(param)
send ("0" to "100" param)
When I use putty and want change state from "0" to "50" then send
StateOutput6=50
, gateway response me at system state change - first send me
StateOutput=0
and second
StateOutput=50
maybe this is the problem?
SetValue use 1s pooling interval
Sensor command use 3s pooling interval
I use latest developer release controller 2.1.0 29.10.2014, latest iOS and Android 2.1.1 client

I think OpenRemote is very interesting project.

Posted by szejkindudi at Dec 11, 2014 14:10

I guess you are using TCP protocol? I have no experience with that, so I am afraid I have to leave further answering to others

Posted by pz1 at Dec 11, 2014 14:36

Yes I use TCP protocol.

Posted by szejkindudi at Dec 11, 2014 14:45

You don't need a polling interval for the set command, as it'll not be linked to any sensor (but this does not have anything to do with the problem you're having).

I would add a label to your design, linked to the sensor. As you change the value with the slider on 1 phone, the label should update on both phones to the set value.
If it does, then there is an issue with the slider interpreting the value or in the slider implementation.
If not, then there is an issue with updating the sensor / polling.

Posted by ebariaux at Dec 12, 2014 11:05

Label show value properly on all phones and webconsole. Do you have any other idea to solve this problem? What would I do in the next step?

Regards
Adam

Posted by szejkindudi at Dec 13, 2014 14:48

Did you look in your logfiles? You stated your sensor has a range 0-100. Are you sure you only get integers within that range? No decimals?

Posted by pz1 at Dec 13, 2014 19:17

Only get integers. In the log i do not see something to point the problem exist.
Sensor to my switch working ok and switch status (label) synchronized properly on all devices. Only have a slider problem.

Posted by szejkindudi at Dec 13, 2014 23:39

PZ1- thank you for feedback i checked again integers/decimals and regex filter and now is working but not for value <10
Feedback construction what i am getting is

CommandName.CommandName.number.number.number=value

I tested at regexplanet and if i use filter with
regex (\d{2})
and value is from 10 to 100 range it is working and synchronizing perfect. Ok now if I put
(\d{1,}) or (\d{1,3})
to take possession of range 0-100(include 0-9 values interval) it is not working.Only working
\=(\d{1,3})
and show all range 0-100 but in this case of course there is a problem with "=". What i am doing wrong with regex construction?

What I see additionaly slider sensor ignore it's CommandName and read value from another command (temperature) using regex filtering rules e.g.
I change light to 50%, gateway response

CommandName.light.2.2.2=50
- slider move and label show 50%. now i change temperature and gateway response
CommandName.temperature.2.2.2=1370
- in a moment slider read '137' (using his regex (\d(2,3) )) and go to the max position (100).
Of course in a sensor light&temperature I have two independent commands.

About forum what tag i must use to ignore { } formating in post?

Posted by szejkindudi at Dec 16, 2014 18:09

Same problem with other sensors e.g. temp sensor from time to time ignore its command name and read foreign value. Problem is only with sensor and slider position, slider not sending another value to receiver, only change position and show incorrect value in label.

Posted by szejkindudi at Dec 20, 2014 13:27

Sorry, I have to leave this to the OR experts. Hope someone finds the time to help you out.
As for the {}, do include your code and listings in {code}..{code} tags.

Posted by pz1 at Dec 20, 2014 13:42

OK, thank you for feedback I check this phenomenon and it is not time to time .. it is constans..I have command e.g.

SUN.azimuth=244
and slider also interprets this command
When I create label to read value and look at, it show correct value, then read incorrect value, and again switch to the correct but slider not move - is still in a second incorrect value position.

Next step.Little better. I add "?" after "=" and change interval to 1s slider returns to the previous position (as i wrote earlier not back to correct position) but in this case still sometimes not back too

Posted by szejkindudi at Dec 20, 2014 13:53

up

Posted by szejkindudi at Dec 29, 2014 14:02

up

Posted by szejkindudi at Jan 04, 2015 20:06

No one knows why it is not filter with value from 0 to 9 using using regex and range 0-100? I added label text which show value, when value is 0-9 it is show N/A when value is from 10 to 100 show correct.As i wrote earlier I think regex rules are ok.

Posted by szejkindudi at Jan 15, 2015 22:45

If you take my earlier advice to place your code and regex expressions between {code} {code} tags, you'll have a better chance someone will answer.

Posted by pz1 at Jan 16, 2015 13:13

Sorry ma fault I am doing to many things at the same time - I checked again regex rulez, corrected it and now synchronizing ok.

Posted by szejkindudi at Jan 17, 2015 21:18
Document generated by Confluence on Jun 05, 2016 09:39