Open funx1 opened 6 months ago
Some ideas?
/var/lib/homebridge/node_modules/homebridge-sma-home-manager/index.js:402
const deviceClassId = data.buffer.slice(0, 4).readUInt32BE();
^
TypeError: Cannot read properties of undefined (reading 'buffer')
☝️ Looking at the relevant code:
// Read device class (U32, ENUM).
client.readHoldingRegisters(30051, 4, function(err, data) {
const deviceClassId = data.buffer.slice(0, 4).readUInt32BE();
deviceType = data.buffer.slice(4, 8).readUInt32BE();
deviceClass = SMA_DEVICE_CLASSES.get(deviceClassId) || `unknown ${deviceClassId}`;
registerInverterDiscoveryIfComplete();
}.bind(this));
That's blindly reading data
and is ignoring err
altogether 😬 This is one of the last remaining patterns of code remaining of the original codebase that I forked from (https://github.com/codyc1515/homebridge-sma-inverter).
Question: Modbus TCP/IP is enabled?
TCP is active on the STP and SBS. Actually I can access the SBS from the HA SMA implementation but not the STP. But I was able to access values over iobroker and modus.
Actually I can access the SBS from the HA SMA implementation
Last time I looked, the Home Assistant integration was scraping the inverter's web UI 😨
But I was able to access values over iobroker and modus.
How does iobroker get the data? And what is "modus"?
I give up on this. Using now HA with modbus to read out values. Integrations I tried did not work. Previously with iobroker I was using modbus too. After switching to homebridge I lost these values. But I will start reading them with modbus again.
Paste of Logs:
Screenshots:
Inverter: SHM
Homebridge Environment: local network