Comments (4)
I think the first issue here, that 0A to set the inverter to 1000W is not a string, but a hex value: 0x0A.
I never used this function myself, let me add @joe288 as he added this part of the code.
@joe288 just to recap, when you publish to the "SetModulePower" topic, you expected to pass the value as decimal and not at string like "0A" right?
Based on this, I think instead of
String message = "OA";
it should be:
uint16_t modulpower = 0x0A;
and further in the code, instead of
result = growattInterface.writeRegister(growattInterface.regModulPower, int(strtol(message.c_str(), NULL, 16)));
it should be:
result = growattInterface.writeRegister(growattInterface.regModulPower, modulepower);
Please wait until @joe288 confirms it.
from growatt2mqtt.
Yeah that was it. thanks again.
from growatt2mqtt.
Hi,
@nygma2004 your change should produce the same result. In the implementation with MQTT it still has to be converted from string to integer. You can optimize this step with the variant of nygma2004.
the code should actually work.
you have to make sure that you first can switch the inverter on/off.
growattInterface.writeRegister(growattInterface.regOnOff, 0); // switch off the inverter
growattInterface.writeRegister(growattInterface.regOnOff, 1); // switch on the inverter
The configuration can only be changed when the inverter is switched off.
Of course it could also be that your inverter has a different timing than mine. I would test to increase the delays significantly to make sure that the commands have been processed completely.
I hope these tips help you to find the problem.
from growatt2mqtt.
thanks for the help, am going to try that next.
Timing thing isn't/shouldn't be an issue as over mqtt it worked even useing R232 instead of what the repo is saying.
Going to close this topic once I tried the mentioned code
from growatt2mqtt.
Related Issues (20)
- Smart meter address
- RS232 Viability HOT 2
- useModulPower HOT 3
- SOC data request HOT 2
- Use growatt2mqtt for evcc HOT 3
- WDT Timeout Issue HOT 11
- Growatt MOD 6000TL3-X HOT 4
- Sending setMaxOutput to MQTT HOT 6
- my version HOT 3
- unable to use setMaxOutput HOT 4
- Smart Meter emulation ingtegration HOT 3
- Growatt MIN 3600TL-XE ? HOT 5
- is it possible to enable/disable and change export limits via modbus for mic type inverters HOT 1
- Used your code! Thanks! Reworked main as code seems to freeze HOT 2
- "PV energy today" and "PV energy total" register missmatch HOT 6
- Monitor multiple inverters? Multi-phase, parallel installation. HOT 5
- Changes in Libraries?
- Adapting for 3 phase inverter HOT 2
- "maxpower" setting? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from growatt2mqtt.