|
Post by papa on May 27, 2020 18:50:52 GMT
ESP32-CAM Camera Board Intro to This Thread
As documented here, I previously experimented with the ESP32 TTGO White Camera Board & used it to create a MQTT Smart Doorbell device. Now I'm applying what I learned to the ESP32-CAM Camera board like this one. The ESP-CAM board looks interesting. It's cheaper & smaller than TTGO White Camera Board that I bought & used earlier. It has an SD card slot (up to 4GB capacity), a small indicator LED, 16 connector pins that could mount to a solderless breadboard or female dupont cables, & much online documentation. It also has a large flash LED which could help get a clearer camera image from a dark location.
Unlike TTGO White Camera Board, ESP32-CAM does not have screen, PIR, or USB connection. Some online builds address those lacks. In this thread, I'll review what I'm learning about the ESP-CAM board & include using it with MQTT & openHAB & perhaps more. BTW, I gained much insight from Random Nerd Tutorials which posted several threads about using the ESP32-CAM board.
|
|
|
Post by papa on May 27, 2020 18:55:12 GMT
First Views of the ESP32-CAM Board
<< Members, click on pics for larger view. Seen from the front, the ESP32-CAM board comes like this with detached camera (camera installation described below).
<< The ESP32 module on the back of Random Nerd's board is labeled "AI Thinker ESP32-S."
<< On the back of my board, the label only says "ESP32-S" The labeled pins on my board match Random Nerd's pinout chart & later I was able to use the AI Thinker pin assignments to program the board.
|
|
|
Post by papa on May 27, 2020 19:05:16 GMT
ESP32-CAM, Main Parts
<< This image illustrates well the main parts of the ESP32-CAM board.
^^ Forum members, click on pic for larger view.
|
|
|
Post by papa on May 27, 2020 19:17:24 GMT
ESP32-CAM, Labeling Male Connector Pins
Installing the Camera
<< Forum Members, click on pic for larger view.
This image labels the board's male connector pins. It also shows where to lift the ribbon cable lock to install the camera.
Install the camera to the board: Orient the board with the ESP32-CAM label at bottom. A little above that is a white plastic rectangle piece. At the top of the white plastic rectangle is a black plastic piece.
At the location labeled in the above pic, lift the black plastic on hinges. With the camera facing out & ribbon cable's contacts facing down, insert the ribbon cable's end ALL THE WAY in under the white plastic piece. Close down the black plastic lock over the ribbon cable's end. Before using the camera, remove its clear plastic protector.
|
|
|
Post by papa on May 27, 2020 19:51:30 GMT
Parts & Preparation to Connect ESP32-CAM for Flashing, Backup, & Using Besides an ESP32-CAM board, these are needed for flashing & backup: an FTDI programmer which must be able to function in 5 volts. I use this one. Others use this one. Also needed for flashing & backup: 5 female to female dupont cables (color-coded?) a USB cable (probably Mini-B type) to connect the FTDI programmer to a computer running Arduino IDE. =========================== Needed later to power the programmed ESP32-CAM board for regular use: A USB cable (Micro-B type), a 5 volt (2 Amp may be best) power adapter that accepts a USB cable
2 female to female dupont cables (red & black?) to connect the breakout board to the ESP32-CAM board.
Next, Using the ESP32-CAM with Existing Firmware (before re-programming)
|
|
|
Post by papa on May 28, 2020 19:28:54 GMT
Using the ESP32-CAM Board's Existing Firmware
(before re-programming) << Forum members, click on pic for larger view. ^^ Connect ESP32-CAM (EC) to FTDI as above illustration, except do NOT yet connect EC IO0 to EC Gnd. Connect EC Gnd to FTDI Gnd, EC 5v to FTDI vcc, EC U0T to FTDI Rx, EC U0R to FTDI Tx. Then use USB cable to connect FTDI to the Arduino IDE computer. In Arduino IDE Tools/Port, make sure the FTDI's port is selected. Open the Arduino IDE Serial Monitor. Press the ESP32-CAM's tiny reset button.
More ESP32-CAM specifications from here: External 4M PSRAM (camera memory) & SPI Flash Default 32Mbit (that is 4 Mega Bytes for firmware). This site helped make sense of using the ESP32-CAM's included app: In WiFi access points listed on your computer, connect to ESP32_CAM . Then in a browser, open the IP addresses. When we open http://192.168.4.1/jpg in a browser, the bright LED lights & a single image appears in the browser. When we open http://192.168.4.1/jpg_stream, the bright LED strobes & successive images appear in the browser. This included firmware demonstrates that the ESP32-CAM works & its possibilities.
Next, Backing Up Firmware
|
|
|
Post by papa on May 28, 2020 19:55:27 GMT
Backing Up & Restoring Firmware, Part 1
Being able to back up the as is & future ESP32-CAM's firmware is helpful. We can restore working programming without having to find & customize the source code (which we may not have in the case of this board's original firmware. Go here about installing ESPtool. If necessary, start with installing Python. (I used the latest version of Python 2.7 which we've used elsewhere on the forum) In Windows cmd or Linux Terminal, go to Python's install folder & enter: pip install esptool Then go to Python's \Scripts folder Unplug the FTDI's USB cable from the computer. As in the last post, connect ESP32-CAM (EC) to FTDI plus connect EC I00 to EC Gnd. Plug the USB cable into the computer. Press the ESP32-CAM's tiny reset button. This readies the ESP32-CAM for back up or (later) to receive new firmware.
In cmd or Terminal, enter the following command to back up the original firmware to Python's \Scripts folder: (Replace "#" with the FTDI's port number you used above in the Arduino IDE.
esptool.py -p COM# -b 460800 read_flash 0 0x400000 esp32_cam_orig.bin
Next, Backing Up & Restoring Firmware, Part 2
|
|
|
Post by papa on May 29, 2020 19:13:47 GMT
Backing Up & Restoring Firmware, Part 2, Continues Last Post
To restore saved firmware (If Arduino IDE Serial Monitor is open, close it.): Connect things as above, including ESP32-CAM IO0 to GND. Press tiny reset button. In cmd or Terminal, go to Python's \Scripts folder & enter the following command to restore saved firmware: ( Replace "#" with the FTDI's port number you used above in the Arduino IDE.
esptool.py --p COM# -b 460800 write_flash 0 esp32_cam_orig.bin
By changing the file names at the end of the read_flash & write_flash commands, these procedures can back up & restore other firmware.
Next, Flashing New Firmware
|
|
|
Post by papa on May 29, 2020 19:37:01 GMT
Preparations for New Firmware Arduino IDE & Getting the ESP32 Add-On Let's start with something basic. CameraWebServer.ino comes with the needed ESP32 Add-on for IDE & becomes available from Arduino IDE's File/Examples menu when one selects an ESP32 board in Arduino IDE's tools/boards menu. This site was helpful. It instructed installing the needed Arduino IDE & the ESP32 Add-on for Windows & Mac/Linux. In preparation for programming an ESP32 board (including a camera board), install the needed ESP32 add-on. I did so for Windows: In Arduino IDE, go to File\Preferences In the “Additional Board Manager URLs” near the bottom of Preferences, enter the following & click the OK button. If other URLs are in the box, end the list with a comma & then add this URL:
https://dl.espressif.com/dl/package_esp32_index.json
Go to Tools\Board\Boards Manager. In the box near Boards Manager's top, search for ESP32 & press the install button for “ESP32 by Espressif Systems“ When the install finishes, you may close the Boards Manager. Next, Arduino IDE: Accessing an ESP32 Board
|
|
|
Post by papa on May 29, 2020 19:42:04 GMT
Preparations for New Firmware
Arduino IDE: Accessing an ESP32 Board &
the Example Sketch, CameraWebServer.ino
The following assumes first having completed what's in the post just above. For the following to work, you MUST now connect the ESP32-CAM board (through the FTDI device) to your Arduino IDE computer's USB. (Follow the wiring connections in this post above. This time, DO CONNECT ESP32-CAM's IO0 to Gnd.) Then go to Arduino IDE's tools/boards menu & scroll down to see & select an ESP32 board. Perhaps your board will be listed, but I just use ESP32 Dev Module which seems generic. You may sometimes need to select a port in the config list that appeared when you selected the ESP32 board. In File/Examples, scroll down to ESP32/Camera & select CameraWebServer. Arduino IDE should open 4 files in 4 tabs: CameraWebServer.ino, app_httpd.cpp, camera_index.h, & camera_pins.
Caution: Before we upload any ESP32 sketch (even when you've selected a board that resembles a name on your board), we must make sure the sketch pin assignments are correct for our board. The Arduino IDE's configuration list for the board may also need some tweaking. (See more below) Next, Preparing to Use CameraWebServer.ino
|
|
|
Post by papa on May 29, 2020 19:52:57 GMT
Preparing to Use New Firmware, CameraWebServer.inoHint: In Arduino IDE's File/Preferences menu, have verbose output turned on for compiling & uploading. That gives steady feedback that things are working & any problems arising. In Arduino IDE's Tools/Board, tweak some configs for the ESP32 Dev Module. For the ESP32-CAM Board at least: Have Flash Frequency at 40MHz (the ESP32-CAM Board's crystal frequency) Have Partition Scheme at Huge APP (to help it be large enough for the sketch) Have PSRAM at enabled (the ESP32-CAM Board does have PSRAM, image RAM) (Important for some performance) Using your board's specs, change any board configs as needed. See this above post for ESP32-CAM Board specs. From installing Arduino IDE & the ESP32 add-on (see above), Arduino IDE has the libraries it needs for CameraWebServer.ino However, we need to ensure the sketch has the correct pins configuration for our board (in this case the ESP32-CAM board). Next, Pins Configuration for Our Board
|
|
|
Post by papa on May 29, 2020 20:40:48 GMT
Pins Configuration for ESP32-CAM BoardAs I cautioned above, "Before we upload any ESP32 sketch, we must make sure the sketch pin assignments are correct for our board." Sometimes different camera models' pin assignments may be listed within the sketch. For CameraWebServer.ino, the models' pin assignments are in the header file, camera_pins.h I confirmed that in camera_pins.h, the list for AI_Thinker matches the pin assignments for ESP32-CAM board.
An ESP32 Board's pins may be given on sites where they are sold or perhaps packaged with the board. If your board's pin list does not match anything in camera_pins.h, create a new model name & under it list new #defines with our camera board's pin assignments. Insert a new pin list just above the "#else" near the end of camera_pins.hEarly in CameraWebServer.ino is a section where we UNcomment (activate) only one #define of a camera model to match ours. For programming ESP32-CAM, in CameraWebServer.ino, UNcomment the line: #define CAMERA_MODEL_AI_THINKER Deactivate/comment out (start the lines with //) all the other camera model defines.
|
|
|
Post by papa on May 30, 2020 18:14:30 GMT
Final Preparations for Uploading the Firmware Sketch
In the CameraWebServer.ino sketch, replace the two "*******" with your WiFi's SSID & Password. Since you started with an example sketch, save as a new name, perhaps CameraWebServer02 Create the connection chain Arduino IDE computer, USB Cable, FTDI, ESP32-CAM (connecting FTDI & ESP32-CAM as shown above). Using a female to female dupont cable, also connect ESP32-CAM's IO0 pin to the nearby GND pin. In Arduino IDE's Tools/Port menu, make sure to have selected the COM port to which the FTDI / ESP32-CAM is connected
Open the Arduino IDE's Serial Monitor & have it set to 115200 baud. Press the tiny ESP32-CAM reset button.
Serial monitor output: rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2)) waiting for download
Uploading the CameraWebServer Firmware
|
|
|
Post by papa on May 30, 2020 18:47:49 GMT
Uploading the CameraWebServer Firmware
On the Arduino IDE, click Uploading.
At the bottom of Arduino IDE, wait for "Leaving ... Hard resetting via RTS pin ..."
After uploading the code, disconnect GPIO 0 (IO0) from GND.
Open the Arduino IDE Serial Monitor at a baud rate of 115200. Press ESP32-CAM's tiny on-board Reset button (RST) to see in the Serial Monitor: WiFi connected Starting web server on port: '80' Starting stream server on port: '81' Camera Ready! Use 'http://xxx.xxx.xx.xxx' to connect Make note of the IP address in the above Serial Monitor output. Next, Using the CameraWebServer Firmware
|
|
|
Post by papa on May 30, 2020 19:02:09 GMT
Using the CameraWebServer FirmwareIn a browser, enter the IP address you got from following the just above post. This displays a browser interface of several settings & buttons to work with the ESP32 camera board. This interface resulted from more than one firmware sketch I used, probably due to their all including the esp_camera.h library.
You may only need some of these settings/buttons, for example ... Resolution sets the image size in the browser (starts at QVGA) V-Flip & H-Flip help us orient the image as desired depending on how we orient the board. Get Still displays an image in the browserStart Stream displays continuously updated images in the browser. The following are only available for stills at CIF or lower resolution
Face Detection allows saving a face image for recognition. Enroll Face
Face Recognition activates recognizing saved faces (if Resolution is not set too high). If you click the Start Stream button, a continually updated camera image displays in the browser & image info scrolls in the Serial Monitor. Continues toward Using MQTT & Connecting with OpenHAB
|
|
|
Post by papa on May 31, 2020 19:41:32 GMT
Firmware to Display Camera Output in OpenHAB's UIAnother sketch I worked with came from a helpful site called Random Nerd TutorialThe sketch in the posting linked just above was set up for ESP32-CAM board. Unlike the last example with 4 files, this is only one file that contains the board pin assignments. I added: pin assignments & instructions for the TTGO White Board & some others (not all tested) some more instruction
lowering of the displayed frame size (resolution) for higher initial frame rate setting vertical flip so the image is right side up when the ESP32-CAM label is at the bottom So far my version of this sketch uses only the ESP32-CAM Board's camera, not other features (indicator LED, bright flash LED). Next, Customizing the Firmware Sketch
|
|
|
Post by papa on May 31, 2020 19:51:06 GMT
Customizing RN_VideoStreamttgo04_pub.ino You will need to customize the sketch:
Edit in your WiFi credentials.
In the lines that start with "#define CAMERA_MODEL" UNcomment (remove starting //) ONLY for #define CAMERA_MODEL_AI_THINKER. Make sure the other CAMERA_MODEL defines are commented (start with //). If you're using another board, match your board's pin assignments to one on the list or add a new define naming your board & a list of your board's pin assignments. Possible customizing: Not too far from the sketch's end is a line setting the persisting display resolution which you could make larger or smaller. config.frame_size = FRAMESIZE_VGA; Instead of VGA, you could use other resolution names. From esp_camera.h: Size of the output image: FRAMESIZE_ + QVGA|CIF|VGA|SVGA|XGA|SXGA|UXGA
A little later is a section starting with "#if defined(CAMERA_MODEL_AI_THINKER)"
This vertically flips the displayed image for my ESP32-CAM board. If you need this for another board, change the "#if defined..." to your camera model name or just delete "#if defined..." at the section's start & the "#endif" at the section's end. Next, Uploading RN_VideoStreamttgo04_pub.ino
|
|
|
Post by papa on May 31, 2020 19:56:00 GMT
Uploading RN_VideoStreamttgo04_pub.inoI adapted & augmented uploading/flashing instruction from the original sketch: As the first instruction indicates, to flash ESPxx boards, we've expected to ground a pin &/or mash a push button. That may be required for your board.
As the second instruction & above notes indicate, to put the ESP32-CAM board in flash mode: before uploading, connect the board's IO0 pin to GND & press its tiny reset button.
On the Arduino IDE, click Uploading. At the bottom of Arduino IDE, wait for "Leaving ... Hard resetting via RTS pin ..."
After uploading the code, disconnect GPIO 0 (IO0) from GND.
Next, Initial Results with RN_VideoStreamttgo04_pub.ino
|
|
|
Post by papa on May 31, 2020 20:01:27 GMT
Initial Results with RN_VideoStreamttgo04_pub.inoAfter uploading the sketch, disconnect GPIO 0 (IO0) from GND & open the Arduino IDE's Serial Monitor at 115200 baud. Push the board's reset button (RST). On the Serial Monitor, we should see something like: Open a browser tab, enter the IP displayed on the Serial Monitor, & see the video stream in the browser. Unlike with the other firmware sketches used above, the browser will not display a console to change settings for the camera board. The perhaps inconvenient news is that (at least for now) to change camera settings, one needs to change & add those settings in the sketch & upload again. The good news follows in the next post. Note: Serial Monitor output can be increased by UNcommenting the sketch lines (may affect the stream): // Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));
//Serial.printf("Starting web server on port: '%d'\n", config.server_port); Next, Display Camera Output in OpenHAB's UI
|
|
|
Post by papa on May 31, 2020 20:11:35 GMT
Display Camera Output in OpenHAB's UI Using RN_VideoStreamttgo04_pub FirmwareFrom following the post just above, note the camera board's IP address displayed on the Arduino IDE's Serial Monitor. Important: If you have a browser tab open hosting the video stream, CLOSE it now. (Otherwise the following won't work.) Have your openHAB User Interface (UI) open in a browser tab. In an openHAB .sitemap file, add this line, including your board's IP address where indicated (& save the file): With occasional temporary blanks, the openHAB UI should display the video stream, refreshing it every 1000 milliseconds (1 second).
Ahead, More Firmware Development including MQTT Connections to OpenHAB
|
|
|
Post by papa on Jun 1, 2020 20:11:43 GMT
Firmware to Connect ESP32-CAM to MQTT & OpenHAB
I have a firmware sketch (below) that accesses the ESP32-CAM Board's RSSI, firmware version, IP address, small indicator LED, & the large flash LED. Also via MQTT, the firmware sketch publishes messages for those functions to openHAB. I've configured openHAB Things, Channels, items, & sitemap to collect the data from this camera node & control the LEDs. Beside the above ESP32 camera sketches, my sketch also adapts computourist's ESP_SONOFF_12.ino.
I have the ESP32-CAM Board's camera streaming server working (in a browser tab or openHAB's UI) with the above. I did more clean up & reorganizing in the sketch.
Next, Preparing to Use the ESP32-CAM Board with openHAB
|
|
|
Post by papa on Jun 1, 2020 20:17:15 GMT
Preparing to Use the ESP32-CAM Board with openHABNeeded, things covered above: an ESP32-CAM Board, means to upload to the board (USB connector or FTDI device), Arduino IDE, & the ESP32 Add-on for Arduino IDE (see this post). Also needed: A recent openHAB install (2.5.x) with MQTT 2.x Binding & MQTT Broker also installed into openHAB. See here for installing openHAB 2.5.x. Start here for installing MQTT Binding & the embedded/system MQTT Broker. See here for some troubleshooting for MQTT. See here about Things. Also if needed, add a code library, using Arduino IDE's Tool/Library Manager: PubSubClient
If you have not yet, perhaps save a backup copy of your board's original firmware or other firmware presently on your board. See this post. (At the end of the read_flash command, change the file name.) Next, MQTT Firmware for ESP32-CAM Board
|
|
|
Post by papa on Jun 1, 2020 21:01:30 GMT
A Sketch of Firmware to Connect
ESP32-CAM Board to OpenHAB via MQTT
This sketch includes code from a PubSubClient example sketch for reconnecting MQTT if disconnected. ^^ June 1, 2020, updated & successfully used with ESP32-CAM.
With Arduino IDE, open the firmware sketch & OK its being put in a folder (make note of the folder) Close the firmware sketch just downloaded & saved to a folder. ESP32_pins.h (11.1 KB) << Download this .h header file to the folder now holding the firmware sketch that was downloaded above. ^^ June 1, 2020, updated & successfully used with ESP32-CAM. (Note: as camera_pins.h, this came with CameraWebServer.h, but I renamed & augmented it for this sketch.) Re-open the firmware sketch & see the ESP32_pins.h header file in another Arduino IDE tab From now on, when you save these two files, they should be in the same folder. Go to the next post for customization of the firmware sketch & the .h header file & configuring for openHAB Next, Customizing the ESP32-CAM Board Firmware
|
|
|
Post by papa on Jun 1, 2020 21:14:05 GMT
Customizing the ESP32-CAM Board Firmware (ESP32_mqtt....ino)nodeID must be a unique number for each WiFi device, but should be a unique node number in your openHAB system. I assume 34 below. wifi_ssid_A, wifi_password_A edit in your SSID & password If you have another WiFi station, edit in that info to wifi_ssid_B, wifi_password_B. Otherwise, give B the exact same WiFi info as A. mqtt_server, edit in the IP address of your computer hosting the mqtt broker (See above for install) In the list of Camera_Model_xxxxxx, UNcomment & thus select ONLY ONE board, in this case CAMERA_MODEL_AI_THINKER.
Important: At the end of the firmware's (version ...02d09f) customization section are six defines that are commented/deactivated: Enable_SSD1306, OLED_TXT, BTN, PIR, Camera & ACTOR. UNcomment/activate defines that apply to your board or to the functions you desire. !!!!! In the case of ESP32-CAM, UNcomment only #define CAMERA & #define ACTOR. Next, Uploading the Firmware & Expected Results
|
|
|
Post by papa on Jun 1, 2020 21:21:24 GMT
Uploading the ESP_mqtt Firmware & Expected ResultsConnect the ESP32-CAM board to your Arduino IDE computer's USB (via FTDI device).
As used before, connect the board's IO0 pin to GND. Press the board's reset button to compete putting the board into flashing mode.
From the Arduino IDE, upload the sketch. As before, wait for the IDE status message: "Leaving...Hard resetting via RTS pin..."
Next, Expected Results on Serial Monitor & Browser Tab
|
|
|
Post by papa on Jun 1, 2020 21:39:22 GMT
Expected Results on Serial Monitor, LED, & Browser Tab
On the ESP32-CAM board, disconnect IO0 from Gnd.
With the board connected to USB, on Arduino IDE, open the Serial Monitor at 115200 baud. Press the board's tiny reset button.
Then as the board connects to WiFi/MQTT shortly, the small indicator LED should flash then glow steady. Searching the sketch (Ctrl+F) for " ifdef SHOWME" will show you various success & error messages that can display on the serial monitor. Note the camera board's IP address displayed on the Arduino IDE's Serial Monitor. Enter that IP address in a browser tab & see the camera stream there.
Next, Configuring openHAB to Handle Board Data
|
|
|
Post by papa on Jun 2, 2020 15:44:03 GMT
Configuring openHAB to Handle ESP32-CAM Data Introduction
My current preferred method for configuring openHAB is using PaperUI for Add-ons, Things, Channels, & linking items to channels. I use text files to configure items, rules, & sitemaps. PaperUI displays Things in alphabetical order, but displays a Thing's channels in the order they are created.
Hint: This PaperUI process is somewhat tedious. It's quicker, but "messier" if you create Things as you need them. If you like the Things in neater alphabetical order, create them in that order & create all you may eventually use. (It should hurt nothing if they are not used.) For the ESP32-CAM Board, I'll likely use device/channel: 02 (RSSI), 03 (firmware version), 10 (IP address, & 16 (ACTOR to toggle the board's bright flash LED) & will create those in order below. Again the following assumes the features of a ESP32-CAM Board which has been programmed as above as Node 34. Adjust nodeId accordingly when you use the instructions below. Next, Create a Thing for Our ESP32-CAM Board
|
|
|
Post by papa on Jun 2, 2020 15:49:31 GMT
Configuring openHAB to Handle ESP32-CAM Data Create a Thing for Our BoardGo to PaperUI\Configuration\Things Click ( + ), (plus sign in a blue disc). Click " MQTT Binding". Click " ADD MANUALLY" We must choose which type of Thing for the MQTT 2.xx Binding. All but one type are standards that may fit a standard used on our physical device. For physical devices (like our DIY RFM69 or ESPxxxx Nodes) which don't match listed standards, we use the Generic Thing & configure the Thing with the message standard used on our device. Click Generic MQTT Thing Configure the Generic MQTT Thing using something like the following fields: (Customize to your situation.)
Name [starts as Generic MQTT Thing] Node34ec << This is the ESP32 Node to be accessed. Thing ID [ randomly generated for us ?? ] Location MAINFL [Thing's location on a tab of PaperUI\Control, may be blank ]
Bridge Selection MQTT Broker - mqtt:systemBroker:embedded-mqtt-broker ^^ If we install Mosquitto or another broker instead of the embedded broker, I believe that will show in the Bridge Selection drop down list. To create this Node34ec Thing with the above properties, click its ( ✔ ), check mark in a blue disc. Next, Create Channels for the Thing
|
|
|
Post by papa on Jun 2, 2020 15:54:01 GMT
Configuring openHAB to Handle ESP32-CAM Data Create Channels for the Thing
Hint: Be careful as you add Channel type, Channel id & Label below. Clicking created channels (pencil icon) for editing only lets us edit fields from MQTT State Topic & below. To change Channel type, etc, we must delete (trash can icon) the channel, start over, & accept the channel's being listed at the end of its Thing's list. First we add a channel 02 for the node's RSSI (signal strength).
To add channels to this Thing, click the ( + ) to the right of "Channels" Complete the Add channel fields: (Customize to your situation)
Channel type: Text value in the drop down list Channel id: Node34Channel02 Label: eCam1_34_RSSI MQTT state topic: home/esp_gw/nb/node34/dev02
Check your work & Click "SAVE"
Next, Continue Creating Other Channels
|
|
|
Post by papa on Jun 2, 2020 16:01:06 GMT
Continue Creating Other Channels For Node34ec (or your Thing)
Follow the same process as in the last post. The following lists the field contents which you customize to your situation. Channel type: Text value in the drop down list Channel id: Node34Channel03 Label: eCam1_34_Version [Node's Firmware version]
MQTT state topic: home/esp_gw/nb/node34/dev03 (Click SAVE) Channel type: Text value Channel id: Node34Channel10 Label: eCam1_34_IP [Node's IP address]
MQTT state topic: home/esp_gw/nb/node34/dev10 (Click SAVE) Channel type: On/Off Switch Channel id: Node34Channel16 Label: eCam1_34_ACT [Node's Flash LED] MQTT State Topic: home/esp_gw/nb/node34/dev16 MQTT Command Topic: home/esp_gw/sb/node34/dev16 (Click SAVE) Next, Create openHAB Items for Channel Data
|
|