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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ver 3.x I2C connections.
#1
I have a question on I2c connections. I have the i2c turned on in the pi, and installed from settings. Wanting to monitor inside temperature and humidity with a bmp 280.

Had it hooked up last year on the old version, got it set up but never got data. This year in version 3 the I2C  setup page is dead. Have two different manufacturers sensors and both act the same.

just wondering if the I2C routine is not active yet, or I've made a mistake somewhere. 

latest openplotter, Pi 4b, pi-can M hat now hooked up to the Pi.
Thanks
Alan
Reply
#2
(2023-06-13, 08:54 PM)amckeown Wrote: I have a question on I2c connections. I have the i2c turned on in the pi, and installed from settings. Wanting to monitor inside temperature and humidity with a bmp 280.

Had it hooked up last year on the old version, got it set up but never got data. This year in version 3 the I2C  setup page is dead. Have two different manufacturers sensors and both act the same.

just wondering if the I2C routine is not active yet, or I've made a mistake somewhere. 

latest openplotter, Pi 4b, pi-can M hat now hooked up to the Pi.
Thanks
Alan

Hi Alan

Firstly you can't measure humidity with a BMP280, they only support pressure and temperature (and derived altitude of course). You'll need a BME280 for the three readings.

I don't understand when you say the I2C page is dead, can you elaborate?

I am using I2C 3.3.12 on a Pi 4 and have just set up a BMP280 as a test and it works fine. I've too many screenshots of the process to fit in one post so first let me try to explain by text:

In a terminal window run the command to find the address of your BMP280:

Code:
i2cdetect -y 1

You should (probably) see a 76 in the output grid which is the typical BMP280 address but it may differ on occasions but it would be uncommon.

Go to Openplotter>I2C and you will see a message at the bottom of the page saying the access request must be aproved (sic) etc

Go to Openplotter>Signal K and log in with the admin credentials. If you haven't already set this up then enable it now and log in.

Under the Security Tab you will see Access Requests at the bottom, click that, click the entry in the Identifier row, select NEVER and Read/Write in the Authentication Timeout and Permissions Respectively. Then Approve. 

Go to Openplotter>I2C and in the Sensors Tab click Add

Under Supported sensors click BMP280 and Detected addresses 0x76 (assuming yours is on that address), click OK

You should now see two lines, one yellow, one white. Left click on the white one and it turns grey, click Edit. Under Signal K key type environment.inside.temperature and hit OK. Now both lines are yellow.

Go to Openplotter>Signal K>Data Browser and you see the data for pressure and temperature.

I'll add a few screenshots in the hope it helps, I think the max is 5 in one post.

Good luck


Attached Files Image(s)
                   
Reply
#3

.txt   June 12 2023 check system.txt (Size: 2.19 KB / Downloads: 140)
Thanks very much. heading to the boat today and will try the setup again.
when I start the i2c routine, every button is non responsive. the chip is getting power, as the led lights up.

I've inserted the last system check i did. may be of use.
Alan
Reply
#4
(2023-06-14, 04:07 PM)amckeown Wrote: Thanks very much. heading to the boat today and will try the setup again.
when I start the i2c routine, every button is non responsive. the chip is getting power, as the led lights up.

I've inserted the last system check i did. may be of use.
Alan

Alan

That page is unresponsive because you haven't actioned the message at the bottom of the page. It requires you to grant permission.

This borne out by the results of your system check:

Checking I2C sensors... | I2C enabled | openplotter-i2c-read not running
↳The access request must be aproved with read/write permission in Signal K administrator.


Follow my steps to address that.

What I would say is be absolutely sure which sensors you have, are they BME280 or BMP280? If you try to set it up and pick the wrong one it won't work. Many sellers send out BMP280 when the buyer actually wants a BME280, they look so similar. Often the boards carry both E and P markings.

Have a look at yours, there is a small metal can on the PCB with a small hole in; is the can roughly square or is it clearly a non-square rectangle? Another clue but one which is a little less reliable is if the i2cdetect command shows an address of 0x77 in which case it is probably a BME280. BMP280s are normally 0x76. The shape of the can is the truer test.

I've done a test today with a BME280 and can let you have the results of that if you need it. It is almost identical to that for the BMP. If it is a BME then under Supported sensors you'd pick BME280 of course and you'd have three lines in the I2C screen, the additional one being for relative humidity.


Attached Files Image(s)
   
Reply
#5
Hi, I ran the i2cdetect command, and it returned the chip on x76. Checked and both chips are bme280. that's the good news. I tried again with the instructions you sent.  Opened signalk in chromium and logged in as admin on the signalk server.then started the i2c setup.  
. started i2c,  Click approve, do the next steps. click apply. click refresh and get the you must approve the request message. it's not storing the approve request. did this multiple times, sometimes restarting the server. got nowhere. Tried every combination I could multiple times.
Had taken an old 24" monitor down, in case the small 7" screen was not showing everything. hooked it up, and repeated everything. same thing. no visible missing items, like a save button.
took multiple screenshots but forgot them.
it looks like signalk server is not storing the approval. Not sure why. Wondering what I could have missed. Or what I might not have set up in the initial installation.  Wondering as i'm having problems in influxdb as well, all my signalk keys are setup, but cannot get any data.
is there a data connection in signalK I have to set up before the i2c?  That has to be done for the actisense ntg-1 or other serial device. I am getting data from the network, as opencpn has the gps position, and get the data on signalk instrument panel. it's set to log data.
Thanks for your help,
Alan
Reply
#6
Alan

You seem to be doing things in a different order to me.

