Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json from ESP local server #13

Open
jezikk82 opened this issue Nov 19, 2021 · 22 comments
Open

Json from ESP local server #13

jezikk82 opened this issue Nov 19, 2021 · 22 comments

Comments

@jezikk82
Copy link

Hi, would it be possible to present data in json format on local (on ESP) Web server?
I want to integrate it with smart home solution based on plc.

I don't have mqtt server and gateway for my plc so it would be much easier to work with json or any other format with i can get by http request from.

@cliffdude
Copy link

Check out my git SofarCtrl it is a modified copy of Colin's code with a webserver and OTA support.
All original code is there but I have comented out what I did not need such as OLED support.
https://github.com/cliffdude/SofarCtrl/blob/master/HYBRID-WEB_OTA.ino

@schritta
Copy link

@cliffdude
When using the Hybrid-web_OTA , do we still need the mqtt server?
I only need the readings on the local web(esp) and then do a http request from node-red.
Is it then correct not using the mqtt stuff in you code?

@jezikk82
Copy link
Author

Yes, you can not use mqtt. I just commented it out and rest "works".

@cliffdude
Copy link

Yes, you are correct, I use personally mqtt but you do not need to! Check in the code and you will understand what to do.

@schritta
Copy link

Thank you for the quick response. I have ordered the parts as soon as the arrive I will start this project.
And keep you posted. I aim looking into the code to see what exactly to comment out.

@schritta
Copy link

@jezikk82
Where did you make the connection for the RS485 in your HYBRID, because the pics show only the ME3000SP.
Is there also a 485s connector? I have got the HYB 6000-ES.

@jezikk82
Copy link
Author

68747470733a2f2f7777772e616e64797768697474616b65722e636f6d2f696d672f485944363030302d52533438352d30312e6a7067

First from the left is modbus for battery, second (green plug) is for slave devices and you connect max485 with ESP there.

@schritta
Copy link

@jezikk82 Thank you very much i'll check this also with my device.

@schritta
Copy link

schritta commented Dec 4, 2021

Ok , received the espc and setup the hardware on temporary project board.
It works for 99%. Where did you got the register information? Because I don't get "Solarpv2", all other readings are received . So I thought there is a minor issue with the reading of that specific register. I do not know how to debug this.

@schritta
Copy link

schritta commented Dec 4, 2021

my uploaded code in esp
Hybrid-web_OTA.txt

@cliffdude
Copy link

cliffdude commented Dec 4, 2021 via email

@schritta
Copy link

schritta commented Dec 4, 2021

thanks I'll try to debug it, but I aim not a specialist.

@jezikk82
Copy link
Author

jezikk82 commented Dec 4, 2021

here you have newer version of modbus for hybrid inverters.
SofarHYD ES ME3000SP Modbus protocol.pdf

What inverter and datalogger firmware you have ?
I have v302 and LSW3_15_FFFF_1.0.78 and in my case I cant get any data neither by ModBus RTU or TCP :(

@cliffdude
Copy link

cliffdude commented Dec 4, 2021 via email

@schritta
Copy link

schritta commented Dec 4, 2021

I have SW version 2.90 HW version 1.00 HYB-5000-ES, and yes i got the rs485 symbol in the left upper corner .
@jezikk82 try indeed to swap the + and - rs485 wires.

@jezikk82
Copy link
Author

jezikk82 commented Dec 4, 2021

I see the rs485 logo but the when I try to get data from inverter I got crc error on all 0x03 function code and all registry.
I can take info from 0x04 function and 0x2000 registry = the are serial no, firmware ver etc.

@richplatts
Copy link

richplatts commented Dec 4, 2021 via email

@jezikk82
Copy link
Author

any update ?

@schritta
Copy link

I have received the mod-bus RTU protocol from sofar 5 days ago, but the Solar PV2 has the same modbus address so i did a calculated solarPv2 value in node red "SolarPV - SolarPV1 = SolarPV2" so now I've got all the data needed to build my node red flows. The most important addresses are listed on page 15 Panel string information see pdf.
Now everything works as planned for me. Thank you to remind me for updating.
SofarHYD ES Modbus protocol.pdf

@cmcgerty
Copy link
Owner

Hi All.

Sofar2mqtt V2.0 beta1 has been published today, which is a major write and should bring much greater stability. Any testing would be greatly appreciated. I'm especially keen to get feedback from owners of hybrid inverter models as we have now combined it into a single file. Just uncomment your model at the top of the file.

@cliffdude I still really like your fork that delivers the json output directly. For a Node-Red user like me I could skip the mqtt server entirely. Sorry if it's too much work to merge them. But it might be something we can collaborate on.

@cliffdude
Copy link

cliffdude commented Apr 24, 2022 via email

@cliffdude
Copy link

Hi All.

Sofar2mqtt V2.0 beta1 has been published today, which is a major write and should bring much greater stability. Any testing would be greatly appreciated. I'm especially keen to get feedback from owners of hybrid inverter models as we have now combined it into a single file. Just uncomment your model at the top of the file.

@cliffdude I still really like your fork that delivers the json output directly. For a Node-Red user like me I could skip the mqtt server entirely. Sorry if it's too much work to merge them. But it might be something we can collaborate on.

Would be happy to merge but I removed the LCD that I did not need and we should merge for V2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants