Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First time Relay Issue. #1037

Closed
GarthButt opened this issue Jun 22, 2021 · 9 comments
Closed

First time Relay Issue. #1037

GarthButt opened this issue Jun 22, 2021 · 9 comments

Comments

@GarthButt
Copy link

First time using a relay, Simply trying to setup an On/Off test.
I cant even get that right.
Heres the error i get.

ERROR - mycodo.outputs.on_off_gpio_b505ff69 - Output was unable to be setup on pin 11 with trigger=1: Only '=', '!=', 'is_()', 'is_not()', 'is_distinct_from()', 'is_not_distinct_from()' operators can be used with None/True/False
Traceback (most recent call last):

Ive tried many different GPIO pins. I cant seem to get any of them working.
Please send help :(

@kizniche
Copy link
Owner

Please paste the entire traceback

@GarthButt
Copy link
Author

2021-06-22 16:07:09,056 - ERROR - mycodo.outputs.on_off_gpio_b505ff69 - Output was unable to be setup on pin 25 with trigger=1: Only '=', '!=', 'is_()', 'is_not()', 'is_distinct_from()', 'is_not_distinct_from()' operators can be used with None/True/False
Traceback (most recent call last):
File "/home/pi/Mycodo/mycodo/outputs/on_off_gpio.py", line 187, in setup_output
self.check_triggers(self.unique_id, output_channel=0)
File "/var/mycodo-root/mycodo/outputs/base_output.py", line 552, in check_triggers
amount > Trigger.output_duration)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py", line 341, in lt
return self.operate(lt, other)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 301, in operate
return op(self.comparator, *other, **kwargs)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py", line 341, in lt
return self.operate(lt, other)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/orm/properties.py", line 424, in operate
return op(self.clause_element(), *other, **kwargs)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py", line 341, in lt
return self.operate(lt, other)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 831, in operate
return op(self.comparator, *other, **kwargs)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/operators.py", line 341, in lt
return self.operate(lt, other)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/type_api.py", line 75, in operate
return o[0](self.expr, op, *(other + o[1:]), **kwargs)
File "/var/mycodo-root/env/lib/python3.7/site-packages/sqlalchemy/sql/default_comparator.py", line 92, in boolean_compare
"Only '=', '!=', 'is
()', 'is_not()', "
sqlalchemy.exc.ArgumentError: Only '=', '!=', 'is_()', 'is_not()', 'is_distinct_from()', 'is_not_distinct_from()' operators can be used with None/True/False

@kizniche
Copy link
Owner

kizniche commented Jun 24, 2021

Are there any Trigger Functions in use and if so, can you provide a screenshot of their settings?

Repository owner deleted a comment from Mibu92000 Jun 24, 2021
@GarthButt
Copy link
Author

Screenshot (7)

@GarthButt
Copy link
Author

this is the only function im trying to perform, a simple on/off

@kizniche
Copy link
Owner

That's the Output page... Is there nothing on the Function page?

@GarthButt
Copy link
Author

no i have not set up any functions. im merely trying to turn on and off an LED now.
do i have to use functions to test the pins activation of relays?

@kizniche
Copy link
Owner

I have never seen this issue before and I cannot reproduce the error. I just pushed a change that adds try/except blocks to the trigger checking function that is causing an error in your case. To be clear, this is not a fix for the error you're experiencing, but the error will now no longer prevent the output from operating. I encourage you to read the New Bug Report Issue Template and provide the necessary information that will help in diagnosing and fixing the actual issue. If you can provide this information, do not open a new report, just put the information in a new comment in this issue.

@kizniche
Copy link
Owner

kizniche commented Jul 2, 2021

Also curious, why did you delete your user GoldiLauchs from #1033 only to create another one for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants