Solarman Integration by Stephan Joubert

Hi There,

I recently installed a SoFar ME3000MP and 2x PylonTech batteries for home storage. I want to integrate that in to Home Assistant and found the integration by Stephan Joubert home_assistant_solarman/README.md at main · StephanJoubert/home_assistant_solarman · GitHub I have installed the integration but not able to get any data recovered. 40 Entities are there but all have an “unknown” status:

I cant find any topic on the forum that covers this integration so thought I would start one to ask for any help in getting this to work on my HA instance.

i have the same issue, though i am running a 3000-ES, let me know if you fix this, I am looking into what’s wrong as well

I got a working solution, see my post here: PV Data from Solarman WiFi logger - with API - #28 by angusc

First step is to request for API access from SoFar. I sent e-mail on Friday and they replied today with AppID and API Key. Then follow the instructions from above post and further link…Not too difficult if I managed to complete it :slight_smile: Yaml file also quotes to make it easier for the Restful and Sensor set ups…

Hello, I have a Sofar KTLM-G3 and like the original posters, the data returned is not working right.

I don’t want to use the API as angusc mentioned because I want all data come from my own network, not their servers.

Is there a debug mode or some other means of seeing what the local inverter server returns? I wonder if this is just a mapping problem for newer Sofar inverters?

Hi, Solarman have wrong definition for some Sofar inverters like HYD 4-10KTL…
Seems that I was able to find some .xls with correct definitions at this page
https://www.elektroda.pl/rtvforum/topic3698233-150.html
You can edit your sofar.yaml
till now I identify those:
0x04AF - total power consumption
0x0605 - battery %
0x0606 - charge / discharge kW of battery

but of course with that xls it will be easy to find what you need

will that help?

I pull data directly from the Inverter via the RS485 port. I followed this build instruction to make the Modbus board.

Which provides directly from the inverter to MQTT and HA:

  • running_state
  • grid_voltage
  • grid_current
  • grid_freq
  • battery_power
  • battery_voltage
  • battery_current
  • batterySOC
  • battery_temp
  • battery_cycles
  • grid_power
  • consumption
  • solarPV
  • today_generation
  • today_exported
  • today_purchase
  • today_consumption
  • inverter_temp
  • inverterHS_temp
  • solarPVAmps

With the inverter in Passive Mode, send MQTT messages to:

  • sofar2mqtt/set/standby - send value “true
  • sofar2mqtt/set/auto - send value “true” or “battery_save
  • sofar2mqtt/set/charge - send values in the range 0-3000 (or higher if your inverter goes above 3000 watts)
  • sofar2mqtt/set/discharge - send values in the range 0-3000 (or higher if your inverter goes above 3000 watts)

i too have this and i can see its working in the MQTT broker, but how do you get the information to display in a dashboard? i have install node-red, but im just lost im very new to HA and struggling

So you mean that you have built the modbus module from that link? If you did then the following yaml will report the mqtt topics.

Let me share my setup with you.

# SoFar MQTT Commands & Sensors (Data directly from Inverter 485 module)
mqtt:
  sensor:
   -  name: "Sofar Running State MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.running_state }}"

   -  name: "Grid Voltage MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.grid_voltage }}"
      unit_of_measurement: 'V'

   -  name: "Grid Current MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.grid_current }}"
      unit_of_measurement: 'A'

   -  name: "Grid frequency MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.grid_freq }}"
      unit_of_measurement: 'Hz'

   -  name: "Battery power MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.battery_power if value_json.battery_power is defined else states('sensor.sofar_battery_power') | float(2) }}"
      unit_of_measurement: 'W'
#      value_template: "{{ (value_json.battery_power / 100) | round(0) }}"

   -  name: "Battery voltage MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ (value_json.battery_voltage / 100) | round(2) }}"
      unit_of_measurement: 'V'

   -  name: "Battery current MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.battery_current }}"
      unit_of_measurement: 'A'

   -  name: "Battery SOC MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.batterySOC if value_json.batterySOC is defined else states('sensor.sofar_battery_soc') }}"
      unit_of_measurement: '%'
