I am trying to use this feature to using KAKU switches but it does not seem to be working. Could it be due to the fact that in the rules I have to use kaku_switch.id etc, while in the debug it registers the protocol as arctech_switch?

just recently I started working with pilight and was very pleased to read, that I can implement special light switch applications by these ad hoc signals. Only it does not work with the protocol for my Intertechno remote controls. Using the arctech_switch protocol I also get the log error: attempt to compare variable string to an integer. I did some tests. Some protocols are accepted in the rules, but the one my remote controls is sending is not.
Verified protocols (incomplete list):

elro_800_switch

kaku_switch

intertechno_switch

intertechno_old

The protocol I got an error with:

arctech_switch

My Intertechno remotes do send out arctech_switch signals. The corresponding power plugs do accept intertechno_switch from pilight-send. But the rule does not fire, by using any of the above tested protocols.
Does anybody know, how I can pilight make to accept the Intertechno remote arctech_switch protocol in the rules?

The error you are getting, indicates that arctech_switch is not recognized as a protocol, so "archtech_switch.id" is handled as just some string.

Replacing "arctech_switch" by "kaku_switch" should solve this, because "kaku_switch" is one of the archtech_switch protocols".

@curlymo,

I have seen similar posts regarding arctech protocols and imho it is confusing. The protocol kaku source files are named "arctech_xxx" and the protocol id is also "archtech_xxx", but "arctech_xxx" is not defined as a protocol name:

Normally a device state change or a time event will trigger a rule. Although I am not quite sure, I think that the value of "kaku_switch.state" (kaku_switch is a protocol, not a device) is evaluated each second, but does not work as a trigger. Maybe @curlymo can tell if I am right.

Assuming that the id- and unit numbers are correct, you can try to add a time event to your rule like:

I tried to replicate @sibov 's issue and indeed it did not work with kaku_switch for me either.
My guess was that the problem was related to the fact that the protocol is detetcted as "arctech_switch", but that "arctech_switch" is not a valid protocol name. Thus it is impossible to refer to arctech_switch in the rule. But using kaku_switch (one of the valid arctech switch protocols) instead doesn't work either.

I decided to add "archtech_switch" to the list of protocols in arctech_switch.c and use arctech_switch.id, -.unit and .state in the rule and now it works!

So my conclusion is that, in order to allow protocol values to be used in rules, the protocols now must at least contain a protocol name equal to the protocol id.

Imho a better approach would be a fix in events that will permit using valid protocol names beloning to the received protocol id, but that looks a bit too complicated for me.