Add Digital Temp Sensor For PI 3

Can we get a digital temp sensor for the pi 3 added to the sensor list.

Hi & welcome to the nymea forum,

what kind of temperature sensor do you mean? I wrote an OWFS plug-in, that adds 1-Wire temperature sensors and will come with the next release:

Simon Stürz wrote a Hackster article where he used various I2C sensors on a Raspberry Pi to create an open source sensor station:

I am trying to use a DS18B20 1 wire temp sensor. I can get it to work in debian but I dont know how to get that data into Nymea. I will also be using a GREDIA water flow sensor and I feel I may come across the same issue when I get to that point. Maybe I can output the data to a serial port then read it back into Nymea from that?

The project is a hot tub. I went with a PI 3 a+ before I got into Nymea and saw that there is more plugins for the UniPi. I have the PI 3 so I would like to get it to work. I have not got to the temp set points and adjusting them with buttons yet so that should be fun as well. I am a network admin not a programmer so this is new and alien for me but here we go.

The DS18B20 temperature sensor will be supported with the next release. The water flow sensor has hall sensor included, for that a GPIO counter is necessary. The Raspberry GPIO library is currently being reworked, might be a good chance to get the counter function included. @simon.stuerz

Do we know when the next release will be?

We have a pre-release “landing” channel where the 1-Wire plug-in will be released within the next days. I can’t tell yet when the counter will be ready. @simon.stuerz can you give an estimation?

I recommend to start with controlling the relays, get familiar with the rule engine, and extend the system one by one.

Using the counter should be quiet easy with the new libnymea-gpio. That lib offers you 2 classes:
Gpio: allows you to configure a GPIO and set the value, read the value and so on
GpioMonitor: this class is what you need. It configures the Gpio as input an gives you an interrupt signal each time the Gpio value changes.

In your plugin you can create a timer of with a 1 second timeout, and count a variable each time a Gpio Interrupt occurs, and reset the variable after one second. Do you have the source code somewhere, than I could help you with the code, which might be easier :slight_smile:

I’ve extended the Raspberry Pi GPIO plug-in with a Counter device class. It displays you the pulses per second in Hertz [Hz]. I don’t know the conversion factor of your flow sensor, but if it is 1000 pulses per liter, and the device states 10 hertz then the water flow is 0.01 liter per second or 0,6 liter per minute.

See the release progress here:

The onewire plug-in has been released!