#      value_template: "{{ value_json.batterySOC }}"

   -  name: "Battery Temp MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.battery_temp }}"
      unit_of_measurement: '°C'

   -  name: "Battery Cycles MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.battery_cycles }}"
      
      
   -  name: "Grid Power MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.grid_power }}"
      unit_of_measurement: 'W'

   -  name: "Solar PV MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.solarPV }}"
      unit_of_measurement: 'W'

   -  name: "Today Generation MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.today_generation }}"
      unit_of_measurement: 'Kwh'

   -  name: "Today Exported MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.today_exported }}"
      unit_of_measurement: 'KWh'

   -  name: "Today Purchase MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.today_purchase }}"
      unit_of_measurement: 'Kwh'

   -  name: "House Consumption MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.consumption }}"
      unit_of_measurement: 'W'

   -  name: "Today Consumption MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.today_consumption }}"
      unit_of_measurement: 'Kwh'

   -  name: "Inverter temperature MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.inverter_temp }}"
      unit_of_measurement: '°C'

   -  name: "Inverter HS temperature MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.inverter_HStemp }}"
      unit_of_measurement: '°C'

   -  name: "solar PV Amps MQTT"
      state_topic: "Sofar2mqtt/state"
      value_template: "{{ value_json.solarPVAmps }}"
      unit_of_measurement: 'A'
  
  
  switch:

   -  name: "SoFar Standby Mode"
      command_topic: "Sofar2mqtt/set/standby"
      state_topic: "Sofar2mqtt/set/standby"
      payload_on: "true"
      retain: true
      
      
   -  name: "SoFar Auto Saver Mode"
      command_topic: "Sofar2mqtt/set/auto"
      state_topic: "Sofar2mqtt/set/auto"
      qos: 1
      payload_on: "true"
      payload_off: "battery_save"
      retain: true
      
      
   -  name: "SoFar Auto Mode"
      command_topic: "Sofar2mqtt/set/auto"
      state_topic: "Sofar2mqtt/set/auto"
      qos: 1
      payload_on: "true"
      retain: true
      
      
   -  name: "SoFar Battery Saver Mode"
      command_topic: "Sofar2mqtt/set/auto"
      state_topic: "Sofar2mqtt/set/auto"
      qos: 1
      payload_on: "battery_save"
      retain: true
      
      
   -  name: "SoFar Charge Mode 1000"
      command_topic: "Sofar2mqtt/set/charge"
      state_topic: "Sofar2mqtt/set/charge"
      qos: 1
      payload_on: "1000"
      retain: true
      
      
   -  name: "SoFar Charge Mode 1500"
      command_topic: "Sofar2mqtt/set/charge"
      state_topic: "Sofar2mqtt/set/charge"
      qos: 1
      payload_on: "1500"
      retain: true
      
      
   -  name: "SoFar Charge Mode 2000"
      command_topic: "Sofar2mqtt/set/charge"
      state_topic: "Sofar2mqtt/set/charge"
      qos: 1
      payload_on: "2000"
      retain: true
      
      
   -  name: "SoFar Charge Mode 2500"
      command_topic: "Sofar2mqtt/set/charge"
      state_topic: "Sofar2mqtt/set/charge"
      qos: 1
      payload_on: "2500"
      retain: true
      
      
   -  name: "SoFar Charge Mode 3000"
      command_topic: "Sofar2mqtt/set/charge"
      state_topic: "Sofar2mqtt/set/charge"
      qos: 1
      payload_on: "3000"
      retain: true
      
      
   -  name: "SoFar DisCharge Mode 1000"
      command_topic: "Sofar2mqtt/set/discharge"
      state_topic: "Sofar2mqtt/set/discharge"
      qos: 1
      payload_on: "1000"
      retain: true
      
      
   -  name: "SoFar DisCharge Mode 1500"
      command_topic: "Sofar2mqtt/set/discharge"
      state_topic: "Sofar2mqtt/set/discharge"
      qos: 1
      payload_on: "1500"
      retain: true
      
      
   -  name: "SoFar DisCharge Mode 2000"
      command_topic: "Sofar2mqtt/set/discharge"
      state_topic: "Sofar2mqtt/set/discharge"
      qos: 1
      payload_on: "2000"
      retain: true
      
      
   -  name: "SoFar DisCharge Mode 2500"
      command_topic: "Sofar2mqtt/set/discharge"
      state_topic: "Sofar2mqtt/set/discharge"
      qos: 1
      payload_on: "2500"
      retain: true
      
      
   -  name: "SoFar DisCharge Mode 3000"
      command_topic: "Sofar2mqtt/set/discharge"
      state_topic: "Sofar2mqtt/set/discharge"
      qos: 1
      payload_on: "3000"
      retain: true
       
       
  button:

  -   name: "Sofar Set - Standby"
      command_topic: "sofar/set/standby"


  -   name: "Sofar Set - Auto"
      command_topic: "sofar/set/auto"


  -   name: "Sofar Set - Charge"
      command_topic: "sofar/set/charge"
 

  -   name: "Sofar Set - Discharge"
      command_topic: "sofar/set/discharge"
    


