LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Search Forums
User Name
Password

Notices


Showing results 1 to 7 of 7
Search took 0.01 seconds.
Search: Posts Made By: stockton
Forum: Programming 02-16-2024, 11:41 AM
Replies: 18
Views: 406
Posted By stockton
Thank you NevemTeve

Thank you NevemTeve
Forum: Programming 02-14-2024, 06:47 AM
Replies: 18
Views: 406
Posted By stockton
Tried pan64 suggestion but val is still a float ...

Tried pan64 suggestion but val is still a float
#
mosquitto_sub -h 192.168.8.119 -p 1883 -v -t '#' -C 15 | grep grid_voltage | awk 'NF>1{print $2}'

val=$(awk '{($2>200)?a=1:a=0;print a}')...
Forum: Programming 02-14-2024, 05:52 AM
Replies: 18
Views: 406
Posted By stockton
grid_voltage/state also returns the voltage as a...

grid_voltage/state also returns the voltage as a float
Forum: Programming 02-14-2024, 05:35 AM
Replies: 18
Views: 406
Posted By stockton
Thank you NevemTeve and Turbocapitalist but I...

Thank you NevemTeve and Turbocapitalist but I should have seen that 0.0 was not an integer.
Forum: Programming 02-14-2024, 04:57 AM
Replies: 18
Views: 406
Posted By stockton
solar_assistant/inverter_1/pv_voltage/state 64.2 ...

solar_assistant/inverter_1/pv_voltage/state 64.2
solar_assistant/inverter_1/grid_frequency/state 0.0
solar_assistant/inverter_1/pv_power/state 1216
solar_assistant/inverter_1/battery_voltage/state...
Forum: Programming 02-14-2024, 04:36 AM
Replies: 18
Views: 406
Posted By stockton
Not understanding bash script

Would the $2 have the value of grid_voltage?
Forum: Programming 02-14-2024, 03:34 AM
Replies: 18
Views: 406
Posted By stockton
SOLVED Not understanding bash script

With the following bash script I get error message "./GetGridVoltage.sh: line 3: [: 0.0: integer expression expected"


voltage=$( mosquitto_sub -h 192.168.8.119 -p 1883 -v -t '#' -C 15 | grep...
Showing results 1 to 7 of 7

 

Didn't find what you're looking for? Try Google:


  



All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration