PlantIn idea

Would it be possible to have plantIn app and home assistant work together to make adjustments as the app recommends?

Figure start by finding a way for these two things to share a message between one another then it’ll be something to building on…

Any ideas???

Snap pic with camera

Read webpage for recommendations

Change settings

certs

SHA-256 Fingerprint = 61 3C 98 30 87 97 8C BB 88 AA 04 B5 26 F6 10 A2 99 13 3C D6 DA 6D A1 AB F9 5D 81 4C 86 E9 3F C5

SHA-1 Fingerprint = B9 B5 2D F5 B1 BC 62 2D AB 29 C0 C2 CF 39 E6 32 F6 0E B2 6E

maybe able to send file here?

https://myplantin.com/next-api/trpc/plant-problems.diagnose?batch=1

curl 'https://myplantin.com/next-api/trpc/plant-problems.diagnose?batch=1' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Authorization: 044c8b07-eafe-4df9-895c-993502c8957e' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: G_ENABLED_IDPS=google; pln-token=044c8b07-eafe-4df9-895c-993502c8957e; pln-user-premium=true; pln-user-id=13265880; amp_d5c551=0dmtVtWfuoKAICgbsaX_1K.MTMyNjU4ODA=..1gni9mah5.1gniat51t.37.4.3b' \
  -H 'Origin: https://myplantin.com' \
  -H 'Referer: https://myplantin.com/plant-problems' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (X11; CrOS armv7l 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.105 Safari/537.36' \
  -H 'content-type: application/json' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="104"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
--data-raw '("0":{"json":{"images":[{"base64":"data:image/jpeg;base64,  "
--compressed

it then adds image encoded in base64

base64 ~/config/ my.jpg

whats the proper method to send this message back?

@jayrama @Samsung123

#!/bin/bash


img="$(cat garage-cam.jpg | base64)"


set prompt "#"

send "curl 'https://myplantin.com/next-api/trpc/plant-problems.diagnose?batch=1' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  -H 'Authorization: 044c8b07-eafe-4df9-895c-993502c8957e' \
  -H 'Connection: keep-alive' \
  -H 'Cookie: G_ENABLED_IDPS=google; pln-token=044c8b07-eafe-4df9-895c-993502c8957e; pln-user-premium=true; pln-user-id=13265880; amp_d5c551=0dmtVtWfuoKAICgbsaX_1K.MTMyNjU4ODA=..1gni9mah5.1gniat51t.37.4.3b' \
  -H 'Origin: https://myplantin.com' \
  -H 'Referer: https://myplantin.com/plant-problems' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (X11; CrOS armv7l 13597.84.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.105 Safari/537.36' \
  -H 'content-type: application/json' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="104"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  --data-raw '("0":{\"json\":{\"images\":[{\"base64\":\"data:image/jpeg;base64, "image=@$img" }]}}) "' \
  --compressed

echo $res | grep -qo '"status":200' && link=$(echo $res | sed -e 's/.*"link":"\([^"]*\).*/\1/' -e 's/\\//g')

my idea was to script it back out and send it back, but base 64 encoding fails it everytime…