How do I test a cus...
 
Notifications
Clear all

[Solved] How do I test a custom input?  

  RSS

rbultman
(@rbultman)
New Member
Joined: 3 weeks ago
Posts: 3
November 5, 2020 8:02 am  

I'm working on a custom input that uses the Grove Pi+ board as the interface.  I have added the custom input via the web interface and got a success status, but when I try to see the output in the web interface, it shows that no input has been received from the sensor.  How can I test this module?  I feel like I am flying blind.

The sensor is the Grove Temperature and Humidity Sensor, which is based on the DHT11.  I used the existing DHT11 input file and modified it for reading via the Grove Pi+.  I have stand-along python code that communicates with the sensor just fine, but I can't figure out what my custom input code is doing.

Thanks!


Quote
Topic Tags
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 368
November 6, 2020 8:38 pm  

Try adding "self.logger.info("TEST")" and "self.logger.info("TEST value: {}".format(my_variable))" to give feedback in the log as to the value of your variables throughout your module. You will need to enable "Log Level: Debug" for the debug log lines to appear. This will help understand what coding is being executed and you can observe the values of your variables.

Mycodo Developer


ReplyQuote
rbultman
(@rbultman)
New Member
Joined: 3 weeks ago
Posts: 3
November 9, 2020 8:42 am  

Thanks @kylegabriel.


ReplyQuote