Integrate atlas scientific sensors with openhab 2 using raspberry pi 3 B+

Hello,

I have 3 atlas scientific sensors (PH, EC and RTD), and I need to integrate them with openhab 2 platform to get their measurements and take actions depended on these measurements, I have search over the internet for a solution to integrate atlas scientific sensors directly with openhab 2 but I have found just python code mentioned here https://github.com/AtlasScientific/Raspberry-Pi-sample-code

I have used the sensor under i2c mode with codes 99, 100 and 102 for PH, EC and RTD respectively to get the measurements through python code in i2c.pyhttp://i2c.py file.

My question is is there any sample code to integrate these 3 sensors with openhab 2 directly away from python code ? Or is there any integration that mixes openhab 2 and python to get results ? If not which platform you recommend to integrate with our three sensors ?

Best regards,
Omar

Perhaps this?

or this

Sorry, but you will have to write some code for that one
Shouldn’t be too hard
Start with that example script you have get the data from your sensor in your script
Then use MQTT in python (http://www.steves-internet-guide.com/into-mqtt-python-client/)
and add MQTT to your python script
Then use the MQTT binding (Read the docs) to send data to openHAB.

I think a NodeMCU or similar would be a nice fit.

program it to send a JSON object via MQTT in a single topic
use JSONpath transform to extract sensor values and log to openhab.

that way your pi can do what it does best

and you’re not bound by wires, but can use Wi-Fi

I have some code that works, but it’s not stable enough. maybe we can collaborate. I’ve been working on properly threading the sketch but seem to have broken something :stuck_out_tongue:

there’s also some code here which I found using google:

keen to hear about your progress!

Support could be added to my MQTTany software for these devices. Depending on your timeline I could add the support and get you to test it. I am currently working on another module right now but then will be making a generic I2C module that will open up support for any device over I2C.