Grove I2C Motor driver support

oh yes, that sounds good and more easy for me,
i love this forum, it is always very kind

1 Like

It works for the grove relay board as well

1 Like

I just updated the module You will need to upgrade to master if you want to test the yet-to-be released code. Please let me know if it works if you do test.

back with mycodo, motordriver vers. 07 is running
Vers. 08 dont work
Vers. 09 dont work, doesnt turn the motors

What is not working. Please post debug log and what you are testing (manual on/off, volumen, duration). And screendump of module settings.

Version 09 is not working, vers.07 is perfect: here is the log

2021-05-03 12:27:36,650 - INFO - mycodo.outputs.grove_i2c_motor_driver_v1_0_09_ffd6a25a - Initialized in 215.9 ms
2021-05-03 12:27:43,564 - ERROR - mycodo.daemon - Could not turn output on: '<' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/mycodo_daemon.py", line 810, in output_on
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/controllers/controller_output.py", line 275, in output_on_off
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/outputs/base_output.py", line 421, in output_on_off
    'on', output_channel=output_channel, output_type='sec')
  File "/home/pi/Mycodo/mycodo/outputs/custom_outputs/grove_i2c_motor_driver_v1_0_09.py", line 285, in output_switch
    if amount < 0:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
2021-05-03 12:27:48,403 - ERROR - mycodo.daemon - Could not turn output on: '<' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/mycodo_daemon.py", line 810, in output_on
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/controllers/controller_output.py", line 275, in output_on_off
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/outputs/base_output.py", line 421, in output_on_off
    'on', output_channel=output_channel, output_type='sec')
  File "/home/pi/Mycodo/mycodo/outputs/custom_outputs/grove_i2c_motor_driver_v1_0_09.py", line 285, in output_switch
    if amount < 0:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Please tell me what to do now : a lot of errors appear with the atlas ph sensor, it has worked without errors before i set up mycodo the 2.nd

2021-05-03 12:32:43,515 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: 'utf-8' codec can't decode byte 0x80 in position 18: invalid start byte
2021-05-03 12:32:43,516 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Sensor read unsuccessful: 'utf-8' codec can't decode byte 0x80 in position 18: invalid start byte
2021-05-03 12:32:43,517 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2021-05-03 12:32:58,478 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: 'utf-8' codec can't decode byte 0xae in position 2: invalid start byte
2021-05-03 12:32:58,478 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Sensor read unsuccessful: 'utf-8' codec can't decode byte 0xae in position 2: invalid start byte
2021-05-03 12:32:58,478 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2021-05-03 12:33:13,460 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: 'utf-8' codec can't decode byte 0x90 in position 22: invalid start byte
2021-05-03 12:33:13,461 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Sensor read unsuccessful: 'utf-8' codec can't decode byte 0x90 in position 22: invalid start byte
2021-05-03 12:33:13,462 - ERROR - mycodo.inputs.atlas_ph_8776ba6b - Cannot set a value of None. Must be a float or string representing a float. Check the sensor and Input module is working correctly.
2021-05-03 12:33:28,524 - DEBUG - mycodo.devices.atlas_scientific_i2c_99_1 - AtlasScientificI2C raised an exception when taking a reading: 'utf-8' codec can't decode byte 0x80 in position 7: invalid start byte

Ahh, yes. I forgot that I changed that part myself. 09 is not working with manual buttons. In the new master you should be able to select the new “standard” grove 1.0 output. This should work and also have the ability to change i2c address on the device. You can delete all the 0x test versions then

After updating to master : i have a lot of issues and i dont know why,
ph shows some values, but stopped after a while. Is there an issue with the input modul ?
How can i check this ?

You would be better off, if you make a separate forum post for each issue.

As for the Grove 1.0 module, it looks like Kyle haven’t updated it with the latest changes yet. So it wont work as of now. Maybe use the 07 for now and change it in the future, when there is a stable release.

1 Like

Please only test the version on Github (acquired by upgrading to master), as this is the one I’m actively developing. Delete all other test modules you may have imported.

Agreed

Just pushed a fix to check if amount is None. Upgrade to master and see if it works. Thanks.

ok, i have tried the last motordriver with ability to change i2c adress
changing i2c is successfull, motors dont turn
now going back to Version 7
both boards are working now with different i2c adresse

here is the log:

TypeError: '<' not supported between instances of 'NoneType' and 'int'
2021-05-04 12:15:08,768 - ERROR - mycodo.daemon - Could not turn output off: '<' not supported between instances of 'NoneType' and 'int'
Traceback (most recent call last):
  File "/var/mycodo-root/mycodo/mycodo_daemon.py", line 769, in output_off
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/controllers/controller_output.py", line 275, in output_on_off
    trigger_conditionals=trigger_conditionals)
  File "/var/mycodo-root/mycodo/outputs/base_output.py", line 436, in output_on_off
    ret_value = self.output_switch('off', output_type=output_type, output_channel=output_channel)
  File "/home/pi/Mycodo/mycodo/outputs/grove_motor_driver_v1_0.py", line 311, in output_switch
    if amount < 0:
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Remember you need to upgrade to master to get the latest code. The error you pasted is the same one as you previously posted and indicates you did not upgrade.

You can see in your error, your line 311 references a line of code that is different from what currently exists on the master branch:

Hi Kyle, sorry I just saw this. As far as I know it is the same as from the old forum, so if you’ve made updates we should go with that new version. Unfortunately right now I don’t have my motors set up to test them easily. When I get them back up again I will run tests and give feedback. Glad to see this is making it into a release

1 Like