Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please help me code DS18B20 #247

Open
jockethebastard opened this issue Mar 10, 2024 · 1 comment
Open

Please help me code DS18B20 #247

jockethebastard opened this issue Mar 10, 2024 · 1 comment

Comments

@jockethebastard
Copy link

I hope this is the place, had no success with Reddit or Facebook.

I’m trying to install temperature sensor DS18B20 with my ESP8266 D1 Mini.
I’ve had success with blinking lights and a relay switch, but can’t get the temp sensor working. If I use the code included with Mixiaoxiao I get it to show up in HomeKit by simply adding my WiFi credentials. Here’s where the problem begin, it shows different values every 10 sec, anything between 10-30 degrees.

I have no programming experience whatsoever, but I’ve been reading and trying a bunch of stuff already. From what I can see in the code, changes must be made to the part about temp values, I’ve tried adding the numbers -45 and 125, but no luck. I’ve pasted code from some random person who had this problem also, no luck. I have no idea what I can do right now.
I also installed the Arduino library DS18B20 and added the .h file, but that just keeps getting error about duplicates, but when removing them some other error comes up.

Also, ” define your accessories here” what the heck does that even mean, and what should I put there?

Hope someone can help a total noob with this, cause it’s a code jungle out there and I just can’t grasp it.

Thanks.

@putnik161
Copy link

void my_homekit_report() {
// FIXME, read your real sensors here.
sensors.requestTemperatures();

float temperature_value = sensors.getTempCByIndex(0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants