Skip to content
Discussion options

You must be logged in to vote

For sending sensor readings, you can skip the wrapper and call the same /v2/send endpoint 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:

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. localhost would refer to the ESP itself.

Use MicroPython's requests, rather than installin…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@msauereisen
Comment options

@msauereisen
Comment options

Answer selected by msauereisen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants