Repository navigation
pysignalclirestapi for micropython? #901
|
I just came across the signal-cli-rest-api and tested it with sending messages with curl as documented - really easy! |
Replies: 1 comment 2 replies
|
For sending sensor readings, you can skip the wrapper and call the same Once connected to Wi-Fi: import requests
response = requests.post(
"http://192.168.1.10:8080/v2/send",
json={
"message": "Temperature: 23.5 C",
"number": "+YOUR_LINKED_NUMBER",
"recipients": ["+RECIPIENT_NUMBER"],
},
)
try:
print(response.status_code)
finally:
response.close()Replace the server's LAN address and both numbers, including their country codes. Use MicroPython's Checked the send endpoint and client source with Codex; not tested on ESP8266 hardware. |
For sending sensor readings, you can skip the wrapper and call the same
/v2/sendendpoint from MicroPython. Keep your working Signal API server running on the PC/Pi; the ESP only makes an HTTP request.Once connected to Wi-Fi:
Replace the server's LAN address and both numbers, including their country codes.
localhostwould refer to the ESP itself.Use MicroPython's
requests, rather than installin…