After refreshing the entire process and starting over (including adding more fluff to my curl command)
curl -k -X POST -H "Accept-Encoding: gzip" -H "Authorization: Bearer SECRETTOKEN" -H "User-Agent: Google-HTTP-Java-Client/1.23.0 (gzip)"-H "Button-Serial-Number: SERIAL" -H "Button-Battery-Level: 53" -H "Button-Name: Flic2" -H "Timestamp: 2021-05-25T23:03:26Z" -H "Accept: */*" -H "Content-Type: application/json"-H -H "Cache-Control: no-cache" -H "Pragma: no-cache" -H "Connection: close" -d '{"entity_id":"input_boolean.flic2_singleclick"}' https://HOMEASSISTANT:8123/api/services/input_boolean/toggle
To get almost matching posts (using a local netcat Listener on Port 8080 (ncat.exe can be found with nmap on windows installations)
c:\PATH\TO\ncat.exe -l -p 8080
Somehow this last time around of starting all over from scratch worked, I can only assume that something was messed up in the Authorization header that was having issues (the string is so long you cant even see the delete button).
I honestly have no clue why it is now working considering i've set up and deleted these api requests a couple times even with new tokens.
For anyone who comes across this in the future or has issues/wants to integrate flic button HTTP requests to the Home Assistant API I will leave some notes. (this is running off a new install for a home-assistant VM).
Configuration.yaml file:
#flic v2 buttons
input_boolean:
flic1_singleclick:
name: flic1_singleclick
icon: mdi:checkbox-blank-circle
flic1_doubleclick:
name: flic1_doubleclick
icon: mdi:checkbox-multiple-blank-circle
flic1_hold:
name: flic1_hold
icon: mdi:clock
input_boolean:
flic2_singleclick:
name: flic2_singleclick
icon: mdi:checkbox-blank-circle
flic2_doubleclick:
name: flic2_doubleclick
icon: mdi:checkbox-multiple-blank-circle
flic2_hold:
name: flic2_hold
icon: mdi:clock
Adding by Entity in the lovelace UI creates visible toggles and these can be used by Node-Red to trigger whatever you want (including MQTT messages or other triggers)
Flic button Settings:
Post
URL: https://HOMEASSISTANTLOCATION:8123/api/services/input_boolean/toggle
add a Header String with the following information
Key: Authorization
Value: Bearer LONGLIVEDAPITOKEN
Body: {"entity_id":"input_boolean.flic2_singleclick"}
Content type: application/json
Timeout:10
Validate Certificates: Toggle yes (do this only if using https with a valid cert and using FQSN/DNS)
Here is an example on how to get that data into node-red and making changes for an example i am using the wled2 library to change to colors on a light strip.
EXAMPLE NODE-RED :
The Event State node is what is used to pull the boolean value. This leads into two change nodes that set the msg.payload to either red or green based on the boolean value of true or false. (also included are 2 Debug nodes to make sure the msg.payload actually changed before it hit the switch). This leads to a switch node that sends a signal based on the msg.payload being either red or green. If red it uses the WLED2 library to set the lights to red.