"Opened signalk in chromium and logged in as admin on the signalk server.then started the i2c setup.  
. started i2c,  Click approve, do the next steps. click apply. click refresh and get the you must approve the request message. "

A lot has gone on there - log in, approve, next steps, apply, refresh etc all before you get the approve the request message.

In my sequence there is none of that, the very first thing to do in OP is to go to Openplotter>I2C and you should get the you need to approve the request message at the very first step. Close I2C for now.

After doing the above (Openplotter>I2C - get the approval request message), can you follow these 3 steps and show the equivalent of these screenshots on your system?

1. Go into OpenPlotter>Signal K with your admin credentials. In Access requests, double click the OpenPlotter I2C identifier, enter NEVER and Read/Write and click the big red approve button.
2. The system will return to the access requests page but it will (should) be blank as shown, there are no outstanding requests as below
3. Then reopen Openplotter>I2C and at the bottom is should say "The access request was successfully approved" as you can see.

Can we compare that with what you see so we can concentrate just on this particular issue at least as it is very relevant.

You ask ".. is there a data connection in signalK I have to set up before the i2c?", well all I can say is that I have never ever had to.



   
   
   
Reply
#7
(2023-06-14, 11:10 PM)amckeown Wrote:
Hi, I ran the i2cdetect command, and it returned the chip on x76. Checked and both chips are bme280. that's the good news. I tried again with the instructions you sent.  Opened signalk in chromium and logged in as admin on the signalk server.then started the i2c setup.  
. started i2c,  Click approve, do the next steps. click apply. click refresh and get the you must approve the request message. it's not storing the approve request. did this multiple times, sometimes restarting the server. got nowhere. Tried every combination I could multiple times.
Had taken an old 24" monitor down, in case the small 7" screen was not showing everything. hooked it up, and repeated everything. same thing. no visible missing items, like a save button.
took multiple screenshots but forgot them.
it looks like signalk server is not storing the approval. Not sure why. Wondering what I could have missed. Or what I might not have set up in the initial installation.  Wondering as i'm having problems in influxdb as well, all my signalk keys are setup, but cannot get any data.
is there a data connection in signalK I have to set up before the i2c?  That has to be done for the actisense ntg-1 or other serial device. I am getting data from the network, as opencpn has the gps position, and get the data on signalk instrument panel. it's set to log data.
Thanks for your help,
Alan

Hi,
For some reason, I'm not getting the access request shown on the left hand side. last one I get is users. To get the settings, I have to click the identifier line in the i2c panel, then I get the panel to fill in Never, read write and approve. Don't get the green access request approval line.

thanks
Alan
Reply
#8
Can't you scroll down to see the other two options, Devices and Access Requests?

"To get to settings, I have to click the identifier line in the i2c panel", whereabouts in the I2C panel do you see the identifier line? I can't see it. which "settings" are you referring to?

My I2C panel look like the attachment.

I have three systems here, all built with the latest updates for OS and OPv3, running on a Pi4 4GB, 64bit OS. I have tried the above procedure on all three and it works flawlessly. It's as if you and I are talking about completely different systems. I am trying hard to help but had naively assumed your panels, screens etc. looked like my screenshots but that is clearly not the case.


Attached Files Image(s)
   
Reply
#9
Hi,
I've attached a file with various screenshots. Sure doesn't give me the screens you have.
Is there a way to delete permissions and start over?
last week I reinstalled signalk when I started having difficulties with this.  didn't do anything, except loose some settings.

Thanks
Alan

.docx   I2c setup answers june 15 2023.docx (Size: 548.51 KB / Downloads: 156)
Reply
#10
Alan

Those screenshots are extremely useful, thank you. They are consistent with what I see which is refreshing (although settings are different of course on my system, the functionality is the same)

What they show is that there is no outstanding request to approve for I2C because you have completed it successfully. The little red square next to Access requests shown on p3 of your document is no longer there on p4. On p5 you see the message Device I2C has been approved too. Incidentally the never/NEVER distinction is crucial, this is linux after all. Lower case 'never' will not be accepted, you have to follow the format shown on the panel which is unambiguously upper case.

So we now know that your issue has nothing to do with the request for approval (although I have a niggling worry that you're saying this need to approve comes back again at some stage?). After pressing Approve on the request in Signal K whether the system declines your input (e.g if you put 'never') or accepts it, there is no message to the user from signal K. The most obvious indicator is whether that red square next to Access requests stays there or disappears. Yours has gone so we're OK. You can also see on the I2C panel on p2 of your document it says at the bottom "The access request no longer exists, press Refresh". Interestingly you say you pressed Refresh and it came up with a signal K screen. I am baffled by that but it may be a red herring.

Then next steps then are just to try to add one of your sensors. As I said you really want to be sure about what you have. The address of yours are 0x76 so that suggests BMP280 (temperature and pressure only). A final confirmation can be made by looking as the small metal can on the sensor PCB. If it is obviously non-square then it is a BMP280.

What happens when you try these steps next (screenshots in earlier post):

1. Go to Openplotter>I2C and in the Sensors Tab click Add

2. Under Supported sensors click BMP280 and Detected addresses 0x76, click OK

3. You should now see two lines, one yellow, one white. Left click on the white one and it turns grey, click Edit. Under Signal K key type environment.inside.temperature and hit OK. Now both lines are yellow.

4. Go to Openplotter>Signal K>Data Browser and you see the data for pressure and temperature.

Good luck

Finally, managing signal K in chromium I find to be a nightmare. It painfully slow. I would suggest you consider installing firefox and having a bookmark pointing at localhost:3000/admin

If you want to access signal K open firefox and click the bookmark rather than going through Openplotter>Signal K.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)