Tinker forge group "off" doesn't work

Hi

I have given all my Hue Bulbs the Group “Lights” and created a group to turn them all off at once:

Group:Switch:OR(ON,OFF) Lights “All Lights [(%d)]”

In sitemap I have:
Frame label=“Quick Actions” {
Switch item=Lights mappings=[OFF=“All Off”]

That works perfectly fine.
I also have some Tinkerforge Remote Switch items and added the “Lights” Group to those with bulbs connected to:

Switch	rsA	""	<socket>	(Switching,Lights) 	{ tinkerforge="uid=r6x, subid=rsA" }
Switch	rsB	""	<socket>	(Switching,Lights) 	{ tinkerforge="uid=r6x, subid=rsB" }
Switch	rsC	""	<socket>	(Switching,Lights) 	{ tinkerforge="uid=r6x, subid=rsC" }

When I turn them on, they show as “on” in the GUI, so fine, so good, but when I use the “turn all Lights off” button, they go to “off” in the GUI, but are not really turned off.

Am I missing something here?

Thanks

Andre

Distance to the remote antenna too far?
I have that problem with one Tinkerforge remote device: it goes to on when switched on but doesn’t turn off when switched off.
When I move it closer to the 433 Mhz antenna it works fine …

no, distance is not the problem, as I can turn on and off via openhab fine, just the “all Off” doesn’t seem to work

Hi Andre,

are the Remote Switch Bricklets work correctly if you switch them directly without using the group?

Regards,
Theo

Hi Theo

Yes, they do.

even when I don’t move, so I cannot be too far away (or the actor from the sensor)

I will check the code the next weekend, may it’s a bug.

Hi @theo
any updates on this?

Meanwhile it looks like that the Binding doesn’t even load.
I don’t see anything in openhab.log (actuator, etc).

I can connect (and switch the items) fine using brickv

I have the 1.8.0.SNAPSHOT Version running (Openhab and binding)

any ideas?

Thanks

[quote=“andre1, post:8, topic:3007, full:true”]
Meanwhile it looks like that the Binding doesn’t even load.[/quote]

Works fine here, OH 1.71 on RPi2 with Jessie and binding 1.8.0. snapshot.

Hi Andre,

there are no changes merged to the binding since 1.7.1. If it really doesn’t load it’s probably an issue of the “runtime-snapshot” or your configuration.
Sorry for the delay. I will check Remote Switch behavior today.

Regards,
Theo

Pretty sure it is a race condition.

From Tinkerforge docs:

If the current state is busy, the Bricklet is currently sending a code to switch a socket. It will not accept any calls of switchSocket() until the state changes to ready.

I have no quick fix for that, I have to think about a good solution.
Could you please open an issue.

@andre1 here is a fixed tinkerforgeBinding. Could you please test it and give me feedback.

Thanks in advance,
Theo

Hi @theo

Nope, no changes. I don’t know, you have maybe overseen this:

From my log file, it looks like the tinker forge module doesn’t even get started when I start openhab. There is no entry at all. I can however run all commands using the brickv software.

Andre

[quote=“andre1, post:13, topic:3007, full:true”]
From my log file, it looks like the tinker forge module doesn’t even get started when I start openhab.[/quote]

Because the Tinkerforge binding is running fine here on my setup you should look for a problem on your hardware or configuration.
Maybe you could post your openhab.cfg so we can take a look if it is only a misconfiguration …

Hi @sihui
thanks for coming back to me on this.

here is my config snippet:

############################## Tinkerforge  Binding ###################################
#
# IP addresses / Hostnames  of the hosts running the brickd (optional port 
# separated by a colon, defaults to 4223) 
Tinkerforge:hosts=10.2.2.221

tinkerforge:rs1.uid=r6x
tinkerforge:rs1.type=bricklet_remote_switch
tinkerforge:rs1.typeADevices=rsA rsB rsC rsD rsE rsF

tinkerforge:rs_A.uid=r6x
tinkerforge:rs_A.subid=rsA
tinkerforge:rs_A.type=remote_switch_a
tinkerforge:rs_A.houseCode=21
tinkerforge:rs_A.receiverCode=1

tinkerforge:rs_B.uid=r6x
tinkerforge:rs_B.subid=rsB 
tinkerforge:rs_B.type=remote_switch_a
tinkerforge:rs_B.houseCode=21
tinkerforge:rs_B.receiverCode=2

tinkerforge:rs_C.uid=r6x
tinkerforge:rs_C.subid=rsC
tinkerforge:rs_C.type=remote_switch_a
tinkerforge:rs_C.houseCode=21
tinkerforge:rs_C.receiverCode=4

tinkerforge:rs_D.uid=r6x
tinkerforge:rs_D.subid=rsD
tinkerforge:rs_D.type=remote_switch_a
tinkerforge:rs_D.houseCode=21
tinkerforge:rs_D.receiverCode=8

tinkerforge:rs_E.uid=r6x
tinkerforge:rs_E.subid=rsE
tinkerforge:rs_E.type=remote_switch_a
tinkerforge:rs_E.houseCode=21
tinkerforge:rs_E.receiverCode=16

IP address is fine, as is the port. I can manage the bricks using brickv perfectly fine.

It’s weird that i don’t see anything related to tinker forge in the log file, not even a “loaded” on any error on loading it.

Andre

Should be:

tinkerforge:hosts=10.2.2.221

Edit: @theo already mentioned the upper/lower case problem in your config …

[quote=“andre1, post:15, topic:3007, full:true”]
It’s weird that i don’t see anything related to tinker forge in the log file, not even a “loaded” on any error on loading it.[/quote]

You should have something like
2015-11-21 20:05:19.360 [INFO ] [.service.AbstractActiveService] - Tinkerforge Refresh Service has been started
in your log.

[quote=“andre1, post:15, topic:3007, full:true”]
When I turn them on, they show as “on” in the GUI, so fine, so good, but
when I use the “turn all Lights off” button, they go to “off” in the
GUI, but are not really turned off.[/quote]

Although I don’t use the “all lights off” feature I’ve set this up to test it and I can confirm your perception with the 1.8.0 snapshot from cloudbees: I used two lights, one turns off, one does not turn off, in the GUI they all show up as off.

Then I used @theo 's fixed binding from his post above and I can confirm with that binding everything is running fine with “all lights off” through your group function: both lights turned off, both lights showed as off in the GUI.

@sihui thanks for checking this.

Yeah …

works again, including the “all off” switch

thanks a lot for all your help

1 Like