So I have MPU 6050 sensor connected to HA via ESPHOME. trying to get a trigger signal when a large metal object - a vehicle passes - to trigger cameras etc in homeassistant.
I could probably to the calculations in homeassistant - but it seems very unnecessary to sent all compass data to HA instead of just letting the esp make the calculations in the arduino unit. So what is the best approach to do that - and any suggestions on what to meaure.
Tried google - alot - to find example code in best practices on how to use the sensor in this manor.
So this is how its setup now. But I would instead like the arduino not to send the data to HA and instead just send a “vehicle_trigger = 1/0”
I agree with Daryl @zoogara, however there are four different magnetometer sensors in esphome. Why not use one of them? (There is even one built into esp32, but it may not be up to the job) ESPHome — ESPHome
No. Not unless it was solid lead maybe. The MPU6050 uses MEMS technology to detect movement. It’s a solid state device that uses gravity and acceleration forces to physically bend tiny levers inside a microchip.
darn, I bought the wrong sensors for my purposes. thanks for the links ill try getting another one. Would any of the three versions on the esphome page above be more or less suitable?
I would do some Googling to see which the most sensitive or has the fastest response.
Meanwhile the MPU6050 is a good sensor, not so useful in ESPHome maybe - but you can make some pretty cool things with them. Here’s some shameless self promotion, if you know anyone who has a caravan or RV.
You probably mixed the MPU6050 up with the MPU9250. They look very similar, however only the 9250 has 9dof and therefore a magnetometer.
I played around with the 9250, but getting it to work isn’t easy. The chip has to be calibrated which is quite complicated.
So I can find the GY-271 using QMC5883L on amazon for about 18 euro / 5pcs. I’m thinking its ok if they are a bit uncalibrated - I just need them to go “bananas” when something big metal passes?
Think so… read that the normal hall sensors are too weak. Im ordering them and well see. Still need to make some smart esphome code that does not spam homeassistant with a million compass readings and only sends “motion” or “no motion”.
thanks for the tip about rv-usage … actually have that need as well so the mpu6050 will go into that project
So… perhaps I could ask for some bright ideas. I would like this sensor not to send instant compass data to homeassistant but instead process the compass data internally and only provide a binary sensor information equivalent to “X-axel has changed more then a certain percentage set binary switch to true” - which would indicate that vehicle has passed. Haven’t found any good examples of that type of capabilities in the esphome code library. I’m thinking this would save alot of data I dont need in the HA.
… Help? right now its looking as the screenshot - but with working compass data… something glitchy when screenshot was done.