cbpi4-BLEHydrom 0.0.6__tar.gz → 0.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cbpi4-BLEHydrom
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: CraftBeerPi4 Plugin for Hydrom and Tilt (BLE connection)
5
5
  Home-page: https://github.com/avollkopf/cbpi4-BLEHydrom
6
6
  Author: Alexander Vollkopf
@@ -47,11 +47,12 @@ Python needs also special rights, to access the bluetooth resources. Therefore y
47
47
  2. Click the **Add** button in the Sensor section, and fill out the sensor properties:
48
48
  1. **Name**: Give the sensor a name. This is specific to this sensor reading, and does not need to match the Tilt color. It can be something like Wort Gravity or Tilt Temperature.
49
49
  2. **Type**: Choose BLEHydrom.
50
- 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom
51
- 4. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
52
- 5. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
53
- 6. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
54
- 7. Once you have filled out the sensor fields, click **Add**.
50
+ 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom.
51
+ 4. **Hardware**: Here you must select if you are using a Tilt / Hydrom or one of the Tilt pro series. Pro series devices can be used in parallel with a Tilt or Hydrom of the same color.
52
+ 5. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
53
+ 6. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
54
+ 7. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
55
+ 8. Once you have filled out the sensor fields, click **Add**.
55
56
  3. Repeat the above steps if you want additional sensors for the other data types that your Tilt reports, or if you have more than one Tilt, you can create sensors for those devices as well.
56
57
  4. You can now add any of the Tilt sensors to kettles or fermenters in your brewery, or you can view their data on the dashboard or graph their data with the charts.
57
58
 
@@ -66,13 +67,15 @@ You can use the Calibration Point fields to calibrate your Tilt, much like when
66
67
 
67
68
  ### Changelog:
68
69
 
69
- - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution
70
- - 01.12.23: (0.0.6.a1) updated requirements
71
- - 11.05.22: (0.0.5) Updated README (removed cbpi add)
72
- - 25.02.22: (0.0.4) Updated README
73
- - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!)
74
- - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter
75
- - 07.01.22: (0.0.1) Initial Commit
70
+ - 13.07.24: (0.0.8) Addition of Tilt Pro series.
71
+ - 13.04.24: (0.0.7) Test with new gattlib-dbus package.
72
+ - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution.
73
+ - 01.12.23: (0.0.6.a1) updated requirements.
74
+ - 11.05.22: (0.0.5) Updated README (removed cbpi add).
75
+ - 25.02.22: (0.0.4) Updated README.
76
+ - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!).
77
+ - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter.
78
+ - 07.01.22: (0.0.1) Initial Commit.
76
79
 
77
80
 
78
81
 
@@ -35,11 +35,12 @@ Python needs also special rights, to access the bluetooth resources. Therefore y
35
35
  2. Click the **Add** button in the Sensor section, and fill out the sensor properties:
36
36
  1. **Name**: Give the sensor a name. This is specific to this sensor reading, and does not need to match the Tilt color. It can be something like Wort Gravity or Tilt Temperature.
37
37
  2. **Type**: Choose BLEHydrom.
38
- 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom
39
- 4. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
40
- 5. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
41
- 6. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
42
- 7. Once you have filled out the sensor fields, click **Add**.
38
+ 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom.
39
+ 4. **Hardware**: Here you must select if you are using a Tilt / Hydrom or one of the Tilt pro series. Pro series devices can be used in parallel with a Tilt or Hydrom of the same color.
40
+ 5. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
41
+ 6. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
42
+ 7. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
43
+ 8. Once you have filled out the sensor fields, click **Add**.
43
44
  3. Repeat the above steps if you want additional sensors for the other data types that your Tilt reports, or if you have more than one Tilt, you can create sensors for those devices as well.
44
45
  4. You can now add any of the Tilt sensors to kettles or fermenters in your brewery, or you can view their data on the dashboard or graph their data with the charts.
45
46
 
@@ -54,11 +55,13 @@ You can use the Calibration Point fields to calibrate your Tilt, much like when
54
55
 
55
56
  ### Changelog:
56
57
 
57
- - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution
58
- - 01.12.23: (0.0.6.a1) updated requirements
59
- - 11.05.22: (0.0.5) Updated README (removed cbpi add)
60
- - 25.02.22: (0.0.4) Updated README
61
- - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!)
62
- - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter
63
- - 07.01.22: (0.0.1) Initial Commit
58
+ - 13.07.24: (0.0.8) Addition of Tilt Pro series.
59
+ - 13.04.24: (0.0.7) Test with new gattlib-dbus package.
60
+ - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution.
61
+ - 01.12.23: (0.0.6.a1) updated requirements.
62
+ - 11.05.22: (0.0.5) Updated README (removed cbpi add).
63
+ - 25.02.22: (0.0.4) Updated README.
64
+ - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!).
65
+ - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter.
66
+ - 07.01.22: (0.0.1) Initial Commit.
64
67
 
