iButton
Syrus can communicate with compatible DS19xx family of iButtons® via a reader like DS9092 iButton® probe.
For any 1-wire accessories such as temperature and ibutton sensors, up to 64 total sensors can be supported simultaneously. This means if you want to read an ibutton you can have a maximum 63 other temperature sensors connected all reading temperatures at the same time. Note that this does not affect the authorized/whitelisted list of ibuttons, up to 500 ibuttons or 1-wire accessories can be authorized for use with the apx-onewire tool.
General Overview
- Start by connecting an iButton probe to the Syrus
- Connect an iButton to the probe and read the unique ID with the apx-onewire tool
- Use the apx-onewire tool to add the iButton to an authorized list
- Give the iButton to a driver and allow them to perform actions like enable the engine using Syrus Programming Language (syruslang)
Installation
1-wire Wiring Pinout (found in 14-pin molex) for Connection to iButton probe
iButton Probe Wires | Signal | Description | Syrus Signal | Syrus Wires | |
---|---|---|---|---|---|
Gray | DATA | Data signal, connect to the Syrus white/red 1-wire cable. Make sure to use the 14-pin molex white/red cable. | 1WIRE | ||
Black | GND | Connect to the Syrus electrical ground cable. | GND |
Configuration
After installing the iButton probe, you can connect an iButton and read data with apx-onewire tool.
Return list of ibuttons
$ sudo apx-onewire ibutton get_all
{
"ibuttons": [
{
"alias": null,
"id": "123456789012345",
"whitelisted": false,
"connected": false,
"conn_epoch": 1608048266,
"disc_epoch": 1608048273
}
]
}
Add or authorize the iButton so it appears 'whitelisted' with the add
command.
Assign driver 1 to ibutton id 123456789012345
$ sudo apx-onewire ibutton add 'driver 1' 123456789012345
the get_all
command would return the following the next time you connect it.
{
"ibuttons": [
{
"alias": "driver 1",
"id": "123456789012345",
"whitelisted": true,
"connected": true,
"conn_epoch": 1608048266,
"disc_epoch": 1608048273
}
]
}
It's ready to be handed to the driver so they can use it.
Redis Interaction
To notify the changes on the status, the onewire application publishes:
onewire/notification/ibutton/state onewire_ibutton_json_object
"PUBLISH" "onewire/notification/ibutton/state" "{\"alias\":\"driver1\",\"id\":\"123456789012345\",\"whitelisted\":true,\"connected\":true,\"conn_epoch\":1610658389,\"disc_epoch\":1610658390}"
Updated 6 months ago