The reason is simple. You initialized the variable "hi" and then used the "setvar=hi" without a value. By default, variables set to 0, so by using "setvar=hi" you have in fact set the variable to 0.
You would need to initialize your variable with the "dimvar=hi", then have a script to set the variable "hi" to the value you want in order for the switch to become useable. So (for example), I would initialize the "hi" variable, then have a script the player interacts with (such as picking up something) and that pickup script would use the "setvar=hi 1" (sets he variable hi to a value of 1). Then when I approach the remote, the door remote switch script would check the variable and if the value was at "1" I can use the remote to open the door:
;Artificial Intelligence Script
;Header
desc = Remote Controlled Door (Open and Close with variable value)
;Triggers
:state=0,varequal=hi 1:state=1
:state=1,activated=1:state=2,setframe=0,sound=$0
:state=2:incframe=0
:state=2,frameatend=0:state=3,coloff
:state=3,activated=0:state=4,sound=$1,colon
:state=4:decframe=0
:state=4,frameatstart=0:state=0,setframe=0
;End of Script
I use this method in v1.17 flawlessly.
There's no problem that can't be solved without applying a little scripting.