Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Alexander Ruf
@alexruf
hey
Alexander Ruf
@alexruf
maybe someone can help me with my agents. I wanna build some agents watching gas prices in my area, which send me notifications when prices drop during a certain period. So I already have a WebsiteAgentquerying prices and producing events like this {"brand": "AVIA", "isOpen": true, "diesel": 1.239, "e5": 1.359, "e10": 1.339}. Then my plan was to use a ChangeDetectorAgentto check for the lowest price ({% assign drop = last_property | minus: e10 %}{% if last_property == blank or drop > 0 %}{{ e10 | default: last_property }}{% else %}{{ last_property }}{% endif %}). The produced events will be collected by a Digest Agent and send to me via Email. The problem now is that I somehow need to tell the ChangeDetectorAgent to erase its Memory after a certain period so it will inform me when the price dropped during the last e.g. 3 days and not just tracks the all time high.
Anyone knows how I can do this ?
I already added a timestamp ("timestamp": "1576320056") to my events so I am able to check how old the latest price events are.
But I still don't know how to reset the Memory value of the ChangeDetectorAgentso that it will just detect price drops during a certain time period
Alexander Ruf
@alexruf
Or is there a way to use the Peek Detector Agent for this type of task and tell it to detect lows instead of peeks ?
The Doctor
@virtadpt
This message was deleted
The Doctor
@virtadpt
That is a really good question. I don't know.
I did some poking around in my install and I didn't find anything.
matrixbot
@matrixbot
pengnuin Hmm, as a quick hack you could probably just go ahead and prepend a - for the detection logic
Andrew Horton
@urbanadventurer

I'd like to introduce myself. I'm an infosec guy and a ruby coder with some opensource projects , and I have been traveling all around the world for the past few years. Some of the digital nomad hotspots I have traveled to have an air quality problem. This includes Bali, Mexico City, and Tbilisi (Republic of Georgia) where I'm currently located.

My first project is an Air Quality Index monitor. I am using a Website Agent to pull data from the AirVisual JSON API. I then send that data to a JavaScript Agent to enrich the JSON using the red, orange, yellow, green AQIUS system. I send this data to a Trigger Event Agent which checks if the air quality is bad, and if so creates an alert.

image.png
The Doctor
@virtadpt
Nice! I do something similar with the Air Now API in my daily weather reports.
Welcome to the project.
mdelias
@mdelias
so rather than having a .env file, the Docker container expects variables to be passed into the launch command.
what does this mean?
I cannot auth twitter service...
I edited .env
Jayr Motta
@jayrmotta
Anyone using (or have used) Huginn to automatically delete tweets?
matrixbot
@matrixbot
pengnuin mdelias you pass the options in the command line that you use to launch your docker container (or in your dockerfile or docker-compose.yaml)
pengnuin You might be able to use the builtin credential storage for that as well
Andrew Horton
@urbanadventurer
I have noticed that the huginn/huginn docker container raises errors if setting RAILS_ENV to development. What is the recommended way to develop huginn agents in a docker container?
This is raised foreman stderr | NameError: uninitialized constant Rack::LiveReload
Andrew Horton
@urbanadventurer
I haven't solved this issue but I have a temporary workaround. I defined a volume in docker-compose.yml to change the production environment configuration to be more like development.
- ./production.rb:/app/config/environments/production.rb
Huginn::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # Code is not reloaded between requests
  config.cache_classes = false

  # Eager load code on boot. This eager loads most of Rails and
  # your application in memory, allowing both threaded web servers
  # and those relying on copy on write to perform better.
  # Rake tasks automatically ignore this option for performance.
  config.eager_load = false

  # Full error reports are disabled and caching is turned on
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false
Akinori MUSHA
@knu
Feeling it's time for JqAgent, after struggling yet again with a weird response format that Pocket API uses
There's a C binding, but a simple unix way of popen() would be enough
Akinori MUSHA
@knu
Akash Agarwal
@iAk4zh_twitter
Just found out this app, one question. What I am looking for somekind of self hosted api service where I can call and endpoint /socialpost/?text=someText&twitter_token=xxxxxxxx it it posts to my twitter. Can this app do this?
Akash Agarwal
@iAk4zh_twitter
Also is it allowed to change Huggin name and fabicon?
degan6
@degan6
@iAk4zh_twitter Yes, That would take two or three agents, but it can do that for sure
matrixbot
@matrixbot
pengnuin Let's say: I don't see any reason why you wouldn't be able to change the icon and name. The software is MIT licensed. I assume you're trying to build a service using huginn as a base?
Rafael Rivera
@riverar
So, I managed to accidentally emit 39 pages of garbage events. Any tips on cleaning this up quickly/easily? 😂
matrixbot
@matrixbot
k0b0 In Agents menu choose the agent that generated the events and choose the option as seen on the pic
k0b0 posted an image: Screenshot_20200114-204331.png
k0b0 "Delete all events"
k0b0 I'm not sure if this deletes only events generated by this agent or all events ever generated...
Rafael Rivera
@riverar
Awesome, thanks k0b0
matrixbot
@matrixbot
k0b0 No problem
matrixbot
@matrixbot
k0b0 No problem. You using huginn for something cool?
Rafael Rivera
@riverar
Just deployed it few days ago locally, am warming up on it. Using it to track when a web service spits out a new json config, alerts some friends via Telegram. Going to tinker with diffing out the json changes next, looks like folks use a JavaScript Agent and its memory capabilities to do that.
Of course, have a shopping list of agents to add. Adult legos.
matrixbot
@matrixbot
k0b0 I agree with Legos analogy. All I do now is search for sites with rss/json outputs 😂 Would kill for a Skyscanner price tracking solution...
matrixbot
@matrixbot
pengnuin Doesn't skyscanner have a REST API? What's wrong with that?
k0b0 They only offer api keys to companies, I don't apply to their requirements...
matrixbot
@matrixbot
pengnuin Ugh, that sucks. I didn't go that in-depth
k0b0 Yeah. I might send them an email asking for a low volume api key. But I'm still having trouble with some basics in Huggin, as I don't have any programming knowledge, so adding something complicated as in a 3rd party api results can wait for time being 😁
Ryan
@ryangriffin_gitlab
I have removed all of the pre-loaded agents/scenarios but daily at 5pm I'm getting failed email attempts to admin@example.com. What's the best way to get this job cleared out?
Akash Agarwal
@iAk4zh_twitter
@degan6 How will it be possible as it does not have a way to pass TWITTER auth keys as parameters it asks to set that in Services so I can only post to my set token. Or do you mean by creating different users and making same agents in each one
Andrew Horton
@urbanadventurer
@ryangriffin_gitlab do you see anything in http://127.0.0.1:3000/jobs ?
Ryan
@ryangriffin_gitlab
@urbanadventurer oh thanks! I realized when trying to view /jobs that I didn't have admin access. I didn't know there was a default admin user. I gave myself admin access and dropped the default admin user.
Cole
@Cole25968973_twitter
What would be a good way to graph Sentiment Agent data? Basically I want to use something like Grafana and feed Sentiment Agent data to it. I don't know if Grafana is the best tool though, I don't know how to use it and it seems pretty advanced for what I want to do. Any ideas?