Giter Club home page Giter Club logo

hunter-wifi's People

Contributors

anubisg1 avatar bigmak40 avatar ccmmgg avatar ecodina avatar numericoverflow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hunter-wifi's Issues

http api called sucessfully but no action on the sprinkler

Hello, I installed everything as instructed. I issues an http api GET request and the reponse is as below:

{ "status": "Request received and processed correctly.", "result": "As you have not specified a 'result' argument, the result of the operation can't be send to you." }

But nothing is happening on the sprinkler side. How do I debug this? I soldered a wire to D0 and connected it to REM and another wire from 5v to AC2. I can see the device is online by visiting the web address which shows simple upload button:
Screenshot 2024-05-24 at 4 51 55 PM

Add documentation

Move the docs folder to the WiKi page and add the MQTT and OTA updates documentation.

Check that all functions are documented using @brief and @param.

Wifi AP & password not being saved (must re-enter on restart)

I've compiled for my NodeMCU (ES8266) using PlatformIO and VSCode and after some brief testing, the API seems to be working great.

The only problem is that my wireless SSID and password configuration do not survive a reboot. At every power cycle of the NodeMCU, I have to reconnect to the internal "WateringSystemAP" to re-enter the desired SSID and credentials.

Any idea why this might be happening?

Here's the compile output, in case it's helpful...

