October 20Oct 20 Has anyone successfully used the PG3x Notification node server REST API from an external process?I'm working on a Raspberry Pi-based monitoring and control project for my water-well system. I'd like the Pi to be able to send alerts to my phone through UD Mobile, using the eisy Notification node server as the notification mechanism.I already receive multiple UD Mobile notifications each day that are triggered by code running on eisy itself. That part works reliably. What I'd like to establish is whether an external process running on the Pi can invoke the Notification node server to send notifications through the same mechanism.The Notification node server's Read Me describes a REST interface. I tried the following request from the Pi, using the eisy's configured address and REST port:curl -X POST \ -H "Content-Type: application/json" \ -d '{"node":"udmobile","message":"The Message","subject":"The Subject"}' \ http://192.168.7.241:8199/sendThe server responded:do_POST:Received: /send {}.Code: 200Command /send successHowever, no notification appeared in UD Mobile.Has anyone successfully sent UD Mobile notifications from a Raspberry Pi or another external process using the eisy Notification node server?If so, I'd appreciate a working example of the request, including the correct endpoint, HTTP method, payload format, and any required configuration or node-server-specific details.My objective is to have the Pi send alerts about significant abnormal water-well system conditions to UD Mobile, while keeping the Pi responsible for its monitoring and control-support functions.I'm particularly interested in a solution that works over the local network, without having to implement a separate push-notification mechanism.Thanks.
October 20Oct 20 Might be easier, to use the portal API directly, example: https://wiki.universal-devices.com/UD_Mobile#Network_Resources_SetupBonus Points: Create a Node Server that reads or polls the rpi for the well status, and populates as a node. Now all managed from eisy.
October 21Oct 21 Author 3 hours ago, Javi said:Might be easier, to use the portal API directly, example: https://wiki.universal-devices.com/UD_Mobile#Network_Resources_SetupBonus Points: Create a Node Server that reads or polls the rpi for the well status, and populates as a node. Now all managed from eisy.Thanks Javi - it sounds promising. I found the UD Mobile documentation for the direct Portal API (/api/push/notification/send), including the required x-api-key header and request body. However, it describes configuring an IoX Network Resource rather than calling the API directly from a Raspberry Pi.Could you provide a working Raspberry Pi curl example for this API, with the API key supplied through an environment variable rather than written directly into the command?
Create an account or sign in to comment