13.05.2016, 09:10
(13.05.2016, 06:39)admin Wrote: Here's a basic example, create a resident script with sleep time = 0. os.sleep at the end tells how often the 1-Wire bus is polled for new devices. Can you explain what kind of task do you have, some kind of access / door control or similar? I can provide a better example if the details are known
Yes i can give you more details.
We like to make a simple access control for a building with 25 apartments and 1 central control room. Every apartment and the control room has a LogicMachine Ambient with 1-wire devices, like the Keyfob and reader.
Our goal:
1: keyfobs are added and deleted with the LogicMachine Ambient in de control room and synced with the LogicMachine Ambient in the apartment (local variable).
The benefit for using local variable in the apartment LogicMachine for storing the keyfobs is that every apartment can be used standalone for controlling the acces,
only adding and deleting keys is controlled from central.
Example:
Key 1 and 2 is added and synced to Apartment 1
Key 3 and 4 is added and synced to Apartment 2
Key 99 is added and send to Apartment 1 and 2
Key 4 is deleted and synced to Apartment 2
2:
In the apartments we have a reader. When the right keyfob (assigned by the central control room) is hold for the reader then a output contact on the 1-wire PUZZLE is activated to control the door for some seconds.
3:
Maybe a end-user app to add and delete the keyfobs and assign them to a apartment, is this possible?
Then its also possible to store more information for a keyfob, like a username or unique number.