jacauc
Members
-
Joined
-
Last visited
Reputation Activity
-
jacauc got a reaction from Sc00bs in My Sunsynk 8Kw & data collection setup@Sc00bs the pinout you show looks a bit different. Below is a pinout which more accurately reflects @Gooseza setup
https://www.electronicshub.org/esp32-pinout/
-
jacauc got a reaction from RobO in My Sunsynk 8Kw & data collection setupInstead of posting my esphome configs here, I'm uploading them to github (partly just for keeping for my own backup)
Recently added all the setting values
https://github.com/jacauc/SunsynkEsphome
-
jacauc got a reaction from Sc00bs in My Sunsynk 8Kw & data collection setupNot sure if related, but is your inverter set up for Modbus ID #1?
Also have a good look at the cabling between the esp and the inverter
-
jacauc got a reaction from BrettC in My Sunsynk 8Kw & data collection setupInstead of posting my esphome configs here, I'm uploading them to github (partly just for keeping for my own backup)
Recently added all the setting values
https://github.com/jacauc/SunsynkEsphome
-
jacauc got a reaction from WannabeSolarSparky in SunSynk - Inverter MonitoringRepo hasn't changed much because it didn't really need changes. All is well with that code.
We're focusing right now on moving the functionality out of node red and raspberry Pi to be able to poll it with a much more lightweight ESP32 on the Esphome platform for situations where the HA instance is not close to the inverter
-
jacauc got a reaction from Sc00bs in SunSynk - Inverter MonitoringRepo hasn't changed much because it didn't really need changes. All is well with that code.
We're focusing right now on moving the functionality out of node red and raspberry Pi to be able to poll it with a much more lightweight ESP32 on the Esphome platform for situations where the HA instance is not close to the inverter
-
jacauc got a reaction from Sc00bs in My Sunsynk 8Kw & data collection setupI would imagine it's possible using the write_lambda function
https://esphome.io/components/output/modbus_controller.html
Worthwhile to look at the node red flows @Bloubul7made for writing values to see how he did it and adapt it to lambda format. Let me know if you figure something out with this, I'll try it sometime, but have a busy few weeks ahead
-
jacauc got a reaction from Sc00bs in My Sunsynk 8Kw & data collection setupYeah thought about that too, but I don't really know how to query it less frequently with esphome. Also... Does it really matter?
I suppose we can make another modbus sensor with a less frequent scan rate, no idea if that would work though.
I commented out the PV values because I don't have PV. (which is also why I have not tried writing values)
If you want to add any more values to query, please feel free to add them into the code on GitHub with a pull request. Maybe we can somehow have a variable that can be set in the top of the script so that the irrelevant values are automatically ignored?
-
jacauc got a reaction from Hannesvz in SunSynk - Inverter MonitoringOh forgot to mention - For those who did not know, ESP recently released a loadshedding API which can be used by personal users and integrated directly into HA. Just need to request an API key from them. Been using it for a week. Works very well
-
jacauc reacted to sjlouw in My Sunsynk 8Kw & data collection setupHi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant:
Required Hardware:
ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-esp32-development-board.html?search_query=esp32&results=26
MAX485 RS-485 to TTL Convert Module @R19.95 https://www.diyelectronics.co.za/store/serial/1204-max485-rs-485-to-ttl-converter-module.html?search_query=485&results=21
3D Printed Case I use to pack it all: https://www.thingiverse.com/thing:4670334
My code for ESPHome https://esphome.io/
Note: On the Sunsynk inverter side it is set to Modbus ID 1 and runs in Slave mode. (I think this is default for the inverter)
esphome: name: "sunsynk" esp32: board: esp32dev framework: type: arduino logger: baud_rate: 0 api: ota: wifi: ssid: !secret wifi_ssid password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "SOMEFALLBACKAP" password: "password" fast_connect: true power_save_mode: none time: - platform: sntp id: sntp_time timezone: Africa/Johannesburg servers: - pool.ntp.org uart: id: mod_bus tx_pin: 17 rx_pin: 16 baud_rate: 9600 stop_bits: 1 modbus: id: sunsynk_modbus flow_control_pin: 4 modbus_controller: - id: sunsynk address: 0x01 modbus_id: sunsynk_modbus setup_priority: -10 update_interval: 20000ms sensor: - platform: modbus_controller modbus_controller_id: sunsynk name: "Total Battery Charge (kWh)" id: total_battery_charge_kwh register_type: holding address: 72 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Total Battery Discharge (kWh)" id: total_battery_discharge_kwh register_type: holding address: 74 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Total Grid Export (kWh)" id: total_grid_export_kwh register_type: holding address: 81 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Total Grid Import (kWh)" id: total_grid_import_kwh register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Total Load Power (kWh)" id: total_load_power_kwh register_type: holding address: 85 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Total PV Power (kWh)" id: total_pv_power_kwh register_type: holding address: 96 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Grid Power" id: grid_power register_type: holding address: 169 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement filters: - lambda: |- float MIN_VALUE = 0.00; float MAX_VALUE = 8000.00; if (MIN_VALUE <= x && x <= MAX_VALUE) return x; else return {}; - platform: modbus_controller modbus_controller_id: sunsynk name: "Load Power" id: load_power register_type: holding address: 178 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement - platform: modbus_controller modbus_controller_id: sunsynk name: "PV1 Power" id: pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement - platform: modbus_controller modbus_controller_id: sunsynk name: "PV2 Power" id: pv2_power register_type: holding address: 187 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement - platform: modbus_controller modbus_controller_id: sunsynk name: "Battery SOC" id: battery_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery - platform: modbus_controller modbus_controller_id: sunsynk name: "Battery Charging Efficiency" id: battery_charging_efficiency register_type: holding address: 216 unit_of_measurement: "%" accuracy_decimals: 1 device_class: battery filters: - multiply: 0.1 - platform: modbus_controller modbus_controller_id: sunsynk name: "Grid Connected Status" id: grid_connected_status register_type: holding address: 194 accuracy_decimals: 0 In Home Assistant, ensure to include the new sensors in the recorder:
recorder: include: entity_globs: - sensor.total_* - sensor.grid_* - sensor.load_* - sensor.pv*_power - sensor.power_production*
-
jacauc got a reaction from SolarNovice88 in SunSynk - Inverter MonitoringNode red all the way. I have a separate node red instance running on my home assistant pi and do these types of automations there.
HA is great for getting all the entities in one place, and node red ties seamlessly into it. HA automations suck.
-
jacauc reacted to Robbo in SunSynk - Inverter MonitoringJust wanted to add my thanks for this incredible work!
Unbelievable what @Bloubul7started here, and great work to @jacaucand @Sc00bs for continuing it and adding dashboards to get me started. Love it all!
This thread is at least 50% of the reason I went with Sunsynk, they should pay you guys commission
-
jacauc got a reaction from Robbo in My Sunsynk 8Kw & data collection setupI have a dsc alarm, and using the envisalink for smartening the system with integration to HA. You may want to look at this module. Alternatively, I'm sure it'll be possible with Rpi or even arduino, but might be a bit more of a hack.
-
jacauc reacted to RhysMcW in SunSynk - Inverter MonitoringI found it on Facebook but actually got screwed a little. The post stated it was one of the i5 models but when I got it home and powered it on I discovered it was actually the Celeron version, so if you do look at one second hand make sure you get the model number off it's base sticker and Google that model to confirm its spec.
Even though it's only the Celeron CPU (with 4Gb RAM) it is significantly better performing than the Pi 4 (with 4Gb RAM) so still very happy with it, I may just upgrade the RAM to 8Gb though as I see HA likes using RAM so want to give it some more. It's not super heavy on RAM but if you drop into the shell in the OS and run "top" you can see it uses what it gets, which is not a bad thing (Linux based OS's handle memory great compared to crappy Windows) but I'm sure it would benefit from some more.
-
jacauc got a reaction from RhysMcW in SunSynk - Inverter MonitoringNode red all the way. I have a separate node red instance running on my home assistant pi and do these types of automations there.
HA is great for getting all the entities in one place, and node red ties seamlessly into it. HA automations suck.
-
jacauc got a reaction from Yellow Measure in SunSynk - Inverter Monitoring'fraid not
-
jacauc got a reaction from Sc00bs in SunSynk - Inverter Monitoringhttps://github.com/jacauc/SunSynk-NodeRed
Published here - will need to work on Readme and others to give proper credit to @Bloubul7
My current dashboard attached at the bottom of this post. Still a work in progress
Open the "influx" shell and then do
--list all tables SHOW MEASUREMENTS --copy values from old table to new table SELECT * INTO newtablename FROM oldtablename --delete old measurements DROP MEASUREMENT oldtablename
grafana.json
-
jacauc got a reaction from Sc00bs in SunSynk - Inverter MonitoringThought I'd share my current flows for anyone interested.
Removed all Solar Readings (nodes) as I do not have PV (yet) Split the data output into a separate flow to simplify changes Set msg values for each of the nodes so they can be reused later Cycle through each reading one by one to avoid parallel requests to modbus - seems to work a slight bit better. Format MQTT topics using the home assistant MQTT discovery protocol, to allow HA to pick up the entities automatically https://www.home-assistant.io/docs/mqtt/discovery/ Feel free to comment - I'm not exactly a node-red or MQTT expert, but this seems to work for now.
inverter monitoring.json publish externally.json
-
jacauc got a reaction from JuanH in SunSynk - Inverter MonitoringBe aware that it will change some of the names of the tables in your influxdb, so dashboards may be affected. Let me know if you need help transferring data from the old tables to the lowercase tables.
-
jacauc got a reaction from JuanH in SunSynk - Inverter Monitoringhttps://flows.nodered.org/node/node-red-contrib-cycle
Forgot to mention 🙂
-
jacauc got a reaction from JuanH in SunSynk - Inverter MonitoringThought I'd share my current flows for anyone interested.
Removed all Solar Readings (nodes) as I do not have PV (yet) Split the data output into a separate flow to simplify changes Set msg values for each of the nodes so they can be reused later Cycle through each reading one by one to avoid parallel requests to modbus - seems to work a slight bit better. Format MQTT topics using the home assistant MQTT discovery protocol, to allow HA to pick up the entities automatically https://www.home-assistant.io/docs/mqtt/discovery/ Feel free to comment - I'm not exactly a node-red or MQTT expert, but this seems to work for now.
inverter monitoring.json publish externally.json
-
jacauc got a reaction from Sc00bs in SunSynk - Inverter MonitoringFor the moment I just set up the timeout value to 100ms (fail fast) and disabled the error logging. All of the values make it to mqtt and influx about 9/10 cycles, so even though imperfect, it's not hampering my ability to use the data.
Ignorance is bliss for the moment
-
jacauc reacted to Zerc in SunSynk - Inverter MonitoringI can confirm this, I originally had the USB RS485 adapter with the bare circuit board as mentioned in Luminous' post above and I had no issues. I then upgraded to the R30.00 adapter from microrobotics that jacauc was using and I had issues with it so I'm back to the original adapter.
-
jacauc reacted to Sc00bs in My Sunsynk 8Kw & data collection setupHere it is, my Grafana skills are still a work in progress 😉
Solar Dashboard-1621372657287.json
-
jacauc reacted to Sc00bs in My Sunsynk 8Kw & data collection setup100% correct, I wired wires 2&7 to A and both 1&8 into B and it works. Not sure if it is necessary to have both wires connected but I did and it works so not inclined to try the other way 🙂
Good luck, let us know if you get stuck