more G-Labs products

Author Topic: GrovePi+ program, python script for host and some issues im having  (Read 607 times)

July 03, 2016, 02:30:08 PM
Read 607 times

baggins

  • *
  • Information
  • Newbie
  • Posts: 1
Hi Guys,

I am new to home genie but so far so good. I'm also not a programmer which will likely become very apparent very quickly.

I have modified slightly  a program and scripts  i got from a threat for adding MySensors via MQTT to hg.

Thanks to all of the contributors to the threads and code i used so far.

Please find attached the hgx and text file of the python script that sends the data to the hg MQTT broker.

Its all running on Pi 2's latest builds, latest updates.

I created this stew as it were this to get around (i do not possess the skills) writing code to pull sensor readings directly from the Grovepi+ python modules (i did attempt this but failed horribly).

Also using MQTT provides some future features I want to add later any way.

I would be very happy if this thread grows into a fully built program (i need help)

Currently the program seems to be working and I'm relatively sure that i just don't understand some basic fundamentals in either using hg and/or programming or likely both.

The script pulls data from the temp sensor on the GrovePi+ on one host and successfully sends the data via MQTT to the broker on the host running hg which receives the data creates a virtual module based on the MQTT message and displays the data in the notifications box.

However this is where the joy and bliss get a little muddy.

when i add the module to the home page it only displays the word "On". NOT 19.4
 for example as I'm sending the temp in Celsius. However i do see 19.4 as the Level in the notifications box?
 
I get the green light in the bottom corner of the widget and the temp in the notifications so im sure the widget is getting the data which seems to come in as Status.Level but i don't seem to be able to figure out how to get the widget to display the Status level with some description text (i.e. Temp).

Ive been staring at this for the last 24 hours any help would be deeply appreciated (possibly by more than my self).

P.S. Thanks for the all the help.


There are no comments for this topic. Do you want to be the first?