1 Like

Thank you that is awesome i now have the readings :grinning:

i did make a few adjustments to correct some values so that they read in KW rather than W but thats way easier when all the code is sat in front of you.

one thing i have noticed if Grid power is 0W the reading shows 65534w which is not a huge concern but would be nice to removed that any ideas?

Yeah I saw that same issue but didn’t get around to looking. Sometimes it’s 0 but then goes to that number, there are two other sensors that also do that.

Some learning that I made for the charging and discharging switches:

I’m normal operation you only need the “saver/auto mode” stitch ON and the “stand by switch” OFF.

You only use the “charge switches” to FORCE the Sofar to charge.
You only use the “discharge switches” to FORCE the Sofar to discharge.

1 Like

at the moment im just using it as read only no control over the inverter, but once i get my smartmeter fixed and on cheap electric over night ill be moving to charge over night so will be playing with that.

how did you get the slide switchs for the modes? i can only find this

1 Like

Try using this card yaml for the slider switches:

type: entities
entities:
  - entity: switch.sofar_auto_saver_mode
    name: Saver / Auto Mode
    icon: mdi:battery-sync-outline
  - entity: switch.sofar_standby_mode
    icon: mdi:power
    name: Stand-by
  - entity: switch.sofar_charge_mode_2000
    name: Chg 2000w
    icon: mdi:ev-station
  - entity: switch.sofar_charge_mode_2500
    name: Chg 2500w
    icon: mdi:ev-station
  - entity: switch.sofar_charge_mode_3000
    name: Chg 3000w
    icon: mdi:ev-station
show_header_toggle: false
state_color: true
title: Sofar Inverter Control

Hi,
i try to use this integration with my Sofar HYD-5000ES with wifi logger (S/N: 23XXXXXX). I put on all the parameters and restart HA but all the sensor stay in status “unknown”.
I don’t have any error message in log.
I also try autodiscover mode but without success
If someone have an idea…
Thanks

PS : i have an integration with solarman API which works fine but i would try to get datas directly from the data logger

1 Like

Well according to the documentation you should have full support:

Supported models:

ME3000SP - Full support
HYD-xx00-ES - Full support

I made some notes to test the API at Solarman website, can you try and see if you get the output directly from the website, then at least you know the values are available for your MQTT server to extract in JSON format:

If Solarman stops working then try updating the token using below API by following these instructions :

My Information:

#How to refresh the Solarman Token Code if sensors stop getting data:
If the SOFAR sensor data stops working try to refresh the token by following these steps:

  1. Go to https://reqbin.com/curl and paste in the following curl:
