This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New OpenPlotter GPIO app available
#31
(2021-02-03, 12:21 AM)smartsailingboat Wrote: I made a tutorial here: https://www.youtube.com/watch?v=XFOGrBmDhJg

WOW! Excellent video!!!
 
Reply
#32
I have s strange issue with the GPIO app, when adding a 1w sensor.
1w is enabled in raspberry config, and there is signalk approval.

However, when I set 1w gpio and choose the pin number and click OK. Nothing is added in the 1w tab of the GPIO app.
In /boot/config.txt the line dtoverlay=w1-gpio,gpiopin=6 is added.

When Openplotter starts, the checking process for GPIO says:

Checking GPIO... | Access to Signal K server validated | pigpiod not running | 1W disabled | GPIO service not running


- Anybody know why the sensor is not added, is the line only added if the sensor is found and connected properly?
- Are pigpiod and gpio service only running if 1w and Seatalk1 are configured properly?

When I check if the sensor is found in the terminal I get:

Code:
pi@openplotter:~ $ cd /sys/bus/w1/devices/
pi@openplotter:/sys/bus/w1/devices $ ls
00-400000000000  00-800000000000  w1_bus_master1

So I know it is connected properly.
However this only works if in config.txt the default line dtoverlay=w1-gpio is added, the minute ,gpiopin=6 is added, I cannot see the DB18B20 anymore.


- Is this because it is claimed by the GPIO app? So then I can't see it?
- Or, do I have the wrong GPIO pin? I must point out that I have a compute module CM3+ and for another python script (node-red-pi-gpio) I had to switch to BCM mode instead of GPIO mode. Does it have something to do with this?

Hope anybody can assist.

Ah, maybe 00-400000000000  00-800000000000 is just the master / slave bus of 1w? And not the sensor itself?
In that case I have to check if indeed connected properly.
Still wonder though why the are no rules/lines added in GPIO app.
Reply
#33
@Sailloog, I am getting some odd behavior from the GPIO app. In my previous installation al was working fine, that is 1 month or so ago. I decided to do a complete reinstall of OpenPlotter from scratch to make sure everything is tidy and clean moving forward. 

So far so good on all accounts but the GPIO app. I can't get it to launch. I have installed it via the Setting Panel (and un-installed and re-installed a few times) but every time I click on it to open the App and set my 1-wire settings for my DS18B20 temp sensors, I get the hourglass icon for 3-5 seconds and then nothing happens. The App does not launch. Other apps like the i2C are launching fine.

Also, when I run the Check System, I am told, "Checking GPIO... | pigpiod not running | 1W enabled | GPIO service not running".

https://imgur.com/2tgj27f

I checked the GPIO pin map and it appears to see that I have 1-wire devices on Pin #4. 

https://imgur.com/rLqyYal

https://imgur.com/SL47iZn

I have enabled read/write permissions from SignalK Admin.
https://imgur.com/zgESyDz

Any idea what could be going on? I noticed the previous reply to this thread posted a few days ago mentions something similar. 

Thank you so much for your help. 
Sincerely,
Emmanuel
Reply
#34
I can confirm, I have the same issue. Seems to happen only when the sensor is connected. When disconnected, it will open.

Update:

When removing the line "gpio=6" in /boot/config.txt for the 1w interface seems to resolve the issue, that the app is not opening. So, 1w is still enabled, but just not assigned to a pin.
I have tried two separate sensors, doesn't seem to be a broken sensor or something. I can detect them from the terminal, they both have a separate unique address.
It's just like gpio=6 is causing some kind of trouble?

Update:

Tried gpio 4 , even though there is not connected anything to it. This works, but no line is added.
Tried gpio 6, with sensor connected, app will not start
Tried gpio 6, without sensor connected, app will start
Reply
#35
I did some test and can confirm the GPIO app does indeed launch when I disconnect the 1-wire sensors. The 1-wire sensor setup is properly setup as it was working perfectly before I did a fresh re-install of "OpenPlotter Starting"

I have not played around with GPIO pin numbers as Jamos in previous reply has. I am using this stock setup in my boot/config file

dtoverlay=w1-gpio

https://imgur.com/fHBE4K4

Thanks
Reply
#36
I think I have found the bug, that line in config.txt needs a new line after and right now the script is not adding it.
This will be fixed in the next release next days.

when only this line is defined in config.txt the default pin is GPIO 04:

Code:
dtoverlay=w1-gpio


If you want to set a different pin, for example GPIO 06, this line should be:

Code:
dtoverlay=w1-gpio,gpiopin=6


Try to manually add an empty line after this, reboot and check if it works.

some advices:

We use BCM to name pins in code: https://pinout.xyz

Do not forget to add the resistor:

[Image: DS18B20_sensors.png]
Reply
#37
Thanks Sailoog,

Quick question. My setup is already all soldered on Pin 4. I use 3 temp sensors as per your schematic and I have it all soldered exactly as per the schematic. (it was working perfect before my re-install of OpenPlotter)

This extra line you will add in next few days, will it solve the problem of app not opening for my case as well, or only for cases where one is wanting to use a different GPIO pin?

As always, thank you for your help. This whole OpenPlotter system is incredible.

UPDATE: I have added an extra empty line below 

dtoverlay=w1-gpio

in my config file. I have rebooted. 
This has not solved the issue, I cannot open the GPIO app unless I disconnect all 3 temp sensors. 

Cheers
Reply
#38
In your case you need just this line in config.txt with an empty line after it:


Code:
dtoverlay=w1-gpio

this line is added automatically when you enable "1-Wire" in preferences-raspberry configuration-interfaces

after reboot try to open the GPIO app and check if everything is working as expected.

if GPIO apps does not open, open a terminal and type openplotter-gpio. Copy here if you get any error.
Reply
#39
Thanks, I actualy moved the 
dtoverlay=w1-gpio
command to the bottom of my config.txt file and created two lines below it

https://imgur.com/8ZL6KJq

I rebooted, and can not start the GPIO app.

I opened a Terminal and ran openplotter-gpio command

this is output:

Code:
Traceback (most recent call last):
 File "/usr/bin/openplotter-gpio", line 11, in <module>
   load_entry_point('openplotterGpio==2.1.0', 'console_scripts', 'openplotter-gpio')()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 660, in main
   MyFrame().Show()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 97, in __init__
   self.onRefresh()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 209, in onRefresh
   self.readOneW()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 375, in readOneW
   self.listOneW.Append([sensor.type_name,sensor.id,sk,rate,offset])
AttributeError: 'W1ThermSensor' object has no attribute 'type_name'
Reply
#40
In my case the extra line was already there, app is not starting.
Manually starting gpio outputs:

Code:
pi@openplotter:~ $ openplotter-gpio
Traceback (most recent call last):
 File "/usr/bin/openplotter-gpio", line 11, in <module>
   load_entry_point('openplotterGpio==2.1.0', 'console_scripts', 'openplotter-gpio')()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 660, in main
   MyFrame().Show()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 97, in __init__
   self.onRefresh()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 209, in onRefresh
   self.readOneW()
 File "/usr/lib/python3/dist-packages/openplotterGpio/openplotterGpio.py", line 375, in readOneW
   self.listOneW.Append([sensor.type_name,sensor.id,sk,rate,offset])
AttributeError: 'W1ThermSensor' object has no attribute 'type_name'

Not sure if I read correctly, but it seams to try to append a new sensor to the app and it can't because it is missing 'type_name' attribute.
And this seems to block the opening of the app? (Don't shoot me, I'm not a coder) haha
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)