|
From: Sam G. <sg...@ho...> - 2016-06-21 16:32:50
|
Joel, Thanks, for the quick reply and pointing me in the right direction. I modified the RecurringMultipleReadProperty.py to have a write request and got that running yesterday. Thanks again, Sam ________________________________ From: Joel J. Bender <jj...@co...> Sent: Monday, June 20, 2016 12:45 PM To: Discussion about developing BACpypes Subject: Re: [BACpypes-developers] Read or Write property without a console? Sam, I am trying to use BACpypes to write to the presentValue property of an analogOutput object. I can do this with the ReadWriteProperty sample without any problems (BACpypes works great from the console.). We celebrate success wherever it is found :-). However, I would like to be able to integrate the write property command into my existing script rather than using an interactive console. The script I am writing is used to forecasts lake levels, and last step needed in the script is to change the presentValue property of a handful of analogOutput objects on a BACnet IP network. Ok. I have tried to get a non console version of the ReadWriteProperty sample running, but haven't been successful. Are any samples available for a read or a write property that don't include an interactive console? The closest thing there is now is the samples/RecurringMultipleReadProperty.py application. At the top is a list of points to read (address, object type, object instance, property) and every "interval" seconds it scans down through the list and reads them all. The "prairie dog" is the application along with the process_task() function that kicks off the work so after calculating the correct value, stash a copy and call next_request(). In your case you'll building a WritePropertyRequest. Joel |