curl --request POST \
  --url 'https://api.solarmanpv.com/account/v1.0/token?appId=20211xxxxxxxxxx&language=en&=' \
  --header 'Content-Type: application/json' \
  --data '{
	"appSecret": "8cb8f0fec435y654ea127eda0c7d9f406e",
	"email": "[email protected]",
	"password": "9d564hks8679534kghtd6da660b155cf15872fae88fc365a48683cac720cf18"
}'

NOTE: your Sofarman password has to be hashed using SHA256 Password: SHA256 - Online Tools

  1. The output should look like this:
{
    "code": null,
    "msg": null,
    "success": true,
    "requestId": "d94127a5000d00ad",
    "access_token": "eyJhbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "token_type": "bearer",
    "refresh_token": "eyJhbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "expires_in": "5183999",
    "scope": null,
    "uid": 762072
}
  1. copy the ACCESS TOKEN and then enter in to this replacing the previous token after “bearer”:
curl --request POST \
  --url 'https://api.solarmanpv.com/device/v1.0/currentData?appId=<appId>&language=en&=' \
  --header 'Authorization: bearer eyJhbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
	"deviceSn": "SE1ESxxxxxxxxx"
}'

NOTE: Paste the ACCESS TOKEN in to the Home Assistant CURL .YAML file: /config/packages/systems/sofar_battery_inverter/solarman_sensors.yaml

  1. This should return values:

Data Recovery from Inverter:

