HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: Szab02 on July 12, 2015, 01:48:05 PM

Title: Serial data send to arduino (DIP/"INTELIGENT" Switch)
Post by: Szab02 on July 12, 2015, 01:48:05 PM
Hi!

Can anybody help me. Why drop always gini the port?

I attached the hgx file.
Title: Re: Serial data send to arduino (DIP/"INTELIGENT" Switch)
Post by: kevin1 on July 13, 2015, 01:54:11 PM
Looks like some of your braces are mixed up?  Try moving "}" before When.WebServiceCallReceived to close HandleStatusChanged action.  You'll need to delete the brace which is down at the end about 45 lines.

Code: [Select]
Action<bool>
HandleStatusChanged = (bool connected) => {
 
  // this will be called every time the connection status changes
  Program.Notify("SerialPort Status", connected ? "CONNECTED!" : "DISCONNECTED!");
   /* As a switch, the module should also handle "Control.On" and "Control.Off" commands issued by the user
 from the Web user interface, or by scripting. (define Web service) */

} // <== MOVE BRACE TO HERE to finish the action

 When.WebServiceCallReceived("ArduRCswitch", ( args ) =&gt;
Title: Re: Serial data send to arduino (DIP/"INTELIGENT" Switch)
Post by: Szab02 on July 16, 2015, 06:36:47 PM
Hi kevin1!

Unfortunately not the Bracket. The problem come, when i make OFF or ON with original DIP SWITCH remote control, after that  the gini drop the port. (When is necessary then can i upload the ardu code.)


OMG!

I have a find the error (slash):

//var sensor = Modules.InDomain("ArduSensor")