You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes same need. I have a TEMPerX232 (thermo-hygrometer) with that ID and I can't make it work as my others Temper1F.
I have no clue. I don't really now what magic is going on in these hacks. I added the new ID to the VIPDS list, and of course I get an error ("Entity not found").
Thank you
Hi I use temper-python with my Microdia TEMPer Temperature Sensor (0c45:7401) and it works like a charm. I, as well, was too adventurous when buying an obscure "TEMPerHUM" (413d:2107). It would be great to have support for this device in temper-python!
I've created a working Munin plugin for our device using hid-query: https://github.com/mreymann/temperx
Support should be fairly easy to implement in temper-python. USB commands seem to be very similar. I have a PCAP file here if anybody needs it.
Hoping that this comment will help temper-python to support devices with id 413d:2107 I should note that running this hid-query gives you the temperature (hid-query is part of https://github.com/edorfaus/TEMPered more info bellow):
./hid-query /dev/hidraw1 0x01 0x80 0x33 0x01 0x00 0x00 0x00 0x00
...
Response from device (8 bytes):
80 80 09 0e 4e 20 00 00 <--- temperature is 0x090e/100
P.S. Until temper-python supports them here's a complete set of commands to print the temperature:
DEVID=/dev/hidraw1 # use `hid-query --enum` to find the right DEVID
OUTLINE=`./hid-query $DEVID 0x01 0x80 0x33 0x01 0x00 0x00 0x00 0x00|grep -A1 ^Response|tail -1`
OUTNUM=`echo $OUTLINE|sed -e 's/^[^0-9a-f]*[0-9a-f][0-9a-f] [0-9a-f][0-9a-f] \([0-9a-f][0-9a-f]\) \([0-9a-f][0-9a-f]\) .*$/0x\1\2/'`
echo $(( 16#$OUTNUM ))|awk '{printf("%4.1f\n",$0/100)}'
23.1°C
The above are 99% based on TEMPered#51 "hack" from digiboule mentioned above.
As I mentioned at edorfaus/TEMPered#35 (comment) I have one of these new 413d:2107 devices which the Windows "TEMPer V26.1" software calls "Firmware: TEMPerGold_V3.1" and mine is I think temperature only, although the hidapi testgui app shows two devices with that VID:PID. The eight-byte hex string posted by ndemou above, does work when manually entered from the hidapi testgui. However the TEMPered project "hid-query" tool does not see the device at all (only sees my keyboard and mouse) so I don't know how to script this.
Thanks @jbeale1 for noticing the bug with integer arithmetic. I fixed my script (just used awk instead of bc because it works perfectly for such low precision calculations and is pre-installed almost everywhere)
I also have a 413d:2107 device. It is supposed to do both T and R.H.: vendor, Amazon. By pressing the button, I can get it to operate like a keyboard and just dump its output to /dev/stdin. So I know it works, and it puts out T and R.H. in a human readable way. But that's not really practical.
My biggest issue right now is that hid-query /dev/hidraw3 0x01 0x86 0xff 0x01 0x00 0x00 0x00 0x00 gives me this error: Write failed: (null). I am doing this as root, and hid-query detects it successfully. Is this perhaps a slightly different device? Does it need a different string sent? Or is something about permissions set up the wrong way, so that writing does not work?
I should add that my device is called "TemperX232". I know that some other devices also use the same 413d:2107 USB identifier (for instance the newer "TemperHum" devices).
After logging for two days, I see the output of my TEMPer has a nominal 0.06 C resolution. I haven't done a careful calibration, but the plot shows big flat spots at fixed values like it gets stuck. It is not, but clearly it can not reliably measure changes smaller than 0.5 C. Example plot: https://photos.app.goo.gl/HEiZdxNJTLN1RLUf7
For about the same price, the "USB DS18B20" probe on ebay may work better. At least there's apparently a working linux package.
I received a 413d:2107 from amazon, and though it reports two USB devices (keyboard/USB device), I can only seem to get data from the usb device. I don't have a button to send keyboard input. The temp it reports back is way too high to make sense. It was commented elsewhere that there is an internal and external temp that can be reported. I'm worried that I'm only seeing the internal temp, if that's the case.
This totally fixed my problems: urwen/temper.
It's a pure python3 program that makes my device work. The author also describes in the README.md that the access via hidraw does not work and gives errors. Brilliant! I can use my device now!!! The author also has listed a table with different devices.
What brought me on this track: the Firmware version using the Windows software reads as "TEMPerX232_V2.0".
Reacted by Alex Berezovskiy, François, Starfight, Jack Pearce, tmo26 and Marius Durbaca
This totally fixed my problems: urwen/temper.
It's a pure python3 program that makes my device work. The author also describes in the README.md that the access via hidraw does not work and gives errors. Brilliant! I can use my device now!!! The author also has listed a table with different devices.
What brought me on this track: the Firmware version using the Windows software reads as "TEMPerX232_V2.0".
A fork of it has several improvements. It also has a setup.py so it can be installed in a virtualenv preferably (in a terminal) like:
not to be confused with the unrelated project on pypi (pip install temper without the link above will mess things up)
Please use the --user option along with each command if not using a virtualenv (to avoid messing up your copy of Python).
And used as a module instead of a command (in Python) like:
fromtemperimportTempertmpr=Temper()
ifnothasattr(tmpr, 'usb_devices'):
print("You have the wrong temper. Get ccwienk/temper (or the old urwen/temper).")
devices=tmpr.read()
foriinrange(len(devices)):
print("{} C".format(devices[i]['internal temperature']))
I was able to get my Temper2 device working in windows. You will need to download libusb-1.0.26-binaries and unzip it in the project directory. For windows, this is what I needed. This device is VID 0x431D PID 0x2107. There is no product name in the USB descriptor, so there's no good way to tell it apart from any of the others except for VID/PID. It does have 2 endpoints. The first is a keyboard endpoint. The other is the temperature interface. This device has a button on it. It has an internal temp measurement and an external measurement probe. To get both sensor readings, you write the USB commands for init, then send USB command to read temp, then complete 2 reads. The first read is the internal temp (offset 2 in the 8 byte data) then divide by 100.0. The second read is the external temp (offset 2 in the 8 byte data) then divide by 100.0.
I've attached a modified temper.py file. I'm sorry it is such a hack, but I just needed something quick. This at least gives the coders maintaining this to potentially add it. Though I'm not sure if it'll work since all the others have product names. This one does not and that is how they are differentiated in the code. This one is definitely different than the others. Again, my apologies for the hack job of this beautiful code, but I also wanted to give back since this gave me a great starting point. temper.py.zip
Please could you double check the description strings to see if there's anything uniquely identifiable about the sensor that we can use to select the correct decoding?
I don't have one of these sensors so I'm also looking for someone who can help me with testing a patch for this new sensor.
Activity
Estebastien commentedon Jan 26, 2018
Yes same need. I have a TEMPerX232 (thermo-hygrometer) with that ID and I can't make it work as my others Temper1F.
I have no clue. I don't really now what magic is going on in these hacks. I added the new ID to the VIPDS list, and of course I get an error ("Entity not found").
Thank you
mreymann commentedon Feb 7, 2018
Hi I use temper-python with my Microdia TEMPer Temperature Sensor (0c45:7401) and it works like a charm. I, as well, was too adventurous when buying an obscure "TEMPerHUM" (413d:2107). It would be great to have support for this device in temper-python!
Thanks for your work!
mreymann commentedon Feb 16, 2018
I've created a working Munin plugin for our device using hid-query: https://github.com/mreymann/temperx
Support should be fairly easy to implement in temper-python. USB commands seem to be very similar. I have a PCAP file here if anybody needs it.
ndemou commentedon Jun 1, 2018
Hoping that this comment will help temper-python to support devices with id 413d:2107 I should note that running this hid-query gives you the temperature (hid-query is part of https://github.com/edorfaus/TEMPered more info bellow):
P.S. Until temper-python supports them here's a complete set of commands to print the temperature:
The above are 99% based on TEMPered#51 "hack" from digiboule mentioned above.
To install TEMPered (that contains the hid-query utility) download it and see this post edorfaus/TEMPered#35 (comment)
P.S.3: I must admit that I'm really confused by who forked what version of TEMPered to support which device type.
P.S.4: Here's a copy of my bash session that ended up on the above commands:
jbeale1 commentedon Jun 17, 2018
As I mentioned at edorfaus/TEMPered#35 (comment) I have one of these new 413d:2107 devices which the Windows "TEMPer V26.1" software calls "Firmware: TEMPerGold_V3.1" and mine is I think temperature only, although the hidapi testgui app shows two devices with that VID:PID. The eight-byte hex string posted by ndemou above, does work when manually entered from the hidapi testgui. However the TEMPered project "hid-query" tool does not see the device at all (only sees my keyboard and mouse) so I don't know how to script this.
ndemou commentedon Jun 17, 2018
@jbeale1: mine is also temperature only and if you notice in the transcript above I also see two devices and one of them doesn't respond.
jbeale1 commentedon Jun 17, 2018
It does work! After keyboard and mouse, it's hidraw3 on my system. Also needs 'sudo'
jbeale1 commentedon Jun 17, 2018
Edit: awk works for float division, or after doing "sudo apt-get install bc"
jbeale1 commentedon Jun 17, 2018
Bash script to print time & temp every ~15 sec, with readTEMPer.sh being my script in above comment:
example output:
ndemou commentedon Jun 17, 2018
Thanks @jbeale1 for noticing the bug with integer arithmetic. I fixed my script (just used awk instead of bc because it works perfectly for such low precision calculations and is pre-installed almost everywhere)
jbeale1 commentedon Jun 17, 2018
On my raspberry pi, 'awk' is apparently mawk 1.3.3 and it always gives me 0.0 for example:
Edit: after 'sudo apt-get install gawk' then it all works as intended.
ndemou commentedon Jun 17, 2018
Right again. A cross platform way seems to be
(I've updated my script)
schniepp commentedon Jun 19, 2018
I also have a 413d:2107 device. It is supposed to do both T and R.H.: vendor, Amazon. By pressing the button, I can get it to operate like a keyboard and just dump its output to
/dev/stdin. So I know it works, and it puts out T and R.H. in a human readable way. But that's not really practical.My biggest issue right now is that
hid-query /dev/hidraw3 0x01 0x86 0xff 0x01 0x00 0x00 0x00 0x00gives me this error:Write failed: (null). I am doing this as root, and hid-query detects it successfully. Is this perhaps a slightly different device? Does it need a different string sent? Or is something about permissions set up the wrong way, so that writing does not work?I should add that my device is called "TemperX232". I know that some other devices also use the same 413d:2107 USB identifier (for instance the newer "TemperHum" devices).
ndemou commentedon Jun 19, 2018
@schniepp have you tried all devices that
hid-query --enumreturns?schniepp commentedon Jun 19, 2018
Yes. The other two ones are only my external keyboard and mouse. The one that I am using reports the correct USB ID.
jbeale1 commentedon Jun 19, 2018
After logging for two days, I see the output of my TEMPer has a nominal 0.06 C resolution. I haven't done a careful calibration, but the plot shows big flat spots at fixed values like it gets stuck. It is not, but clearly it can not reliably measure changes smaller than 0.5 C. Example plot: https://photos.app.goo.gl/HEiZdxNJTLN1RLUf7
For about the same price, the "USB DS18B20" probe on ebay may work better. At least there's apparently a working linux package.
cmsimike commentedon Jul 6, 2018
I received a 413d:2107 from amazon, and though it reports two USB devices (keyboard/USB device), I can only seem to get data from the usb device. I don't have a button to send keyboard input. The temp it reports back is way too high to make sense. It was commented elsewhere that there is an internal and external temp that can be reported. I'm worried that I'm only seeing the internal temp, if that's the case.
Proxx commentedon Aug 21, 2018
same here, got the 413d:2107 version and really like to see this usbstick supported 😄
cmsimike commentedon Aug 21, 2018
I am currently using this script to read the raw USB values from the 413d:2107
I built TEMPered, and it has an hid-query, which I can use to get the raw sensor values.
schniepp commentedon Oct 16, 2018
This totally fixed my problems: urwen/temper.
It's a pure python3 program that makes my device work. The author also describes in the README.md that the access via hidraw does not work and gives errors. Brilliant! I can use my device now!!! The author also has listed a table with different devices.
What brought me on this track: the Firmware version using the Windows software reads as "TEMPerX232_V2.0".
Poikilos commentedon Jan 21, 2021
A fork of it has several improvements. It also has a setup.py so it can be installed in a
virtualenvpreferably (in a terminal) like:--useroption along with each command if not using a virtualenv (to avoid messing up your copy of Python).And used as a module instead of a command (in Python) like:
acs4design commentedon Oct 21, 2022
I was able to get my Temper2 device working in windows. You will need to download libusb-1.0.26-binaries and unzip it in the project directory. For windows, this is what I needed. This device is VID 0x431D PID 0x2107. There is no product name in the USB descriptor, so there's no good way to tell it apart from any of the others except for VID/PID. It does have 2 endpoints. The first is a keyboard endpoint. The other is the temperature interface. This device has a button on it. It has an internal temp measurement and an external measurement probe. To get both sensor readings, you write the USB commands for init, then send USB command to read temp, then complete 2 reads. The first read is the internal temp (offset 2 in the 8 byte data) then divide by 100.0. The second read is the external temp (offset 2 in the 8 byte data) then divide by 100.0.
I've attached a modified temper.py file. I'm sorry it is such a hack, but I just needed something quick. This at least gives the coders maintaining this to potentially add it. Though I'm not sure if it'll work since all the others have product names. This one does not and that is how they are differentiated in the code. This one is definitely different than the others. Again, my apologies for the hack job of this beautiful code, but I also wanted to give back since this gave me a great starting point.
temper.py.zip
davet2001 commentedon Oct 27, 2022
@acs4design Thanks for sharing this. Is your sensor like one of the ones here?:
https://usb-ids.gowdy.us/read/UD/413d/2107
Please could you double check the description strings to see if there's anything uniquely identifiable about the sensor that we can use to select the correct decoding?
I don't have one of these sensors so I'm also looking for someone who can help me with testing a patch for this new sensor.
acs4design commentedon Oct 27, 2022