Sofar HYD6000-ES Inverter RS485 data logger part 2

Sofar2MQTT ESP8266 device

Right, got the nonRS485 stuff all working. Tweaked the code considerably to add 

  • Added ESP8266mDNS to advertise on the local LAN using mDNS to make it easy to find
  • A website that displays the most recent data on a simple page; I dropped the very complex ESP8266WebServer in favour of the WiFiServer class
  • A reset page that resets the configuration and asks for new details. 
  • A "noRS485" flag, set on compile, but could be configured via a webpage if required so it's less twitchy about not having RS485 connected for testing
  • Dummy data if noRS485 is set

This was all fairly hard work, largely because my C++/Arduino/ESP8266 knowledge is really pants. 

I've also made another ESP8266 that subscribes to the MQTT messages and displays them on a web page - this was my alternative if I couldn't get the web server working with the original! 

Now just waiting for the RS485 interface to arrive so I can get round to Dave's and start shorting out his inverter :-).

IDEAS

  • Make noRS485 switchable using a web page
  • Build another using basic ModBus to investigate dave's registers using the multiple register read request
    • Uses Serial input to control what registers to ask for and so on, then prints contents out on Serial monitor

Comments

Popular posts from this blog

mDNS, Sonoff-Tasmota, code spelunking, and when is a host not a host! Or a domain a domain...

Plan B: Flashing Sonoff devices using FTDI & wires - Success!!

Replacing Coffee Machine Pump (Dualit Espressivo)