Author |
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: February 29 2004 at 19:41 | IP Logged
|
|
|
Dave, I have asked before I know, but I wish you would reconsider including a function to download triggers and timers from powerhome to cm11 interface memory. Your suggestion of downloading to the interface via activehome seems like I would lose alot of functionality of powerhome if I were to download from activehome. I would have to place triggers and macros into powerhome another way to fully implement those functions that way, plus I still would need to download something to the interfaxe unless I want to leave my computer run 24/7 (which I really do not want to do) , to get the automated controll I am looking for. If you still will not reconsider, is there anyone who has a jscript or vbscript function available or who could help write one, that would download to the cm11 interface memory???
2) what does the "MEM" filed on the powerhouse screen mean?? does this just keep macros and timers and such in application memory??
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 29 2004 at 20:23 | IP Logged
|
|
|
I plan on eventually adding this functionality, it just hasn't been very high on the priority list.
Keep in mind that when this capability is added, it will most likely be new screens tailored specifically for the CM11A. The "fast macros" of the CM11A are extremely limited in their functionality and are nowhere near as powerful as the macros in PowerHome (this is a limitation of the CM11A and not PowerHome.) In essence, all they can do is send X-10 commands...there is no if-then-else capability. The same limitation exists for triggers.
When I do add the ability to download, you won't have any additional functionality above what you would have using ActiveHome. Admittedly, it will be more convenient to just do it all in PowerHome rather than having to go to a second program.
2. Im not sure what field you're talking about. Is it on the Frame window, the Control Center, an Explorer screen, etc. All macros and timed events are actually stored within the database. System variables are stored within memory.
Hope this helps,
Dave.
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: February 29 2004 at 21:47 | IP Logged
|
|
|
there is a mem field on the x10 type screen within powerhouse.
I would really be satified with just timed events and simple macros being downloaded to interface memory. such as motion dectection that turns on or off other x10 devices, and timer functions being downloaded. That would give me the "BASIC" lighting automation capabilities with the pc off and full powerhome functionality while my pc is up....
couldn't this be accomplisged somehow with a vbscript or jscript?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 29 2004 at 22:54 | IP Logged
|
|
|
The "mem" field on the X-10 types screen is a flag to let PowerHome know whether or not the X-10 devices "remembers" the last level of a particular light. Some of the more expensive X-10 devices have support this function. An example is the two-way lamp module that X-10 sells. If you were to turn this light on, dim it down to 30%, and then turn it off...the next time you turn it on, the light will automatically go to 30%. This field lets PowerHome accurately track the current status of such devices.
The CM11A would support simple X-10 commands being sent in response to incoming X-10 commands as well as limited timed events. However, this cant be accomplished with any vbscript or jscript. There is a specific protocol that must be adhered to for programming the CM11A. You can take a look at the protocol here: ftp://ftp.x10.com/pub/manuals/cm11a_protocol.txt
HTH,
Dave.
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: March 01 2004 at 21:39 | IP Logged
|
|
|
I have read the attached protocol before, but I am confused about how to pass data to the interface thru VB, and How would I extract the macro and timer data from powerhome?? could you or anyone give me some insite into how I utilize this protocol using VB?? I really feel that this is a much desired and needed function to have in powerhome, so I would be willing to try a little development on my own if someone could help me get started. can you please direct me as to how I can extract the data needed to load the interface from the powerhome DB. If I have the data, that is half the battle. I would welcome any assistance from anyone.. Thanks in advance.
|
Back to Top |
|
|
MSchultz Newbie
Joined: February 24 2004 Location: United States
Online Status: Offline Posts: 12
|
Posted: March 02 2004 at 07:24 | IP Logged
|
|
|
I think that you will find translating PH timer (much less macro) events for use on the CM11 a rather difficult task. As Dave mentioned, the types of macros and timed events that the CM11 supports are much more limited in functionality and scope than their PH counterparts. Attempting to translate the information in the Macro and Timer tables for use on the CM11 would be nearly impossible, IMO.
On the other hand, it might be possible to make use of the "User" database to construct a table that contained information that would be directly translatable into a CM11-style macro or timer event. I am not sufficiently proficient in the use of PH yet to give you any specific pointers on how this would be done, but from a high level it would involve reading records from one of the user tables, parsing out the relevant information from the available fields in the user table, building the binary/bytecode sequence for a macro/timer upload to the CM11, and sending the resulting EEPROM image to the CM11.
I suspect that if Dave were to opt to include support for the CM11's "resident" timers and macros, he would have to create dedicated tables specific to this functionality, as translating the existing PH timers and macros for resident use on the CM11 would be, for all practical intents and purposes, impossible.
It is important to realize, if you do not know already, that PH's utilization of the CM11 (or any other X-10) interface, at the low level, is pretty much restricted to sending basic X-10 control codes and reading the same that are detected by the interface. All other higher-level decision logic, such as the time(s) at which given codes are sent, or the decision as to what to do when a given code is detected by the interface, take place on the host computer, using logic built into the PH program itself, in conjunction with decision logic provided by macros you write (which in turn are processed/interpreted by the PH program).
Yes, the CM11 does have the ability to "run" very simple "macros" and "timers", but these elements are interpreted by the fairly simple firmware running on a very basic microcontroller incorporated into the CM11 itself, and the functionality provided by the CM11 firmware is pretty much restricted to sending a unconditional series of X-10 commands upon a detected powerline X-10 event, or doing the same when a certain time-of-day or elapsed period of time is attained. PH (or any other host app) cannot extend the functionality of the macro/timer "interpreter" firmware on the CM11. It can only extend functionality by implementing the bulk of the decision-making logic on the host side, and sending the "results" of that logic (one or more X-10 low-level commands at designated point(s) in real time) to the interface.
The upshot of all this is that in order to support the CM11's limited timers and macros, PH would need to have significant amounts of code added to it and (probably) a dedicated set of table(s) that were targeted specifically to providing data tailored to the limited capabilities of the CM11's timers and macros. PH would have to have code added to in to interpret the contents of these tables and build a download EEPROM image for the CM11 based on this information. I'm not saying that such capability would not be desirable, since even the limited timer/macro functionality that the CM11 offers is adequate for many basic control tasks, and it DOES have the advantage of being able to operate sans host. But I, for one, agree with Dave's assesement that implementation of such functionality should be a low priority.
One solution I am considering for my future home-control setup is to get a old but servicable PC, set it up with PH, configure it's file sharing properly, and run it as a dedicated PH server in a 'headless' configuration. I would use either VNC (a open-source computer remote control app) and/or the PH web interface when I needed to interact with PH directly. Otherwise, this machine (and the control interfaces attached to it) would unobtrusively perform the automation tasks I set it up for, without too great of a power consumption cost penalty (since it would be running 'headless', with some power-management features enabled). Using VNC and file sharing, I could perform any needed PH setup/maintenance tasks on a different PC on my network that has an available VNC client. I already have several "server" computers running at my home (that are *nix based) that I maintain this way (actually, I usually do most of my maintenance with a simple SSH text terminal using *nix shell commands and command-line apps and editors such as VI and nano). With a setup such as I propose, who needs CM11 macros?
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: March 02 2004 at 23:10 | IP Logged
|
|
|
I agree to a point, however I have been looking at the help function of x10comm.exe app and it appears that it does include a function to load eprom memory on the cm11 controller (via batch command). However, I am quite confused on how exactly that is specified to x10comm.exe app. the help file seems cryptic and not very detailed. So if I can figure out how to load the eprom of the cm11 controller using x10comm.exe, Wouldn't it be feasible to "export" the data from PH Database (only for simple macros and timers) and build the eprom data to be loaded into the cm11 controller interface using x10comm.exe (using PH launch APP function??
I guess I really need help on 2 things:
1- being able to somehow access the PH database data for macros and timers (and filter out only the simple (cm11 compatible) macros and timers).
2- determine the format of the data needed to build the eprom memory data to be used by x10comm.exe to download the eprom of the cm11.
I was hoping that Dave would be able to help me in either or both of these areas since he is familiar with standard communication to the cm11 interface (how to form and format the data, and how to send it to the cm11 interface. AND since he knows the format of HIS PH databases to know what data is needed for macros and simple timers. I am not sure if he can, but I was hoping.
If there is anyone out there that understands how to use x10comm.exe commands (more than I do currently) I would certainly be interested in hearing how this might be done. Again, I am just hoping! I realize that this might be a difficult task but it seems doable. And I would really put this fuctionality on the top of my wishlist for PH, even though Dave may not agree with me.
I think PH seems like a solid app, although it could be a little easier to setup and use (IE, better and easiler control center design, and easier macro setup), however, I find PH usable to me because I do have a computer and slight development background, but I am not sure if a everyday computer user would be able to manuver easily around PH.
Part of my problem is I do not run my PC 24/7 and I regularly shutdown my system overnight (because it is in my bedroom and makes fan noise that can keep my wife awake). I feel having the ability to maintain just the simple macros and timers in the cm11 so the overnight stuff would continue to run when my PC is not.
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: March 02 2004 at 23:15 | IP Logged
|
|
|
I guess that the "export" function on PH file menu gave me the impression that I could export the data from PH databases. What is the "export" function in PH used for???
Thanks for everyones help.......Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 03 2004 at 10:31 | IP Logged
|
|
|
Nick,
Their are two export functions. The one you get by right-clicking in the Explorer will allow you to generate SQL statements so that you can move triggers, macros, IR, between databases (other users, the sample database, etc). While the raw data is contained within the SQL statement, it would not be very easy to extract. The one on the File menu allows you to export data from a report.
You can access the PowerHome database using Microsoft Access or similar tool using ODBC. The userid and password is PH/PH. If you want to use the File->Export function, you just have to turn the database data you're interested in into a report. You'll have to type some simple SQL that I'll detail below. You can also view the entire database structure in the Appendix of the User's Manual.
The macros are contained in two different tables...a macroheader that describes the macro and it's button attributes, etc. and a macrodetail table that contains the actual lines that make up the macro. This is what you would be interested in. The timed events are contained within the timedevents table.
To get the data in the macrodetail table, launch "SQL Query" under the reports menu. Next, type in the following SQL statement:
select * from macrodetail where id = 'TYPE YOUR MACRO ID HERE' order by sequence
Be sure that you use SINGLE quotes...SQL is very particular in its syntax. Press the "Do-It" button and you'll get a report that shows the RAW data for the particular macro you selected. Once this report is onscreen, you can go to the File->Export menu option and select the type of export you want. If you're going to try and parse this file using VB, then you'll probably want to export it as CSV (Comma Separated Values).
The 'type' field probably won't make much sense but this field is a numeric representation of the macro command for the line. You'll be interested in outgoing X-10 commands which are a type '12'. The 'type number' will contain the X-10 command. If its 16 or less, it will be an address. If it's in the 100's it will be a function. You'll have to subtract 100 to get the equivalent X-10 function.
To view the Timed Events, change the SQL statement to:
select * from timedevents
This will give you a report showing ALL of your timed events and this can be exported as well.
Im not familiar with the X10COMM program so won't be able to comment on it. I can tell you that the formatting of the data for downloading to the CM11A is very different from simply sending and receiving commands to it. One reason why I haven't looked into adding the download capability is the lack of comprehensive information detailing the download process and the number of errors in the PROTOCOL.TXT. An example is the X-10 extended command syntax which is completely in error and took a couple of days of testing to determine the proper syntax. Im not saying that I cant figure out how to do the download, but it will take a bit of work with trial and error.
Yes, I will agree with you that configuring and using PowerHome is not as easy as with other programs . One of the things that Ive been trying to get around to adding has been some "wizards" that will walk you through setup, macro, timedevent, and trigger creation.
Let me know if you have any other questions concerning the exports and such. That much I do know how to do. Also, Im not saying that the download ability will never get done, it's just low on the priority list.
Dave.
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: March 03 2004 at 15:56 | IP Logged
|
|
|
Thanks dave, this should be a great deal of help to me in this endevor. I understand that the x10 protocol is not very detailed or descriptive (I think the x10 people intentionally made it this way) however I know if x10comm.exe allows for download commands to eprom that what I need is doable, it is just a matter of figuring it out. I would appreciate it if you could send me a email to let me know your progress in adding this functionality to PH. You have been a good help to me with the info you have provided. Thanks.
Note: I did comment that PH is not easily setup or navigated by "normal" users, however you have done a excellent job with your development of PH so far. Although it has been somewhat confusing to setup and implement, I have been successful so far in accomplishing that (but I have heavy computer background and do have some development exposure,) so it has not been that bad for me..
Lastly, have you been able to include more examples of macros and triggers setup examples. I would like to try some more extensive macros with PH but I wish I had some examples of other macros to look thru to help me write my own. do you have some macros that contain multiple lines that I can reference??
Thanks again for all your help.....Nick
Also if anyone else on this forum has ANY information concerning this download to eprom function, I would appreciate any info on the subject...
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 03 2004 at 16:25 | IP Logged
|
|
|
Nick,
No problem. Im glad that the information is helpful. Concerning the sample macros and triggers....if you are running version 1.03.2 or version 1.03.3, then its real easy. Just open up the PowerHome Explorer and click on the Explorer toolbar button on the right. You could also just press the 'F7' key. This will allow you to "explorer" a database other than your default. You should be able to navigate to the "database" directory and select the phsample.db database. This database contains a full set of simple to complicated macros, trigger, timed events etc.
Also, take a look at the new QuickStart Guide and let me know what you think. Its an attempt to make it easier for those "normal" users .
Hope this helps,
Dave.
|
Back to Top |
|
|
npavkov Groupie
Joined: February 29 2004 Location: United States
Online Status: Offline Posts: 91
|
Posted: March 10 2004 at 23:15 | IP Logged
|
|
|
dave..... I know you have stated that you intend to provide this functionality to download to the cm11 controller, at some futre point in time, however how possible would it be for you to provide some way in PH to provide port communications with the interface in the nearer future?? From what I can tell by the interface specs, if PH provided a way for us to send messages directly to the interface and wait for interface responses, then I think I would be able to decifer what bytes to send to the interface to be able to download macros to the interface memory. (appears to be a matter of sending the correct bytes to the interface at the correct time). But PH starts up and takes the com port so no other outside process can use the port. If you could provide some kind of interface communication, that would be quite helpful, without hopefully a lot of coding modifications. would it be possible maybe for you to define some globol variables in PH, where PH would take the data from those variables and pass them to the interface then wait for response from interface and then output that response into another globol variable in PH. You have to already have somekind of port level communications with this interface, with the basic functions of PH x10 control.
So far, it seems that I am still left only with the choice of using the activehome software to control my lights and automation while my computer is powered off, or leave my computer powered on 24/7 to use powerhome software to control my automation to gain little more functionality provided by PH.
if I could find a way of accomplishing this task external to PH, then I could easily make the choice in what software to use. Is it really impossible to accomplish this kind of com port communication using something within PH, or am I just overestimating the power of vbscripts or windows script or some other functionality already provided in PH.
Thanks in advance for enduring my persistance in this subject......your help is much appreciated.... Nick
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: March 10 2004 at 23:53 | IP Logged
|
|
|
Nick,
Version 1.03.3 provides a full set of COM port functions that you should be able to use. They are documented in the online help under Formula->Functions->Com Control.
However, when PowerHome is currently connected to the controller, the COM port is in use and you would be unable to utilize these commands. Not to worry however, PowerHome also has a couple of commands ph_connect and ph_disconnect. Before using the COM port functions, just issue a ph_disconnect. You'll then be able to connect using the COM functions and attempt communications with the CM11A. When done with your communications, just issue a ph_connect command and PowerHome will again be in control.
HTH,
Dave.
|
Back to Top |
|
|
|
|