Sennevds
(Sennevds)
December 17, 2016, 2:46pm
5
i’m trying to do the same thing but with a lighting1 device of type COCO GDR2.
I have found this post:
Prefix:
0b is the length of the datapacket
11 means Lighting2
00 means subtype AC
self.packetlength = data[0] self.packettype = data[1] self.subtype = data[2] self.seqnbr = data[3] self.id1 = data[4] self.id2 = data[5] self.id3 = data[6] self.id4 = data[7] self.id_combined = (self.id1 << 24) + (self.id2 << 16) \ + (self.id3 << 8) + self.id4 self.unitcode = data[8] self.cmnd = data[9] …
explaining how the code is made.
I have looked at the source code:
# This file is part of pyRFXtrx, a Python library to communicate with
# the RFXtrx family of devices from http://www.rfxcom.com/
# See https://github.com/Danielhiversen/pyRFXtrx for the latest version.
#
# Copyright (C) 2012 Edwin Woudt <[email protected] >
#
# pyRFXtrx is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyRFXtrx is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with pyRFXtrx. See the file COPYING.txt in the distribution.
# If not, see <http://www.gnu.org/licenses/>.
"""
This file has been truncated. show original
at this moment i have following code
071010044104
07 =package length
10 = lighting1
10 = subtype COCO GDR2
04 = seq nbr(don’t know if this is right)
41 = housecode A
04 = unitcode 4
but then i’m stuck