Need help to send temperature reading from CAI Webcontrol to ISY 994i

electron4951

New Member
I'm a newB with both CAI Webcontrol (latest version) and ISY 994i; and would appreciate if  you can help in guiding me to get the CAI WC to send temperature data to an ISY 994i.
Many thanks
 
Do you have ISY side configured already?  On WebCtronol side is easy, just in PLC send WEBSET to your ISY by configuring WEBSET to match your ISY configuration.
 
On the ISY Network Module, I set CAI Webcontrol ip address; port 80 but not too sure on the path.I set state variable #57 for Temperature
On the CAI side Notify Setup, I set URL1 to ip address of the ISY, port 80; under Get URI I enter " /rest/vars/set/2/57/ "; and enter Base 64 Authorization String as instructed.
On the CAI PLC:
START    
    SET VAR1 T1 
    WEBSET URL1    VAR1
 
END
 
However, the ISY variable #57 did not receive or update with the T1 value
 
Please help me in correcting any errors
 
I would appreciate if you can help
 
Try url1 without the port number. Your get uri looks fine. If your base 64 autho. is wrong that will prevent the updates as well.
 
The other thing is that the isy will not process any number with a period in it. I cant remember is wc8 sends the temp as say 96.9 or as 969. If it sends as 96.9 the isy will ignore it.
 
Also unless there is more to you plc code the wc8 will try to send updates to the isy a lot of times per minute which will probably overload the isy, you will need some sort of limiter to keep the updates to a reasonable amount.
 
TJF1960 said:
Try url1 without the port number. Your get uri looks fine. If your base 64 autho. is wrong that will prevent the updates as well.
 
The other thing is that the isy will not process any number with a period in it. I cant remember is wc8 sends the temp as say 96.9 or as 969. If it sends as 96.9 the isy will ignore it.
 
Also unless there is more to you plc code the wc8 will try to send updates to the isy a lot of times per minute which will probably overload the isy, you will need some sort of limiter to keep the updates to a reasonable amount.
Thank you for the reply. Here are what I did:
            1.  If your base 64 autho. is wrong that will prevent the updates as well. I copy my admin:password from the CAI base 64 as well as from a working web resource.
             2. Try url1 without the port number. I did but no result.
            3. isy will not process any number with a period in it. The WC8 sends temp as 969
            4. unless there is more to you plc code the wc8 will try to send updates to the isy a lot of times per minute. I did add a limiter
                       
TSTEQ CM RAM1 
                CALLSUB WEBCTROL
WEBCTROL:
                INC RAM1  
                WEBSET URL1 RAM2 
                TSTEQ RAM1 60 
                SET RAM1 1 
                RET  
But the ISY variable #57 still did not receive temp data from CAI. I wonder on the ISY network resources what should I put in the "Path"
 
Many thanks
 
TSTEQ CM RAM1
CALLSUB WEBCTROL
WEBCTROL:
INC RAM1
WEBSET URL1 RAM2
TSTEQ RAM1 60
SET RAM1 1
RET

But the ISY variable #57 still did not receive temp data from CAI. I wonder on the ISY network resources what should I put in the "Path


The ISY Network module is not required. The ISY will not be initiating transmitting anything and only receiving data with the Rest interface.
 
As per TJF: no port number or colon ":"  on your IP address. The "/rest/vars/..." looks good with "/" each end. Make sure you format your ISY994i account:password exactly with no spaces to generate your encrypted code.
 
You have no time delay in that routine and may still experience  clobbering the WC8 Ethernet port with data. I have found my WC8 to average about 1600 lines of PLC code per second.
 
Try this:
 
START
    SET RAM1  500
LOOP:
    WEBSET URL1 RAM1
    DELAY 2000
    SUB  RAM1  1  RAM1
    BNZ RAM1 LOOP
 
END
 
 
Note: This was just off the top of my head so if anybody sees code errors please correct.
 
LarrylLix said:
TSTEQ CM RAM1
CALLSUB WEBCTROL
WEBCTROL:
INC RAM1
WEBSET URL1 RAM2
TSTEQ RAM1 60
SET RAM1 1
RET

But the ISY variable #57 still did not receive temp data from CAI. I wonder on the ISY network resources what should I put in the "Path


The ISY Network module is not required. The ISY will not be initiating transmitting anything and only receiving data with the Rest interface.
 
