PLEASE NOTE: If you had an account with the previous forum, it has been ported to the new Genetry website!
You will need to reset the password to access the new forum. Click Log In → Forgot Password → enter your username or forum email address → click Email Reset Link.

Notifications
Clear all

Please add username and password fields to the MQTT server configs.

11 Posts
2 Users
1 Likes
88 Views
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

Hello Sid!

Been running the inverter every day during peak energy for a year. It's been working flawlessly! I'm integrating my 6k inverters into my Homeassistant instance. I love that I can change the MQTT server from wifi.genetrysolar.com to my local Mosquitto MQTT broker, but It requires a username and password. Can you add that function to the wifi firmware? 
BTW currently I have NodeRED flow accessing /stats.json, and then fowarding it to Homeassistant via the MQTT broker, and it's amazing!! But it's a bit circuitous.

This topic was modified 2 months ago by jeffrey.hein

   
Quote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

Also, I had to create a new forum account, because my old password didn't work with the new forum. Also, I never received the reset password link when I tried to reset it. 


   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

Here is some homeassistant documentation on MQTT auto discovery if you want to make it really easy for homeassistant folks: https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery


   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

 

Screenshot from 2024 07 06 10 34 45

Here is an example of how I am currently integrating everything manually:

 

This post was modified 2 months ago 2 times by jeffrey.hein

   
ReplyQuote
(@sid-genetry-solar)
Member Admin
Joined: 4 years ago
Posts: 2882
 

Posted by: @jeffrey-hein

Hello Sid!

Been running the inverter every day during peak energy for a year. It's been working flawlessly! I'm integrating my 6k inverters into my Homeassistant instance. I love that I can change the MQTT server from wifi.genetrysolar.com to my local Mosquitto MQTT broker, but It requires a username and password. Can you add that function to the wifi firmware? 
BTW currently I have NodeRED flow accessing /stats.json, and then fowarding it to Homeassistant via the MQTT broker, and it's amazing!! But it's a bit circuitous.

Umm...yeah, there's no reason not to be able to set custom MQTT username/password combos.  I'll add it to the feature backlog--should be pretty simple to implement.

 


   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

Thank you! Will that disable the firmware updates? could it send data to both brokers? Also, is there a list of command topics? Are these still issued using HTTP like in the manual?

image
This post was modified 2 months ago by jeffrey.hein

   
ReplyQuote
(@sid-genetry-solar)
Member Admin
Joined: 4 years ago
Posts: 2882
 

There's two endpoints: the local HTTP host (as detailed in the manual, and accessed via the local server), as well as MQTT.

Note that if you point the inverter to an MQTT server other than the "wifi.genetrysolar.com" server, it will not be able to get updates--as it does not know where the files are.  No, there is not support for multiple concurrent MQTT connections.

A "local firmware upload" functionality was implemented some time back (allowing you to upload firmware files directly to the inverter from a web browser), but for some reason it tends to be very problematic and unreliable...not a solution!


   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

OK! I'll keep using NodeRED to query the http endpoint and connect to the homeassistant MQTT broker. I can reverse it to send commands to the /cmd HTTP endpoint from a MQTT topic. 

image
This post was modified 2 months ago by jeffrey.hein

   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

Hello! I am wanting to use a standard http get now, but I'm running into this error:

7/14/2024, 12:32:26 AMnode: 20608182e7b17913
msg : error
"RequestError: Parse Error: Duplicate Content-Length"

I checked the headers with wget, and there is indeed a duplicate content length header:

jp@katana:~$ wget -vS  http://inverter.lan/stats.json 
--2024-07-14 00:29:19--   http://inverter.lan/stats.json 
Resolving inverter.lan (inverter.lan)... 10.0.10.87
Connecting to inverter.lan (inverter.lan)|10.0.10.87|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Content-Type: application/json
  Content-Length: 647
  Cache-Control: no-cache
  Access-Control-Allow-Origin: *
  Content-Length: 647
  Connection: close
Length: 647 [application/json]
Saving to: ‘stats.json.2’

stats.json.2               100%[======================================>]     647  --.-KB/s    in 0.001s  

2024-07-14 00:29:19 (565 KB/s) - ‘stats.json.2’ saved [647/647]

This post was modified 2 months ago by jeffrey.hein

   
ReplyQuote
(@sid-genetry-solar)
Member Admin
Joined: 4 years ago
Posts: 2882
 

Oops, my fault.  Yes, the code is sending a "content-length" header (source: bad example that did that!)...and then the ESP32 stack is adding its own "content-length" header.  This unfortunately will affect all of the inverter's HTTP endpoints...

Easy fix...now I just need to get a number of other fixes through and release 1.2r6 with the correction.


   
ReplyQuote
(@jeffrey-hein)
Active Member Customer
Joined: 2 months ago
Posts: 8
Topic starter  

<3 Thank you so much!


   
ReplyQuote