-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading values changes them! #11
Comments
No idea? :) |
I have a good news for you: it's a firmware bug: I adapted my scripts to base them on torsten traenkner's expect scripts and I have the same bug. |
@Benjalien what device/firmware version do you have exactly? I wanted to do just the same as you but after reading your issue I remembered that even with the official app I had the impression that I lost the config some times , but always assumed it was some connection issue... Also, did you just try writing the whole config after reading? You probably don't change it manually often and it would be easy to detect the default config... |
Martin,
I have them all on "COBL0126 - 0.0.6-sygonix1". Meanwhile I got
myself a Xavax version to test/compare but I didn't had the time to do
so yet.
Pushing a complete backup after every call is indeed my very last
plan if nothing else works... but how would it work if my wife comes
home earlier and manually changes the setting? The heating would turn
off after 15 minutes max...
Keep me posted please, and good luck!
…On 23/02/2020 18:17, Martin Rauscher wrote:
@Benjalien <https://github.com/Benjalien> what device/firmware version
do you have exactly? I wanted to do just the same as you but after
reading your issue I remembered that even with the official app I had
the impression that I lost the config some times , but always assumed
it was some connection issue...
Also, did you just try writing the whole config after reading? You
probably don't change it manually often and it would be easy to detect
the default config...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11?email_source=notifications&email_token=AKN4NUIJUTEVI3QMRPJZMLTREKVTJA5CNFSM4GFXLEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWBTWY#issuecomment-590092763>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKN4NUNTQE63TBW3JGE3XYLREKVTJANCNFSM4GFXLEOA>.
|
Hi,
I'd like to use this nice piece of code to read the temperatures from my house and see if my setting are good (if my house is cooling down when I leave and warming up again before I come back.
I have more foreseen, but one step at a time.
Here's my issue: I did setup a script that "calls" all me devices every 15 minutes and fills a DB with the values. Every time I activate this I have about 50% of my devices loosing their config over a single day. Typically one value is missing: I have 2 open/close cycles and when I open the iOS app, I can only see 3 values instead of 4.
Did anyone experience this?
I was thinking about using only the "backup" command and then splitting the JSON inside my script, but I'm afraid I'll just invest a few hours to come to the same result :(
Hereby my script just in case someone would like to do something similar:
`#!/bin/bash
#read the devices from the DB
declare -A myDevices
deviceCount=0 # I have to keep track of it as my 2D array is simulated and Bash can't really loop them itself
declare -A myMeasures
while read device
do
devices+=("$device")
done < <(mysql -u CometBlue -pCometBluePass -D CometBlue --host localhost -BN -e "select id , '|', MAC, '|', PIN, '|', Name , '|', description from devices;")
#read the array of devices and split the lines to get the details into a bigger 2D table
for device in "${devices[@]}"
do
#echo "Device: " $device
((deviceCount++))
IFS='|' read -r -a array <<< "$device"
#trimming the whitespaces... should probably be done at "read" part rather than here :(
trimmed_ID=$(echo ${array[0]} | xargs)
myDevices[$trimmed_ID, MAC]=$(echo ${array[1]} | xargs)
myDevices[$trimmed_ID, PIN]=${array[2]}
myDevices[$trimmed_ID, Name]=${array[3]}
myDevices[$trimmed_ID, Description]=${array[4]}
done
#read the data from the CometBlues$cptr - $ {myDevices[$cptr, Description]} - ${myDevices[$cptr, MAC]}
for ((cptr=1; cptr<=$deviceCount; cptr++))
do
myMeasures[$cptr, MAC]=${myDevices[$cptr, MAC]}
echo ============================================================
echo
echo ============================================================
done
`
If someone wants the SQL creation script, just ask :)
BR
Benja
The text was updated successfully, but these errors were encountered: