Skip to content

Commit fd37fc2

Browse files
authored
Merge pull request #201 from jay-oswald/docs-update
Docs update
2 parents a43ac52 + 02215a9 commit fd37fc2

File tree

4 files changed

+5
-134
lines changed

4 files changed

+5
-134
lines changed

README.md

+2-98
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
---
55
## MeatPi [Discord server](https://discord.com/invite/2hpHVDmyfw)
66
## Please update to the [latest firmware version](https://github.com/meatpiHQ/wican-fw/releases/)
7+
---
8+
# [Official Docs](https://meatpihq.github.io/wican-fw/)
79

810
## Order on [**Mouser**](https://www.mouser.com/c/?m=MeatPi) or [**Crowd Supply!**](https://www.crowdsupply.com/meatpi-electronics)
911

@@ -65,8 +67,6 @@
6567
- [OBDII PID Request Over MQTT](#5-obdii-pid-request-over-mqtt)
6668
- [Request Battery SoC MQTT Example](#6-request-battery-soc-mqtt-example)
6769
- [CAN to JSON interpreter - Filtring](#7-can-to-json-interpreter---filtring)
68-
- [Home Assistant](#home-assistant)
69-
7070
- [Firmware Update](#firmware-update)
7171
- [OTA](#1-ota)
7272
- [USB Flash](#2-usb-flash)
@@ -443,102 +443,6 @@ Custom ID|355| 170| 170| 170| 170|_5_| _34_| 170| 170
443443

444444
The PID in the configuration should be set to -1. The values to extract are from Byte 4 and Byte 5. The formula used here is (5 + 34)/2, so the expression to set is (B4 + B5)/2.
445445

446-
# Home Assistant
447-
448-
WiCAN seamlessly integrates with Home Assistant via the MQTT protocol, automatically retrieving vehicle data and publishing it. Sensors are created in Home Assistant without any manual intervention, making setup effortless.
449-
450-
**Note:** The [WiCAN PRO](https://www.crowdsupply.com/meatpi-electronics/wican-pro) model supports more car models.
451-
452-
<img width="394" alt="image" src="https://github.com/user-attachments/assets/75460d61-3656-4458-aeca-0f8a3657d6ad">
453-
454-
### Getting Started Guide
455-
456-
1. **Install the Home Assistant [Mosquitto broker add-on](https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md).**
457-
458-
2. **Create a new Home Assistant user account for WiCAN.**
459-
The credentials for this account will be used to configure the MQTT settings in WiCAN.
460-
461-
3. **Connect to the WiCAN access point** (WiCAN_xxxxxxxxxxxx).
462-
Open a web browser and navigate to [http://192.168.80.1/](http://192.168.80.1/).
463-
464-
4. **Set the "Mode" to AP+Station.**
465-
466-
5. **Enter your home WiFi network SSID and password.**
467-
468-
6. **Set the Protocol** to Autopid
469-
470-
7. **Enable [MQTT](#mqtt)** and enter the Home Assistant credentials created in step 2.
471-
472-
8. **Go to the "Automate" tab and enable "Vehicle Specific".**
473-
474-
9. **Select your vehicle model from the dropdown list.**
475-
If the list is empty, download the latest [vehicle profiles file](https://github.com/meatpiHQ/wican-fw/blob/main/vehicle_profiles.json) and upload it using the "Choose File" button.
476-
477-
10. **If your vehicle isn't supported,** open an issue on GitHub, and I’ll assist you in creating a new vehicle profile if possible.
478-
479-
11. **Enable "Home Assistant Discovery".**
480-
This will automatically create sensors in Home Assistant.
481-
482-
12. **Fill in the "Destination Topic" and "Cycle Time".**
483-
- **Destination Topic:** The MQTT topic where WiCAN will publish the vehicle data.
484-
- **Cycle Time:** Defines how frequently WiCAN will pull and publish the vehicle parameters to Home Assistant.
485-
486-
13. **Press the "Store" button and reboot the device** for the changes to take effect.
487-
488-
---
489-
490-
### ---Deprecated method---
491-
### 1. EV Battery Examples [Wiki Page](https://github.com/meatpiHQ/wican-fw/wiki/EV-Battery-SoC-in-Home-Assistant-%E2%80%90-Example)
492-
In this example, we will learn how to set up Home Assistant to request the battery State of Charge (SoC) without using Node-RED. This example has been tested on an ORA Funky Cat vehicle and can also serve as a reference for requesting other Parameter IDs (PIDs) in addition to SoC. EV Battery Examples [Wiki Page](https://github.com/meatpiHQ/wican-fw/wiki/EV-Battery-SoC-in-Home-Assistant-%E2%80%90-Example)
493-
494-
### 2. Node-RED Example
495-
496-
WiCAN is able to send CAN bus messages to Home Assistant using MQTT protocol. I found that using Node-RED is the simplest way to create automation based on the CAN messages received. This short video highlights some of the steps https://youtu.be/oR5HQIUPR9I
497-
498-
1. Install Home Assistant [Mosquitto broker add-on](https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md)
499-
2. Create Home Assistant new user account for WiCAN. These user credentials will be used to set up the MQTT setting for WiCAN.
500-
3. Connect to WiCAN access point WiCAN_xxxxxxxxxxxx then, using a web browser, go to http://192.168.80.1/
501-
4. Set the "Mode" to Ap+Station
502-
5. Fill in your Home WiFi network SSID and Password.
503-
6. Enable [MQTT](#mqtt) and fill in the Home Assistant credentials created in step 2
504-
7. Install Home Assistant [Node-RED Add-on](https://github.com/hassio-addons/addon-node-red)
505-
8. Download [wican_example_flow.json](https://github.com/meatpiHQ/wican-fw/blob/main/ha/wican_example_flow.json) and replace **device_id** with your WiCAN ID.
506-
9. Open Node-RED Add-on and import the edited "wican_example_flow.json"
507-
10. Double click on the subsction Node and edit the server fill in MQTT broker IP address and credentials created in step 2
508-
11. Click deploy.
509-
12. To create a new MQTT sensor, you’ll need to edit the configuration.yaml file by adding the following lines:
510-
511-
```
512-
mqtt:
513-
sensor:
514-
- name: "Amb Temp"
515-
state_topic: "CAR1/Amb_Temp"
516-
unit_of_measurement: "C"
517-
value_template: "{{ value_json.amb_temp }}"
518-
- name: "Fuel Level"
519-
state_topic: "CAR1/Fuel_Level"
520-
unit_of_measurement: "%"
521-
value_template: "{{ value_json.fuel_level }}"
522-
```
523-
11. Restart Home assistant
524-
12. After restart go to dashboard and Add new Card entity.
525-
526-
## Workflow summery
527-
528-
In this example we've got one Node subscribed to topic ``` wican/device_id/status ```, when WiCAN connects to the local network it will publish ``` {"status": "online"} ```. Once the Node function ``` Send Get Amb Temp req ``` receives online status it will send a OBD2 request to get the ambient temperature. The OBD2 request message looks like this:
529-
530-
``` { "bus": "0", "type": "tx", "frame": [{ "id": 2015, "dlc": 8, "rtr": false, "extd": false, "data": [2, 1, 70, 170, 170, 170, 170, 170] }] } ```
531-
532-
Frame ID : 2015 or 0x7DF
533-
PID: 70 or 0x46
534-
535-
Here is a good [reference](https://www.csselectronics.com/pages/obd2-pid-table-on-board-diagnostics-j1979) on how to construct a PID request. Note select DEC from drop down list.
536-
537-
We have another Node subscribed to topic ``` wican/device_id/can/rx ```, once the car ECU responds to the request the function ``` Parse Amb Temp RSP ``` will parse the message and publish a message to topic ``` CAR1/Amb_Temp ```. Notice that when you edited ``` configuration.yaml ``` file create an MQTT Entity that subscribes to ``` CAR1/Amb_Temp ``` and expects a message ``` { value_json.amb_temp } ``` with unit_of_measurement C.
538-
539-
![image](https://user-images.githubusercontent.com/94690098/204269457-32f6e6b5-c9be-44d0-b41c-36fa61b82258.png)
540-
541-
542446
# Firmware Update
543447

544448
## 1. OTA:

docs/content/0.index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ navigation: false
55

66
Welcome to the WiCan docs.
77

8-
Use the menu to find various pages. Also checkout out the [contributing](/contributing) page on how to add and update these docs
8+
Use the menu to find various pages. Also checkout out the [contributing](/contributing) page on how to add and update these docs.
9+
10+
These docs are very new, and defiantly still a work in progress. Feel free to help out and migrate helpful content from the main README.md, and various issues/discussions all in here to get them in in a central place

ha-battery-alert.md

-34
This file was deleted.

ha/wican_example_flow.json

-1
This file was deleted.

0 commit comments

Comments
 (0)