Skip to content

Update adafruit_espatcontrol_socket.py #53

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

Merged
merged 3 commits into from
Mar 1, 2022

Conversation

sidikalamini
Copy link
Contributor

I got error when using adafruit_espatcontrol_socket.py and adafruit_minimqtt when I use port 1883 for MQTT, it is due to connection type is not defined for port 1883

Traceback (most recent call last):
File "code.py", line 117, in
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 447, in connect
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 270, in _get_connect_socket
File "/lib/adafruit_espatcontrol/adafruit_espatcontrol_socket.py", line 85, in connect
File "/lib/adafruit_espatcontrol/adafruit_espatcontrol.py", line 202, in socket_connect
RuntimeError: Connection type must be TCP, UDL or SSL

I propose to add conntype TCP for port 1883 in the condition

I got error when using adafruit_espatcontrol_socket.py and  adafruit_minimqtt  when I use port 1883 for MQTT, it is due to connection type is not defined for port 1883

Traceback (most recent call last):
  File "code.py", line 117, in <module>
  File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 447, in connect
  File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 270, in _get_connect_socket
  File "/lib/adafruit_espatcontrol/adafruit_espatcontrol_socket.py", line 85, in connect
  File "/lib/adafruit_espatcontrol/adafruit_espatcontrol.py", line 202, in socket_connect
RuntimeError: Connection type must be TCP, UDL or SSL

I propose to add conntype TCP for port 1883
Copy link
Contributor Author

@sidikalamini sidikalamini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add missing :

@ladyada
Copy link
Member

ladyada commented Mar 1, 2022

hiya! thanks so much for submitting a PR! we can review & merge PRs once they have passed continuous integration (CI). that means that code is 'linted' - that means it is formatted and passes basic structure tests, so that we maintain the same text formatting for all new code
if your code isnt passing, check the CI output (click on the red X next to the PR to scroll through the log and find where the error is

here is a tutorial on pylint and black: https://learn.adafruit.com/improve-your-code-with-pylint

and overall how to contribute PRs to circuitpython: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github

once you get that green checkmark that indicates CI has passed, please comment reply to this post so we know its time for another review (we may not get notified on CI pass and miss that its time to look!)

@sidikalamini
Copy link
Contributor Author

correctly formatted comment

@ladyada ladyada merged commit 06b2a11 into adafruit:main Mar 1, 2022
@ladyada
Copy link
Member

ladyada commented Mar 1, 2022

thanx!

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 4, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 5.4.0 from 5.3.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#98 from tekktrik/dev/add-suspend-mode
  > Fixed readthedocs build

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol to 0.6.3 from 0.6.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP_ATcontrol#53 from sidikalamini/patch-1
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_INA219 to 3.4.12 from 3.4.11:
  > Merge pull request adafruit/Adafruit_CircuitPython_INA219#30 from tekktrik/doc/fix-note
  > Fixed readthedocs build
  > Consolidate Documentation sections of README

Updating https://github.com/adafruit/Adafruit_CircuitPython_CursorControl to 2.7.0 from 2.6.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_CursorControl#34 from flom84/pygamer-start-select-buttons-debouncer
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

Successfully merging this pull request may close these issues.

2 participants