Open threadstone83 opened 2 months ago
I made a safety check for this in the code to prevent sending 0 values. I added also some other exception handling, as on my end, the Json Data was sometimes empty for some reason and that raised a notify exception. I am still not fully done with the change, but will copy paste here the solution to your issue. Not the "cleanest" solution, but it does what is needed.
Sounds really good! Thank you in advance.
search for next_revision.parse... and replace it. you can also comment the notify if you want. next_revision.parse(response_json, 7, 0, 4) total_water_temp = total_water.value * 1000 total_water.parse(response_json, 8, 0, 8) if total_water.value < total_water_temp: notify.publish("Correction made - new value = "+str(total_water_temp)+" - wrong value = "+str(total_water.value),3) total_water.value = total_water_temp total_softwater_proportion.parse(response_json, 9, 0, 8)
I will try it when I'm back home. Can you tell me in which file I have to change it?
Getjudo.py
Sorry for the late answer. I was on holiday and after that I forgot it :-(
I have checked. If I'm right, I have to change this:
To this:
next_revision.parse(response_json, 7, 0, 4)
total_water_temp = total_water.value * 1000
total_water.parse(response_json, 8, 0, 8)
if total_water.value < total_water_temp:
notify.publish("Correction made - new value = "+str(total_water_temp)+" - wrong value = "+str(total_water.value),3)
total_water.value = total_water_temp
total_softwater_proportion.parse(response_json, 9, 0, 8)
Can you please confirm?
Inside the if you have to replace the total_water_temp = total_water.value * 1000 onwards until total_softwater_proportion.parse(response_json, 9, 0, 8) the next revision can stay as is. Seems that there is a small difference to my code
Sorry, I didn't got it :-( Can you eventually copy the code and invite here? Why there is a difference I can not say. It's all complete your code (the Getjudo.py and the code).
It is not my code USE_WITH_SOFTWELL_P was added and is not in my code base. You have to merge on your own, you can make that :)
Sorry, I mixed you up with www-ShapeLabs-de. I only have copied his files at the beginning of the year.
I think I got it. I just have to add the lines with an # behind:
next_revision.parse(response_json, 7, 0, 4)
if config_getjudo.USE_WITH_SOFTWELL_P == False:
total_water.parse(response_json, 8, 0, 8)
if total_water.value < total_water_temp: #
notify.publish("Correction made - new value = "+str(total_water_temp)+" - wrong value = "+str(total_water.value),3) #
total_water.value = total_water_temp #
salt_stock.parse(response_json,94, 0, 4)
salt_range.parse(response_json,94, 4, 8)
total_softwater_proportion.parse(response_json, 9, 0, 8)
water_flow.parse(response_json, 790, 34, 38)
batt_capacity.parse(response_json, 93, 6, 8)
water_lock.parse(response_json, 792, 2, 4)
sleepmode.parse(response_json,792, 20, 22)
max_waterflow.parse(response_json, 792, 26, 30)
extraction_quantity.parse(response_json, 792, 30, 34)
extraction_time.parse(response_json, 792, 34, 38)
holidaymode.parse(response_json,792, 38, 40)
else:
total_water.parse(response_json, 9, 0, 8)
Hi to all,
from time to time the total water percentage switches for some seconds (not a complete minute) to zero (see attached picture).
In the protocol I can not find any suspicious entry.
@www-ShapeLabs-de / anyone an idea what the reason could be?
Thank you in advance!
Best regards Andreas