Michael - that got it. There were no messages in the log. The function seems to round down to the next lowest minute but that is really not a big deal to me.
I worked with the button, I will reset my ocelot to the wrong time see what happens at 1:00 am as well.
Paul
Announcement
Collapse
No announcement yet.
ADIOcelot Plugin
Collapse
This is a sticky topic.
X
X
-
Jim-
Thats an interesting thought, and at the same time a tall order. Its tokenizing a variety of Ocelot commands, plus essentially an assembler function to deal with addressing. When an "If condition" is false, something has to tell the code where to "jump" to. I guess reverse engineering Ocelot programs can provide that info.
Some Ocelot users wrote an assembler, and then coverted it Java. Their work should help.
http://javacelot.sourceforge.net/index.shtml
The Homeseer / ADI Ocelot is a great interface and I appreciate being able to use it, especially for free. Jim I will support the efforts to further integrate the two, to the extent my skills can help
Paul
Leave a comment:
-
I would be happy to add another escapes to an alternate adi shell in addition to the one for cmax if you want to add a sweeter environment than the one provided by adi. Perhaps your thinking is more like some specific functions related to file management that could be invoked by HS event and the plugin would coordinate the running of external tools that perform the operation and then resume normal HS operations when done.
Leave a comment:
-
I just now caught this thread and so have yet had a chance to test the clock set function but will this weekend.
This got me wondering whether it is possible to integrate HomeSeer and Ocelot a little more. If it could be done, I would help where possible. Here is what I am thinking:
- Edit CMAX code using ADIOcelot - I could work on editor code that would work better than CMAX editor. We would just need to be able to trigger a download of the code to the Ocelot.
- Download (or is that Upload?) IR to file - I learn commands within HS but rarely save the IR info to a file for backup or direct editing.
- Upload IR from file
Leave a comment:
-
Thanks Michael. I will test this when I get home tonight. I really appreciate your support on this.
Paul
Leave a comment:
-
I had sent 50 plus checksum. Looks like it want 50 including checksum. I ran this with no timeouts in the comm log after setting clock so it should be good to go.Last edited by Michael McSharry; January 7, 2005, 11:21 PM.
Leave a comment:
-
Michael,
Tried 1.9.2 and got the following:
ah.log
1/6/2005 11:40:15 PM~!~ADIOcelot~!~Version 1.9.2 Registered with FrmHSPI
1/6/2005 11:40:17 PM~!~ADIOcelot~!~Using Comm Port 2
...
1/6/2005 11:41:20 PM~!~ADIOcelot~!~Initiating 39 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:41:59 PM~!~ADIOcelot~!~Initiating 0 second wait for start of next minute to set clock
1/6/2005 11:42:00 PM~!~ADIOcelot~!~Initiating 59 second wait for start of next minute to set clock
1/6/2005 11:42:25 PM~!~X10 Received~!~B13 (Basement Back Light) B On
1/6/2005 11:42:59 PM~!~ADIOcelot~!~Setting Clock to 241 61 0 0 2 4 3 2 6 0 1 0 5 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ocelot.log
1/6/2005 11:42:59 PM MSCOMM
1/6/2005 11:43:03 PM Ocelot Timeout Expected: 3 Got: 2
1/6/2005 11:43:03 PM Waiting for var info from Ocelot
Is there an extra byte being sent? The command should be 50 bytes long but I'm counting 51. The coding of the date looks correct to me.
241 61 0 0 2 4 3 2 6 0
1 0 5 0 5 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0
jim
Leave a comment:
-
What I see from this is that the year is 2 digits and it is followed by weekday otherwise all else is the same. Attached has this update made.Last edited by Michael McSharry; January 7, 2005, 01:40 AM.
Leave a comment:
-
Michael,
I think I found what is likely the problem - the board swallowed several items from the command posted above. I changed the < to [ and reposted the command below.
Set CPU-XA Real Time Clock
-]Send 50 binary bytes: [241] [61] [0] [0] [min] [10min] [hour] [10hour] [day] [10day] [month] [10month] [year] [10year] [weekday] [0] [0] [0]……. [0] [csum]
[-Receive 3 byte header: [6] [0] [6]
Note: This command updates the CPU-XA's Real Time Clock
Data Explanation:
Monday, December 01, 1997 12:05PM translates as below…..
< 241> <61> 0 0 5 0 2 1 1 0 2 1 7 9 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 < 15>
jim
Leave a comment:
-
Enable theh Log Comms checkbox and see if anything turns up in the comm log (not hs log) to provide a hint. The plugin waits for 3 seconds for the 3 byte acknowledge and if not received a message will also go to this log. Also look to confirm that what is shown in your post from the hs log is the correct command. The checksum was not printed there, but it uses the same checksum computation function that all other messages to the ocelot use.
Leave a comment:
-
Sorry Michael, I was a little dense there.
Here is the log output
1/6/2005 3:24:51 PM~!~ADIOcelot~!~Initiating 8 second wait for start of next minute to set clock
1/6/2005 3:24:55 PM~!~Info~!~Exec command: D5 preset dim dim: 0 extra: 0
1/6/2005 3:24:59 PM~!~ADIOcelot~!~Setting Clock to 241 61 0 0 4 2 5 1 6 0 1 0 5 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The command went, but the clock remains set ~20 minutes behind, where I set to test originally.
Paul
Leave a comment:
-
Immediately after the button press a message should appear in the log. If not an intended message, then an error message. Only 1 version has the clock button on the setup tab. If the ocelot is busy at the instant the clock should be set then it will try again at the start of the next minute and the Sync message will appear again. Another message appears at the time it actually sends the data to the ocelot.
Button press activates this ....
Private Sub aClock_Click()
SyncClock
End Sub
Public Sub SyncClock()
10 On Error GoTo Error_Exit
Dim iTimeToNextMinute As Long
iTimeToNextMinute = 59 - val(DatePart("s", Now))
hs.WriteLog PluginName, "Initiating " & CStr(iTimeToNextMinute) & " second wait for start of next minute to set clock"
If iTimeToNextMinute > 0 Then
With FrmTimer.ClockSync
.Interval = iTimeToNextMinute * 1000
.Enabled = True
End With
Else
SetClock
End If
Normal_Exit:
110 Exit Sub
Error_Exit:
120 hs.WriteLog PluginName, "SyncClock " & Err.Description
130 Resume Normal_Exit
End Sub
Leave a comment:
-
Are you getting the messages that indicate that it is trying to update it?
Leave a comment:
-
Hmm. Still didnt do it. I saw the button and pressed it, the time didnt change.
Can someonelse try the ADIOcelot version above and see if it updates their ocelot clock?
Paul
Leave a comment:
Leave a comment: