Closed mKeRix closed 6 years ago
Hey,
My original attempt for this sensor was on a Raspberry Pi. I believe the Omron sensors requires a repeated start (it shows it in their app note, and I was unable to get it working without the repeated start) to properly read the data. After a bit of digging through forums and datasheets, I found that the raspberry pi i2c hardware does not support repeated starts.
Here is a link to one of the forums: https://www.raspberrypi.org/forums/viewtopic.php?t=15840
After struggling for a few days with the Raspberry Pi, I picked up a beaglebone I had laying around, and the same code worked. I looked through a protocol analyzer, and the only difference between the 2 was the repeated start, so it seems like the raspberry pi just isn't the right hardware for interfacing with this device. 2 possibilities I see for getting this working on the RPI:
After toying around with getting the repeated start condition working on RPi I ended up buying a BeagleBone Green Wireless as per your tip. It works perfectly on there, without any modifications required for the sensor! Thank you so much for work you've put into this, you really helped me out a lot. Finally I can start getting these integrated into my home automation. :)
I will test out the code for the D6T-8L-09 on the BeagleBone soon as well and report back!
Should anyone stumble upon this issue in the future, I actually found a way to make the d6t sensors work with the Raspberry Pi. I used the i2c-bus library from npm for this. You can find my code as reference here: https://github.com/mKeRix/room-assistant/blob/thesis/services/d6t.service.js
The code in that branch is experimental, so excuse the mess. Generally this seems to be quite reliable, however I do get some wrong data sometimes. To counter this the PEC check should be implemented as well. I based my code on the D6T whitepaper.
Hey there,
hopefully I'm not annoying you too much yet! A part of my testing efforts I also received a D6T-44L-06 sensor and set it up on my Raspberry Pi. I ran the unmodified version of your example script, unfortunately this time around I'm receiving output like this:
Do you have any idea what the issue could be?