@tpr:
@markus-:Hat jemand von Euch den Air Purifier 2 laufen?
Als m.header.value.devtype bekomme ich also 825 - das kann so nicht stimmen, oder? `
Als Hex ist es bei mir "033b" statt "00c4" im Beispiel für den Air Purifier.
Wenn du das änderst sollten die Befehle funktionieren. `
Jetzt wird die Bibliothek direkt diese Information (devtype, serial) vom Gerät abholen, leider kenne ich nicht direkt die Kommandos anderer Geräte (ein paar von Purifier sind in diesem Thema zu finden). Die rohen Kommandos könntest du mit raw_command (wie hier gezeigt https://github.com/rytilahti/python-mir … ctionality) ausführen um andere Geräte zu steuern.Die beiden serial und devtype stehen nicht wirklich für entsprechende Merkmale, sondern sie sind nur wegen einer Behauptung so genannt. Auf eeur Erkenttnisse bzw. Patches würde mich natürlich freuen
`
Auf meinem Mac (Python 3.6.0 :: Anaconda 4.3.1 (x86_64)) bekomme ich die Fehlermeldung
! ````
msg = {u'data': {u'value': cmd}, u'header': {u'value': header}, u'checksum': 0}
! m = Message.build(msg)
! Traceback (most recent call last):
! File "<ipython-input-18-f0bb71292b90>", line 3, in <module>
m = Message.build(msg)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 193, in build
self.build_stream(obj, stream, context, **kw)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 205, in build_stream
self._build(obj, stream, context, "building")
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 872, in _build
buildret = sc._build(subobj, stream, context, path)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 2713, in _build
return self.subcon._build(obj, stream, context, path)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 1656, in _build
buildret = self.subcon._build(obj, stream, context, path)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 2143, in _build
value = self.subcon._build(value, stream, context, path)
! File "/anaconda/lib/python3.6/site-packages/construct/core.py", line 306, in _build
return self.subcon._build(self._encode(obj, context), stream, context, path)
! File "/anaconda/lib/python3.6/site-packages/mirobo/protocol.py", line 114, in _encode
return Utils.encrypt(json.dumps(obj).encode('utf-8') + b'\x00')
! File "/anaconda/lib/python3.6/site-packages/mirobo/protocol.py", line 45, in encrypt
key, iv = Utils.key_iv()
! File "/anaconda/lib/python3.6/site-packages/mirobo/protocol.py", line 39, in key_iv
key = Utils.md5(Utils.token)
! File "/anaconda/lib/python3.6/site-packages/mirobo/protocol.py", line 34, in md5
checksum.update(data)
! TypeError: Unicode-objects must be encoded before hashing</module></ipython-input-18-f0bb71292b90>
Auf meinem Raspberry Pi steigt er mit beim install aus mit der Fehlermeldung
AttributeError: 'Distribution' object has no attribute '_egg_fetcher'
Hat jemand das Paket [https://github.com/rytilahti/python-mirobo](https://github.com/rytilahti/python-mirobo)
auf seinem Mac oder Raspberry Pi erfolgreich laufen?