You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, I don't know Domoticz, but the jist is rather than one "raw_logs" table, the table names are appended with the year and month. Because of that, this would become a loop with a 2 part process; the first would be getting a list of tables whose names are like "raw_logs_", then doing a for-each through them. Here's the format of the table list:
From there, you could for-each them, swapping in the table name; I'm not sure if you need them all at once, or if you're running it once a month at the end or something, but that should get you code that will work with the split tables. Does that help?
Need help (little understanding of the use of databases):
Before the breakdown by month I used these commands to extract data and put them in Domoticz:
#!/bin/sh
result=
mysql -u UTILISATEUR -pMOTDEPASSE torque -N -e "SELECT kff126b FROM raw_logs ORDER BY time DESC LIMIT 1"
echo $result
kmrestant=
mysql -u UTILISATEUR -pMOTDEPASSE torque -N -e "SELECT kff126a FROM raw_logs ORDER BY time DESC LIMIT 1"
echo $kmrestant
curl -g "http://192.168.0.21:8080/json.htm?type=command¶m=udevice&idx=376&nvalue=0&svalue=$result"
curl -g "http://192.168.0.21:8080/json.htm?type=command¶m=udevice&idx=377&nvalue=0&svalue=$kmrestant"
Please can you help me to convert using new DB structure?
Thank
Aldo
The text was updated successfully, but these errors were encountered: