@@ -94,7 +94,7 @@ def timer10s():
94
94
print (">" + str (it ))
95
95
96
96
if (it == 6 * timer_interval ): # 6 = 1min / 60 = 10min
97
- print ("ok ---- 10 min" )
97
+ print ("ok ------------------- 10 min" )
98
98
solar_adc ()
99
99
show_temp ()
100
100
it = 0
@@ -131,7 +131,7 @@ def on_press_top_button():
131
131
idb = config .get ("influx_db" )
132
132
iusr = config .get ("influx_usr" )
133
133
ipsw = config .get ("influx_psw" )
134
- influx = InfluxDB (iurl , idb , iusr , ipsw )
134
+ influx = InfluxDB (iurl , idb , iusr , ipsw , "solar2" , place = "lab" )
135
135
print ("influx: " , iurl , idb )
136
136
except Exception as e :
137
137
print ("config Exception: {0}" .format (e ))
@@ -157,17 +157,22 @@ def on_press_top_button():
157
157
temp = show_temp ()
158
158
press = bmp .pressure
159
159
160
+ w ()
160
161
try :
161
- w ()
162
162
print ("test influx.write: " , temp , press )
163
163
influx .write ("octopuslab" , temperature = temp , pressure = press , solar20 = 123 , solar21 = 123 , solarBar = 0 )
164
164
except Exception as e :
165
165
print ("influx test Exception: {0}" .format (e ))
166
166
167
167
168
+ post_url = "https://parallelgarden.surikata.info:8086/write?db=octopuslab&u=octopus&p=chobotni4ky"
169
+ post_data = "solar,place=octopuslab,id=1 keepalive={0},solarVolt={1}"
170
+
171
+
168
172
# rtc = RTC() # real time
169
173
tim1 = Timer (0 ) # for main 10 sec timer
170
174
timer_init ()
171
175
176
+
172
177
# --- run ---
173
178
print ("--- run --- RAM free: " + str (mem_free ()))
0 commit comments