Comments (17)
You mean the device has both an onboard as well as a cable-bound
external temperature sensor?
I am not aware of how that would work and I think the code does not
handle that at the moment.
That said - it should be possible to extract the data, maybe there are
more USB endpoints in your case.
Changing the code will be trial&error and sheer luck as the USB
interaction is a blackbox at least for me personally.
Can you provide another link to the product? The one you sent merely
shows a picture with no description.
-- Philipp
from temper-python.
Hi, thank you for your answer :)
Yeah it has two seperate sensors. I have found another information page: http://www.pcsensor.com/index.php?_a=product&product_id=160
from temper-python.
Thanks, that was helpful. It is a total shot in the dark, but if
possible could you capture a dump of the USB communication?
There is USBPCap for Windows that does the heavy lifting of writing a
pcap file.
The tool is here:
http://desowin.org/usbpcap/index.html
Once installed & rebooted, start it from "C:\Program
Files\USBPcap\USBPcapCMD.exe", select the most appropriate number in the
first column of the device tree and let it write a file, e.g. heig-19.pcap.
Then (unplug and) plug in the temper device and start reading using the
logger tool that comes with it.
Ctrl+C ends the capture. Please send me the file (or attach it to this
issue if that is possible) to autosort-github at philipp dot adelt dot net.
Also include the readings in that time (screenshot or text) so we can
correlate the data with the output.
I have never done that before but in theory the dump should show the
complete interaction between the software (that temper-python must
emulate) and the temper device.
-- Philipp
from temper-python.
Hi Philipp, i sent you the files via mail. Thanks again :)
from temper-python.
Thanks, got the files.
I do not have time to reverse engineer that right now, but it looks promising.
The device basically sends data from one endpoint, just like the ones I know and it seems to embed both temperatures in the same transfer, have a look here:
https://docs.google.com/spreadsheets/d/13pr1AK4CbSLBmcVBdw6WMunYdmL6VmFfINaOruiYeWM/edit?usp=sharing
If anyone wants to tinker with the code and needs more of the dump, let me know.
from temper-python.
Holy crap, there's an 8-sensor version too:
http://www.pcsensor.com/index.php?_a=product&product_id=177
It would be good to come up with an interface which would support polling of 2 or more sensors, maybe something like:
def get_temperature(self, format='celsius', sensor_no=1):
But whoever codes support for this should probably have a 2+ sensor TEMPer to test with. Perhaps we could ask the manufacturers to donate one?
from temper-python.
Hi,
unfortunately I have no idea of coding so I cannot help you guys. But I can ask the Manufacture for a donation.
But if i get it correct, what you are basically saying, is that the new code shouldn't just support the two sensor version but an "n"-Sensor Version without hard coded stuff for the 2-Sensor version?
Thank you for your support so far!
from temper-python.
I've just sent a message to the people at PCSensor asking if they'd be willing to donate one of their 8-thermometer units to our project. I'll update this thread if/when they reply.
from temper-python.
Here's what I got back form PCSensor. They're not willing to donate any hardware 😦...
Dear James,
I am sorry not reply you so quickly .Thanks for your email .
TEMPer8_H8 (http://www.pcsensor.com/index.php?_a=product&product_id=177 )
It can connect 8pcs sensors at the same time . you can purchase it from our website , we cannot offer the free sample to you .so sorry !
if you want to develop own program , you can purchase our DLL file . it costs $45 .in addition , you can select anothe product . 1W_D2 (http://www.pcsensor.com/index.php_a=product&product_id=13 ) . You can have a look .
if you want to develop own program,you can come to here (http://www.maxim-ic.com/ ) to find the DLL >file. we use the IC come from this company .Maybe it will give you some help !
Have a nice day !
Nice of them to offer to sell me a DLL for $45 though! 😉
from temper-python.
My early testing indicates that we can get the external sensor by altering the data_s array references on this line https://github.com/padelt/temper-python/blob/master/temperusb/temper.py#L172 from: data_s[2:4]
to data[4:6]
.
I'll play more, and see if I can open a pull request for the functionality.
from temper-python.
Quick update:
External sensor plugged in: data = [128, 4, 27, 112, 20, 112, 46, 51]
Unplugged the external sensor: data = [128, 4, 27, 112, 255, 255, 46, 51]
This makes me more confident data[4:6]
is the external reading.
from temper-python.
Hi ps-jay, thank you very much for this change :) I will try it out immediatly. I just added the second sensor to my device to test ;)
edit
I just tried it out. sensor=0 and sensor=1 work like a charm :) BUT sensor="all" gives me an error:
/usr/local/bin/temper-poll
Found 1 devices
Traceback (most recent call last):
File "/usr/local/bin/temper-poll", line 9, in
load_entry_point('temperusb==1.2.3', 'console_scripts', 'temper-poll')()
File "/usr/local/lib/python2.7/dist-packages/temperusb-1.2.3-py2.7.egg/temperusb/cli.py", line 78, in main
reading['temperature_f']))
TypeError: float argument required, not list
from temper-python.
Yeah - that make sense - that print statement isn't expecting a list of temperatures.
Lets see if we can get some action on this project over the next few weeks.
@foundbobby has committed some code to select from the cli command switches - we could extend that to support "all", and fix the print statement.
from temper-python.
I originally had it accept all, but saw the error too and removed it. I can add it back if you'd like
from temper-python.
I've update PR #34 ... works for me.
@heig & @foundbobby - have a look.
from temper-python.
Updated PR #34 again.
Please test.
from temper-python.
Just checked #34. Works perfectly with my two sensors: two devices with one sensor each. Thanks to everyone for making an even better solution! Please check if attribution in README.md is correct (what about @foundbobby ?) and send a pull request if not!
P.S.: This was joint work from California/USA, Germany and Australia, right? Nice! :)
from temper-python.
Related Issues (20)
- syntax error on debian buster HOT 7
- Use of Python 3.6 syntax HOT 3
- Update documentation to require Python 3.6+
- ID 0c45:7401 Temperature reading incorrect (TEMPer2V1.4) HOT 2
- New device addition HOT 2
- New release possible? HOT 6
- support for TEMPer2V1.3 request HOT 18
- Pylint? HOT 1
- Sorry, not an issue - adding V1.1 support HOT 4
- Support for TEMPerHumiV1.0 HOT 1
- Port number display is not entirely useful since it isn't guaranteed to be unique HOT 1
- Tag the source HOT 1
- Support for TEMPerGold (1a86:e025) HOT 13
- TEMPer2 not detecting devices HOT 21
- Support for TEMPerGold (3553:a001) HOT 6
- Please do a release with all the fixes from the last 2 years HOT 14
- Support for TEMPerX232 (1a86:5523)
- 0c45:7402 Temperature reading incorrect HOT 15
- No output from temper.py, but no error. HOT 1
- Suggested architecture improvement for supporting new sensors HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from temper-python.