{
    "code": null,
    "msg": null,
    "success": true,
    "requestId": "51fe94ec1aaf79a2",
    "deviceSn": "SE1ESxxxxxxxxxx",
    "deviceId": 2150xxxxxx,
    "deviceType": "INVERTER",
    "deviceState": 1,
    "dataList": [{
        "key": "SN1",
        "value": "SE1ESxxxxxxxxx",
        "unit": null,
        "name": "SN"
    }, {
        "key": "SS_CY1",
        "value": "9",
        "unit": null,
        "name": "Production Compliance Country"
    }, {
        "key": "HWv1",
        "value": "V100",
        "unit": null,
        "name": "Hardware Version"
    }, {
        "key": "SWmai_v1",
        "value": "V280",
        "unit": null,
        "name": "Software Master Version"
    }, {
        "key": "DSPv1",
        "value": "V280",
        "unit": null,
        "name": "DSP Version"
    }, {
        "key": "DSPv2",
        "value": "V280",
        "unit": null,
        "name": "Vice DSP Version"
    }, {
        "key": "DPi_t1",
        "value": "5100",
        "unit": "W",
        "name": "Total DC Input Power"
    }, {
        "key": "AV1",
        "value": "251.80",
        "unit": "V",
        "name": "AC Voltage R/U/A"
    }, {
        "key": "AV2",
        "value": "0.00",
        "unit": "V",
        "name": "AC Voltage S/V/B"
    }, {
        "key": "AV3",
        "value": "0.00",
        "unit": "V",
        "name": "AC Voltage T/W/C"
    }, {
        "key": "AC1",
        "value": "4.79",
        "unit": "A",
        "name": "AC Current R/U/A"
    }, {
        "key": "AC2",
        "value": "0.10",
        "unit": "A",
        "name": "AC Current S/V/B"
    }, {
        "key": "AC3",
        "value": "0.08",
        "unit": "A",
        "name": "AC Current T/W/C"
    }, {
        "key": "Et_ge0",
        "value": "431",
        "unit": "kWh",
        "name": "Cumulative Production (Active)"
    }, {
        "key": "Etdy_ge1",
        "value": "8.55",
        "unit": "kWh",
        "name": "Daily Production (Active)"
    }, {
        "key": "ST_PG1",
        "value": "Purchasing energy",
        "unit": null,
        "name": "Grid Status"
    }, {
        "key": "PG_F1",
        "value": "49.97",
        "unit": "Hz",
        "name": "Grid Frequency"
    }, {
        "key": "PG_Pt1",
        "value": "-10.00",
        "unit": "W",
        "name": "Total Grid Power"
    }, {
        "key": "t_gc1",
        "value": "174",
        "unit": "kWh",
        "name": "Cumulative Grid Feed-in"
    }, {
        "key": "Et_pu1",
        "value": "9",
        "unit": "kWh",
        "name": "Cumulative Energy Purchased"
    }, {
        "key": "t_gc_tdy1",
        "value": "0.14",
        "unit": "kWh",
        "name": "Daily Grid Feed-in"
    }, {
        "key": "Etdy_pu1",
        "value": "1.09",
        "unit": "kWh",
        "name": "Daily Energy Purchased"
    }, {
        "key": "PG_V1",
        "value": "251.80",
        "unit": "V",
        "name": "Grid Voltage R/U/A"
    }, {
        "key": "PG_V2",
        "value": "0.00",
        "unit": "V",
        "name": "Grid Voltage S/V/B"
    }, {
        "key": "PG_V3",
        "value": "0.00",
        "unit": "V",
        "name": "Grid Voltage T/W/C"
    }, {
        "key": "PG_C1",
        "value": "6.50",
        "unit": "A",
        "name": "Grid Current R/U/A"
    }, {
        "key": "PG_C2",
        "value": "0.00",
        "unit": "A",
        "name": "Grid Current S/V/B"
    }, {
        "key": "PG_C3",
        "value": "0.00",
        "unit": "A",
        "name": "Grid Current T/W/C"
    }, {
        "key": "BUS_V2",
        "value": "396.00",
        "unit": "V",
        "name": "Busbar Voltage"
    }, {
        "key": "E_Puse_t1",
        "value": "3470.00",
        "unit": "W",
        "name": "Total Consumption Power"
    }, {
        "key": "Et_use1",
        "value": "249",
        "unit": "kWh",
        "name": "Cumulative Consumption"
    }, {
        "key": "Etdy_use1",
        "value": "7.26",
        "unit": "kWh",
        "name": "Daily Consumption"
    }, {
        "key": "B_ST1",
        "value": "Charging",
        "unit": null,
        "name": "Battery Status"
    }, {
        "key": "B_V1",
        "value": "50.60",
        "unit": "V",
        "name": "Battery Voltage"
    }, {
        "key": "B_C1",
        "value": "31.29",
        "unit": "A",
        "name": "Battery Current"
    }, {
        "key": "B_P1",
        "value": "-1650.00",
        "unit": "W",
        "name": "Battery Power"
    }, {
        "key": "GE_C1",
        "value": "20.41",
        "unit": "A",
        "name": "Production Current"
    }, {
        "key": "Pcg_dcg1",
        "value": "1590.00",
        "unit": "W",
        "name": "Charging/Discharging Power"
    }, {
        "key": "P_INV1",
        "value": "1000.00",
        "unit": "W",
        "name": "Storage Inverter Power"
    }, {
        "key": "B_left_cap1",
        "value": "71",
        "unit": "%",
        "name": "SoC"
    }, {
        "key": "t_cd_cg_n1",
        "value": "15",
        "unit": null,
        "name": "Cumulative Charging/Discharging Time"
    }, {
        "key": "t_cg_n1",
        "value": "80",
        "unit": "kWh",
        "name": "Total Charging Energy"
    }, {
        "key": "t_dcg_n1",
        "value": "72",
        "unit": "kWh",
        "name": "Total Discharging Energy"
    }, {
        "key": "Etdy_cg1",
        "value": "4.09",
        "unit": "kWh",
        "name": "Daily Charging Energy"
    }, {
        "key": "Etdy_dcg1",
        "value": "2.26",
        "unit": "kWh",
        "name": "Daily Discharging Energy"
    }, {
        "key": "INV_T0",
        "value": "39",
        "unit": "℃",
        "name": "Temperature- Inverter"
    }, {
        "key": "B_T1",
        "value": "22.00",
        "unit": "℃",
        "name": "Temperature- Battery"
    }, {
        "key": "T_RDT1",
        "value": "33",
        "unit": "℃",
        "name": "Radiator Temperature"
    }, {
        "key": "SYSTIM1",
        "value": "  22-05-30 09:54:51",
        "unit": null,
        "name": "System Time"
    }, {
        "key": "V_eme_o1",
        "value": "251.10",
        "unit": "V",
        "name": "Emergency Output Voltage"
    }, {
        "key": "P_eme_o1",
        "value": "0.00",
        "unit": "W",
        "name": "Emergency Output Power"
    }, {
        "key": "Etdy_ge_hou1",
        "value": "3.15",
        "unit": "h",
        "name": "Daily Production Hour"
    }, {
        "key": "HR_Ege_t1",
        "value": "60",
        "unit": "h",
        "name": "Total Production Hour"
    }, {
        "key": "CD_TIM1",
        "value": "0.03",
        "unit": "s",
        "name": "Countdown Time"
    }, {
        "key": "Buck_C1",
        "value": "4.67",
        "unit": "A",
        "name": "Buck Current"
    }, {
        "key": "LLC_BUS_V1",
        "value": "331.70",
        "unit": "V",
        "name": "LLC Busbar Voltage"
    }, {
        "key": "C_Dcp1",
        "value": "0.01",
        "unit": null,
        "name": "DC Component-Current"
    }, {
        "key": "V_Dcp1",
        "value": "-69.00",
        "unit": null,
        "name": "DC Component-Voltage"
    }, {
        "key": "INV_ST1",
        "value": "Grid connected",
        "unit": null,
        "name": "Inverter status"
    }]
}
1 Like

