temper icon indicating copy to clipboard operation
temper copied to clipboard

unidentifiable version of TEMPer

Open charterhouse-services opened this issue 4 years ago • 6 comments

temper.py -l
Bus 001 Dev 009 1130:660c   PCsensor Temper ['hidraw1', 'hidraw2']

When running ./temper.py receive the following traceback:

root@john-desktop:/home/john/temper/pcsensor-temper# python3 /usr/local/lib/python3.9/dist-packages/temper.py --force 1130:660c --verbose
Firmware query: b'0186ff0100000000'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 436, in <module>
    main()
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 433, in main
    sys.exit(temper.main())
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 426, in main
    results = self.read(args.verbose)
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 343, in read
    results.append({ **info, **usbread.read() })
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 270, in read
    return self._read_hidraw(self.device)
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 178, in _read_hidraw
    firmware = self._read_hidraw_firmware(fd, self.verbose)
  File "/usr/local/lib/python3.9/dist-packages/temper.py", line 158, in _read_hidraw_firmware
    raise RuntimeError('Cannot read device firmware identifier')
RuntimeError: Cannot read device firmware identifier

charterhouse-services avatar Jun 01 '21 21:06 charterhouse-services

Its a pretty old model - I had a look at the PCSensor site and couldnt find it on there :-D If you're up for a challenge Ill gladly help out with testing ;-)

image

charterhouse-services avatar Jun 01 '21 21:06 charterhouse-services

Currently, that function has a select() timeout of 0.2. That might be too fast for that older hardware version.

Try changing:

# in _read_hidraw_firmware
select.select([fd], [], [], 0.2
                            ^^^

..to something longer than 0.2, like 0.4, 0.6, or 1.

eode avatar Jun 28 '22 21:06 eode

@charterhouse-services Did this work for you?

eode avatar Nov 23 '22 16:11 eode

I'll be closing this as inactive soon.

eode avatar Jan 04 '23 22:01 eode

I'm not the original submitter, but I was trying to get this working with the same device and came across this bug report.

I tried several different timeouts on that line, going all the way up to 5, without any effect.

spv-1 avatar May 11 '23 04:05 spv-1

If it helps, I found this old Python 2 script that works with this device: https://github.com/kiloforce/PyTEMPer

OTOH, these might be old enough that it's not worth your time adding in support for them, since there don't seem to be that many of us trying to get them working.

spv-1 avatar May 11 '23 04:05 spv-1