Page 1 of 1
1-wire Plug-in
Posted: Wed Mar 10, 2004 1:48 pm
by ericvic
I'm thinking about writing a plug-in for the Dallas 1-wire network. I don't have any detailed specs of what would be in the plug-in yet just a few ideas.
- A hardware plug-in that connects to the 1-wire bus
- Some software devices for things like (wind speed, direction, temp, humidity, pressure, rain gauge and a few other custom devices)
- Eventually add some data logging for historical trending
Does anyone have any other ideas they would like to see in such a plug-in?
Eric
Posted: Wed Mar 10, 2004 4:45 pm
by Automate
You may want to check out MediaStorms comments about "The Link" in this thread
http://www.housebot.com/phpbb2/viewtopi ... ight=1wire
"The Link" supports the raw 1-wire protocol and a simplified protocol.
My suggestion would be to make the data logging/historical trending a separate pluggin that could record and trend any HB variable. This way it could be used with other devices like a X-10 thermostat etc. Or even with discrete devices to show when a light was turned on or off.
Posted: Wed Mar 10, 2004 5:09 pm
by ericvic
Automate,
I know of the link but I'm just going to support 1-wire using the Dallas drivers right now. My 1-wire network has been working fine with my 9097U so I see no need to get "The Link" right now.
I like your idea of making the data logging/historical trending a separate plug-in. The thing I want to stay away from is having to create a bunch of tasks to make the logging work. If I can get property change events into my device when other device's properties change then that would work. But that is a later project anyway.
Thanks for the ideas.
Eric
Posted: Fri Mar 19, 2004 11:51 am
by ericvic
Scott,
Is there anyway for a hardware device plug-in to set what the valid values are for a property?
What I would like to be able to do is when the user adds a new 1-wire device they would be able to choose the ID from a list of IDs currently attached to the 1-wire network.
Eric
Posted: Fri Mar 19, 2004 12:27 pm
by ScottBot
Eric,
I think your answer is yes. When you say 'hardware device' I'm assuming you mean 'hardware interface', since I know you know how to do this with device plugins.
For hardware interface plugins, you can set the list when you register the property. Something like this:
Code: Select all
const char* aPortList[] = {
"COM 1",
"COM 2",
"COM 3",
NULL };
RegisterHardwareModuleProperty( "COM Port", ptList, aPortList, "", TRUE, "Select the COM Port that the Hardware is attached to." );
Posted: Fri Mar 19, 2004 12:33 pm
by ericvic
Scott,
Sorry I wasn't very clear. What I want to be able to do is dynamically update the valid values for a property for device plug-ins from a hardware interface at runtime.
When my 1-wire hardware interface scans the 1-wire bus it will create a list of valid IDs of devices that are attached to the bus. I want to be able to make those the valid values for a property called "Device ID" for 1-wire devices.
Hopefully that is clearer.
Posted: Fri Mar 19, 2004 1:07 pm
by ScottBot
Now I get it. I though that you were beyond that level of question.
Unfortunately the 'valid' values that are associated with a Property are saved in the DB and are static.
You could, however, have a 'button' property on the Device that would allow the user to select from the valid IDs. When the button is pressed, you can display a dialog with a list of valid IDs returned from the interface. When the user selects one, you can either store it privately, or set a standard Property value with the new ID.
Posted: Fri Mar 19, 2004 1:41 pm
by ericvic
Scott,
I'm hoping that I'm beyond that level of questions, I don't want to be going backwards
I will look at the button property way of going about it.
Eric