Thank you,
as i said i already use the integration using Solarman API and it works fine but i would try to get datas directly from the data logger directly with local access

Hi Guys, that 65534 that you’re seeing is the equivalent of - 1 when represented as an unsigned integer - I’m not sure how you would fix it, but I think you can declare the datatype as a signed integer and the issue will be sorted.

2 Likes

Hi Everyone,

Looking to change the amount charged overnight via solar estimates.

I know you can bring in things around python scripts etc, I’m just wondering what’s the easiest method?

I am currently capturing tomorrows solar estimate and have sofar2mqtt up and running.

Thanks for your help.

I use Solcast for my Solar predictions. I have a ‘input_number’ helper set up for the “overnight charge powerwall max charge” and then here are my automation (the Chooses part) that I use to set the different SOC levels required. Obviously I have a power wall but the principle should still be the same. Then using your sofar2mqtt you can turn on charging and turn off once the corresponding Sofar Battery SOC matches the input_number.overnight_charge_powerwall_max_charge

choose:
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        below: 8
    sequence:
      - service: input_number.set_value
        data:
          value: 100
        target:
          entity_id: input_number.overnight_powerwall_max_charge
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        above: 8
        below: 12
        value_template: ""
    sequence:
      - service: input_number.set_value
        data:
          value: 80
        target:
          entity_id: input_number.overnight_powerwall_max_charge
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        above: 12
        below: 14
    sequence:
      - service: input_number.set_value
        data:
          value: 70
        target:
          entity_id: input_number.overnight_powerwall_max_charge
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        above: 14
        below: 18
    sequence:
      - service: input_number.set_value
        data:
          value: 60
        target:
          entity_id: input_number.overnight_powerwall_max_charge
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        above: 18
    sequence:
      - service: input_number.set_value
        data:
          value: 50
        target:
          entity_id: input_number.overnight_powerwall_max_charge
  - conditions:
      - condition: numeric_state
        entity_id: sensor.solcast_forecast_tomorrow
        above: 18
    sequence:
      - service: input_number.set_value
        data:
          value: 35
        target:
          entity_id: input_number.overnight_powerwall_max_charge

A bit of a double post, but: PV Data from Solarman WiFi logger - with API - #78 by mhoogenbosch

Did you check if the token has changed? Follow my post here on how to do that: