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
Both 'Heating' and 'Hot Water' symbols are lit when either pump is on #16
Comments
It looks like it's because |
Fixing issue #16 with status highlights
I was pondering how you were getting a string. In my "post to EmonCMS" code I have a thing like this to convert a boolean to b = bool(thing_being_posted)
v = 0
if b:
v = 1
to_post = v Are you posting it as a string? I didn't think you could post strings to EmonCMS. Is it possible that your setup is getting strings when you are requesting data from |
Hmm, that's pretty peculiar. When I'm calling it I get a result including the pump data like this: "42": {
"id": "493",
"userid": "1",
"name": "WaterPump1Status",
"datatype": "1",
"tag": "ecodan",
"public": "",
"size": "4584304",
"engine": "5",
"unit": "",
"time": 1638686280,
"value": 0,
"start_time": 1569922020,
"end_time": 1638686280,
"interval": 60
} |
Do you have REDIS enabled? I never managed to get it to work, so I've been using EmonCMS without it. That means the list of feeds and values are stored in MySQL, and it seems that when feed_model.php requests all the data with mysql_get_user_feeds, the values are strings, despite the schema of the table definitely storing This can be fixed by adding |
Yes @MrTimbones I'm Docker-based for absolutely everything so you can imagine I'm running something like this:
|
I thought wrong. It turns out that mysqli is returning all fields as strings, regardless of how they are stored in the database. I'm amazed that anything works at all, seeing as all numeric operations will have depended on PHP's own implicit conversion to real numbers. |
What shall we do about this @MrTimbones ? Do you want to chase it with EmonCMS and close this issue or would you like to keep it open to track the outcome? |
I'm happy that we now understand why this fix was necessary, and I've not had any issues elsewhere with EmonCMS, so I think we can close this issue. |
Thanks for your help @MrTimbones |
The top line of the app shows when the heat pump is active, by shading the 'Space Heating' and 'Hot Water' symbols in red based on their respective pump activity. However, on my system, both symbols are always lit when either pump is running.
For example, right now, WaterPump4Status (hot water) is high, and WaterPump2Status (heating) is low, and yet both of them are highlighted in red. Which is generally not possible for this model of heat pump.
The text was updated successfully, but these errors were encountered: