Hi im kinda new in the mushroom community and are trying to set up an automatic humidity and temperature controll for my cultivation. The measurment works fine:
But after i set up the outputs via shell skript and connecting them with the sensor via a PID function i cant get the system work properly. The outputs are always set to off and there is no regulation. I dont get any P, I or D values. Right now i manually switch the power of the humidyfire off and on same with the heater.
I use a Tasmota NOUS A4T with two power connectors therefore Power 1 and 2 in the link. I can turn them seperatly off and on via mycodo. Here the outputs:
Sounds like youâre making things much more complicated than they need to be.
Why are you setting up your outputs via a shell script?
Are you using outputs that arenât supported by Mycodo?
Looks like some of the screen shots you intended to post are missing?
If youâre new to Mycodo, you will be much better off using Bang-Bang controllers to control temperature and humidity than trying to use PID controllers.
Thanks for the help I couldnât put in more pictures because my account is too new, so I was limited to adding only one screenshot.
The power supply Iâm using was not in the selection of output devices, but Tosmata was preinstalled. So I connected the power supply with mykodo via a shell script. It works fine, but I couldnât get the PID running.
The Bang-Bang Function, on the other hand, works just fine. So thank you very much again! I was kind of overthinking the system, I guess.
If your Output is connected to a device running Tasmota you can try using the MQTT options in Mycodo for controlling that device as well. You would need to setup an MQTT Broker like Mosquitto on the same Pi running MycodoâŚ
And then setup your OutputsâŚ
I have many devices running Tasmota and use MQTT to communicate with and control all of them with Mycodo.
I tried MQTT but couldn´t trigger the two outputs of my Tasmota device separately so I sticked with the Shell Skript. But to be fair I didn´t put that mutch time in figuring out how MQTT works. Is MQTT the long term better solution?
I would say that MQTT is the more standard solution, it is used extensively in industrial systems integration and automation. This is just one reason Tasmota is designed specifically to use MQTT and HTTP as itâs primary modes of communication with external systems. If you want to take full advantage of all the available remote-control features of your Tasmota Device, Iâd recommend using MQTT. There is a little learning involved since itâs designed to handle some complex scenarios, but for the most part itâs pretty straight forward and easy to setup once youâve learned the basics⌠and simpler than having to write custom scripts.
Hereâs the Tasmota documentation for MQTTâŚ
For the Tasmota NOUS A4T⌠the MQTT Topic for the power outlets should be something likeâŚ
âcmnd/tasmota/POWER1â
âcmnd/tasmota/POWER2â
and the payload would be âONâ or âOFFâ.
If you already have an MQTT server like Mosquitto set up on your Raspberry Pi, I also recommend installing a diagnostic app like MQTT Explorer on your laptop or desktop so you can visually monitor the actual MQTT Topics that your devices are sending to the MQTT server⌠this makes things easier to understand as well as making setting up Tasmota and Mycodo easier.
I notice you enabled setpoint tracking using the same measurement as the measurement value, which doesnât make sense. Why was this done?
You also have a measurement max age of 60 seconds set⌠Is your input measuring every 60 seconds or sooner? You will see âcannot obtain measurementâ errors if youâre trying to sample faster than your input is acquiring measurements.
I dindn´t do it on purpose. It was kind of a play and find out how the system will react if I change a specific value. I think i have to learn more about the PID functionality in order to set i up correct.