SmartThings Community

Raspberry Pi Monitor

raspberrypi
(Gene Clark) #65

(Gene Clark) #66

@cl0udninja I do see what you’re talking about in the handler but reason I went with temperature is because it shows up as temperature in webCoRE options.

(Janos Elohazi) #67

I think you see temperature because of the capability. Although the cpuTemperature wasn’t defined as an attribute in the DH. I changed that and pushed the new DH. Could you pls pull it again and publish and try again?

(Gene Clark) #68

That worked perfectly - thanks so much! I don’t mean to clog up this post but may I ask what this is for right here?

Does that work for this or something? Trying to find a soil sensor that works with SmartThings and PlantLink seems to be out of stock everywhere.

(Janos Elohazi) #69

haha yes. Well i kind of execute a python script on the backend and then read the STDOUT and convert that into JSON for the DH. I’m not good at python and any low level stuff for that matter.

(Gene Clark) #70

How do you connect the sensor to at though? I thought the sensor was Bluetooth.

(Janos Elohazi) #71

pi3 B+ has bluetooth. https://github.com/cl0udninja/janipi has the code, and it uses a python library from here: https://zsiti.eu/xiaomi-miflora-plant-sensor-pimatic-raspberry-pi-3/

1 Like
(Gene Clark) #72

@cl0udninja I know I’m a pain but trying to the LED controller setup now and followed instructions then started up using sudo java -jar /path to snapshot.jar. Seems like it’s running fine but smartapp won’t discover it. Should I be able to go to page raspberrypi:8180 like you can with monitor going to raspberrypi8080? I got an error when I tried and wondering if that may be tied into the non discovery issue. I’ve set the up address in the application.properties file. Thanks again for al your help!

(Gene Clark) #73

What is this device handler? Can you just create a device and set it to this handler? If so the. Do you set IP address in handler code? Would it both of these IP settings? Then is this port 80 or 8180 like it’s set on Pi? Sorry to bombard you with questions.

EDIT: So I tried that and see you can change those settings right in SmartThings app but if you can do it this way then how would you specify which pin you want to control?

(Janos Elohazi) #74

UPnP was removed from most of the code, I’m not sure which repo you checked out. UPnP in a couple of days leads to dying of the process, and I didn’t want to spend / had time to fix it. So you’ll need to set the IP and Port of the DH in the API Console of SmartThings.

None of the RaspberryPi services have a valid root URL. If you look at the *Controller.java files you can see the URLs each one handles, and only those ones are available. You didn’t share what URL you called you got the 404 for, so unfortunately I can’t give you specifics.

Suggestion is that whenever you want help from me let me know the branch you are using, and the URL that doesn’t work. You can also PM me instead of OFFing thig topic :wink:

(Janos Elohazi) #75

My daughter had a LED string of fireflies from Dollar Tree that was running on to AA batteries. I built a RaspberryPi and could directly hang the LED string onto a pin as it puts out 3.3V. The project handles a push button, that toggles the pin driving the LED string. And you can also access it over SmartThings with this DH.
The pin being controlled in the *Service.java. Can’t remember the exact name but I suppose you’d know based by it’s name.

The purpose of the project was that she can say goodnight to her google home mini, and that would turn this thing on as a nightlight.

(Gene Clark) #76

I sent you a PM but my main purpose to try controlling the cooling fan on one Pi then go from there with other projects.

(Gene Clark) #77

@cl0udninja getting a. Failed to start application message on a new setup. Says failed to listen on port 8080 - do I need to update port information somewhere?

(Gene Clark) #78

If you do this should that also mean you need to update the application.properties file located in /home/pi/raspberrypi.monitor-master/src/main/resources? If so then to what?

(Janos Elohazi) #79

That means that you have something else running on port 8080 already. You can change the port of the application by adding server.port = 8090 to the application.properties file and rebuild the project.

(Janos Elohazi) #80

When you specify the port as an input parameter when starting up you don’t need to modify the application.properties file.

(Gene Clark) #81

Thanks as always for your response. So do I add another line or hangs 8080 to 8081 as I’ve done? I can’t get it find the Pi in discovery.

(Gene Clark) #82

Also keep saying listener stopped and I’m not sure if I should or should not say that. Thanks again!

(Janos Elohazi) #83

As I said before that UPnP stuff is very unstable, and I actually took it out from my own deployments. It’s easier to have a rule on your router to tie the Pi’s MAC address to an IP address instead (so it will always get the same) and use the manual version of everything where you type in the IP address.

1 Like
(Janos Elohazi) #84

Here’ you’ve changed the UPnP port. I think you shouldn’t do that, but I don’t know much about UPnP. I would suggest to use the version w/o UPnP. I might just remove that completely from my repo