> Executing task: C:\Users\myUsername\.platformio\penv\Scripts\platformio.exe run --environment nodemcuv2 <

Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
----------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (3.1.0) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.30001.210627 (3.0.1)
 - tool-esptool 1.413.0 (4.13) 
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa 2.100300.0 (10.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPAsyncWiFiManager> 0.25.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP Async WebServer> 1.2.3
|   |   |-- <ESPAsyncTCP> 1.2.2
|   |   |-- <Hash> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |   |-- <ArduinoJson> 6.18.2
|-- <ArduinoJson> 6.18.2
|-- <ESP Async WebServer> 1.2.3
|   |-- <ESPAsyncTCP> 1.2.2
|   |-- <Hash> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ArduinoJson> 6.18.2
|-- <ESPAsyncTCP> 1.2.2
|-- <ESP8266HTTPClient> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <HunterRoam>
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Archiving .pio\build\nodemcuv2\lib8c0\libESP Async WebServer.a
Compiling .pio\build\nodemcuv2\lib487\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\abi.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\aes_unwrap.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\base64.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\cont.S.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\cont_util.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_app_entry_noextra4k.cpp.o  
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_eboot_command.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_features.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_flash_quirks.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_flash_utils.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_i2s.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_main.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_non32xfer.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_noniso.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_phy.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_postmortem.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_si2c.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_sigma_delta.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_spi_utils.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_timer.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_vm.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_waveform_phase.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_waveform_pwm.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring_analog.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring_digital.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring_pulse.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring_pwm.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\core_esp8266_wiring_shift.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\crc32.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\debug.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\exc-c-wrapper-handler.S.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\exc-sethandler.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\flash_hal.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\gdb_hooks.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\heap.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\hwdt_app_entry.cpp.o
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp: In member function 'void AsyncWiFiManager::copySSIDInfo(wifi_ssid_count_t)':
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp:314:12: warning: unused variable 'res' [-Wunused-variable]
  314 |       bool res=WiFi.getNetworkInfo(i, wifiSSIDs[i].SSID, wifiSSIDs[i].encryptionType, wifiSSIDs[i].RSSI, wifiSSIDs[i].BSSID, wifiSSIDs[i].channel, wifiSSIDs[i].isHidden);
      |            ^~~
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp: In member function 'boolean AsyncWiFiManager::isIp(String)':
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp:1166:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 1166 |   for (int i = 0; i < str.length(); i++) {
      |                   ~~^~~~~~~~~~~~~~
Compiling .pio\build\nodemcuv2\FrameworkArduino\libb64\cdecode.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\libb64\cencode.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\libc_replacements.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\mmu_iram.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\reboot_uart_dwnld.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs\spiffs_cache.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs\spiffs_check.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs\spiffs_gc.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs\spiffs_hydrogen.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs\spiffs_nucleus.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\spiffs_api.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\sqrt32.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\stdlib_noniso.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\time.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\uart.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\umm_malloc\umm_info.c.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\umm_malloc\umm_integrity.c.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\umm_malloc\umm_local.c.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\umm_malloc\umm_malloc.cpp.o
Compiling .pio\build\nodemcuv2\FrameworkArduino\umm_malloc\umm_poison.c.o
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp: At global scope:
.pio\libdeps\nodemcuv2\ESPAsyncWiFiManager\ESPAsyncWiFiManager.cpp:152:15: warning: 'String byteToHexString(uint8_t*, uint8_t, String)' defined but not used [-Wunused-function]  152 | static String byteToHexString(uint8_t* buf, uint8_t length, String strSeperator="-") {
      |               ^~~~~~~~~~~~~~~
Archiving .pio\build\nodemcuv2\libFrameworkArduino.a
Archiving .pio\build\nodemcuv2\lib487\libESPAsyncWiFiManager.a
Linking .pio\build\nodemcuv2\firmware.elf
Retrieving maximum program size .pio\build\nodemcuv2\firmware.elf
Checking size .pio\build\nodemcuv2\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=====     ]  52.3% (used 42820 bytes from 81920 bytes)
Flash: [=====     ]  51.5% (used 538045 bytes from 1044464 bytes)
Building .pio\build\nodemcuv2\firmware.bin
Creating BIN file ".pio\build\nodemcuv2\firmware.bin" using "C:\Users\myUsername\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\nodemcuv2\firmware.elf"
============================= [SUCCESS] Took 8.19 seconds =============================

Terminal will be reused by tasks, press any key to close it.

No response from hunter x-core after sending command

Hi there, I've just set up this project on a d1mini. Flashed and connected to the floating power source and the hunter as documented. When I send a command, I get a success back on the result topic, but nothing actually happens at the hunter. The only change I made to the project is to use D1 instead of D0.

How do I go about debugging this?

Help is much appreciated!

Can't compile

Hello

when i try to compile the sources i get this error


Compiling .pio/build/d1_mini/src/wifi.cpp.o
src/web_server.cpp: In function 'void setup_APIRoutes()':
src/web_server.cpp:63:21: error: 'handleNotFound' was not declared in this scope
   63 |   server.onNotFound(handleNotFound);
      |                     ^~~~~~~~~~~~~~
In file included from src/wifi.cpp:10:
include/mqtt.h:21:8: error: 'WiFiClient' does not name a type
   21 | extern WiFiClient espClient;
      |        ^~~~~~~~~~
*** [.pio/build/d1_mini/src/web_server.cpp.o] Error 1
*** [.pio/build/d1_mini/src/wifi.cpp.o] Error 1

what other details can I provide to help

Pre-build image keeps rebooting

Hi,
tanks to al the developers for the brilliant idea and the effort!!
Sorry but I have some problem with this program:
I've flashed the last pre-build image from this repo (1.0.0) to a D1 mini, the image seems to be working, I'm able to connect both to wifi and mqtt, i can send some command to my x-core 601 but after some time (minutes) when i look at the check-in topic on mqtt the system logs a reboot every 25 seconds or so. From there on the system works only on those rare moments between the reboots.

The strange thing is, if i clone the repo and build with pio the code to the same hw the image is different in size and behavior.
With the image I built the reboot problem seems to be gone but the WeMos didn't connect to mqtt.
I also note that the pre-build image is missing the option to enable/disable mqtt in the captive portal Wich is present in I compile the code.

Any advice? Many thanks.

P.s.

I suggest also to include in the doc the instructions to upload the data folder that contains the webpages to the device, otherwise the web interface is not working (only rest API are functioning). I'm not proficient with GitHub, so I'm not able to do a PR...sorry

Any ability to stop a program?

It's not in the docs, but I don't know if that means it hasn't been included yet, or if the capability isn't there.

I've tried using http://host/api/stop/program/1 but I just get a page back with the text "This is the API root"

Should be a quick yes/no answer 😄

Thank you!

Hunter Roam library on Arduino

Hello, in your documentation, you wrote that it should work with Arduino board. I'm trying to use the HunterRoam library with Arduino Mega (for 5V) and Arduino Nano 33 IoT without success. Do you have some feedback with this use case? You know if a onewire library is required? A particular PIN is required or D1 is ok?
With your WeMos D1 Mini Pro you don't need a common GND? Do you have another picture, because we don't see very well your board...
I have a Hunter XCore.

is improved web interface working?

Thank you for such a great project!

I am able to first boot the device, see the web interface and set up WIFI. I am now seeing the device in my network but there is not web interface nor is the device pinging back. any advise?
I saw that commit #21 was for an updated web interface. thanks

Proposal to make documentation easier to understand

I was put on the wrong track when reading this part of the documentation.
Easy changes
You can change the AP's SSID and password-protect it by changing the values in include/global_config.h. You can also change the GPIO that connects to the REM pin of the Hunter system (by default, GPIO16 / D0).

I didn't work yet with a D1 mini pro and didn't have pre-knowledge about the used WifiManager library and his http GUI interface (example: https://randomnerdtutorials.com/wifimanager-with-esp8266-autoconnect-custom-parameter-and-manage-your-ssid-and-password/)
So I thought that I could put here my home AP SSID and password directly. But it didn't work.
I figured out by our Google friend that these parameters where only for changing the SSID name of the WifiManager own open wifi access point and to protect it with a password. Nothing to do with the own home wifi-network parameters.

My mistake of course, lack of knowledge, but to help future users to not make the same mistake, maybe adapt the documentation like this?

Try it yourself
Download this project and upload it to your board. Afterwards, connect the microcontroller to the SmartPort (see how in the docs folder).

The first time you power it, by default a "WateringSystemAP" open unprotected WiFi access point will be created. Connect to it and your phone will ask to "sign-in". Click on the notification and follow the steps to connect to your home WiFi. If nothing happens when you connect to the AP, navigate to 192.168.4.1.
You can change this default open unprotected WiFi access point by adapting the AP's SSID "WateringSystemAP" to a name of your choice and password-protect it by changing the values in include/global_config.h

When the board is connected to your home router, you will have an easy to use HTTP API (endpoints in the docs folder).

Easy changes
In the same include/global_config.h as above, you can also change the GPIO that connects to the REM pin of the Hunter system (by default, GPIO16 / D0).

Power From SmartPort/Base Unit for 5VDC

Something I noticed while I was setting my PCC1200i up was that the 24VAC power supply, shows the listed output as (2) 12VAC lines. The backplane of the controller then combines the 2x12VAC to a 24VAC.

Based on your documentation, that the SmartPort power didn't work, may be because one leg (ACC1 or ACC2) is actually 12VAC and stepdown for 24VAC to 5VDC wouldn't get the required voltage?

Content-Type not sent in the webhook

while troubleshooting my server on why it could not decode the json response i found out that the wemos doesn't include the content-type in the HTTP response.

with manual curl

curl -X POST -H "Content-Type: application/json" -d '{"action": "Start zone 2 for 1 minutes.","action_num": 1,"zone": 2,"result": "No error.","result_num": 0}' http://192.168.0.2:8123/api/webhook/zone_start

my application works perfectly, but when i get the response from my wemos it doesn't work.
when doing a capture (see below screenshot), the content-type is missing

image

ESP Continuous reboot

Installed precompiled firmware from latest release. I am using a D1 Mini Pro (ESP-8266EX)

Monitoring shows this as device reboots every 10 seconds or so:

␐�!␛␐���1�)�␙␔␎␘�mounting FS...
mounted file system
reading config file
opened config file
{"mqtt_server":"","mqtt_port":0,"mqtt_username":"","mqtt_password":""}
json successfully parsed
*WM: Adding parameter
*WM: server
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: username
*WM: Adding parameter
*WM: password
*WM:
*WM: AutoConnect Try No.:
*WM: 0
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result: 
*WM: 3
*WM: IP Address:
*WM: 192.168.1.214
mDNS responder started

IP address: 192.168.1.214
:0
Ready! Open http://X-CORE.local in your browser

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffd40 end: 3fffffc0 offset: 01a0
3ffffee0:  feef0030 00000000 40228ac4 ffffffff  
3ffffef0:  3fff117c 3fff11f8 3fff1198 4022749d  
3fffff00:  3fff3634 3fff118c 3fff1198 40212d03  
3fffff10:  feefeffe feefeffe feefeffe feefeffe  
3fffff20:  00000000 3ffe8da5 00000000 00000000  
3fffff30:  00000001 00000000 3fff3b24 3fff3b14  
3fffff40:  40209f74 00000000 00000000 3fff15fc  
3fffff50:  3fffdad0 3fff11f8 3fff1288 40212f4c  
3fffff60:  00000000 3ffe8e60 00000001 3fff3f4c  
3fffff70:  feefef20 feefeffe feefeffe 402075f1  
3fffff80:  00000000 3ffe8e60 3fff117c 4022749d  
3fffff90:  feefeffe 3fff11f8 3fff117c 40205947  
3fffffa0:  3fffdad0 00000000 3fff15e8 402230ec  
3fffffb0:  feefeffe feefeffe 3ffe88e0 401003f5  
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Coexistence with actual ROAM receiver?

Do you happen to know if the electrical setup allows the ESP to be connected in parallel with the actual Hunter receiver (both connected at the same time?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.