by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Gideon Wolfe
@GideonWolfe
So I am having an issue where thousands of events are stacking up and failing because "Run Agent Schedule" and "Run Event Propogation" are hanging without doing anything
I've had glitches where a single formatting agent stopped the entire pipeline, but it seems like now it isnt even running the agentsa
The Doctor
@virtadpt
Are you running in Docker, in production, or some other way?
Have to ask, sorry about this: Have you restarted the scheduler?
delayed_job workers or threaded worker?
Database locally or hosted on another box?
matrixbot
@matrixbot
k0b0 @Flame you would have to write your own agent to process Facebook pages. If you are after Facebook posts, you could use rss-bridge to convert them to rss/json output which you could use in Huggin.
Anton Myrberg
@AntonMyr
Are there any guidelines regarding opening a pr for a new agent?
malcmail
@malcmail
Has anyone managed to get an agent to post to a channel in Microsoft Teams? Managed to get Slack going but no joy with Teams.
The Doctor
@virtadpt
Can't say I've tried yet. Sorry.
James Deaton
@okjed
Anyone aware of a place with some good examples of using the javascript agent? I'm trying to loop through an API request that is limited to a small number of responses per query and need to generate a series of offsets. I assume using the javascript agent is the best option.
The Doctor
@virtadpt
Off the top of my head, no. Admittedly, I don't know anything about JS.
James Deaton
@okjed
Thanks, I'm realizing that I may be stuck unless I craft a new agent. I do have another question, I have a number coming in from an API request that I'd like to format as a currency/money via liquid. In my tests, it looks like those filters aren't implemented/available? Or am I missing something.
The Doctor
@virtadpt
Hmmm...
Depending on what you want to do, you can go pretty far with just the round Liquid tag. Unless you want to do something more complex?
or schapira
@schapira_gitlab
hi, is there a way to automate telegram group images save to some cloud service?
Srinivasan Iyer
@sriniiyer
is there a way to ask the WebsiteAgent to wait for the page to finish loading?
Jimmy B.
@jimmybrancaccio
So I have an external MySQL container I am using, is the local MySQL service necessary in the Huginn docker container and if not, how to disable?
malcmail
@malcmail
Been plugging away trying to improve my knowledge on this. From a particular site I managed to get ""date": "<td>10/07/2020</td>\n"," using the css "//table[@class='decisionrepeater']/tr/td[1]". Is ther eany way to strip out the tags etc and just leave the date? CAn I do this in the website agent or do I need to use another process before posting the result elsewhere? Thanks.
malcmail
@malcmail
Also wonderign how I can extract the number after RowOnClick in this "</tr><tr onmouseover="this.tmp = this.style.backgroundColor; this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor = '#ffffff'" onclick="RowOnClick('11735');" style="cursor: pointer;">". I've tried substring but can't get it to work at all probably as I've little idea s to what I'm doing as you can likely tell!)
Jimmy B.
@jimmybrancaccio
Any ideas on how to get Huginn to not start it's internal MySQL process, as I assume it's not needed if using an external MySQL DB?
danquach
@danquach_twitter

I'm deploying huginn with this

version: '2'
services:
  huginn: 
    container_name: huginn
    networks:
        - main
    image: huginn/huginn-single-process
    restart: always
    env_file:
      - ./huginn/mysql.env
      - ./huginn/secrets.env    
  threaded:
    image: huginn/huginn-single-process
    networks:
        - main
    command: /scripts/init bin/threaded.rb
    restart: always
    env_file:
      - ./huginn/mysql.env
      - ./huginn/secrets.env
    depends_on:      
      - huginn
networks:
  main:
    driver: bridge

Every morning at 8am pst tons of resources seems to get used, I logged into the docker images but can't seem to find the logs. What directory is it in?

danquach
@danquach_twitter
Actually nevermind, I checked the logs and it logs to /dev/stdout which can be grabbed through docker logs CONTAINER_ID

For all of my agents, I run them at 2am in the middle of the night, but I am noticing in the AgentRunScheduleJob enqueueing things at weird times

