Blockly and soil moisture sensor

Moderator: leecollings

Post Reply
Treskil
Posts: 2
Joined: Monday 03 February 2020 18:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Blockly and soil moisture sensor

Post by Treskil »

Hi folks,

I'm trying to automate my little chilli pot garden. I wanted to measure soil moisture. So I've managed to connect capacitive soil moisture sensor to esp board and send the data to domoticz which runs on RPi2B+. This results in a reading on a sensor "abc":
abc sensor.PNG
abc sensor.PNG (9.7 KiB) Viewed 372 times
The problem is that when I try to use this value in blockly to start the water pump:
blockly script.PNG
blockly script.PNG (39.06 KiB) Viewed 372 times
I get the error message in log:

2020-02-03 18:40:16.337 Error: EventSystem: Lua script error (Blockly), Name: Script #2_1 => [string "result = 0; weekday = os.date('*t')['wday']; ..."]:1: attempt to index a nil value (global 'utilitydevice')

What seems to the issue here? I have tried to find an answer on these forums to get this thing to work but I could not find any solution. Is this due to the value being of different type?
Treskil
Posts: 2
Joined: Monday 03 February 2020 18:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Blockly and soil moisture sensor

Post by Treskil »

I have solved it myself. I figured out that changing the sensor type from "leaf wetness" to any other does the trick.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest