Coder Social home page Coder Social logo

Comments (19)

wills106 avatar wills106 commented on May 28, 2024

Release 0.4.4 Starts to partially address this issue, but in a crude hard encoded way.

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

Just checked over the docs. Gen2 & Gen3 uses Lo for hours and Hi for mins. But Gen4 has swapped it to Lo for mins and Hi for hours...

Will need a separate "TIME_OPTIONS" for Gen4 ie "TIME_OPTIONS_Gen4"

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

It's only meant as a quick stop gap, I'll do the same for Gen4 for the time being.
At least we have partial functionality even if it's in 15min chunks. Should cover most use cases?

I guess it depends if the HA mods would allow this method in an official Integration?
Hopefully date_time will end up as a proper entity as some point in the near future. I know it's been asked a number of times in the Dev Chat on Discord.

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

Thanks, yes, indeed this should cover most cases !

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

Do your times (discharger_start_time_2 etc) report back as 01:05 or 1:5?

I had to pad out the ones for Gen2 / Gen3 as the Inverter's return the values without the leading zero.

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

It's annoying they keep switching things. Like the above mentioned flip of Hi and Lo for the hours and mins.

I have added in the Gen4 times & selects. Hopefully they are correct.
I have not added it to a release yet. Could you let me know if they look correct?

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

So potentially TIME_OPTIONS_GEN4 isn't needed?

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

I am not sure if the documentation is correct ....

Wouldn't be the first time

from homeassistant-solax-modbus.

infradom avatar infradom commented on May 28, 2024

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

Thanks for validating that.

Once I have confirmation that Gen2 works the same as Gen3 I'll release it all as 0.4.5

from homeassistant-solax-modbus.

AviadorLP avatar AviadorLP commented on May 28, 2024

Since you are changing times to full digits can you do that to the sensor.solax_rtc please ?
already done the change to your code but don't know if it affects anything else.

        rtc_seconds = str(decoder.decode_16bit_uint())
        self.data["rtc_seconds"] = rtc_seconds
        
        rtc_minutes = str(decoder.decode_16bit_uint())
        rtc_hours = str(decoder.decode_16bit_uint())
        rtc_days = str(decoder.decode_16bit_uint())
        rtc_months = str(decoder.decode_16bit_uint())
        rtc_years = str(decoder.decode_16bit_uint())
        
        self.data["rtc"] = f"{rtc_hours.zfill(2)}:{rtc_minutes.zfill(2)}:{rtc_seconds.zfill(2)} {rtc_days.zfill(2)}/{rtc_months.zfill(2)}/{rtc_years.zfill(2)}"

from homeassistant-solax-modbus.

wills106 avatar wills106 commented on May 28, 2024

Closing down due to being on the Todo List #37 for further investigation.

from homeassistant-solax-modbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.