[ActiveJob] Enqueued AgentRunScheduleJob (Job ID: 7ca30795-a1b8-41ac-9d2f-b705d20e74b4) to DelayedJob(default) with arguments: "every_2h"
Queuing schedule for 8am
[ActiveJob] Enqueued AgentRunScheduleJob (Job ID: 746f2601-d8f8-4119-abcc-666bad62678a) to DelayedJob(default) with arguments: "8am"
2020-07-21T08:00:08-0700: [Worker(host:c7f63f9e7430 pid:1)] Job AgentRunScheduleJob [3b67878b-557f-413f-8788-d19cc9d43575] from DelayedJob(default) with arguments: ["every_10m"] (id=277248) (queue=default) RUNNING
[ActiveJob] [AgentRunScheduleJob] [3b67878b-557f-413f-8788-d19cc9d43575] Performing AgentRunScheduleJob (Job ID: 3b67878b-557f-413f-8788-d19cc9d43575) from DelayedJob(default) enqueued at 2020-07-21T15:00:02Z with arguments: "every_10m"
[ActiveJob] [AgentRunScheduleJob] [3b67878b-557f-413f-8788-d19cc9d43575] Performed AgentRunScheduleJob (Job ID: 3b67878b-557f-413f-8788-d19cc9d43575) from DelayedJob(default) in 0.96ms
2020-07-21T08:00:08-0700: [Worker(host:c7f63f9e7430 pid:1)] Job AgentRunScheduleJob [3b67878b-557f-413f-8788-d19cc9d43575] from DelayedJob(default) with arguments: ["every_10m"] (id=277248) (queue=default) COMPLETED after 0.0088
2020-07-21T08:00:08-0700: [Worker(host:c7f63f9e7430 pid:1)] Job AgentRunScheduleJob [6560c76b-9d46-4dcd-af29-e5bcfc946955] from DelayedJob(default) with arguments: ["every_30m"] (id=277249) (queue=default) RUNNING
[ActiveJob] [AgentRunScheduleJob] [6560c76b-9d46-4dcd-af29-e5bcfc946955] Performing AgentRunScheduleJob (Job ID: 6560c76b-9d46-4dcd-af29-e5bcfc946955) from DelayedJob(default) enqueued at 2020-07-21T15:00:02Z with arguments: "every_30m"
[ActiveJob] [AgentRunScheduleJob] [6560c76b-9d46-4dcd-af29-e5bcfc946955] Performed AgentRunScheduleJob (Job ID: 6560c76b-9d46-4dcd-af29-e5bcfc946955) from DelayedJob(default) in 1.23ms
2020-07-21T08:00:08-0700: [Worker(host:c7f63f9e7430 pid:1)] Job AgentRunScheduleJob [6560c76b-9d46-4dcd-af29-e5bcfc946
955] from DelayedJob(default) with arguments: ["every_30m"] (id=277249) (queue=default) COMPLETED after 0.0141
2020-07-21T08:00:08-0700: [Worker(host:c7f63f9e7430 pid:1)] Job AgentRunScheduleJob [4b89e30f-8ec6-4064-8e60-a97c5abe232f] from DelayedJob(default) with arguments: ["every_1h"] (id=277250) (queue=default) RUNNING
[ActiveJob] [AgentRunScheduleJob] [4b89e30f-8ec6-4064-8e60-a97c5abe232f] Performing AgentRunScheduleJob (Job ID: 4b89e30f-8ec6-4064-8e60-a97c5abe232f) from DelayedJob(default) enqueued at 2020-07-21T15:00:02Z with arguments: "every_1h"
[ActiveJob] [AgentRunScheduleJob] [4b89e30f-8ec6-4064-8e60-a97c5abe232f] Performed AgentRunScheduleJob (Job ID: 4b89e30f-8ec6-4064-8e60-a97c5abe232f) from DelayedJob(default) in 2.41ms

Is there any reason why things are being queued at times what I didn't specify in the UI, and why other things are appearing like every_1h, etc?

In my agents, I don't have anything set with args of every_Xm
cksonny
@cksonny
Hey all, is there a way to make 'Website Agent' post an HTML copy of a page at a particular location? I've tried a couple of options and I don't seem to be able to do this.
Jayson-Q
@Jayson-Q
Hi, anyone help me with an issue that's driving me nuts? I'm trying to make a PostAgent that posts to Discord however I cannot get the format to basically be the Title (from a RSS feed) with the URL link.
1 reply
Jayson-Q
@Jayson-Q
if it helps, the code I currently have is:
{
  "post_url": "https://discordapp.com/api/webhooks/EDITED",
  "expected_receive_period_in_days": "1",
  "content_type": "json",
  "method": "post",
  "payload": {
    "content": "{{title}}",
    "url": "{{url}}"
  },
  "emit_events": "true",
  "no_merge": "true"
}
Anton Myrberg
@AntonMyr
Has anyone tried adding an agent gem to their Huginn instance?
Eugene bogorad
@bogorad

Can anyone point me to a solution, please! I need to pass some parameters through the WebsiteAgent - e.g. 'URL' and 'title'. But unless I put those into 'extract' they're not passed. And 'extract' requests I use css - but I just want to pass them through!

