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

Raspberry Pi 4 Requires latest wiringpi needs 2.52 #689

Closed
chitters2004 opened this issue Sep 17, 2019 · 31 comments
Closed

Raspberry Pi 4 Requires latest wiringpi needs 2.52 #689

chitters2004 opened this issue Sep 17, 2019 · 31 comments

Comments

@chitters2004
Copy link
Contributor

chitters2004 commented Sep 17, 2019

Attempts to manually update before mycodo installation are reverted.

Attempts post installation fail to update.

http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/

https://project-downloads.drogon.net/wiringpi-latest.deb

@Theoi-Meteoroi
Copy link
Contributor

I think it is also important to mention Gordon's post about WiringPi.

The End of Everything as we know it

I work as a support guy in my day job. And to see folks that give support for no charge really seems a charity and act of kindness. I enjoy helping where I can however I have no expectation of the author to figure it out for me, or to train me in the methods required to use the code.

This code runs in a python virtualenv. There is your first clue. Now read the installation script.

Open Source is participatory, not a spectator occupation.

@kizniche
Copy link
Owner

@chitters2004 What are you using wiringpi for? Are there any alternatives?

@Theoi-Meteoroi That was a depressing read, but thanks for sharing it. I've felt the same way at times. Fortunately I still find Mycodo worth the effort to keep it open and up to date. Besides knowing the software helps a lot of people, it's the little things like this that keep me motivated.

@chitters2004
Copy link
Contributor Author

When using rasPi 4 unable to get readout with i2cdetect -y 1 . When I updated wiring pi it worked but then mycodo install reverted it with no obvious way to me to update again.

@kizniche
Copy link
Owner

Are you using the ads1256 that you need this for, or something external from Mycodo?

@kizniche
Copy link
Owner

Oh, I see i2cdetect. Let me see.

@kizniche
Copy link
Owner

kizniche commented Sep 20, 2019

The only place wiringpi is installed is during the initial Mycodo installation, and if the ads1256 Input is installed. Otherwise, only if the ads1256 is installed, it will upgrade the wiringpi Python library when the Mycodo upgrade happens. It doesn't seem like the upgrade caused the issue if you didn't have the ads1256 Input module installed.

@chitters2004
Copy link
Contributor Author

oh damn, i meant gpio readall

@chitters2004
Copy link
Contributor Author

has a board error returned until I updated it to 2.52

@chitters2004
Copy link
Contributor Author

chitters2004 commented Sep 20, 2019

and was unable to activate GPIO outputs

@kizniche
Copy link
Owner

I didn't think RPi.GPIO that's used to switch the GPIO pins depended on wiringpi. Let me look into that.

@kizniche
Copy link
Owner

Or are you referring to switching GPIO pins outside of Mycodo, with the gpio executable?

@kizniche
Copy link
Owner

Since wiringpi is being deprecated, I might just remove it entirely from Mycodo and let the user decide to install it. That will remove conflicts with user configurations. The only purpose of wiringpi in Mycodo at the moment is the as1256 Input, and I believe it's entirely handled by the wiringpi Python module that's installed inside the virtualenv, so the build/install from https://github.com/WiringPi/WiringPi-Python that's performed in the install/setup.sh during the initial installation is likely unnecessary.

Let me know if you were referring to GPIO manipulation outside of Mycodo. If so, I'll see about removing the winringpi install during the Mycodo install.

@chitters2004
Copy link
Contributor Author

All was working well, tried to get GPIO output to relay but nothing was happening. Found the error in mycodo system info. googled the error, it pointed to wiring pi, so tried to update that but it stayed at the same version. Did a fresh flash, tried gpio readall and got the same unidentified board (17 error), when i installed latest wiringpi it gave me the output.

@chitters2004
Copy link
Contributor Author

Will do a fresh install on rPi 4 later and see if i can replicate

@kizniche
Copy link
Owner

Can you also paste the error you get?

For reference, this is also the only reference to gpio I can find in Mycodo:

"gpio readall", stdout=subprocess.PIPE, shell=True)

@chitters2004
Copy link
Contributor Author

I believe it was

Oops - unable to determine board type... model: 17

@chitters2004
Copy link
Contributor Author

People online were having problems when 3b came out too and solved by updating wiringpi

@chitters2004
Copy link
Contributor Author

The error appeared here:

Annotation 2019-09-21 000905

@kizniche
Copy link
Owner

kizniche commented Sep 20, 2019

I just updated the wiringpi install script section to install from the deb instead of building from source. If you have time, can you fresh flash Raspbian and fresh install Mycodo to see if everything works out of the box? Here's how to install from master:

cd
apt install git
git clone https://github.com/kizniche/Mycodo
sudo /bin/bash ~/Mycodo/install/setup.sh

@kizniche
Copy link
Owner

But it would be beneficial to know if the Mycodo Outputs were really affected rather than maybe you caught an update I made that fixed it between your testing installs. If you have the error from the log, that would be helpful.

@chitters2004
Copy link
Contributor Author

I have a raspi4 fresh install from last night, checking it now

@chitters2004
Copy link
Contributor Author

Annotation 2019-09-21 001537

@kizniche
Copy link
Owner

But do the Outputs work from within Mycodo?

@kizniche
Copy link
Owner

kizniche commented Sep 20, 2019

If it's only the "gpio readall" command that's impacted, that's pretty minor and I can replace that on the /info page with software that's still maintained.

@chitters2004
Copy link
Contributor Author

log file looks ok when i set up dummy output with nothing connected. If it makes a difference to have an actual output connected i can check tomorrow.

@chitters2004
Copy link
Contributor Author

Shall I do that before testing master update?

@kizniche
Copy link
Owner

kizniche commented Sep 20, 2019

If it turns green when you click ON it's likely working, because the status indicator (red/green color) is determined directly from RPi.GPIO reading the pin state. So it appears it's just "gpio readall" that's affected in Mycodo. But please do test with a multimeter or relay when you can. I don't yet have a Pi4 to test with.

@kizniche
Copy link
Owner

A master upgrade won't affect the currently-installed wiringpi, so you can do that and still test later.

@chitters2004
Copy link
Contributor Author

sorry, I meant fresh install after testing the outputs on 7.7.6

@kizniche
Copy link
Owner

If your Outputs turn on in Mycodo with 7.7.6, then it's not too important to do a fresh install, because I'll be looking for a replacement for wiringpi, as it's no longer maintained.

@chitters2004
Copy link
Contributor Author

Ok, will do a test tomorrow anyway and then keep my pi4 current with latest as test platform alongside 3b+

@kizniche kizniche closed this as completed Oct 3, 2019
kizniche added a commit that referenced this issue Jun 14, 2020
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

3 participants