Excellent suggestion, I tried adding it to me (player faction 0001c21c), but it is still hostile to anything that isn't me. When I try putting "Setav aggression 1" , It says item "aggression" not found for parameter actor value. The other commands seem to be accepted, but in the end, the robot still attacks anything that isn't me -- settlers, provisioners, and other non-hostile NPCs.
Edit: I got it to work so that it does not attack my settlers on sight, but my settlers attack the robot first, then consequently turning it hostile against them. I am sure I added it to my player faction, so I'm not sure what gives.
Steps taken:
Hack Legendary Assaultron Robot and set "Command" in Pipboy
Entered Console Commands in this order:
Clicked Assaultron
Setav aggression 1 (which results in the error code above)
Help 0001c21c 0
Addtofaction 0001c21c 1