question

thebelcherman avatar image
thebelcherman asked

What's responsible for starting the start-digitalinputs.sh script?

@Kevin Windrem @derrick thomas

Anyone tell me what is responsible for calling /opt/victronenergy/dbus-digitalinputs/start-digitalinputs.sh. Need to find it, whatever reason that script is never called. And it turn dbus-digitalinputs.py doesn't start. In the meantime, I'll be on the hunt.


thanks guys

cb


d-bus
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

7 Answers
Kevin Windrem avatar image
Kevin Windrem answered ·

start-digitalinputs.sh is a service (dbus-digitalinputs) that should be run at startup, and restarted if it crashes. It's possible dbus-digitalinputs.py is crashing.

Check the log file: /data/log/dbus-digitalinputs/current

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thebelcherman avatar image
thebelcherman answered ·

Thanks man, add added some logger statement to the script and it is running. I see what's the issue is.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thebelcherman avatar image
thebelcherman answered ·

@Kevin Windrem

Master Kevin,

I think (okay, know) you're correct about it crashing. The timestamp of the log file "/data/log/dbus-digitalinputs/current" is exactly the time I last rebooted.

Little cryptic and only has 11 lines. Attaching to see if you can decipher it.

But, it sure as heck isn't running.

Also attaching evidence of it crashing, just found it moments ago. Something isn't happy,

digitalinputs.currentlog.txt

evidenceofcrash.txt

I'll start looking at what's happening dbus_dititalinputs.py on lines 169 and 614. Those are the 2, it references when it traces.

Works like a charm, until whatever takes in down.


Thanks man!


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thebelcherman avatar image
thebelcherman answered ·

@Kevin Windrem

Something tells me you know this dbus_digitalinputs.py script like the back of your hand? :) Looks like GuiMods updated it?

I'm having having fun, learning. Just have to get over this hump, probably not going to be trivial.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·
I'm not all that familiar with that program. I only modified it to add the input for external transfer switch.


The logs you show 8 digital inputs. How are you getting the additional 4? Could be something in whatever is creating those inputs.


It's also odd that when running normally without any digital inputs the service is starting twice. (two *** starting messages).


Sorry I can't be of more help

0 Likes 0 ·
thebelcherman avatar image
thebelcherman answered ·

Oh ya, it's me creating them, apparently not correctly :) I thought I had it, nope!

Thanks Kev,

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thebelcherman avatar image
thebelcherman answered ·

My Cerbo MK2 just arrived. Finally have something with native Digital Input's. Hoping this will shed some light on whatever's plaguing this RPi.

Thanks again Kevin,


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thebelcherman avatar image
thebelcherman answered ·

@fguiot @Kevin Windrem

Fredric, Hope your home safe and sound.

Good news, DI's are fully functional on a RPi. Last battle was finding the highly modified S90rgpio_pins.sh script was being executed after the startdigitalinputs.sh script had already run and failed it's first test. The very clause that's meant to not start DI service on a RPi.

When you recoup from some jet-lag, let's hook up.


Thanks Kevin. You pointed me right direction. Just know, your little words of wisdom even if you think they're not helpful, they are.


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic