Skip to content
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

Multiple cm160 #12

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

SledgehammerPL
Copy link

Hello - I get your great code and try to make it working for more than 1 device. I did it, so I'd like to share it with you. Unfortunately I don't use git hub from the beginning, so I can't show you the working code, because I broke something at very end, and now it raises segfault - but maybe you can find the little wrong piece.

How it works - I decided not to use one program for all devices, but one program for one device. So if you run the program without any args, it will looks for devices. If it finds only one - it goes further, if finds more - shows serials and exits. In that case you have to run it with -s arg example cm160 -s AA001234 - in that case program finds only one matching device and goes further.

You choose the weekend/week tariff, but it is rather useless because of many different kinds of tariff - so I decided to change the stat tables - I remove column kwh_week_total and kwh_weekend_total and add kwh_0_total,kwh_1_total etc, and I planned to sum columns to get week/weekend or many other tariffs

Sorry for changing {} but this standard is too hard to me.

Now I'm stuck in update_stat_db - the program enters it, executes sqls, but then segfaults and no changes in database...I can't debug it... So maybe you have a little piece of time?

@SledgehammerPL
Copy link
Author

I send you a message, and I found the bug ! Isn't it incredible? Now it works - it needs a html changes, but it works - please enjoy, and thank you for help (even spiritual ;D)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant