-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support to MQTT using Home Assistant #16
base: master
Are you sure you want to change the base?
Conversation
-code refactor adding mqtt and replacing the sequencer from thingspeak to mqtt. -changed delay to 10s to publish to mqtt -added comments of how to get the mqtt key
FWIW I just tested this and it worked flawlessly. Great writeup and submission, please merge! |
Hi! I'm back to searching for a way to get my co2/air temp sensor to actually power on properly and send values in Home Assistant (it's an aquaponics kit) when I happened across this Pull Request. For some reason all the other sensors power on and work as expected, but the co2 sensor does not. I believe it has to do with the amount of power it receives not being enough... so I have been trying to figure out if it's possible to delay the startup of all the other sensors so that the co2 sensor can start with all the power the huzzah32 can provide. My question: If you're using Home Assistant, why aren't you going through ESPHome? Also, because ESPHome integrates with Arduino code, is there anyway to merge your improvements with them so that both thingspeak and Arduino are no longer necessary and those using Home Assistant can keep all the programming in-house via ESPHome? Thanks! |
Help please, novice with Github here. I'm having difficulty with one sentence from the write up: "Check out the library for Atlas Scientific EZO devices in I2C mode at #16". There is no download option here. I installed gh CLI on Ubuntu, logged in, ran gh pr checkout 16 and received not a git repo. Where can I find hydroponics_mqtt.ino, pool_mqtt.ino (preferably) along with Adruino_mqtt.h? |
@Lasakro you can download or clone the fork itself from https://github.com/vessosa/Ezo_I2c_lib/tree/hydroponics_kit_mqtt |
I'm obviously newer to both Github & Arduino. Hardware not so much software. I'm starting with a new Adafruit HUZZAH32 to make sure I can get it to do what I what before purchasing the Hydroponics Kit. It does work fine with the default code. I followed the EZO instructions, Installed esp32, skipped ThingSpeak and the default EZO_and installed this library from the zip. Opened Example hydroponics_kit_mqtt. I set my Wifi & mqtt details but receive the following errors when compiling. Any idea? `/home/bob/Arduino/libraries/Ezo_I2c_lib-hydroponics_kit_mqtt/Ezo_i2c.cpp: In member function 'void Ezo_board::send_cmd_with_num(const char*, float, uint8_t)': exit status 1 Compilation error: exit status 1` |
@Lasakro That was fixed in this issue #17. Since this branch takes from an older version of the code it didn't get this fix. So what you can do is download/clone the main version of this code and make sure that works. Then download this code and take the file hydroponics_kit_mqtt.ino and copy it into your own code. The mqtt library comes from adafruit. We're not officially supporting mqtt right now so its gonna be up to you and others to make sure this code works past a certain point. |
@Atlas-Scientific I'd be happy documenting my progress here for a future merge back in. That's a little beyond my knowingness with Github ATM, unless you have a better idea. What's working and where it stops: 1) Follow EZO Instructions & Verify "Sent to ThingSpeak" msg. Works! "Sending data to mqtt" As for the Mosquitto broker, HA complains about loading the configuration.yaml changes from this fork but it still loads. See’s it as unsupported/Outdated. This is the updated version showing only one channel. As per HERE. 5) Modify configuration.yaml: My Mosquitto broker is still is not seeing the EZO device. Reading up HA with Adafruit MQTT next. |
Update: My Mosquitto broker "Listen to a topic" function does see "sensors/hydroponics-kit/ph". It's that the HA Entity is not being created. |
This works. I had a typo and was calling PH instead PM. I saw the entity PM but just pushed this off thinking maybe AM/PM had 2 entities. So this now works for Hydroponics Kit. Now going to see if I can make it work for what I need, Pool Kit. Changing EC to ORP. |
How can we calibrate the probes via MQTT? |
-code refactor adding mqtt and replacing the sequencer from thingspeak to mqtt.
-changed delay to 10s to publish to mqtt
-added comments of how to get the mqtt key