Skip to content

Commit

Permalink
Update ink2mqtt.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouwe Westerdijk authored Jul 14, 2019
1 parent 59a398b commit a773bcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ink2mqtt/ink2mqtt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ while true; do
mapfile -t lines < <(ink -b bjnp://$PRINTERIP)
if [ "${lines[2]}" != "" ]; then
temp=\"Device\"
payload="{$temp:\"${lines[2]}\""
payload="{$temp: \"${lines[2]}\""
numlines=${#lines[@]}
for (( i=4; i<=$numlines-1; i++ ))
do
temp=${lines[i]//%}
temp=${temp//[[:space:]]/}
temp=${temp/:/'":"'}
temp=${temp/:/'": "'}
temp=\"$temp\"
payload=$payload",$temp"
done
Expand Down

0 comments on commit a773bcb

Please sign in to comment.