Announcement

Collapse
No announcement yet.

Api mode curiosity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Anybody? I'm trying but without an example to begin I'm not able.
    Pratically I'd like to set outputs on API.ino and manage them by events...
    Thanks
    Regards
    Rinpe
    Last edited by Rinpe; December 22, 2014, 07:48 AM.

    Comment


      #17
      Originally posted by Rinpe View Post
      With Greig help I understand better how input pin on API mode works. There are some little things to refine but a bit 'at a time.

      Now I'm thinking to understand output pin. In the sketch I set for example pinMode(pin2, OUTPUT); and I thought it was enough. I also thought that in the home (device list) of HS when I push "off" or "full" button of the output, something changing...but it isn't.
      In which way I can associate pin output to relative device in the HS?
      I think there is something I miss, probably what is written in the .ino
      " To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
      Eg.. FromHS[5] would be the data from API Output device 5"
      But I don't understand....Can anybody give me an example please?

      Thanks in advance.
      Regards
      Rinpe

      Yes you need more in the API.ino. Homeseer updates the FromHS[] array with the values you require so to use them you need to look at the array so for a pin as output you would need

      int pin2 = 2;

      pinMode(pin2, OUTPUT);

      then digitalWrite(pin2, FromHS[1]);

      Greig.
      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
      Scripts =
      Various

      Comment

      Working...
      X