Using moisture sensors to control programs - Printable Version +- SIP (https://nosack.com/sipforum) +-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1) +--- Forum: Writing plugins (https://nosack.com/sipforum/forumdisplay.php?fid=8) +--- Thread: Using moisture sensors to control programs (/showthread.php?tid=320) |
RE: Using moisture sensors to control programs - dan - 2024 Jan 29 Thanks for the test report. I will look into the missing log entries. By the way I have taken a quick look at your moisture_sensor plugin. I really like how it can accept sensor data from different sensor types through additional plugins. RE: Using moisture sensors to control programs - cdesouza - 2024 Mar 05 I cannot install the moisture_sensor_data_mqtt plugin because 1.) the following code in plugin_manager.py Code: short_list = [ The check 'if not "data"' filters out all the entries from the manifest file giving a empty list. Code: moisture_sensor_data_mqtt.py plugins if I change the check to 'if not " data "' (which probably is not correct) I can install the plugin but I cannot enable the plugin. 2.) I require the python module jmespath Does this need to be added by hand or can it be included in the base SIP install? RE: Using moisture sensors to control programs - dan - 2024 Mar 05 for #1: could you possibly rename your plugin files to something like moisture_sensor_info_mqtt.*? I know this could be a real pain. I will look for another solution. for #2 The jmespath module looks pretty useful. I will consider adding it to the base SIP install even though I prefer to keep things as small and simple as possible. Edit: I think the best solution for 1 would be to replace Code: short_list = [ Code: short_list = [] RE: Using moisture sensors to control programs - cdesouza - 2024 Mar 08 The code change looks like it should work, if you need help testing let me know. I have completed my testing and only found one issue, where I think we had a misunderstanding concerning the functionality of gv.rn. It does not make sense for the moisture_sensor_control plugin to have any influence on manual schedules, i.e. RUN NOW and RUN ONCE, however gv.rn is only set for RUN NOW and not for RUN ONCE. If you run a schedule manually it should not be blocked by a plugin. Apart from this issue and the ones mentioned in the previous post as far as I'm concerned the pull request containing the moisture_sensor_data_mqtt and the moisture_sensor_control plugins can be merged. RE: Using moisture sensors to control programs - dan - 2024 Mar 08 I pushed the plugin_manager change and added the jmespath/ module to the SIP install. RE: Using moisture sensors to control programs - cdesouza - 2024 Mar 11 In my opinion there is still a bug in the sub directory creation code of install_plugins() as the code assumes that all sub directories will be created under plugins/. The new plugins however required sub directories under data/ I have provided a PR with a proposed fix and a few other minor changes/improvements. On another subject any ideas why email notifications from the forum do not work? RE: Using moisture sensors to control programs - dan - 2024 Mar 12 Thank you for the bug fix and code improvements. Your work on the new plugins is greatly appreciated. They add some amazing capabilities. The forum is graciously provided by a SIP user and I don't have full admin rights so I can't address the email notification problem. RE: Using moisture sensors to control programs - dan - 2024 Mar 12 I installed the moisture_sensor_data_mqtt plugin and tried submitting the settings without adding a topic. This resulted in an "internal server error" page to be shown. Could there be a more user friendly way to indicate this type of error such as an alert box? RE: Using moisture sensors to control programs - cdesouza - 2024 Mar 14 I will take a look tomorrow EDIT I could not reproduce the issue, can you provide more details/the logs EDIT 2 I was able to reproduce the issue, will provide a fix this weekend. EDIT 3 PR is available RE: Using moisture sensors to control programs - dan - 2024 Mar 15 (2024 Mar 14, 07:39 PM)cdesouza Wrote: I will take a look tomorrow Thank you. The PR is merged. |