@@ -88,7 +88,15 @@ def readTilt(cache):
88
88
 
89
89
  for beacon in beacons:
90
90
  if beacon['uuid'] in TILTS.keys():
91
- cache[TILTS[beacon['uuid']]] = {'Temp': beacon['major'], 'Gravity': beacon['minor'], 'Time': time.time(),'RSSI': beacon['rssi']}
91
+ if int(beacon['minor']) < 2000:
92
+ # Tilt regular or Hydrom
93
+ cache[TILTS[beacon['uuid']]+"_0"] = {'Temp': beacon['major'], 'Gravity': beacon['minor'], 'Time': time.time(),'RSSI': beacon['rssi']}
94
+ else:
95
+ # Tilt mini pro
96
+ temp=float(beacon['major'])/10
97
+ gravity=float(beacon['minor'])/10
98
+ cache[TILTS[beacon['uuid']]+"_1"] = {'Temp': temp, 'Gravity': gravity, 'Time': time.time(),'RSSI': beacon['rssi']}
99
+ logging.info(cache)
92
100
  logging.info("Tilt data received: Temp: %s Gravity: %s RSSI: %s" % (beacon['major'], beacon['minor'], beacon['rssi']))
93
101
  time.sleep(4)
94
102
  except Exception as e:
@@ -100,6 +108,7 @@ def readTilt(cache):
100
108
 
101
109
 
