H
HASS.Agentβ€’6mo ago
Anto79-ops

how to get started - migration?

hello! I've read the docs but not sure about a couple of things. At the moment, I have the old HASS.agent service and satellite running with Win10 computer and HA(HAOS). Do I have to uninstall the Windows program and use the new beta? do I have to remove the HA integration also and replace that, also? thanks
Solution:
From a simple point of view, to test the 2.0.1 version: 1. backup your current "config" folder (there's never enough backups) 2. run the installer, select "migrate" option at the end 3. done...
Jump to solution
100 Replies
Amadeo
Amadeoβ€’6mo ago
soo, very good question sice we haven't got the docs "done" yet πŸ˜„
Do I have to unstall the Windows program and use the new beta?
No, the fork is a "separate app" you can have both of them installed at the same time (and with some flips here and there even running - I'll get back to it at the end) Installer, after putting all files where they need to be (again, different paths than the original one) will offer you a migration option, this will: 1. stop original HASS.Agent if it's running 2. stop original Satellite Service if it's running 3. change the original Satellite Service to run only on manual trigger (not automatically) 4. copy the config files from the original HASS.Agent to the new one/fork
do I have to remove the HA integration also and replace that, also?
No, as of now the fork is compatible with the original "HASS.Agent Integration" found in HACS Now, getting back to having both "HASS.Agents" running at the same time -if you just migrate (either by copying the config files manually or using the migrate option offered by installer) you'll not be able to run them at the same time (they can be installed but not running) - this is because they'll use the same MQTT settings and basically "fight for connection" I can't see a reason for having them both running at the same time but it can be done, just the MQTT config needs to be changed so the connection will be ok (plus I wouldn't recommend having same set of sensors/commands on both of them :D)
Solution
Amadeo
Amadeoβ€’6mo ago
From a simple point of view, to test the 2.0.1 version: 1. backup your current "config" folder (there's never enough backups) 2. run the installer, select "migrate" option at the end 3. done
Amadeo
Amadeoβ€’6mo ago
new version should launch and that's it (you may want to first disable autostart in the original version if it was enabled)
Anto79-ops
Anto79-opsβ€’6mo ago
OK will give it a try Thanks!
DrR0x
DrR0xβ€’6mo ago
Ill get the docs updated so it includes info about migration @Anto79-ops @Amadeo You guys posted this one before i updated the bot settings so both of your names are on the community page. They can be removed if you just delete this post, in future don't delete them obviously but right now you can if you want your names/profile pics removed.
Anto79-ops
Anto79-opsβ€’6mo ago
Hi,You mean my full name or my username? I'm ok with the latter, but can delete if it affects @Amadeo
DrR0x
DrR0xβ€’6mo ago
oh no not your full name πŸ˜‚ That's not possible im pretty sure, discord keeps it private
DrR0x
DrR0xβ€’6mo ago
how to get started - migration? - HASS.Agent
hello! I've read the docs but not sure about a couple of things. At the moment, I have the old HASS.agent service and satellite running with Win10 computer and HA(HAOS). Do I have to uninstall the Windows program and use the new beta? do I have to remove the HA integration also and replace that, also? thanks
Amadeo
Amadeoβ€’6mo ago
I have a separate acc for non-corporate jokes, fine by me
🀣
DrR0x
DrR0xβ€’6mo ago
πŸ‘
Anto79-ops
Anto79-opsβ€’6mo ago
All good by me πŸ™‚
DrR0x
DrR0xβ€’6mo ago
@Anto79-ops Just go ahead and mark amadeos message as solved all these message dont show up as much
Anto79-ops
Anto79-opsβ€’6mo ago
Lol trying to figure out how to do that....
DrR0x
DrR0xβ€’6mo ago
top of this thread
Anto79-ops
Anto79-opsβ€’6mo ago
Oh yes how did I miss that. Doesn't seem that I can do it on the mobile app though?
DrR0x
DrR0xβ€’6mo ago
three dots on the message? Works for me? Hold on amadeos message and click apps --> mark solution is it not there for you?
Anto79-ops
Anto79-opsβ€’6mo ago
thanks! it was working....now went to 404 the link
DrR0x
DrR0xβ€’6mo ago
yeah, i have no idea. Im using it to develop but it just completely died. Acorn is too new, few bugs still, but it works okay. Everythings okay on that page tho? back up now
Anto79-ops
Anto79-opsβ€’6mo ago
Okay awesome going through the instructions now for the migration keep you posted in a few minutes ok awesome! it running 2.0.1 and I removed the old hass.agent migration went well, everything on my the HA side is working as normal By the way that whole mqtt naming issue that HA is complaining about is that something that will come on the integration side update? Lots of warnings coming from Norton and windows about installing that exe file so not sure if you want to mention that in the docs but obviously I clicked ignore Warnings
DrR0x
DrR0xβ€’6mo ago
ooh, could you send some screenshots if possible? Windows are the biggest ones, but norton would be helpful as well. The biggest issue is th fact that hass.agent is designed to fully take control of your pc to do anything, but obviously thats a big security risk from nortons pov
Anto79-ops
Anto79-opsβ€’6mo ago
Okay I could try to uninstall and install it again however I think it might remember the settings because I said allow program or run program. The windows one was a bit more tricky because it didn't even give me the option to run the program until I clicked on more info then I got the option for it to run the program The only option it gave me was to cancel until I clicked on "more info" For what it's worth Norton scaned the app and didn't find any malware I think it's Windows Defender that is doing this
Amadeo
Amadeoβ€’6mo ago
Backup the config (yeah I know again :D), close HASS.Agent and then run the exe with "compat_names" so in cmd/powershell
HASS.Agent.exe compat_names
HASS.Agent.exe compat_names
Amadeo
Amadeoβ€’6mo ago
HA is complaining because the "entity name" contains device name and with 2023.8 changes it should not, please see this for more details https://github.com/LAB02-Research/HASS.Agent.Staging/pull/20
GitHub
Fix: Home Assistant 2023.8 MQTT by amadeo-alex Β· Pull Request #20 Β·...
This PR: Adds changes required to be compatible with MQTT requirements of Home Assistant 2023.8 and up (LAB02-Research/HASS.Agent#337) adds "object_id" property support to the discovery...
Amadeo
Amadeoβ€’6mo ago
This will try and automatically convert the names (entity id name in HA will stay the same otherwise compat task will not alter command/sensor) Did it complain only about exe not being signed with trusted certificate or smth else?
Anto79-ops
Anto79-opsβ€’6mo ago
Something about an untrusted source
DrR0x
DrR0xβ€’6mo ago
yep, makes sense but norton? they usually say other stuff i thought?
Anto79-ops
Anto79-opsβ€’6mo ago
Yeah I'm trying to remember what Norton said. I wonder if I can go back into the history and see when I allowed the app to run
DrR0x
DrR0xβ€’6mo ago
probs says iut in the norton log no?
Amadeo
Amadeoβ€’6mo ago
Windows likes to complain about exe files not being signed with cert it trusts and since the installer is signed with one generated by us it's not "trusted"
Anto79-ops
Anto79-opsβ€’6mo ago
It's also my Norton Google Chrome extension which monitors all downloads
DrR0x
DrR0xβ€’6mo ago
will we fix this at all? How did sam do it? do you just buy one like web certificates?
Amadeo
Amadeoβ€’6mo ago
Had a certificate which was provided by one of the intermediate CAs Not sure how tho
Anto79-ops
Anto79-opsβ€’6mo ago
I don't remember what Norton or Windows did when I installed Sam's version it likely did the same thing
Amadeo
Amadeoβ€’6mo ago
Usually they are quite pricey
DrR0x
DrR0xβ€’6mo ago
thought so
Anto79-ops
Anto79-opsβ€’6mo ago
I will try this in a bit just taking the kids out for a walk now did I miss this in the docs.....sorry if I did 😦
DrR0x
DrR0xβ€’6mo ago
nope not in there what are we doing about the compat names? Do i need to add it to the docs?
Amadeo
Amadeoβ€’6mo ago
Highly depends on the AV, I have nod32 and it never complained about those file. Same situation with LibreHardwareMonitor - some avs think its a malware... Scan of one of the previous versions: https://www.virustotal.com/gui/file/b6a66b73b693f1a531b951448a61d05b950c854eba3635beae10bb39caf7920f/detection And link to the issue on its repo: https://github.com/LibreHardwareMonitor/LibreHardwareMonitor/issues/675
Amadeo
Amadeoβ€’6mo ago
Nah, no worries, docs are not completed yet πŸ˜„ At some point yeah, because ppl will ask this question a lot
Amadeo
Amadeoβ€’6mo ago
Stack Overflow
How to avoid the "Windows Defender SmartScreen prevented an unrecog...
My company distributes an installer to customers via our website. Recently when I download via the website and try to run the installer I get the warning message: Windows protected your PC Windows
Anto79-ops
Anto79-opsβ€’6mo ago
Also is this just a one-time thing or does it have to happen every time it reboots or restarts?
Amadeo
Amadeoβ€’6mo ago
Afaik only during install
Such an EV certificate will cost you somewhere betweenΒ 250 and 700 USDΒ per year (you better compare prices), and will only be issued to registered businesses. If you're a single developer, you must be a sole proprietor and have an active business license. You can read more about the formal requirements for EV code signing certificates in theΒ EV Code Signing Certificate Guidelines.
Either Sam is rich or got some certificate on the basis of open source project :D
DrR0x
DrR0xβ€’6mo ago
Wtf That's expensive af We're gonna need a lot of donated coffees πŸ˜‚
Amadeo
Amadeoβ€’6mo ago
xD I'll try to throw the installer at the option 1 they mentioned but this may get tedious (or we limit releases to one per month or smth)
Amadeo
Amadeoβ€’6mo ago
Sigstore
Signing Blobs
You can use Cosign for signing and verifying standard files and blobs (or binary large objects), in addition to containers. This topic discusses signing blobs/files. For information on verifying, see Verifying Signatures. Keyless signing of blobs and files # Cosign supports identity-based signing, associating an ephemeral signing key with an ide...
Amadeo
Amadeoβ€’6mo ago
Link for tomorrow :P
Anto79-ops
Anto79-opsβ€’6mo ago
ok re-ran this this as instructed and installed no problem. I think* it worked, just for good measure also purged my mqtt broker of any hass.agent data (both in homeassistant and the broker itself). I'll hav to check on next HA restart if those mqtt logs reappear. On second install, Windows nor Norton gave me heck
DrR0x
DrR0xβ€’6mo ago
πŸ€”
Anto79-ops
Anto79-opsβ€’6mo ago
maybe because I ran command line as administrator....
Amadeo
Amadeoβ€’6mo ago
If everyting went well the entity names got stripped of the device name but the "entity id name" in HA stayed the same
Anto79-ops
Anto79-opsβ€’6mo ago
Thanks looks that did not happen. My entity name still has the device name, but the friendly name got stripped of the device name. Wait I'm mixing things up OK fie example entity_id has device name in it like sensor.device_hp_activewindow But front end name, shows up as _activewindow But really the issue is not that, the issue is that my HA logs are still saying don't use a device name in the name Etc
Amadeo
Amadeoβ€’6mo ago
The compat task has some checks before it changes anything (mainly it changes only names that had the default scheme od <device>_<entity>, can you check the logs? (compat task in log file name)
Anto79-ops
Anto79-opsβ€’6mo ago
let me know if see anything there, this is default log level
Amadeo
Amadeoβ€’6mo ago
that's from migration there should be separate one for compat_names
Anto79-ops
Anto79-opsβ€’6mo ago
Let me check again...and this should be in the logs folder? ok I checked the logs folder, there is no compat_names log...hmmm... should I try again or is it somewhere else?
Amadeo
Amadeoβ€’6mo ago
Are you sure you've launched the exe with "compat_names" launch argument? (Migration is separate from the name task)
Anto79-ops
Anto79-opsβ€’6mo ago
I thought I did, and followed these instructions: https://discord.com/channels/1173033284519862392/1190342438276042782/1190424590686621876 I ran command prompt as admistrator, then I cd to the file and wrote this and pressed enter HASS.Agent.exe compat_names It then opened up a window and went through the installation process as normal (I also clicked on migration). let me try again and see what happens. Should I uninstall first? ok def did the compat_names
Anto79-ops
Anto79-opsβ€’6mo ago
No description
Anto79-ops
Anto79-opsβ€’6mo ago
went through the entire install and selected migration, still getting the log in HA
Logger: homeassistant.components.mqtt.mixins
Source: components/mqtt/mixins.py:1370
Integration: MQTT (documentation, issues)
First occurred: 12:19:11 PM (10 occurrences)
Last logged: 7:42:21 PM

MQTT entity name starts with the device name in your config {'icon': 'mdi:window-maximize', 'unique_id': '1583775e-7ce8-4978-9c34-724ce543e4cf', 'object_id': 'ANTO_HP_activewindow', 'availability_topic': 'homeassistant/sensor/ANTO_HP/availability', 'device': {'identifiers': ['hass.agent-ANTO_HP'], 'manufacturer': 'HASS.Agent Team', 'model': 'Microsoft Windows NT 10.0.19045.0', 'name': 'ANTO_HP', 'sw_version': '2.0.1', 'connections': []}, 'name': 'ANTO_HP_activewindow', 'state_topic': 'homeassistant/sensor/ANTO_HP/ANTO_HP_activewindow/state', 'payload_not_available': 'offline', 'encoding': 'utf-8', 'qos': 0, 'force_update': False, 'availability_mode': 'latest', 'enabled_by_default': True, 'payload_available': 'online'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes '_activewindow'
Logger: homeassistant.components.mqtt.mixins
Source: components/mqtt/mixins.py:1370
Integration: MQTT (documentation, issues)
First occurred: 12:19:11 PM (10 occurrences)
Last logged: 7:42:21 PM

MQTT entity name starts with the device name in your config {'icon': 'mdi:window-maximize', 'unique_id': '1583775e-7ce8-4978-9c34-724ce543e4cf', 'object_id': 'ANTO_HP_activewindow', 'availability_topic': 'homeassistant/sensor/ANTO_HP/availability', 'device': {'identifiers': ['hass.agent-ANTO_HP'], 'manufacturer': 'HASS.Agent Team', 'model': 'Microsoft Windows NT 10.0.19045.0', 'name': 'ANTO_HP', 'sw_version': '2.0.1', 'connections': []}, 'name': 'ANTO_HP_activewindow', 'state_topic': 'homeassistant/sensor/ANTO_HP/ANTO_HP_activewindow/state', 'payload_not_available': 'offline', 'encoding': 'utf-8', 'qos': 0, 'force_update': False, 'availability_mode': 'latest', 'enabled_by_default': True, 'payload_available': 'online'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes '_activewindow'
here's the entities
Anto79-ops
Anto79-opsβ€’6mo ago
No description
Anto79-ops
Anto79-opsβ€’6mo ago
and monitor wake (for example) is: button.anto_hp_monitorwake
Amadeo
Amadeoβ€’6mo ago
Did you see HASS.Agent popup after you did this? Was the normal HASS.Agent not running at the time? Wait Not the installer xD You're supposed to do that on the HASS.Agent.exe Basically exe that launches hass.agent - it is the exe that installer unpacks In appdata/local/HASS.Agent
Anto79-ops
Anto79-opsβ€’6mo ago
ahhh yes! my fault for not following your instructions πŸ™‚ Ok, I THINK that did it. It seemed to remove all my sensors (which is fine, only took about 20 seconds to add them back), I also purged my mqtt broker from the old sensors. I guess I'll find out on next reboot if the message wil come back but I think this fixed the the infamous MQTT naming issue from the summer lol thanks all πŸ™‚
Amadeo
Amadeoβ€’6mo ago
Did you have to do the cleanup? The code (if succesfull) should republish all discovery messages with proper values If it didn't I'll try to chase the reason
Anto79-ops
Anto79-opsβ€’6mo ago
No I don't think I needed to do the clean up. I just did it for no reason actually Lol
Amadeo
Amadeoβ€’6mo ago
In the dev chat I actually thought (or rather reminded myself) that I recall some fallback mechanic that should prevent those msgs on HA side being generated even with old names (unless the naming was "nonstandard") Could you send me the old HASS.Agent config of one of the entities (or all) that HA was complaining about? Just to double check smth tomorrow
Anto79-ops
Anto79-opsβ€’6mo ago
Sure, let me dm those to you so far 2.01 is runnig well and seems to be more stable than the previous versions. sometimes, the other version just crashes randomly (on the windows side), but that has not happened yet with 2.0.1 an no more mqtt error messages on the HA side!
Amadeo
Amadeoβ€’6mo ago
@zuldero this msg + one below it with link provides some backgroun info
DrR0x
DrR0xβ€’6mo ago
I have now created a new resource that will be in the server guide once Discord sorts out the bugs(Username applies well here :P) Can you just check everything is correct? It seems to work for me πŸ˜„ #entity-names
zuldero
zulderoβ€’6mo ago
https://discord.com/channels/1173033284519862392/1195830132049461249/1195838456744648794. the Alt, f, s, a combo doesnt work for me (maybe different language on windows i have englisch). but if i open the exe manualy with compact names modifyer trough an elevated command prompt. it just stop spinning after approximately 2mins. i guss it hangs up. no change visible in HA. i evan tried and deleted the whole PC entity in HA for my pc. so it could create everything new. nothing changed. i could also do it by hand. but i guess i would like a feedback if the feature would not work. if it would be mine.
Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
DrR0x
DrR0xβ€’6mo ago
Windows version and you were using the default file explorer right? Make sure nothing was selected, I updated the instructions to say that
zuldero
zulderoβ€’6mo ago
im on win11 and yes the default file explorer. yes nothing selected. if i press alt, the "new" in the top left get selected and with the rest of presses nothing happens. i think it would be easyer to let them open an cmd as admin and do it that way.
DrR0x
DrR0xβ€’6mo ago
Yes, except my win10 doesn't have a CMD admin button πŸ˜‚ On win10 alt activates key control and f selects file. S selects shell and a selects admin
zuldero
zulderoβ€’6mo ago
you can evan drag and drop the exe in the cmd and copy paste the compat_names behind and it works. how did you manage that? but you have admin rights?
DrR0x
DrR0xβ€’6mo ago
I wanted a solution that opened the CMD prompt directly in the folder. So for a non elevated prompt U type CMD into the file path. And for PowerShell you open file > powershell > admin This could work, as long as it works without issue on both win10 and 11
zuldero
zulderoβ€’6mo ago
ah now i understand. i dont evan get the classict file button that you refere to with alt.
DrR0x
DrR0xβ€’6mo ago
Interesting, I knew win11 had a different filexp(and that it was worse) but file tab seems fairly important πŸ˜‚
zuldero
zulderoβ€’6mo ago
im also on the evan "newer" fileexplorer with tabs.
DrR0x
DrR0xβ€’6mo ago
There was some useful stuff in there. I tried win11 in Dev 2 years ago on school laptop but it sucked so never upgraded on my current pc Now that is one feature I could see myself wanting, but not any others afaik
zuldero
zulderoβ€’6mo ago
i also had a hard time initali on win11 but with some tools and things you can make it pretty good ou maybe thats the problem also. i have installed the "file explorer patcher" i frogot. and sady i can not just disable it.
DrR0x
DrR0xβ€’6mo ago
Yeah same as win11 Dev, can't disable without a reinstall πŸ˜‚
zuldero
zulderoβ€’6mo ago
but still in all the ways i can launch it with compat_names, it never finishes, it just stops spinning after ca. 2min and just stays there frozen.
DrR0x
DrR0xβ€’6mo ago
Hmm, I'm assuming you have sensors/commands setup right πŸ˜‚ Just got to check
zuldero
zulderoβ€’6mo ago
i use all exept quick actions. but wait. i just toght i run it with the log extension at the end that you told me to istall. and now it went trogh. i will check now with a restart of home assistant. yes most of them changed now. wierd as soon i put a log at the end it works. before it just doent want to do anything. but. it workes now expect a few singel ones that still have the _ before.
DrR0x
DrR0xβ€’6mo ago
Could you create a new help post? Just helps Amadeo and myself keep track of fixes And stops spamming anto79
zuldero
zulderoβ€’6mo ago
it works now and i just answerd here case you pingd me here for the migration. thx to help me out on this.
DrR0x
DrR0xβ€’6mo ago
All good then glad it's fixed πŸ˜€
Anto79-ops
Anto79-opsβ€’4mo ago
just following up here with installation of 2.1.0-beta1
No description
Anto79-ops
Anto79-opsβ€’4mo ago
No description
Anto79-ops
Anto79-opsβ€’4mo ago
clicking on veiw details in Norton
Anto79-ops
Anto79-opsβ€’4mo ago
No description
Anto79-ops
Anto79-opsβ€’4mo ago
No description
Amadeo
Amadeoβ€’4mo ago
Yup Sam had a ceritifcate (to sign the installer) from one of the companies - not sure how he obtained it, I did a quick research and getting one might be pricey We sign rhe insteller with our own (so that HAS.Agent itself can recognize that the new installer is legit) but since the certificate is not signed by one of the certicicate authorities that windows come with, funny software like norton/smart screen can show stuff like this Basically unknown = threat The smartscreen/windows "learns" so after X people use it, it's more probable that others will not see the popup There are some nuances to this but either way I'll need to explore more "fix it once for all" options
Anto79-ops
Anto79-opsβ€’4mo ago
I trust you guys that's all that matters 😁
Amadeo
Amadeoβ€’4mo ago
I'll tell you what I tell to my wife
don't trust me
xD joking of course, for most of the non-technical users this kind of smartscreen notification is a red flag, would be really nice to solve it
DrR0x
DrR0xβ€’4mo ago
I think you may be right but I would bet that at least half of our users have seen it before and are smart enough to realise that it is only flagged because it's unknown And certainly for me that completely clears the red flag. Just because windows doesn't know who signed it it is now bAd? Why would that matter πŸ˜‚ You could still sign a malicious app with a good cert right?
Amadeo
Amadeoβ€’4mo ago
ya
DrR0x
DrR0xβ€’4mo ago
I'm tempted to make my alt account that hasn't changed its username yet to F$#k m$