Closed oBorks closed 4 months ago
I'm wondering if the issue is the channel, and if so is there any way I can specify the correct one?
Sounds like you identified the issue exactly.
Looks like the way to do this with the modbus-serial
library is with setID()
, which defaults to 1
if it isn't explicitly set.
I can easily add in an option to allow the device ID to be specified...
Much appreciated.
I added a comment a few hours ago (just moments before yours), and I see my comment is gone 😳. Not sure if something happened, or if I'm losing my mind...
So, here's what I thought I said earlier:
I've added an argument that will let you specify a device ID if the default "1" doesn't work. I tested it on my live system, first without specifying the argument, which worked. Then I tested a second time, but I added
-d 99
to specify a bogus device ID, and it failed withTransactionTimedOutError
as expected. So, it seems this is working.So, if you'll test with
serial-renogy -s /dev/ttyUSB0 -d 16
and confirm, I'll close this issue.
That worked perfectly. Had to bash my head around getting Prometheus and Grafana set up since I was originally only going to use MQTT to pull the data into Home Assistant with the NodeRenogy project, but with your change I was able to successfully get the data into the Grafana addon for Home assistant.
This will probably be a nicer solution for us than cluttering the main Home Assistant dashboard with more data anyway.
Awesome!
I found your project through your review on Amazon for the cable I bought to connect our Wanderer to a Raspberry Pi Zero 2 W.
On both your project and the one it's based on I receive this error. I had a similar issue on renogymodbus when the slave channel was set to the default. However after searching for the channel, I found my Wanderer's channel is 16 and was able to read the data on that channel. I'm wondering if the issue is the channel, and if so is there any way I can specify the correct one?