Skip to content

Commit

Permalink
Merge pull request urwen#9 from corsac-s/master
Browse files Browse the repository at this point in the history
Add support for TEMPerGold_V3.4 and TEMPer2_V3.9
  • Loading branch information
eode authored Nov 23, 2022
2 parents 35bf00f + 18ae741 commit b681d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ Product | Id | Firmware | Temp | Hum | Notes
------------|-----------|------------------|------|-----|---------------
TEMPer | 0c45:7401 | TEMPerF1.4 | I | | Metal
TEMPer | 413d:2107 | TEMPerGold_V3.1 | I | | Metal
TEMPer | 1a87:e025 | TEMPerGold_V3.4 | I | | Metal
TEMPerHUM | 413d:2107 | TEMPerX_V3.1 | I | I | White plastic
TEMPer2 | 413d:2107 | TEMPerX_V3.3 | I,E | | White plastic
TEMPer2 | 1a86:e025 | TEMPer2_V3.7 | I,E | | White plastic with red button
TEMPer2 | 1a86:e025 | TEMPer2_V3.9 | I,E | | White plastic with red button
TEMPer2 | 1a86:e025?| TEMPer2_M12_V1.3 | I,E | | White plastic with red button
TEMPer1F | 413d:2107 | TEMPerX_V3.3 | E | | White plastic
TEMPerX232 | 1a86:5523 | TEMPerX232_V2.0 | I,E | I | White plastic
Expand Down
4 changes: 2 additions & 2 deletions temper.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _read_hidraw(self, device):
self._parse_bytes('internal temperature', 2, 256.0, bytes, info)
return info

if info['firmware'][:15] == 'TEMPerGold_V3.1':
if info['firmware'][:15] in [ 'TEMPerGold_V3.1', 'TEMPerGold_V3.4' ]:
info['firmware'] = info['firmware'][:15]
self._parse_bytes('internal temperature', 2, 100.0, bytes, info)
return info
Expand All @@ -223,7 +223,7 @@ def _read_hidraw(self, device):
self._parse_bytes('internal temperature', 2, 256.0, bytes, info)
self._parse_bytes('external temperature', 4, 256.0, bytes, info)
return info
if info['firmware'][:12] == 'TEMPer2_V3.7':
if info['firmware'][:12] in [ 'TEMPer2_V3.7', 'TEMPer2_V3.9']:
info['firmware'] = info['firmware'][:12]
#Bytes 3-4 hold the device temp, divide by 100
self._parse_bytes('internal temperature', 2, 100.0, bytes, info, self.verbose)
Expand Down

0 comments on commit b681d5c

Please sign in to comment.