Giter Club home page Giter Club logo

Comments (2)

BlazejosP avatar BlazejosP commented on May 27, 2024

Thanks for mentioning that. That was for now just the temporary solution just to proof that data can be pulled and show on the screen even if is just working in this specific configuration One Plant -> 2 devices [first inverter second Dongle] I have exactly the same configuration . I d'like to write interface which will show dynamically data on screen with use of TUI LINUX terminal TUI for user usage here you will be able chose from which Plant (Is possible more than one) and which device (as you mentioned can be in different order or can be more than one inverter or even more devices battery for example) you can present data on screen. Second issue is when TUI will be written will be just for user lookup sometimes. Real use of this script will be automatically pull up data to InfluxDB/domoticz/MQTT. Actually my plan is to made in TUI configuration option where you chose what will be scraped from which Plant->specific device that will be saved in config file and then in background file will pull-up data which you chosen before with use of TUI.

from huawei-sun2000-api-cli.

BlazejosP avatar BlazejosP commented on May 27, 2024

No that is my

Device 1: [12345679]
Dongle	Device Name: bla bla
Device SN: [bla bla]
Software version: V100R001C00SPC111

Device 2: [12345679]
Smart String Inverter	Inverter Type: SUN2000-5KTL-M0
Device Name: [bla bla] 
Device SN: [bla bla]
Software version: V100R001C00SPC120

So inverter in in second place as (Device 2) That is when I call inverter device inside different functions I use position 1 in array we start from 0 in my case that is dongle in your case is reverse as you mentioned in your previous post.

My case

getDevRealKpi  ${device_Id_array[1]} ${device_TypeId_array[1]}			
getDevFiveMinutes ${device_Id_array[1]} ${device_TypeId_array[1]} $curent_time
getDevKpiDay ${device_Id_array[1]} ${device_TypeId_array[1]} $curent_time
getDevKpiMonth ${device_Id_array[1]} ${device_TypeId_array[1]} $curent_time
getDevKpiYear ${device_Id_array[1]} ${device_TypeId_array[1]} $curent_time

Proposition of solution for your configuration

getDevRealKpi  ${device_Id_array[0]} ${device_TypeId_array[0]}			
getDevFiveMinutes ${device_Id_array[0]} ${device_TypeId_array[0]} $curent_time
getDevKpiDay ${device_Id_array[0]} ${device_TypeId_array[0]} $curent_time
getDevKpiMonth ${device_Id_array[0]} ${device_TypeId_array[0]} $curent_time
getDevKpiYear ${device_Id_array[0]} ${device_TypeId_array[0]} $curent_time

But configurations and order of devices my be different for any person that is you have right is necessary to solve this in dynamical way whatever devices and order person will have. So this now is just temporary until I wrote interface in TUI and such numbers will be inserted inside functions in dynamically way. BTW if you d'like contribute your code related to this problem I will be really happy just create pull request :)

The same problem is with Power plants. I have only one because small solar installation but may existing peoples with more than one Plant. that is now is hardcoded position 0 in array. That must be also changed dynamically way

# We start function to get list of devices inside one particular plant
getDevList ${stations_Code_array[0]} $number_of_plants
			
						
# Statistical data about whole Power Plant
			
getStationRealKpi ${stations_Code_array[0]}	
getKpiStationHour ${stations_Code_array[0]} $curent_time
getKpiStationMonth ${stations_Code_array[0]} $curent_time
getKpiStationMonth ${stations_Code_array[0]} $curent_time
getKpiStationYear ${stations_Code_array[0]} $curent_time

from huawei-sun2000-api-cli.

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.