I am using the same sensors but with the ADS1256 AD/DA converter. I am not the greatest coder but have made an input using your new input module and the ADS1256 input module’s code. It seems to be working fine for manual calibration but the automated calibration feature returns the error:
Action, Controller: could not convert string to float
Any advice on a possible fix would be great. I would attach my code but it won’t allow me as a new user. Thanks
Hi. I split this into a new thread since it’s a new issue. For any issue related to code, we’ll need to see the code to be able to diagnose the issue. Please attach the entire module file. Also, what version of Mycodo and database version are you running? This can be found on the /info page.
Your adc_calibration is included in the custom_actions list. It needs to be in the custom_options list. Only items relevant to the action should be in custom_actions. Since adc_calibration is an option that’s only used during activation of the Input, it’s an option. The reason for the error is that action options of type “select” are not yet supported (however, they should be, so I just added it in case someone has a use for it).
Hi Kyle, unfortunately, I have not had an opportunity yet to attempt to debug the code. The channel selection is faulty and only ‘channel 0’ and ‘channel 1’ work for pH and EC. In the meantime, I have attached the working code if anyone is able to solve the issue. I will try to get to it in the coming weeks. analog_ph_ec_ads1256.py (27.3 KB)
Give this one a try. This allows the pH and EC to be set to any of the 8 channels as well as allowing voltage to be measured from the other channels. Conversions should also work, but if you change the pH or EC channel, the conversion should be reset and you’ll have to set it again. Let me know if there are any issues. If everything works as expected, I’ll include it in the next release.
Hi Kyle, the channels are interchangeable now and working (mild testing done) - thank you. However, when attempting to calibrate the pH and EC slots, this error is shown. My previous custom input is still calibrating correctly.