This code doesn't save - so what do I do?

  "expected_update_period_in_days": "1",
  "url": "{{content | strip_newlines | regex_replace: '\\<A HREF=\\x22(.+?)\\x22.*','\\1'}}",
  "type": "html",
  "mode": "all",
  "extract": {
    "url": {
      "value": "{{{url}}}"
    },
    "title": {
      "value": "{{{title}}}"
    },
    "body_text": {
      "css": "body",
      "value": "string(.)"
    }
  }
}
Laura
@laurathebigone_twitter
Can anyone help me with the Delay Agent? Specifically how is max_emitted_events used? What I'm basically looking for is a way to rate limit events to 1 per 5 seconds. So I was hoping the delay agent would hold a buffer of events and send them one by one every 5 seconds
The Doctor
@virtadpt
Leaky bucket queuing?
Hmm.
I don't think Delay Agent has that granularity. The fastest an agent can fire is every minute.
That's an interesting use case, though... I wonder how hard it would be to retrofit it into the Delay Agent. Something like, "Every time this agent runs, it will emit one event from its queue every five seconds, and cleanly terminate when its queue is empty or when its runtime is up."
mainuser369
@mainuser369
Hi guys, I'm a bit new to Huginn; and I've been able to successfully deploy Huginn on Heroku. I need help with Website Agent; especially scraping HTML/CSS content. I would like to monitor, let's say, the page https://www.python.org/downloads/ and the HTML path that I would like to extract is <a class="button" href="https://www.python.org/ftp/python/3.8.5/python-3.8.5.exe">Download Python 3.8.5</a>
How do I proceed?
Specifically, I would like to monitor when the text 'Download Python 3.8.5' changes to 'Download Python x.x.x'. Could someone please guide me?
Laura
@laurathebigone_twitter
@virtadpt I could just make a schedule for it to run every 15 seconds but I was specifically asking about max_emitted_events? If I set it to 1, does it mean it will hold the buffer and only emit one event every 15 seconds?
Laura
@laurathebigone_twitter
Nevermind I answered my own question: Scheduler Agent (/15 ) -> Delay Agent (max_emitted_events: 1, max_events 9999999)
Laura
@laurathebigone_twitter
Would be awesome if we could have the Scheduler Agent go as fast as 1/sec
Rob Silverii
@areohbe
:wave: checked around the repo and didn't see anything. I am getting back escaped json in the body of a post agent response. is there an easy way to prevent this to avoid having to unescape?
Defplayr
@Defplayr
Is anyone using Huginn with Blynk ? Any problems I should be aware of?
Cash Weaver
@cashweaver
Does anyone know how to include the URL in the event output of a Website Agent? Alternatively, does anyone know how to include arbitrary data in the output event for an agent?
Cash Weaver
@cashweaver
I didn't realize I had access to the URL via {{agent.options.url}}.
cksonny
@cksonny

Hey all, is there a way to make 'Website Agent' post an HTML copy of a page at a particular location? I've tried a couple of options and I don't seem to be able to do this.

Not a very active dev community and really difficult documentation. Definitely not an IFTTT replacement. I'm calling it quits guys on this.

Laura
@laurathebigone_twitter
@cksonny What alternative are you using?
Egon Willighagen
@egonw
has anyone some pointers on how to get new GitHub Issues (assigned to me) routed into Todoist? I am not sure where to find "recipies". I used IFTTT in the past for this, but that IFTTT integration it broken beyond repair for me (yes, tried >6 times)
fourofspades
@fourofspades
Total newbie here. Trying to send a pushover alert when a server stops responding. I have created two agents, a pushover agent, which when I fire manually works, and I have a agent that checks my server Http Status Agent that checks every hour. I am stuck on how to link them together. I looked at the docs, but it's not obvious to me.
fourofspades
@fourofspades
Have to agree with @cksonny documentation and support is severely lacking and it has a bear vertical learning curve. If anyone can suggest alternatives, that would be great.
The Doctor
@virtadpt
@fourofspades Use a Trigger Agent to check the HTTP status code and send a message to the Pushover Agent if it doesn't match a 200-series response.
Steven Irby
@StevenIrby_twitter
Anyone have any ideas on how to scan twitter for keywords without twitter API keys? Twiiter recently announced changes to their API and they're taking forever on approving developer accounts and also denying a lot of folks access. So no keys for me.
The Doctor
@virtadpt
Check out RSS-Bridge. There's a Twitter Bridge that'll let you search on keywords and hashtags without the API, and returns RSS feeds.