Rikkert-RS / VenusOS-TemperatureService

Temperature and Humidity d-bus services for Victron GX
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

Can't find 1-wire sensor #5

Closed Mange131 closed 1 year ago

Mange131 commented 1 year ago

The sensor worked when i install it then after couple of minutes it says, it's not connected. Can i check in someway if the sensor is there?

Rikkert-RS commented 1 year ago

Hello Mange131,

If the DS18B20 sensor is no longer detected on the 1Wire bus, the service for this sensor is stopped after 1 to 5 minutes and the connection and status is set to nio.

can you please tell or describe how you connected the sensor? If you are able to login with SSH Console we can check some files.

mfg Rikkert

Mange131 commented 1 year ago

i use this sensor with pluggable terminal adapter with build in 4.7 pullup resistor.

https://www.amazon.se/gp/aw/d/B094FKQ9BS?psc=1&ref=ppx_pop_mob_b_asin_image

Data to gpio 26, 3,3v and earth. I have tested the pullup resistor after, and it's ok

Venus os 3.00-39. Rpi 3b

I have testet two times, from scratch. Because i have probleme with the rpi can't find my hdmi screen. second time it work for 2-3 hour till i install rpigpiosetup.

I have rpi in my boat. Can test it tomorrow, same time as now?

Mvh/ Magnus

Rikkert-RS commented 1 year ago

Hello,

ok i think the issue is with rpigpiosetup. you have to modify the gpio list and exclude the gpio 26.

The reason why I changed the pin is that I installed a can hat for a canbus battery and that unfortunately collides. Pin 4 could also cause problems for other people and other raspberry shields.

If it works then you just have to create a custom GPIO list for RpiGpioSetup that's not difficult.

Link->[https://github.com/kwindrem/RpiGpioSetup]

grafik

here a view from the RpiGpioSetup gpio_list file: were you can comment out the Gpio26: do that with ssh under /data/RpiGpioSetup/FileSets/gpio_list

grafik grafik

Maybe in the future i can make the pin configurable, or comment out at installation if RpiGpioSetup ist installed

Mange131 commented 1 year ago

Ok i test that tomorrow

Thanks

Mvh/ Magnus

Den sön 21 maj 2023 22:02Rikkert-RS @.***> skrev:

Hello,

ok i think the issue is with rpigpiosetup. you have to modify the gpio list and exclude the gpio 26.

The reason why I changed the pin is that I installed a can hat for a canbus battery and that unfortunately collides. Pin 4 could also cause problems for other people and other raspberry shields.

If it works then you just have to create a custom GPIO list for RpiGpioSetup that's not difficult.

Link->[https://github.com/kwindrem/RpiGpioSetup]

[image: grafik] https://user-images.githubusercontent.com/96136114/239764746-ea3aa47a-2dfa-4414-91bb-9f8bff41fe3f.png

here a view from the RpiGpioSetup gpio_list file: were you can comment out the Gpio26: do that with ssh under /data/RpiGpioSetup/FileSets/gpio_list

[image: grafik] https://user-images.githubusercontent.com/96136114/239765076-84176b40-0ce5-435c-b739-6f885a4c0683.png [image: grafik] https://user-images.githubusercontent.com/96136114/239765099-eef289e0-8d3d-4b59-91a4-f9700b632c0b.png

Maybe in the future i can make the pin configurable, or comment out at installation if RpiGpioSetup ist installed

— Reply to this email directly, view it on GitHub https://github.com/Rikkert-RS/VenusOS-TemperatureService/issues/5#issuecomment-1556277827, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5Z5VUQ3RSKOKXNVHDLOZGDXHJYEJANCNFSM6AAAAAAX7EYBRM . You are receiving this because you authored the thread.Message ID: @.***>

Rikkert-RS commented 1 year ago

@Mange131 Did you already have time to test the problem is solved

Mange131 commented 1 year ago

sorry I haven't checked. have been busy getting the boat ready. but i did a fresh install of venus today. and I will test it tomorrow in the boat. will not install RpiGpioSetup. I don't think I need it yet. just need guimods, shutdown manger and your VenusOS-TemperatureService

Mange131 commented 1 year ago

only worked briefly again. max one hour. tried to uninstall and install temperatureService again but then the sensor did not come up. have installed guimods, rpidisplaysetup. Shutdown manager

Rikkert-RS commented 1 year ago

Hi,

Hmm that is not so good. How long is your Sensor cable?

You can try an other Port with this method: https://github.com/Rikkert-RS/VenusOS-TemperatureService/issues/6#issuecomment-1587847440

otherwise we must check out the logs

Mange131 commented 1 year ago

ok, going to the boat later today. I have 2 sensors of 1 and 3 meters to one pullup 4.7k and then from the pullup I have a one cable of 5 meters to the rpi. slightly thicker cable. Do i need uninstall something?

Rikkert-RS commented 1 year ago

Ok

if you want to switch the Port you don‘t need to uninstall only connect with ssh and change the config.txt file and restart the rpi.

But I would test the sensors with a shorter cable length beforehand. The voltage drop at 3.3v on the cable length can be considerable. If the cable is also not shielded, this can also lead to interference if other cables are nearby.

Mange131 commented 1 year ago

OK thanks

Rikkert-RS commented 1 year ago

Some info for 1 Wire bus wiring

http://pvlng.com/1-Wire_Hub https://www.analog.com/en/technical-articles/guidelines-for-reliable-long-line-1wire-networks.html https://www.msxfaq.de/sonst/bastelbude/raspi/raspi-1wire.htm

Good choice is to use Cat 5 or 6 Network cable

Mange131 commented 1 year ago

works with short cable. and I use pin 26. but under device it looks like this Screenshot_20230628-113939

Rikkert-RS commented 1 year ago

Interesting, is the sensor running with the temperature values? Which Venus OS version are you using?

Mange131 commented 1 year ago

What do you mean with temperature values? sry English is not my language 😀 I'm using 3.0

Just in the process of running a cat6 cable for the sensors with longer distances

Rikkert-RS commented 1 year ago

No problem, English is not my native language either.

I meant if only the metadata to the sensor is missing or also the sensor value, so the temperature value? Possibly it is the version 3. At the moment I have still no device runs on V3.0 to test.

For

Just in the process of running a cat6 cable for the sensors with longer distances

You can also reduce the pullup resistor from 4.7kOhms to something less, perhaps 3.3kOhms or 2.2kOhms, since the RPI pin voltage is 3.3V.

Mange131 commented 1 year ago

now both sensors work with the longer cat6 cable. we'll see how long 😀 and the id number comes up as well

Mange131 commented 1 year ago

Screenshot_20230702-133942

Rikkert-RS commented 1 year ago

ok, ;) inform me if it's working properly the next days

Mange131 commented 1 year ago

Ok i do that. thanks a lot for your help

Mange131 commented 1 year ago

only one works for me now. I will check the cable connection. think it's all to do with sensor instability. if you search online about rpi and 1-wire. so you get quite a lot of hits on those who have problems. one solution to having more sensors is to maybe be able to have more pins available.

We can probably close this thread now. thanks so much for all the help

Rikkert-RS commented 1 year ago

You can try to get more stable signal if you use 5V suply voltgage to the Sensor. And also a good Power suply for the Raspberry is important too.

Here is one Link to do so. http://pvlng.com/1-Wire_Hub

Using multiple pins is not a solution in my opinion

But anyway, I'll close the topic now. Much luck.

Rikkert-RS