102
110
  @parameters([Property.Select(label="Sensor color", options=["Red", "Green", "Black", "Purple", "Orange", "Blue", "Yellow", "Pink"], description="Select the color of your Tilt"),
111
+ Property.Select(label="Hardware", options=["Hydrom / Tilt", "Tilt Pro / Pro Mini"], description="Select the device Type (Default is Hydrom / Tilt)"),
103
112
  Property.Select(label= "Data Type", options=["Temperature", "Gravity","RSSI"], description="Select which type of data to register for this sensor"),
104
113
  Property.Select(label="Gravity Units", options=["SG", "Brix", "Plato"], description="Converts the gravity reading to this unit if the Data Type is set to Gravity"),
105
114
  Property.Text(label="Calibration Point 1", configurable=True, default_value="", description="Optional field for calibrating your Tilt. Enter data in the format uncalibrated=actual"),
@@ -109,14 +118,16 @@ class BLESensor(CBPiSensor):
109
118
 
110
119
  def __init__(self, cbpi, id, props):
111
120
  super(BLESensor, self).__init__(cbpi, id, props)
112
- global titl_cache
121
+ global tilt_cache
113
122
  self.value = 0
114
123
  self.calibration_equ=""
115
124
  self.x_cal_1=self.props.get("Calibration Point 1","")
116
125
  self.x_cal_2=self.props.get("Calibration Point 2","")
117
126
  self.x_cal_3=self.props.get("Calibration Point 3","")
118
127
 
119
- self.color=self.props.get("Sensor color","")
128
+ self.device_color=self.props.get("Sensor color","Green")
129
+ self.device = "_0" if self.props.get("Hardware","Hydrom / Tilt") == "Hydrom / Tilt" else "_1"
130
+ self.color = self.device_color + self.device
120
131
  self.sensorType=self.props.get("Data Type","Temperature")
121
132
  self.unitsGravity=self.props.get("Gravity Units","Plato")
122
133
  self.time_old = float(0)
@@ -148,7 +159,7 @@ class BLESensor(CBPiSensor):
148
159
  if current_time > self.time_old:
149
160
  reading = calcGravity(tilt_cache[self.color]['Gravity'], self.unitsGravity)
150
161
  reading = calibrate(reading, self.calibration_equ)
151
- reading = round(reading, 3)
162
+ reading = round(reading, 4)
152
163
  self.time_old = current_time
153
164
  self.value = reading
154
165
  self.log_data(self.value)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cbpi4-BLEHydrom
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: CraftBeerPi4 Plugin for Hydrom and Tilt (BLE connection)
5
5
  Home-page: https://github.com/avollkopf/cbpi4-BLEHydrom
6
6
  Author: Alexander Vollkopf
@@ -47,11 +47,12 @@ Python needs also special rights, to access the bluetooth resources. Therefore y
47
47
  2. Click the **Add** button in the Sensor section, and fill out the sensor properties:
48
48
  1. **Name**: Give the sensor a name. This is specific to this sensor reading, and does not need to match the Tilt color. It can be something like Wort Gravity or Tilt Temperature.
49
49
  2. **Type**: Choose BLEHydrom.
50
- 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom
51
- 4. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
52
- 5. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
53
- 6. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
54
- 7. Once you have filled out the sensor fields, click **Add**.
50
+ 3. **Tilt Color**: This should be set to the color of your Tilt or color config of your Hydrom.
51
+ 4. **Hardware**: Here you must select if you are using a Tilt / Hydrom or one of the Tilt pro series. Pro series devices can be used in parallel with a Tilt or Hydrom of the same color.
52
+ 5. **Data Type**: Each Tilt has three types of data that it reports, the Temperature,Gravity and RSSI, so select the one that you are configuring for this particular sensor.
53
+ 6. **Gravity Units**: *This field is only required if Data Type is set to Gravity*. The Tilt converts its readings into Specific Gravity by default. However you can choose one of three types here and it will be converted to that unit automatically. The choices are SG (Specific Gravity), Brix (or °Bx), and Plato (or °P).
54
+ 7. **Calibration Point 1-3***: *Optional*. These fields allow you to calibrate your Tilt by entering an uncalibrated reading from the Tilt and then the desired, calibrated value. The format to use is ***uncalibrated value* = *actual value*** (spacing is optional). More info on calibration is in the section below.
55
+ 8. Once you have filled out the sensor fields, click **Add**.
55
56
  3. Repeat the above steps if you want additional sensors for the other data types that your Tilt reports, or if you have more than one Tilt, you can create sensors for those devices as well.
56
57
  4. You can now add any of the Tilt sensors to kettles or fermenters in your brewery, or you can view their data on the dashboard or graph their data with the charts.
57
58
 
@@ -66,13 +67,15 @@ You can use the Calibration Point fields to calibrate your Tilt, much like when
66
67
 
67
68
  ### Changelog:
68
69
 
69
- - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution
70
- - 01.12.23: (0.0.6.a1) updated requirements
71
- - 11.05.22: (0.0.5) Updated README (removed cbpi add)
72
- - 25.02.22: (0.0.4) Updated README
73
- - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!)
74
- - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter
75
- - 07.01.22: (0.0.1) Initial Commit
70
+ - 13.07.24: (0.0.8) Addition of Tilt Pro series.
71
+ - 13.04.24: (0.0.7) Test with new gattlib-dbus package.
72
+ - 10.01.23: (0.0.6) Test with PyBluez Mod as interim solution.
73
+ - 01.12.23: (0.0.6.a1) updated requirements.
74
+ - 11.05.22: (0.0.5) Updated README (removed cbpi add).
75
+ - 25.02.22: (0.0.4) Updated README.
76
+ - 16.01.22: (0.0.3) Reduced mqtt traffic (->cbpi 4.0.1.2 required!!).
77
+ - 08.01.22: (0.0.2) Added RSSI value from blescan as parameter.
78
+ - 07.01.22: (0.0.1) Initial Commit.
76
79
 
77
80
 
78
81
 
@@ -0,0 +1,2 @@
1
+ PyBluez@ https://github.com/AcrossTheCloud/pybluez/archive/master.zip#egg=PyBluez-0.30
2
+ gattlib-dbus@ https://github.com/oscaracena/pygattlib/archive/dbus.zip#egg=gattlib-dbus-24.1.8
@@ -18,7 +18,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
18
18
 
19
19
 
20
20
  setup(name='cbpi4-BLEHydrom',
21
- version='0.0.6',
21
+ version='0.0.8',
22
22
  description='CraftBeerPi4 Plugin for Hydrom and Tilt (BLE connection)',
23
23
  author='Alexander Vollkopf',
24
24
  author_email='avollkopf@web.de',
@@ -31,7 +31,7 @@ setup(name='cbpi4-BLEHydrom',
31
31
  packages=['cbpi4-BLEHydrom'],
32
32
  install_requires=[
33
33
  'PyBluez @ https://github.com/AcrossTheCloud/pybluez/archive/master.zip#egg=PyBluez-0.30',
34
- 'gattlib==0.20210616',
34
+ 'gattlib-dbus @ https://github.com/oscaracena/pygattlib/archive/dbus.zip#egg=gattlib-dbus-24.1.8',
35
35
  ],
36
36
  long_description=long_description,
37
37
  long_description_content_type='text/markdown'
@@ -1,2 +0,0 @@
1
- PyBluez@ https://github.com/AcrossTheCloud/pybluez/archive/master.zip#egg=PyBluez-0.30
2
- gattlib==0.20210616
File without changes