Git Product home page Git Product logo

mi600's People

Contributors

dr-ni avatar morrisjobke avatar tking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mi600's Issues

More comments and explanations

Please can you give a little more comments and explanations about the steps ( loops)

not all are so deep in bash and would like to improve bash skills as well.

I'm trying to include this script in a project " Volkzähler " visiualization of energy consumption for my home.

to do this it is enough for me to query the data every few minutes as in your script and send the values to the database via json request.

Translated with www.DeepL.com/Translator (free version)

Space after value ; check if zero

i use your script for my upload data script for VZ-DB
i also add nowaday the total value

i had some Problems with the value maybe that also some idea/problem for your script to take in account

for actual power i had a zero in front

#request value
ACTUAL=$(/usr/local/bin/mi600 $host_pv $user $password webdata_now_p)
#remove Zero in Front
ACTUAL_NUM=$(($ACTUAL))

and for Total Energy i had a Space at the End

#request value TOTAL
TOTAL=$(/usr/local/bin/mi600 $host_pv $user $password webdata_total_e)
#Remove end SPACE-Char
TOTAL_NUM=$(echo $TOTAL | sed 's/[[:space:]]*$//')

Import to IOBROKER

Hi
Thank you for the script to get the inverter values.
It works perfectly.
How can I insert and bundle the information in iobroker.
I have seen that many types provide the same information.
Very nice work without having to access a cloud.

I would be happy if there is a possibility to import the data into Iobroker.

Greetings Andre

Reduce number of curl

Hi,
thanks for the basic idea, I changed the script to something like this:

#!/bin/bash
host=$1
auth=$2:$3
FILE=$(mktemp)
trap "rm -f $FILE" EXIT
curl -s -u "$auth" "$host"/status.html > $FILE
grep "webdata_now_p =" $FILE | awk -F '"' '{print "Now:", $2, "W"}'
grep "webdata_today_e =" $FILE | awk -F '"' '{print "Today:", $2, "kWh"}'
grep "webdata_total_e =" $FILE | awk -F '"' '{print "Total:", $2, "kWh"}'

So you grab once the status to a temp-file, grep and awk it, and print everything at once. Or something like this:
pnow=$(grep "webdata_now_p =" $FILE | awk -F '"' '{print "Now:", $2, "W"}')
etoday=$(grep "webdata_today_e =" $FILE | awk -F '"' '{print "Today:", $2, "kWh"}')

more stuff as needed...

now=$(date)
echo "$now\t$pnow\t$etoday"

value without Unit

Is it possible that you add some extract string with the value but without extension Unit "W" or "kWh"

or a switch that that extract the 4 value and jump over your then
dat=$4
val=''
[ "$dat" = "webdata_today_e" ] && val=kWh
[ "$dat" = "webdata_total_e" ] && val=kWh
[ "$dat" = "webdata_now_p" ] && val=W
fi

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.