Hi,
May be a bit off topic but I am looking to Run My Meteobridge PRO 2 from a Waveshare UPS 3S so that it continues to collect data in the event of power failure. I noticed that the unit has an I2C header and they provide some example Python scripts for a Raspberry Pi to monitor it. I currently have a Temp/Humidity sensor plugged in to the I2C port to get outside of the pro 2 unit data and would want to keep as well.
Two questions come from this I suppose.
1) As I2C is a Bus technology can Meteobridge take input from multiple devices on the I2C Bus provided?
2) Maybe a question for Boris if the first question has an answer of yes, is it possible that the data provided by the UPS (as below) be captured and made available in Meteobridge as any other sensor data?
The product details are in the following web sits as well as access to the python code
https://www.waveshare.com/wiki/UPS_Module_3S
I suspect it is a very specific requirement but I thought I would ask if it was possible to start with.
Thanks for any pointers or suggestions.
Mark.
Meteobridge Pro2 Monitoring a UPS with a I2C interface
Moderator: Mattk
Meteobridge Pro2 Monitoring a UPS with a I2C interface
My Weather Website http:\\www.harpendenweatherstation.co.uk
Re: Meteobridge Pro2 Monitoring a UPS with a I2C interface
First of all pinout when looking at the back panel from behind the PRO2 is from left to right:
- SCL
- SDA
- GND
- 3.3V
When you connect a device while PRO2 is powered on you have a good chance that PRO2 hangs up. When you connect incorrectly you can damage the PRO2. So please be careful.
The I2C address of your device needs to be separate from the I2C devices inside the Meteobridge. Meteobridge already has devices on addresses 0x3c, 0x41, 0x45 and 0x76. As the INA219 has an adjustable address in the range from 0x40 to 0x4f it depends on how your device is configured (determined by the PCB, cannot be modified by SW). Meteobridge uses INA220 internally for measuring voltage, current and watts, so adapting the read out code to INA219 might be easy to do.
When you connect the device to your PRO2 and give me remote access, I can give adaption a try.
- SCL
- SDA
- GND
- 3.3V
When you connect a device while PRO2 is powered on you have a good chance that PRO2 hangs up. When you connect incorrectly you can damage the PRO2. So please be careful.
The I2C address of your device needs to be separate from the I2C devices inside the Meteobridge. Meteobridge already has devices on addresses 0x3c, 0x41, 0x45 and 0x76. As the INA219 has an adjustable address in the range from 0x40 to 0x4f it depends on how your device is configured (determined by the PCB, cannot be modified by SW). Meteobridge uses INA220 internally for measuring voltage, current and watts, so adapting the read out code to INA219 might be easy to do.
When you connect the device to your PRO2 and give me remote access, I can give adaption a try.
Re: Meteobridge Pro2 Monitoring a UPS with a I2C interface
I inspected the python code and unfortunately the module uses address 0x41.
So we are out of luck 
Code: Select all
# Create an INA219 instance.
ina219 = INA219(addr=0x41)

Re: Meteobridge Pro2 Monitoring a UPS with a I2C interface
HI Boris,
Thanks for taking a look for me much aprechiated, shame there is an address clash, never mind it was a nice to have if it were possible.
Regards
Mark.
Thanks for taking a look for me much aprechiated, shame there is an address clash, never mind it was a nice to have if it were possible.
Regards
Mark.
My Weather Website http:\\www.harpendenweatherstation.co.uk