I2cdevices plugin

Hi,

I added a ads1115 to my raspberry pi and hoped I could read the 4 inputs in nymea.

I2cdetect recognizes the ads115 and a small python test reads the values.

Where in nymea can I adres these inputs? The plug-in is installed, but cannot find the i2cdevices in the adding things.

Hope someone knows …

Regards,

André

I think this is what you want…

1 Like

Yes that’s the one. Searching for i2c, but the thing is named ADS. Could have figured that one out :see_no_evil:

Not sure if this is easy to use. I want to connect ph, orp and dissolved oxygen sensors to the analog inputs. And with those values I want to display at the screen. Maybe I should dive into creating plugins for these sensors.

Thanks so far!

Indeed, extending the generic things plugin with those sensors would be in order now… It’s pretty easy to do, I can take care of that. However, I must admit that its the first time hear of ORP sensors. Is mV (milli Volt) the proper unit for such a thing? Also what would be appropriate for the dissolved oxygen sensor? PPT?

The sensors I want to use for my pond (koi) are the ones from atlas. Atlas sensors were very expensive, but they have some new ones which are a lot cheaper (gravity).

PH: Gravity™ Analog pH Kit | Atlas Scientific
ORP: Gravity™ Analog ORP Kit | Atlas Scientific
Dissolved Oxygen: Gravity™ Analog Dissolved Oxygen Kit | Atlas Scientific

The supplied links provide also some documentation about these sensors. PH sensor for example measures in volts.

Hope this helps. I am going to place the order this or next month, so I will be available for testing purposes.

Regards and have a nice weekend,

André

Ok, gotcha. With those datasheets I’ve understood how those values work. Thanks.

We wouldn’t need special plugins for those devices as they’re standard analog sensors and should work fine with the TI ADS115 you have. What we need though are generic things for PH, ORP and O2 which would convert the voltage reading from the ADC to the appropriate scale for the sensor type and allow calibration.

You can find a complete tutorial how you’d set this up here: https://www.hackster.io/michael_zanetti/smart-gardening-without-coding-all-free-and-open-source-76b126

1 Like

Thanks! I will dive into it!

Regards,

André

Ok. I’ve added interfaces and generic things for all 3 of them. They can be connected to the ADS115 pins in the thing settings and allow calibration there by adjusting min/max values.

Also added some icons for them in the app.

Will add this to experimental now and should be released with 0.29 then. Let me know how it goes.

1 Like

Thanks! Will post my findings here. I have a cheap PH sensor from aliexpress and there is an ORP sensor on its way, so some testing will be done soon.

I think the Atlas sensors are the ay to go, but fo testing purposes the current sensors are ok.

Regards,

André

Hi,

I updated the system with the Experimental 0.29.

I can install the sensors, but I don’t see the nice icons (never mind the icons; if I don’t have some values the icon isn’t displayed I guess …) and more important, the sensors do not function. I tested the ADS115 with the generic temperature sensor and all went well. Now with the PH, ORP and O2 sensor in place no action on the sensors. They are attached to the ads115 channels, but see no values on the sensors.

Logging isn’t showing any information either. Selected genericelements, genericthings, things & system .
Any ideas?

Hi @Foenky ,

so the reason why you aint seeing anything in the app is that you haven’t received the update yet (It’s not released to stable yet). On what platforms are you using nymea:app?

Anyhow, the screen may appear empty in your current state, however, if you go to “Details” from the menu in the upper right, you should see the values.

1 Like

Yes! That’s it! Nice we can tweak the input to calibrate!

I’m using the nymea:app on Windows, Raspberry Pi & Apple (iPhone & iPad)

1 Like

So, if you want to also see/test the new UI:

  • For Windows, you can download the latest beta from Index of /nymea-app/windows/beta
  • On the Rasperry Pi you could enable the experimental repository then you should get the update too

For iOS, unfortunately there’s no public beta, you’ll have to wait for the 0.29 release to get that there.

1 Like

Great! Works!

It would be nice to have a slidebar for calibration purposes in the details pane. I thought the input value slidebar did this trick. Now you can achieve this by changing the max and min values of the sensor.

Regards,

Andé

Right. the input value is the one that is connected to the ADS1115. So whenever the connected channel on the ADS1115 changes its value, nymea will transform that to a percentage and write that to the input, nothing to do with calibration.

The calibration happens in the settings as you’ve figured out. The reason why there isn’t a slider but instead a spinbox is because it has no min/max values… A slider limits its range by its nature, the spinbox is open end. I didn’t want to limit the calibration because I’m sure at some point someone will appear and say the range is not big enough for his particular use case. I’m open for changing that though if someone convinces me that e.g. a range of -20 - +20% will always be enough for anyone…

1 Like

Fair enough! I can live with that.

Alight last messge:

When you add the sensor to your favorites, it would be nice that the value is displayed in the bottom of the icon like the temperature sensor does.

Regards,

André

Good one. thanks. Will fix that!

1 Like

done. it’s on the beta channels now

1 Like

And checked!

image

Regards,

André