Announcement

Collapse
No announcement yet.

Plugin/API docs

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

  • mihaium
    replied
    I'm doing a job with HomeSeer system in a school for control of temperature, heating, air, light, sockets, electrical consumption .....
    I need some information:
    - Any of you have used over 9 arduini with a server? I would need to use 12 or 13 and i need to know if works.
    - Which is the maximum distance that you used between a sensor DS20B18 and the Arduino?
    - Data from the server HomeSeer can be exported to an .xml file or on a website?
    - The data of daily temperatures and power consumption can be saved and printed?

    Example for the interface:
    Attached Files

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by jimbell View Post
    Made the following changes to the device status screen
    suffix - V
    decimal places - 2
    value start - 0
    value end - 1000
    include values is checked

    also changed plugin "update" to "Value"

    Displays something like 512v

    The decimal places do not seem to have any effect.
    Ok I will have a look as there must be a way to do this as it is something very simple even if I have to add the decimal place to the plugin options.

    Sent from my HTC One using Tapatalk

    Leave a comment:


  • jimbell
    replied
    decimal does not seem to work

    Made the following changes to the device status screen
    suffix - V
    decimal places - 2
    value start - 0
    value end - 1000
    include values is checked

    also changed plugin "update" to "Value"

    Displays something like 512v

    The decimal places do not seem to have any effect.

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by jimbell View Post
    On a previous reply to this thread, I had asked about the ability to send a string from the arduino to homeseer in API mode. If this is possible with code changes, it would give the API mode some additional functionality.

    In my case, I am getting data from a remote arduino board via a radio module. The remote module reports it's battery voltage. The voltage comes into the local arduino board as something like 5.12v. I would like do display that in the status. However with the "long" restriction, I reformat this into a long that has a value of 512. That value shows in the status column for the device, which is useable. It would be nice to display 5.12v in the status box.
    I think this could be done in HS. Add a status Value Range something 0 to 1000 then set the decimal place in there. You can also add the "V" ether in the plugin config under Unit or in the status Value Range Suffix.
    I have not tested this but I can not see why it would not work.

    Greig.

    Leave a comment:


  • jimbell
    replied
    Additional info

    I will wait for the fix, of course. I can use it as is, I just get the error message in the log.

    On a previous reply to this thread, I had asked about the ability to send a string from the arduino to homeseer in API mode. If this is possible with code changes, it would give the API mode some additional functionality.

    In my case, I am getting data from a remote arduino board via a radio module. The remote module reports it's battery voltage. The voltage comes into the local arduino board as something like 5.12v. I would like do display that in the status. However with the "long" restriction, I reformat this into a long that has a value of 512. That value shows in the status column for the device, which is useable. It would be nice to display 5.12v in the status box.

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by jimbell View Post
    I have everything working for the API board 1. However, after turning logging on, I get the following in the log

    Date/Time Pri Type/Error Message/Source
    Mar-04 8:19:21 AM Arduino Plugin Exception in RecievedText: Object reference not set to an instance of an object.
    Mar-04 8:19:21 AM Arduino Plugin Board 1, Device Ref = 179, API Input 1, Value = 500

    The value for the input is correct and it changes when it should, but I always get 2 log entries,
    one "good" one and then the error line.

    Debug log is attached.
    Please see the end of this post: http://board.homeseer.com/showthread.php?t=172974

    I hope to get the fix out soon.

    Greig.

    Leave a comment:


  • jimbell
    replied
    Getting error message in log

    I have everything working for the API board 1. However, after turning logging on, I get the following in the log

    Date/Time Pri Type/Error Message/Source
    Mar-04 8:19:21 AM Arduino Plugin Exception in RecievedText: Object reference not set to an instance of an object.
    Mar-04 8:19:21 AM Arduino Plugin Board 1, Device Ref = 179, API Input 1, Value = 500

    The value for the input is correct and it changes when it should, but I always get 2 log entries,
    one "good" one and then the error line.

    Debug log is attached.
    Attached Files

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by jimbell View Post
    I now have a the sketch uploaded to the Arduino and it is working in the API mode, which is what I want. I am sending a long value to homeseer and it is being displayed as a percent. However, I would like to return a string value to homeseer. I set the "update" to "string" and re-downloaded the firmware for board 1 (the api board definition). The code in the sketch on the "SendToHS" function still has the data type in the second parameter as "long". I would think that setting the "update" to "string" would create code in the SendToHS to char or string.

    Is there a problem with this code creating when using "string" in the "update" field for the API created code?

    Thanks
    It is not possible to send a string at the moment with out some code changes. The idea behind the "Update" being set to string is that the value sent to HS can be set to update the String, value in both and it is no the type of data you are sending. I will have a look in to this is a future update.

    Most people need to send a long so can I ask why you need to send a string? can you not setup value status pairs and act on the Value?

    Greig.

    Leave a comment:


  • jimbell
    replied
    Question for API interface returning string values

    I now have a the sketch uploaded to the Arduino and it is working in the API mode, which is what I want. I am sending a long value to homeseer and it is being displayed as a percent. However, I would like to return a string value to homeseer. I set the "update" to "string" and re-downloaded the firmware for board 1 (the api board definition). The code in the sketch on the "SendToHS" function still has the data type in the second parameter as "long". I would think that setting the "update" to "string" would create code in the SendToHS to char or string.

    Is there a problem with this code creating when using "string" in the "update" field for the API created code?

    Thanks

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by jimbell View Post
    Greig,

    Thanks for the quick response. I have downloaded and read the docs over. I do have one more question. This is regarding using the API functions. I will be using a Arduino Uno through the USB port. On page 9 of 12 in the doc, you mention "add your own code to the board. I have written several programs for the Arduino so I am somewhat familiar with the coding. Does the user write all the code for the Arduino in API mode? If so, where can I find the function "SendToHs". I looked through the library and cannot locate it. If a piece of code is downloaded to the Arduino when the API device is created, where can I get this code? If I need to write all the code in the Arduino for API mode, I am up to it. I just need the library functions and whatever else is required.

    Thanks very much for a fine plugin.

    When you use a board with the plugin you download the .ino file for use with the board from the plugin config page. This is the same for the API mode as you will need the .ino file with the connection info for your board.

    So the steps are:

    1.Create a board in the plugin config page.
    2.Chose if you want the board to be in Normal or API mode.
    3.Chose your connection type from the dropdown. Ether Com port or Ethernet.
    4. Download the .ino file from the plugin config page. This is at the top of the page. Choose the board number you want from the dropdown then click the download link. The plugin will configure the ino file for your board setup. ie. The connection Type, Board number and if it is an API mode or not.
    5. open the .ino file in the arduino ide software.
    6. if using the API.ino then add your code to the ino now.
    7. download the code to the board.
    8. Connect the board to Homeseer with the com port or Ethernet and click the connect button.
    9. Add the pins you want by selecting the pins on the pin list then clicking the + next to the kind of pin you require.


    I hope this explains it to you. Anything else then let me know.

    I think I need to make a getting started guide and put it on the board.

    Greig.

    Leave a comment:


  • jimbell
    replied
    Thanks and one more question

    Greig,

    Thanks for the quick response. I have downloaded and read the docs over. I do have one more question. This is regarding using the API functions. I will be using a Arduino Uno through the USB port. On page 9 of 12 in the doc, you mention "add your own code to the board. I have written several programs for the Arduino so I am somewhat familiar with the coding. Does the user write all the code for the Arduino in API mode? If so, where can I find the function "SendToHs". I looked through the library and cannot locate it. If a piece of code is downloaded to the Arduino when the API device is created, where can I get this code? If I need to write all the code in the Arduino for API mode, I am up to it. I just need the library functions and whatever else is required.

    Thanks very much for a fine plugin.

    Leave a comment:


  • enigmatheatre
    replied
    Install the plugin then enable it in homeseer. After that click Tools/Help link in HS3 or at the top of the plugin page there is also a link.

    There is also a description of the plugin and a link to the manual Here

    or

    download them from Here.

    Greig.

    Leave a comment:


  • jimbell
    started a topic Plugin/API docs

    Plugin/API docs

    I can't seem to find the documentation for the plugin or the api. I am especially interested in the API docs. Please let me know where to download/view them.

    Thanks
Working...
X