TaliaBeeZ is the ZigBee interface to TaliaBee API. TaliaBeeZ can be used to monitor and to control the I/O pins of the TaliaBee box through ZigBee.
- Python 3.x
- Python Xbee module
- Python PySerial module
- Python TaliaBeeIO module
pip3 install taliabeez
In order to use ZigBee interface, you need to set your ZigBees to API
mode.
And preferably, set your ZigBee Routers' DL
and DH
adresses to the broadcast adress of the network.
You will send a string and receive a string with the same format. The string should be in the format below:
ID|TYPE|DATA
Each field has a format, too.
ID
is an integer value between 0
and 9999
. This value is used to create request/response pairs.
TYPE
field specifies the data is a command or a reply for a command. C
for command, R
for reply.
There is no use of R
while sending a command. You should probably use C
value.
DATA
is comma separated commands. The command types are below
-
DXXY
: WriteY
to theX
th digital output.XX
is a right-aligned integer with two digits,Y
is char[0-1]
-
RXXY
: WriteY
to theX
th relay output.XX
is a right-aligned integer with two digits,Y
is char[0-1]
-
AXXYYYY
: WriteYYYY
to theXX
th analog output.XX
is a right-aligned integer with two digits[0-4]
,YYYY
is a right-aligned integer with 4 digits[0-4095]
For every sent command list (even if it's empty), the values of the all I/O will be sent as response. There is a format for that, too.
Format : ID|R|dddddddddddddddd,DDDDDDDDDDDDRRRR,aaaa,AAAA,T
-
d
: Digital Input. You'll see the status of a digital input here. -
D
: Digital Output. You'll see the status of a digital output here. -
R
: Relay Output. You'll see the status of a relay here. -
a
: Analog Input. You'll see the status of a analog input here. -
A
: Analog Output. You'll see the status of a analog output here. -
T
: Temperature. You'll see a floating number here. (contains 5-6 characters)
Here you can see the the status of every single component.
Here are the examples for this format:
9|C|R010001
This is the package with ID 9
This package contains commands.
The command is R011
means "Write 1 to relay output #01". (Set it)
9|R|0000000100000000,1000000000001000,1263345619821746,1000200030004000,-2.75
This is the response for the package with ID 9
This data contains a reply for your command list that you've sent before.
All digital inputs are in 0000000100000000
.
All digital outputs and relays are in 1000000000001000
.
All analog inputs are in 1263345619821746
.
First Analog Input is 1263
.
Second Analog Input is 3456
.
Third Analog Input is 1982
.
Fourth Analog Input is 1746
.
All analog outputs are in 1000200030004000
.
Temperature is -2.75