Error: Action, Controller: could not convert string to float

Hi @KyleGabriel and @dookaloosy , thanks for all the effort to make this custom input module. It really helps.

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

1 Like

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.

Okay great.

Attached is the input module I attempted to mesh together. I am running Mycodo version 8.9.2 and the database version is 110d2d00e91d.

ads1256_analog_ph_ec.py (27.2 KB)

And how exactly would I replicate the issue?

With the uploaded input module, when attempting to press any of the “calibrate X, slot Y” buttons, the error occurs.

*for the actions section.

Upgrade to master and see if the issue persists.

Issue is still persisting. Attempted the upgrade twice to make sure and the logs say it was successful. The database version is now 4fedeb57e75b.

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).

Thanks for all the help!

1 Like

You’re welcome. Please share the final version of your Input after testing and I’ll include it in the built-in set. Thanks.

1 Like