As per TJF: no port number or colon ":"  on your IP address. The "/rest/vars/..." looks good with "/" each end. Make sure you format your ISY994i account:password exactly with no spaces to generate your encrypted code.
 
You have no time delay in that routine and may still experience  clobbering the WC8 Ethernet port with data. I have found my WC8 to average about 1600 lines of PLC code per second.
 
Try this:
 
START
    SET RAM1  500
LOOP:
    WEBSET URL1 RAM1
    DELAY 2000
    SUB  RAM1  1  RAM1
    BNZ RAM1 LOOP
 
END
 
 
Note: This was just off the top of my head so if anybody sees code errors please correct.
Dear Larry and TJF,
 
Many thanks to both of you for helping me in getting CAI WC8 to send temperature data to ISY 994i. I did follow your instructions:
1. Remove port 80 and ":" in the ip address
2. Verify the "admin" and "password" of the ISY with ":" between and no space, and copy from CAI base-64
3. Copy your PLC program to the CAI PLC
 
Unfortunately, the ISY state variable #57 still did not update the data as it should.
I also reboot both CAI and ISY but still to no avail. The ISY variable #57 will update T1 data IF I use the WCLink of I-O Guy; however, I don't want to use a PC 24/7 because of T1 data.
 
Many thanks to both of you for helping me in getting CAI WC8 to send temperature data to ISY 994i. I did follow your instructions:

1. Remove port 80 and ":" in the ip address

2. Verify the "admin" and "password" of the ISY with ":" between and no space, and copy from CAI base-64

3. Copy your PLC program to the CAI PLC



Unfortunately, the ISY state variable #57 still did not update the data as it should.

I also reboot both CAI and ISY but still to no avail. The ISY variable #57 will update T1 data IF I use the WCLink of I-O Guy; however, I don't want to use a PC 24/7 because of T1 data


Running out of ideas here but as shown in your ISY Admin Console | Help | About info box...
- you did encrypt your actual user name and password and not the words "admin" and "password"?
- make sure the encryption doesn't have any spaces at the beginning or end of the input line
- have you used just the numeric part of your show IP address without any "http//:" or ending "/"?
- does your ISY show port 80?  eg. 192.168.x.xx:80
 
If you made this work with WCLink then you will be familiar with most of this stuff. My guess is the encryption is not right somehow.
 
Both Larry and Tom are ISY and WebControl experts.  Maybe you can write a step by step guide for how to send sensor data to ISY, so that other users can follow easily.
Thanks.
 
Awesome Randy! Impressive.
 
Would you mind reposting this in a new thread, with a good title, so that searches can find this? Also it could be noted that it may be dynamic if you are willing to maintain it a bit while contributors pick it apart and/or expression confusion. to be clarifies in the doc.
 
I see no glaring errors after a quick read. Somebody in the UDI forum posted a screen capture of their Notification page chart, using "password:password" as a no security give-away  Base64 "Decoder ring". I find a picture is worth that proverbial 1000 words. I would do this myself but I cannot  use any buttons on this crippled forum software using IE 11. I find this form is the most confusing part of the whole process.
 
First correction or query. IIRC a few (including myself) have found that the URL with the port number (eg. ":80") wouldn't function with the ISY994i on the same LAN.
 
I also wonder if using an manually assigned (non-DCHP) IP address inside the ISY will stop traffic from the LAN getting through on the ISY. This especially may be true if an assigned ISY IP address is outside of the router address range allowance table. So many people want to try this on the UDI forum and always seem to have trouble. Routeraphobia?
 
LarrylLix said:
Would you mind reposting this in a new thread, with a good title, so that searches can find this? Also it could be noted that it may be dynamic if you are willing to maintain it a bit while contributors pick it apart and/or expression confusion. to be clarifies in the doc.
...
 
Will do.  I'll probably find time to do that this weekend.
 
I do think that the trickiest part of this for people to get right is the "Notify Setup" information, partly because there seems to be no good way for the average Joe to sniff out the local IP address of their ISY device.  Can you think of a good way for people to discover this?  As you know, the Help->About option in the ISY's admin console simply says "My URL: http://isy/" after you've got it all setup.
 
I'll look into the port number.  I'm pretty sure I'm using port 80 with both devices connected to the same LAN.
 
-Randy
 
Back
Top