Any plan to implement Ethernet GW?
-
hey Martin.
Sorry, I've been traveling for a while.
So I just rebuilt my environment and I can't repro the issue anymore.
If you can't either and no one else is experiencing this I think we can close this down. My environment might be the only thing that is creating the issue.
If the issue happen again I can update with the new information.
-
hey Martin.
Sorry, I've been traveling for a while.
So I just rebuilt my environment and I can't repro the issue anymore.
If you can't either and no one else is experiencing this I think we can close this down. My environment might be the only thing that is creating the issue.
If the issue happen again I can update with the new information.
Great! Then I'll move forward and push my latest changes to my github branch. I'll post here when that is done. You're welcome to test these by the update instructions above.
If nothing comes up, my plan is to have this merged in the next release of home assistant.
-
Hi,
I've also tested your pymysensors version with tcp gateway. I've had an excessive cpu usage on my pi Zero (actually, a constant 100%). After some debugging I've found that I've had to add a sleep of 0.2 to the while loop of the top socket readout. My cpu usage returned normal.
What I've also encountered is that when the tcp gateway looses connection, pymysensors still thinks it's connected. I've buildin an active check by requesting the gateway version every 10 seconds.
Would you like me to make a pull request ?
-
Hi,
I've also tested your pymysensors version with tcp gateway. I've had an excessive cpu usage on my pi Zero (actually, a constant 100%). After some debugging I've found that I've had to add a sleep of 0.2 to the while loop of the top socket readout. My cpu usage returned normal.
What I've also encountered is that when the tcp gateway looses connection, pymysensors still thinks it's connected. I've buildin an active check by requesting the gateway version every 10 seconds.
Would you like me to make a pull request ?
Thanks for the feedback!
I've got some commits that are not pushed yet with some changes, but a pull request should be good anyhow. Great!
-
I've updated the branch at my fork of pymysensors. If you have installed the ethernet branch of my fork of home-assistant, you should uninstall/reinstall that, or just make a new virtual environment and install again. You should remove the lib directory in your home assistant config directory as well.
Eg:
rm -r ~/.homeassistant/lib mkvirtualenv -p /usr/bin/python3 hasstest2 cd ~/dev/home-assistant git branch -D mysensors-tcp-gateway git fetch origin mysensors-tcp-gateway git checkout mysensors-tcp-gateway pip3 install -e . pip3 install colorlog pip3 install python-LevenshteinI've now pushed some updates to my ethernet gateway branch of pymysensors and rebased my home-assistant mysensors-tcp-gateway branch off latest upstream dev branch and pushed that to my github.
To upgrade follow the instructions below.
@martinhjelmare said:
I've updated the branch at my fork of pymysensors. If you have installed the ethernet branch of my fork of home-assistant, you should uninstall/reinstall that, or just make a new virtual environment and install again. You should remove the lib directory in your home assistant config directory as well.
Eg:
rm -r ~/.homeassistant/lib mkvirtualenv -p /usr/bin/python3 hasstest2 cd ~/dev/home-assistant git branch -D mysensors-tcp-gateway git fetch origin mysensors-tcp-gateway git checkout mysensors-tcp-gateway pip3 install -e . pip3 install colorlog pip3 install python-Levenshtein -
Hi,
I've also tested your pymysensors version with tcp gateway. I've had an excessive cpu usage on my pi Zero (actually, a constant 100%). After some debugging I've found that I've had to add a sleep of 0.2 to the while loop of the top socket readout. My cpu usage returned normal.
What I've also encountered is that when the tcp gateway looses connection, pymysensors still thinks it's connected. I've buildin an active check by requesting the gateway version every 10 seconds.
Would you like me to make a pull request ?
Please rebase your pymysensors branch off my latest updates, before you make the PR. Thanks.
-
Hi,
I've also tested your pymysensors version with tcp gateway. I've had an excessive cpu usage on my pi Zero (actually, a constant 100%). After some debugging I've found that I've had to add a sleep of 0.2 to the while loop of the top socket readout. My cpu usage returned normal.
What I've also encountered is that when the tcp gateway looses connection, pymysensors still thinks it's connected. I've buildin an active check by requesting the gateway version every 10 seconds.
Would you like me to make a pull request ?
I went ahead and added your fix for the 100% cpu usage. Although I settled for a very short 0.02 seconds. It was enough for my intel based processor. If you still experience problems and think we should increase it, let me know.
Please make a PR for the check of the connection here https://github.com/theolind/pymysensors if you have time.
My plan is to try and have this make the release of home assistant that is planned during this week. I think it should be good enough for a first version now. We can add polish for the next release.
-
I see HA got released early, and that the ethernetgateway was added. I'll check it out later on tonight but, thanks again for all the work you do on the MySensors project.
-
I see HA got released early, and that the ethernetgateway was added. I'll check it out later on tonight but, thanks again for all the work you do on the MySensors project.
Yeah, finally! I've been a bit disappointed with myself, that it took a long time and for not finishing this earlier, but now it feels good to have it merged. We still have to polish some things, like checking that the connection is still ok, so all feedback is very welcome and valuable.
I need to update the docs at home-assistant.io, and then I might make a new post about the release.
BIG THANKS to everyone that tested this:
@drock1985
@Dave-Dan
@Andrew-Sanjanwala
@subutux -
@martinhjelmare As soon as i have the time (and clean up my code because it was a hack) i'll create a pull request. i've mine also at 0.02 and my (pi zero) CPU is now at around 8-10%.