WebHook Configuration
The WebHook engine allows the WiCAN Pro to push vehicle data to an external server via HTTP/HTTPS POST requests. This is the primary method used for the Home Assistant integration, but it can also be configured to send data to any custom endpoint or cloud service.
1. WebHook Enable
This setting determines how the WiCAN manages its destination URLs.
- Enable: Automatically managed mode. If you are using the Home Assistant integration, the WiCAN will receive its configuration directly from Home Assistant. The URL and Interval fields will be locked (grayed out).
- Enable User Settings: Manual mode. This unlocks all fields, allowing you to manually input Primary/Failover URLs and custom intervals.
- Disable: Turns off the WebHook engine entirely to save bandwidth and processing power.
2. Server Configuration
- Primary URL: The main HTTP or HTTPS address where data will be sent (e.g.,
http://192.168.1.50:8123/api/webhook/abc...). - Failover URL: If the Primary URL returns a 404 or a timeout, the WiCAN will immediately attempt to send the same data packet to this backup address.
- WebHook Interval (s): Defines how frequently the WiCAN sends a data packet.
- Note: Setting this too low (e.g., 1s) can put a high load on your server and your Wi-Fi network.
3. WebHook Data Mode
This is a critical setting for managing data usage and server processing.
- Full Data: Every time the interval triggers, the WiCAN sends the current value of every active PID in the Automate engine.
- Changed Values Only: The WiCAN keeps a local "last sent" cache. It will only include a PID in the WebHook payload if its value has changed since the last transmission. This significantly reduces payload size.
4. Payload Structure
The WiCAN sends data in a standard JSON format. A typical payload looks like this:
{
"device_id": "WiCAN_Pro_A1B2",
"battery": 13.4,
"uptime": 3600,
"data": {
"speed": 65,
"rpm": 2450,
"soc": 78.5,
"coolant_temp": 92
}
}
5. WebHook Stats & Troubleshooting
The Web Interface provides real-time diagnostics for your connection:
- StatDescriptionOKTotal number of successfully acknowledged (HTTP 200) posts.
- FailNumber of failed attempts (Timeouts, 404s, 500s).
- Last PostA timestamp of the last attempted transmission.
- DetailsClick this to see the specific HTTP error code (e.g., 401 Unauthorized or -1 for No Connection).
Using HTTPS: If your webhook URL uses https://, ensure you have uploaded the correct root certificates in the System tab, or the WiCAN will reject the connection for security reasons.