@xstrex - you are absolutely correct. I didn’t even notice, but my IP address was wrong. can’t believe I missed that. I must have looked it over 5 times. Guess each time I convinced myself it was correct.
Once I corrected to 192.168.0.30 it worked fine.
thank you very much for pointing me in correct direction!
Create a template sensor. There is even an example on the below webpage for another conversion of measurement, but pretty sure you’ll be able to use that as a starting point.
And in case you were gonna look for it, this is the formula : T(°C) = (T(°F) - 32) × 5/9
@xstrex i have been trying to get the camera to work, but not having luck.I am using the OctoPi image, but i think my issue is something with how to display the images.
it took me finally realizing that i needed my IP address followed by /webcam/?action=stream
once i did that it showed. but issue is it shows upside down. in Octoprint settings, i just use setting to vertical flip. i’m not sure how to do that in HA. and i dont know how to get to original mjpg_streamer library to set the -vf so on the Pi its always flipped. any thoughts?
@xstrex - that was it. On my OctoPi I set up the -vf and it’s all working now when showing to the HA. Thanks again for pointing me in the correct direction.
@farstreet - I finally figured out the syntax for having the units converted. Now as I was looking around more, I notice that if I change the main homeassistant branch under unit_system, I can use imperial (which will yield all temperatures for all sensors to be °F) or metric (to yield all as °C).
But ideally i would like to list the yr temperature as °F and the 3D printer temps as °C.
Here is the configuration.yaml code for the Template Sensor
I’ve set the overall unit_system to imperial, so I’m getting °F, but with my conversion, I’m was trying to get it to show °C for the 3D printer.
Any ideas how to do this? (i’ve tried calling out unit_of_measurement at the template sensor as well as in the customize sections. Neither had any affect to overrule the unit_system. I also tried to just comment out the unit_system, but i believe the default is metric, so everything showed as °C)
@IROTRAS you’ll have to check what resolution your camera actually supports first, otherwise it will fail. Check it with: sudo lsusb -v |grep wWidth
That should get you to the right area, might have to hit space a few times. But eventually you’ll end up with a table showing all supported resolutions. Let me dig out my config, and I’ll ping ya back.
EDIT: that might not work as expected, are you using a pi camera? I’m not, I’m using a USB webcam.
@xstrex - yes, I’m using the Pi camera. And I’m pretty sure it’s the v1 model. I noticed that if I click on the camera image from HA UI page, another screen opens up and that video is much better with respect to the lag. So it’s looking pretty good.
Eventually I’ll probably upgrade to a better camera. But next step is to just get some better lighting - hoping to integrate some LEDs and then have them as another switch in HA.
So it looks like you can get 1080p video out of the pi camera v1, though I’m not exactly sure how, but I’m sure google has a few suggestions. And yes, the image in the HA UI is a snapshot that updates every so often, but if you click on the image you get the live (proxy’ed) stream, that’s normal behavior, and performs the same for any other camera in HA.
As for the LED lights, I actually just finished a project doing exactly that. Though my LEDs aren’t controlled by HA (by design), but are controlled by Octopi via GCode. Information on that here and here. The reason I chose the GCode route, was because the lights are only needed when I’m actually printing something, or when I turn them on manually. With the above plugin and setup, you can use commands like “M150 R U B” in your starting GCode, followed by “M150” in your ending GCode. This works exactly as expected, every time. Lights turn on (white), print starts … print ends, lights turn off. Which makes shooting time-lapse video of the prints a lot more visible! Hope some of these help! Let me know if you’d like some of my STL’s and design files for the LED power control module.
Did you ever figure this out? I’m trying to accomplish the same thing. Not sure why the OctoPrint support converts in the first place since even in the US we all use Centigrade with our printers. LOL
Hey, I got some help from @bruhautomation on this and it was easier than I thought - just remove the unit of measurement line from your template sensor and everything shows up proper.
If you’re not familiar with @bruhautomation, he has an awesome channel on YouTube dedicated to Home Automation in general and HASS specifically. I can’t express enough how much subscribing has made all the difference in utilizing Home Assistant. When I started out, I’d never even seen a Pi before. With his help, I’ve gotten so involved that I am now a moderator here and I credit him for a lot of that. You owe it to yourself to check out his channel:
Here’s how I set up my sensors in my sensors.yaml file (it’s under my other template sensors, so platform: template may be necessary if your setup is different):
I think this would be the ideal state - remotely watching would be more valuable if you were able to start/stop prints. Did you find a solution for this?