Hallo Liebe Leute!
how do i convert the value returned from a "groupreadresponse" ?
in PYTHON.
when i use struct.unpack:
var = call(["groupreadresponse","ip:127.0.0.1","4/2/0"])
print(var) -> it's always "0"
(1 bit light switch / c = char )
Response from 3.0.1: 01
print(struct.unpack('>c',var))
struct.error: unpack requires a string argument of length 1
( 4 bit Power measure / l = float )
Response from 3.1.3: 42 15 0A 3D
print(struct.unpack('>l',var))
struct.error: unpack requires a string argument of length 4
Danke im Vorraus.
Jonas
how do i convert the value returned from a "groupreadresponse" ?
in PYTHON.
when i use struct.unpack:
var = call(["groupreadresponse","ip:127.0.0.1","4/2/0"])
print(var) -> it's always "0"
(1 bit light switch / c = char )
Response from 3.0.1: 01
print(struct.unpack('>c',var))
struct.error: unpack requires a string argument of length 1
( 4 bit Power measure / l = float )
Response from 3.1.3: 42 15 0A 3D
print(struct.unpack('>l',var))
struct.error: unpack requires a string argument of length 4
Danke im Vorraus.
Jonas
Kommentar