-
Notifications
You must be signed in to change notification settings - Fork 2
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
Q: What username/password to use? #56
Comments
Im having a similar issue. Im currently using my Generac "MobileLink" login. Ive tried various things like changing my password on there but im still getting the error below: Internal Error, file an issue at https://github.com/bentekkie/ha-generac. Out of all my integrations, I really wanted this one to work. Im not sure if it matters but I also have a Propane Tank Monitor installed too. |
Same issue with me. Two generators, propane monitor, ecobee in the mobile link account.
|
;-( |
It's the login you use to sign into https://app.mobilelinkgen.com. I was able to sign in to the HA integration with my credentials for that site without a problem. |
do you have the latest version of the repo pulled and installed? I was able to sign in with no problem using my email and password for that site with a fresh install of the integration a few minutes ago. The generator already shows up with all of its entities in HA and updating in real time. My device screen looks like the screenshot in the repo. |
By the way try checking out your logs in a separate tab or terminal while making the log in attempt, it seems like the integration does provide some logging upon hitting an error but that's not being surfaced in the UI to make it clear to you what's failing. The logs should hopefully be more useful. As far as the current state of this integration, while not actively maintained, it does seem fully functional to me. I also had a friend with a Generac attempt the integration a few moments ago, and it worked fine for them as well. |
I beefed up my logging to DEBUG, and I'm seeing a line that may be relevant:
So it appears it is logging in okay, and is getting my generator info, but that parsing error isn't being caught/handled and results in an "internal error". I'm not seeing anything else in the log that looks relevant. |
Yes - I have the latest. Also, i've removed and reinstalled it several times. Is there any way you can type a crash course to get to that log? Currently, I turned on debug mode, but where do I go to capture the info you posted to see whats going on? |
What I did is in my configuration.yaml, I have this block: `logger: default: warning logs:
` Then I open \config\home-assistant.log in my favorite editor. The actual logging in doesn't seem to be logged, but attempts to get your generator data is. |
Annoyingly the 'code' block for this site omits line breaks. I've tried to beat the above into something semi-readable, but you should get the gist of it. |
Side note, in case it matters: on my mobilegen account I have the actual generator and a tank monitor. I'm not seeing anything specific in the log that the integration is aware of or trying to access the tank monitor, but perhaps that's a clue. |
I added a try/catch in get_generator_data, which yielded the following. I'm not a Python dev (I'm a C# guy), but this might help... 2023-12-12 12:19:09.370 ERROR (MainThread) [custom_components.generac] can not match type "str" to any type of "properties.value" union: typing.Union[custom_components.generac.models.Apparatus.Property.Value, list, NoneType] I have to assume that something in my returned JSON isn't parsing. But it's not obvious to me. |
Here's my working theory... My JSON returned has these properties:
70, 69 and 31 map to "known" sensors. 93 does not. And the value is a string. |
For those willing to tweak their own copies, I made two changes that work around the error and get me operational. As I said, I'm not a Python guy, so there's probably a more correct way to deal with this. Tweak #1, in models.py, look for class Apparatus and the class Property within. Change this line thusly:
That, as I understand it, tells the from_dict call to use the Union (Value), a list (which I don't think applies here) and adds a generic string & int (I had to add both). Tweak #2, which is optional, in ConnectionTimeSensor look for the call to datetime.strptime and change it thusly:
(removing the .%f in the format string) If a Python expert has alternate suggestions, I can try them and if we settle on an actual fix, I can do a formal Pull Request. |
Not sure what changed but my integration started failing about 2 days ago, and I started encountering the same errors as the rest of you. Applying only tweak #2 from bpsmicro's suggestion above fixed the issue and allowed the integration to come back online. I applied the first one as well because there's no harm in it, it just allows for additional value types and follows a pattern used elsewhere in the file. Thanks for the tip @bpsmicro! It made for a quick 10 second fix. |
For anyone that doesn't feel comfortable editing these files, I've forked this repo, added the changes, and confirmed it works on my home integration. You can remove this integration and add my copy: https://github.com/binarydev/ha-generac Feel free to submit issues and pull requests there. |
Nice work @binarydev - Just switched to your fork, and it loaded up my generator nice and quick. Would love to get my propane monitor in there too now.... |
I'm going to try your fork and if it works then I'm buying you a coffee sir. |
Thanks @binarydev. Just installed your fork of the integration and it works like a charm! |
Happy to help! Just noticed issues weren't enabled on my repo, so I turned them on. Feel free to open new ones there: https://github.com/binarydev/ha-generac/issues @tgarrison3 I don't have a propane monitor to attempt adding it myself, but maybe I can work on some general implementation to support any devices returned by the API, like this one. In the meantime, if anyone else who does have a propane monitor would like to take a stab at it, I'd be happy to review a PR contribution on my repo! |
IT WORKED!!!!!!!!!!!!!!!!!!! Two things; I have a Propane Monitor from Generac too. Happy to help any way I can. Theres more coffee if you get that one working. |
Im pretty sure generac did a licensing deal with "Tank Utility inc" and I think this website is for their integration: https://www.home-assistant.io/integrations/tank_utility/ Not positive, but looks like it could be... |
Good find @npstewart87! Seems like it could indeed be the case, at least back in 2017 (https://tankutility.com/wp-content/uploads/2017/07/Generac-Tank-Utility_brochure.pdf). From what I can find it seems at least back then you were able to use the Tank Utility app directly for interfacing with the Generac-branded monitor, and nowadays only seems to be MobileLink accessible. When you first installed it, did you create a Tank Utility account? Or is it only accessible now via MobileLink for you? |
@binarydev I just uninstalled the old code and installed your fork through HACS but I am still getting the same internal error message. The only thing I can think of that might be messing things up is that there are 4 generators on the account and only one is at my home on the same network as home assistant. Any suggestions? |
@RoyalGraph can share what the error message in the logs says (Settings -> System -> Logs -> Click on the generac error messages for full details)? it should include a file name and line number to help me debug the issue for you. The popup when you click on the error message should show something similar to what bpsmicro shared above. This integration doesn't need the generators to be on the same network since it hooks into the MobileLink cloud service, so remote generators should be supported the same as local ones. |
@RoyalGraph also just to be sure about the basics, you deleted the integration (in Settings -> Integrations), then deleted the repo in HACS, added the new custom repo, restarted HA, and then readded the integration, right? |
@binarydev I never had the old one in integrations because it wouldn't work just like it still isn't. I didn't install through HACS but by copying the code so I just deleted the whole generac file. I then installed yours through HACS and restarted but had the same internal error message when putting in the correct login info. So it doesn't show up as an added integration still because it fails. As for the logs, I went to that page but there is no logs pertaining to generac other than this: 2023-12-19 21:56:14.305 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration generac which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant Sorry I am fairly new to home assistant so thank you for trying to help. |
@binarydev I tried adding the integration multiple times to see if it would log an error but there is still nothing in the logs except the line I posted above. |
TankUtility works great with Home Assistant. I’m using the password I set up for https://app.tankutility.com, which is separate from the Generac-related passwords. Getting the token is the hardest part (and not all that hard). The only thing I wish I could get out of it is the battery level.
From: Jose Santiago ***@***.***>
Sent: Wednesday, December 20, 2023 00:20
To: bentekkie/ha-generac ***@***.***>
Cc: Brad Smith ***@***.***>; Mention ***@***.***>
Subject: Re: [bentekkie/ha-generac] Q: What username/password to use? (Issue #56)
Good find @npstewart87<https://github.com/npstewart87>! Seems like it could indeed be the case, at least back in 2017 (https://tankutility.com/wp-content/uploads/2017/07/Generac-Tank-Utility_brochure.pdf). From what I can find it seems at least back then you were able to use the Tank Utility app directly for interfacing with the Generac-branded monitor. When you first installed it, did you create a Tank Utility account? Or is it only accessible via MobileLink for you?
—
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABK44MKG46SDZYPYONIJRV3YKJYQBAVCNFSM6AAAAAA42KZZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRTHA3TAMRTGA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
When I installed it I did it completely through the MobileLink app on my phone - same place as the generator. I had an option to chooose " Tank monitor" or "Generator". |
@binarydev If you're interested in adding propane tank monitor support, I will happily share the json with you. I dug in the code a bit for the API calls, and grabbed my json and marked it up so you can tell what's what without having one.. If you're not interested, I'll probably give it a go myself when I have some time.. likely never.. |
@tgarrison3 that would be fantastic! Please do share the payload, and I'll work on integrating it. Let me know if you'd rather share it privately instead of dropping it here (my email is in my profile). Also remember to anonymize the info in it (e.g. your address and serial number) |
@RoyalGraph if you're be wiling, I'd be glad to jump on a Google Meet video call where you can share your screen, and I'll work with you on debugging this in real time. I'm on NYC time and have availability this upcoming week on the days between Xmas and New Years. I can also meet anytime after the new year. Just let me know. |
@RoyalGraph btw I realized my HACS install instructions were missing the step after you add the custom repo URL where you have to actually download the repo before restarting HA. I assume you were already doing that anyway, but wanted to call that out just to be sure. |
I had to manually uninstall / delete the previous Generac integration, download the new fork, and restart a bunch of times before I got it to work. I basically used file editor to manually delete all the files and folders individually. Prior to doing that, I was getting the same internal error. Once I installed the new fork it finally worked on the first try. |
hey @bentekkie I just realized you're a fellow Googler! It's a small world, and we may have somewhat actually crossed paths before without realizing it. Up until Jan '23, I was an SRE manager in your product area, running the Test SRE team that supports Skygraph Mini/Depserver, TAP, Rapid, etc., and I worked closely with people in your management chain (Ryan, Micheál and Jeff). If you ever decide to re-engage on this repo, let me know, and I'll be happy to open a PR to merge my changes back into this! |
@binarydev I figured out the missing download step in your HACS install instructions so it wasn't that but I realize now that the URL is the old one still somehow so I'm going try and reinstall again and make sure it's the right one. I'll let you know if I get it working and if not I might have to take you up on that video call later. |
I opened a new issue on your branch and dropped the json there to keep it
clean.
…On Thu, Dec 21, 2023 at 10:27 PM Jose Santiago ***@***.***> wrote:
@tgarrison3 <https://github.com/tgarrison3> that would be fantastic!
Please do share the payload, and I'll work on integrating it. Let me know
if you'd rather share it privately instead of dropping it here. Also
remember to anonymize the info in it (e.g. your address and serial number)
—
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJWDWOI6MH63P6LVU5BJ3I3YKT4ZFAVCNFSM6AAAAAA42KZZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXGE4DOOBWGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Perfect thanks @tgarrison3! That's definitely the right move so we can start focusing development in that repo moving forward. I'm working on resolving the other issue on this repo first for the weird config checkboxes and adding a polling interval setting, then I'll work on adding the propane monitor in next. |
I’ll be keeping an eye open to take a look at some of the test builds when you have them. But I confess that I’m souring on the overpriced Generac “cloud” service and this may be the year I build up a genmon box and go all-local.
What I’m enjoying is that even though I’m not a Python dev, I’ve been doing C#/.NET since v1.0. And I’m finding I can look at Python code and figure out what the heck it’s doing. As I circle the retirement drain, I can add another hobby into the mix. 😉
From: Jose Santiago ***@***.***>
Sent: Friday, December 22, 2023 12:21
To: bentekkie/ha-generac ***@***.***>
Cc: Brad Smith ***@***.***>; Mention ***@***.***>
Subject: Re: [bentekkie/ha-generac] Q: What username/password to use? (Issue #56)
Perfect thanks @tgarrison3<https://github.com/tgarrison3>! That's definitely the right move so we can start focusing development in that repo moving forward. I'm working on resolving the other issue on this repo first for the weird config checkboxes and adding a polling interval setting, then I'll work on adding the propane monitor in next.
—
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABK44MK4AF4NWDEGFMK6OB3YKW6QRAVCNFSM6AAAAAA42KZZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXHEYTMMBWGA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@npstewart87 good news for you is that I'm close to having this functional in my branch! I have the propane monitor showing up as a device, and I'm working on getting the properties parsed into proper entities you can work with. Stay tuned over at binarydev#15 |
@bpsmicro latest update for the integration has the polling interval feature and fixed settings in the "Configure" popup form. Halfway done with the propane tank monitor integration as mentioned in my last comment to npstewart87. Looking forward to getting this out to y'all soon. BTW I learned to code in Classic (pre-.NET) ASP 3.0 back in the day and used that to jumpstart my career. Once .NET came around, I swung the other direction towards PHP and the rest of the LAMP stack. I've learned since then that being more of a generalist serves me really well. All of these languages are basically the same concepts implemented their own unique ways with pros and cons. I'm not yet near the retirement "drain", though I prefer to call it the "keyboard pasture" ;), but when I am I find comfort in knowing I can drop into some new language and have fun learning a new twist on familiar concepts. Happy Holidays everyone :) |
@npstewart87 and @bpsmicro I have a beta release adding support for propane tank monitoring if you're willing to test it out? If you're using HACS, go to HACS -> Integrations -> generac, and in the 3 dot menu on the top right, hit the Redownload menu item. In the popup that appears, enable the option to Here's what you should see in the popup: If you're not using HACS, then grab the latest files from the Please let me know if you run into any issues over at binarydev#15, so I can track updates and bug reports via my repo. |
It works! I’m going to poke at it a bit and take some notes and raise issues, but so far all look to be minor/trivial, and likely not regression (ie. “new”) issues.
Nicely done.
From: Jose Santiago ***@***.***>
Sent: Tuesday, December 26, 2023 14:55
To: bentekkie/ha-generac ***@***.***>
Cc: Brad Smith ***@***.***>; Mention ***@***.***>
Subject: Re: [bentekkie/ha-generac] Q: What username/password to use? (Issue #56)
@npstewart87<https://github.com/npstewart87> and @bpsmicro<https://github.com/bpsmicro> I have a beta release adding support for propane tank monitoring if you're willing to test it out? If you're using HACS, go to HACS -> Integrations -> generac, and in the 3 dot menu on the top right, hit the Redownload menu item. In the popup that appears, enable the option to Show beta versions, then select v0.2-beta from the dropdown and hit download. Remember that you'll need to restart HA afterwards.
Here's what you should see in the popup: Screenshot.2023-12-26.at.2.49.48.PM.png (view on web)<https://github.com/bentekkie/ha-generac/assets/979630/7cb9d8a8-728e-42e4-b331-d6a5d02d5020>
If you're not using HACS, then grab the latest files from the custom_components folder in my branch and overwrite your existing copy on the HA server: https://github.com/binarydev/ha-generac/tree/add_propane_monitor
Please let me know if you run into any issues over at binarydev#15<binarydev#15>, so I can track updates and bug reports via my repo.
—
Reply to this email directly, view it on GitHub<#56 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABK44MLKW6BHLFIUZFVJMPTYLMTQ7AVCNFSM6AAAAAA42KZZHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZG42DGNZSGM>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@bpsmicro Unbelivable. I updated to Beta and it popped right up as an additional device, along with the percentage of tank capacity left, overall capacity, etc. Overall, I have (13) ACCURATE entities. There has to be some way to buy you a coffee or a beer? |
Excellent, glad it's working so well for you both! Please do feel free to open issues against my repo if any come up. I'll be merging this feature into the main branch and cutting a new production release shortly. I'll gladly accept the offering of a virtual coffee and say happy holidays to you all! Consider this the work of a bored engineer looking for a fun way to pay a good deed forward 🙂 |
v0.2 production release is out as of yesterday, and with that I think all open feature requests and bugs on both this repo and mine are done. If you guys notice anything else requiring a fix/update, please do feel free to open an issue over on my repo! Have a happy new year 🍻 |
@binarydev Thanks for getting this working, and I can totally understand the bored engineer mindset. Right there with you. 👍 One thing to note for others on this thread... I used to have a TankUtility Propane sensor as well (Generac 7005 Propane Tank (LP) Fuel Level Monitor - WiFi enabled https://www.amazon.com/gp/product/B072KJBLV2/) It died after about a year and a half, and I looked into getting the LTE model as a replacement, since they no longer make the WiFi enabled module anymore. But the LTE module required a separate annual subscription fee (from what I saw), so I went a different route. I ended up getting one of these (Mopeka PRO+ LR Wireless Propane Monitor https://www.amazon.com/gp/product/B0BKLFQ3CL/) which pairs with Passive BLE in Home Assistant and works wonderfully. And no subscription fee or cloud service was required. Hope that info is helpful for someone out there. 😄 |
Thanks so much again. My home assistant has been a 3 month project so far but it never would have been complete. I'd love to send you some virtual coffee through venmo or something, lol - feel free to post venmo name. Im an engineer as well but not this type, but i've learned so much working on this ongoing (never finished) project. :-) |
One housekeeping question. My LP Tank monitor says an integer value. Is there any way to change this to a " % " value? Its already a "Battery" sensor so figured it would be percent but its not. I seem to recall a way to do this using a " Helper" or somewhere within the developer tab. |
Just to clarify @npstewart87 are you looking for a % string value or a % decimal value? i.e. 74 = "74%" or 74 = 0.74? Either way, you're correct that a template helper can be used to take care of this for you. You would go to Settings -> Devices & Services -> Helpers tab (top right). Create a new helper, select the "Template" type and select "Template a sensor". You probably want something like the below contrived example where I divide my battery voltage by 24 (arbitrary) to get a %. Except in your case you can divide by 100 if you want a proper decimal number. Battery sensors from what I can tell seem to expect a % (non-decimal) representation though for the icons to work correctly, so 0.74 is interpreted as <1% battery and gives a red warning icon. In my example, the voltage is currently 13.6 which / 24 gives you the 56% (56.67) value seen here with a yellow icon: The human readable name you enter in the first field will be used to populate a machine readable name for the sensor when you save it, which you can use in your dashboards or alerts. In my example, the resulting sensor was named Hope this helps! |
Done and done. Amazing. I took your template sensor, changed the entity name, and then removed the " / 24" and " x 100" and it came up with 76% (ie. My exact tank percentage fill ) :-) |
Maybe I'm missing something, but when installing it's asking me for a username/password. I'm trying my Mobilelink u/p, but all I get back is "internal error". But if I enter a bogus password, it seems to know it's wrong. I'm not seeing anything in any logs to reveal a clue as to what's up.
The text was updated successfully, but these errors were encountered: