Coder Social home page Coder Social logo

Comments (10)

ironsheep avatar ironsheep commented on June 16, 2024

I see an addressing problem with the script. (reading/writing the wrong register) I'm chasing it!

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

Sigh, nope not the wrong register - just new code resetting chip to factory defaults... and calibrating internal RC oscillators. My bad. Still hunting for possible issues.

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

Couldn't find any cause for write errors. Did find and fix a crash upon detect of overhead event.

Changes committed to /master. Fixes appear in v2.2.5 and later.

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

Please update to the latest version and then rerun with -d -v and let's see what we have...

Oh, also, please restart the pigpiod service with: sudo systemctl restart pigpiod.service (before you test again.)

The error above is from that service... you might have to reboot the RPi to get a clean restart... -FYI

from lightning-detector-mqtt2ha-daemon.

lightmaster avatar lightmaster commented on June 16, 2024

Whelp, looks like the I2C issue is likely nothing to do with the script, cuz this is the output of sudo i2cdetect -y 1

pi@LightningPi [06:41:20 PM] [~] 
-> % sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

I'm at work for the night, so won't be able to double check the hardware until tomorrow. Not sure what could have failed, unless my breadboard is failing. I've another one I can swap with to test.

from lightning-detector-mqtt2ha-daemon.

lightmaster avatar lightmaster commented on June 16, 2024

Also, apologies for making you look through the code when its likely not the culprit. Haven't used I2C before and just found out about that command to test connection.

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

Like minds, I was just going to ask you to check that. Good work! It's good that I did check the code since I found and fixed a crash! So no worries.

I'll be standing by to hear of your next testing...

You might want to double-check that SPI and I2C are both enabled via sudo raspi-config if you are going to be switching between, too.

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

it's also a good idea to make sure your RPi has the latest and best of the software you are using. I keep mine up-to-date with

sudo apt-get update
sudo apt-get dist-upgrade

I answer yes to the list of updates so all are updated.

from lightning-detector-mqtt2ha-daemon.

ironsheep avatar ironsheep commented on June 16, 2024

Also, a couple more easy checks:

ls /dev/i2c*
# which yields something like (only if the driver is loaded):
crw-rw---- 1 root i2c 89, 1 Sep  1 13:17 /dev/i2c-1

or SPI:

ls /dev/spi*
# which yields something like (only if the driver is loaded):
crw-rw---- 1 root spi 153, 0 Aug 31 18:23 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Aug 31 18:23 /dev/spidev0.1

from lightning-detector-mqtt2ha-daemon.

lightmaster avatar lightmaster commented on June 16, 2024

Everything seemed good, but still nothing, so I ended up wiping the MicroSD card and starting from scratch. After updating everything, including using sudo rpi-update, it was detected using sudo i2cdetect -y 1. Must have been something unknowingly fubared.

from lightning-detector-mqtt2ha-daemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.