kizniche / Mycodo

An environmental monitoring and regulation system
http://kylegabriel.com/projects/
GNU General Public License v3.0
2.96k stars 494 forks source link

MS-SQL data as an input. #1337

Closed tazomatalax closed 1 year ago

tazomatalax commented 1 year ago

Using SQL data to control a pH controller

Introduction

I had the idea to use the SQL data I am collecting from some bioreactors as an input for a pH controller based around Mycodo. I have already built a pump controller box using relays and am working on creating a custom output which will allow for a ramping dose rate.

Requirements

I would ideally have an input that can directly query the database and pull the latest value. The data is 1sec data points so should provide enough to control with, even if it is just one way (e.g. just base or just acid).

Options

I thought that using a bash script and using pymssql could potentially work but then thought it may be easier to have the InfluxDB 2 DB pull the data and serve it that way. Also, I had a lot of trouble getting pymssql installed on a 64bit OS RasPi CM4.

Question

Which leads me to the question... What is the default password for the InfluxDB 2.x database? I have tried multiple but can't log in to check if it has the capability to pull data from MS-SQL.

Conclusion

Any help would be appreciated.

kizniche commented 1 year ago

You can find the user/pass used during db creation here:

https://github.com/kizniche/Mycodo/blob/5429d1777694f5bf13f56bcb9d1c8a9909f3f3b8/mycodo/scripts/upgrade_commands.sh#L495