Giter Club home page Giter Club logo

octoprint-telegram's People

Contributors

alexisml avatar alpxp avatar babs avatar bart1909 avatar cedricfinance avatar chatelao avatar danhae avatar db0nd avatar deadly667 avatar derpicknicker1 avatar f4nu avatar fabianonline avatar foosel avatar franciscodemaussion avatar giloser avatar guysoft avatar jakevossen5 avatar jlsjonas avatar kaeltis avatar marcuswolschon avatar michmich avatar rlogiacco avatar slvrpdr avatar szobov avatar thekrush avatar yorambi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octoprint-telegram's Issues

Alternative to Pillow?

Right now the plugin has Pillow as dependency - just to rotate the pictures from the webcam if necessary. But it is a really huge dependency taking a looooooong time to install on a Raspberry 1. Perhaps there is something more lightweight we could use for this task?

add /resume and /pause commands

It seems that I can start as print but not /resume it.
Neither can I /pause it, when I detect something is odd and want to have the printer wait until I come back to fix it without loosing the half-finished print.

Alternative /toggle_pause (a _printer.pause_print() and _printer.resume_print() are part of the next Octoprint release)

Allow to select which notifications are to be sent

First, thanks for the fantastic plugin!

I'd like to be able to specify which messages to send. For example I don't need the "printer shutdown" or "printer started" notifications, but there is no way to disable them.

Read-only support for groups

From extruderCat on twitter:

could you add a "read-only" option for groups in the Octoprint Telegram plugin? Would be nice for a helper or customers.

/connect

a command /connect would be useful to allow the user to connect the printer if Octoprint is not configured to connect automatically (e.g. to be safe against Octoprint ruining prints started via the printer control panel)

Error sending gcode file

With 1.3.1 and when trying to send a gcode file.

2016-05-22 22:29:54,880 - octoprint.plugins.telegram.listener - ERROR - Exception caught! local variable 'data' referenced before assignment

Layer count

Hi. Have this plugin installed and it is working great. Is there any way that as a part of the status message it can report what layer its on? Such as layer # of #. Thanks.

Run system commands

Any way to send system commands? IE w the systems command editor I now have a power on/off menu item. This triggers a gpio command to turn on a relay and power the printer.

Upgrade in octoprint interface fails

Popup shows that update is available. Click on update, get error message that update fails.

Octolog shows this error;
2016-05-17 19:29:08,873 - octoprint.plugins.softwareupdate - INFO - Starting update of telegram to 1.3.0...
2016-05-17 19:29:08,935 - octoprint.plugins.softwareupdate - ERROR - Update of telegram can not be performed
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.11-py2.7.egg/octoprint/plugins/softwareupdate/init.py", line 637, in _perform_update
update_result = updater.perform_update(target, check, target_version)
File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.11-py2.7.egg/octoprint/plugins/softwareupdate/updaters/pip.py", line 50, in perform_update
install_arg = check["pip"].format(target_version=target_version)
KeyError: 'target'

Unable to save settings for OctoPrint-Telegram

I have been unable to save changes in settings for this plugin since after I upgraded for the first time (the first installation was ok). The only thing that I can save is the chat id, nothing else gets saved (can't even enable debugging). Tried uninstalling and removing everything from the config-file, still same problem.
I can't get past the "save first or trashcan-click".

Running version 1.3.0.dev1245+gcba742a (devel branch).

Automatic update fails

The update via octoprint - Version: 1.3.0.dev1047+g5a5d29b (devel branch) - fails.
Here the relevant part from the logfile:

2016-05-19 22:59:07,686 - octoprint.plugins.softwareupdate - INFO - Starting update of telegram to 1.3.0...
2016-05-19 22:59:07,706 - octoprint.plugins.softwareupdate - ERROR - Update of telegram can not be performed
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.0.dev1047_g5a5d29b-py2.7.egg/octoprint/plugins/softwareupdate/init.py", line 666, in _perform_update
update_result = updater.perform_update(target, populated_check, target_version, log_cb=self._log)
File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.0.dev1047_g5a5d29b-py2.7.egg/octoprint/plugins/softwareupdate/updaters/pip.py", line 66, in perform_update
install_arg = check["pip"].format(target_version=target_version)
KeyError: 'target'

add /connect command to sys list

can you add /connect command to sys list, so we can connect the printer to the raspberry (running octoprint) trought telegram?
thanks

Support for multiple chat-id

I will be happy to implement this myself and do a pull request. (I was planning to do this same bot before you put it on GitHub here).

My idea is to allow the user to put a comma-separated list of chat-id like:

2400321, 930323

And allow commands from any of the specified chats.

Do you think that this would be a good approach? It needs minimal changes to the UI. If it makes sense, I will proceed to work on it.

user can't modify /status message

The user can modify all kinds of messages in the Octoprint settings dialog.
The status when not printing is there.
The status when printing is missing in the dialog.

Edit user Command or Notify

Hello,
when I set authorization on one user pressing pencil,
I have this error (on inspect element of Chrome):
Uncaught TypeError: Unable to process binding "checked: function (){return settings.settings.plugins.telegram.chats['269074525']
Do you can help me

Settings are not saved/changed

I run the latest version of the Telegram plugin (1.4.0) on the latest version of Octoprint (1.3.0) and I can't save/change my settings for some reason.

I've managed to add my Telegram Token and save the settings but now it doesn't accept anymore changes to the Telegram settings.

I've tried to reinstall the plugin but it remembered my old token settings so it wasn't fully uninstalled? Is this an issue with permissions on the settings file?

Could not save settings for plugin Telegram Notifications (1.0.0)

Running Version: 1.3.0.dev895+gb1711f3 (devel branch)

After I've saved the token, I can't save anything else. If i delete the token, I can save the other settings for Telegram. Maybe because my token contains a ":"?

2016-03-09 21:38:28,053 - octoprint.server.api.settings - ERROR - Could not save settings for plugin Telegram Notifications (1.0.0)
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.0.dev895_gb1711f3-py2.7.egg/octoprint/server/api/settings.py", line 300, in _saveSettings
plugin.on_settings_save(data["plugins"][plugin_id])
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_telegram/init.py", line 225, in on_settings_save
data['token'] = data['token'].strip()
KeyError: 'token'

Notifications for layer height sent twice w/ Z-hop

Hey,

I have enabled Z-hop on retract (0.1mm). My plugin has the default config of notifying me every 5mm in Z oder every 15 minutes.

I wondered why I get 2 messages sent shortly after each other each time a message is sent.

Then I saw that the first message has a greater Z height than the second, mostly something like:

  1. msg - Z: 6.05mm
  2. msg - Z: 6.15mm

Since I have used a layer height of 0.15mm and a Z-hop on retract of 0.1mm and have enabled the "force retract on layer change" it would totally make sense that the plugin is triggered twice with a very short time difference.

Anything I can do to help?

OctoPint 1.2.9
OctoPrint-Telegram 1.0.0

The GCODE I printed is attached.
serenity_no_panels_sliced_top.gcode.txt

Send webcam captured imaged even if the printer is not connected

I would love too also receive a picture if I send the /status command, even if the printer is disconnected.
Usually, at least in my case, the webcam remains connected to the Octoprint server and pointed to the 3D printer even if the printer is offline.

Thanks!

Webcam image has the wrong orientation

The image sent from the bot has another orientation like the stream in the control tab when i change the orientation of the webcam in the octoprint settings. How can i fix that?

Especify for each print to who to notify

Dude, here is a great feature to your grate plugin would be the ability to specify for each printing file or folder(octoprint 1.3.0rc) to whom send notifications.

This feature will help to notify clients the status of their printing files or folders in case they have more then one file to print.

After aborting print, temps appear to be locked / stuck?

I aborted a print this morning, and I noticed that while the target temps (bed and extruder) both correctly reset to "0.0", the current temps are showing un-moving values of 60.03 / 209.76. I've sent a handful of "/status" commands to the bot over the past half hour, and the temps are always reported as the following:

Not printing.
Bed 60.03/0.0, Extruder 209.76/0.0.

I would expect it to show Bed 20 / 0.0 Extruder 0 / 0.0 (I assumed Bed would be 20 at room temp but you get the idea).

Is this intentional or a bug?

Thanks,

Jeff

[feature] cam-picture

Hi,

i'm quite excited about your plugin! Great work!
I experimented with your plugin-code and added a feature (/campic) which just sends a picture of the printer's cam regardless of the current printing state.

Not sure if you wanna implement it:

elif command==gettext("/campic"): self.main.track_action("command/campic") self.main._send_msg("Ok, here we go you little stalker...", with_image=True)

Plugin install errors

Running OctoPi on a Raspberry Pi 3

When trying to install the telegram plugin I am receiving the following error message. I believe I am following the correct procedure and have not found any helpful info in either this forum or google.

Please help...

pi@octopi:~/oprint/bin $ pip install https://github.com/fabianonline/OctoPrint-Telegram/archive/stable.zip
Downloading/unpacking https://github.com/fabianonline/OctoPrint-Telegram/archive/stable.zip
Downloading stable.zip (85kB): 85kB downloaded
Running setup.py (path:/tmp/pip-0tJZ6P-build/setup.py) egg_info for package from https://github.com/fabianonline/OctoPrint-Telegram/archive/stable.zip
Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?
Complete output from command python setup.py egg_info:

Could not import OctoPrint's setuptools, are you sure you are running that under the same python installation that OctoPrint is installed under?

Cleaning up...
Command python setup.py egg_info failed with error code 255 in /tmp/pip-0tJZ6P-build
Storing debug log for failure in /home/pi/.pip/pip.log

No answer by the bot

I do get the messages when the Octopi is started or while printing like i set it up, but the bot does not respond to my requests. Neither the abort request nor the help one.
Did i do anything wrong?

Error while updating OctoPrint-Telegram

While trying to upgrade OctoPrint-Telegram from version 1.1.1 to 1.3.1 I get the following error:

Update failed!
The update did not finish successfully. Please consult the log for details.

The log contains the following error:

2016-05-20 20:06:50,088 - octoprint.plugins.softwareupdate - ERROR - Update of telegram can not be performed
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.11-py2.7.egg/octoprint/plugins/softwareupdate/__init__.py", line 637, in _perform_update
    update_result = updater.perform_update(target, check, target_version)
  File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.2.11-py2.7.egg/octoprint/plugins/softwareupdate/updaters/pip.py", line 50, in perform_update
    install_arg = check["pip"].format(target_version=target_version)
KeyError: 'target'

I'm running OctoPrint Version: 1.2.11 (master branch)

[feature request] Send bot file and start a print

Thanks for the great bot, I use it to monitor prints while at work. A feature I'd think would be neat is the ability to send the bot a .gcode file and start a print. If I could do that then I'd be able to close the ports to the web interface externally and do everything through the bot.

Faulty status after connect

If connecting to an active octoprint-session, and going up 10mm on Z without homing, the bot automatically messages:

Printing at Z=-10.0. Bed 26.0/0.0, Extruder 21.9/0.0. 00:00:00, 0% done, 00:00:00 remaining.

While all messages are customized to german language, this message is probably somewhere hardcoded and a little bit missleading.

Send the image in a separate message

At least on iOS Telegram notification on the lock screen just says that the bot has sent a photo. If the bot would first send the image and then the status, I could see the status on my lock screen.

add /feedrate to comand list

can you add /feedrate to comand list? somenthing like 10% 25% 30% 40% 50% ecc trought bottons or trought input by keyboard.
thanks a lot

Nothing append when i click "pencil" user icon

Hi,

I have a Token valid for my bot (status appear in greend and ok)
I send a message to bot, chat appear in the list, but if i click on pencil, nothing happend. i cant check boxes.

I use Firefox,

Regards

webcam image not sending even when requested

not getting images (which work thru octoprint just fine, both video and snapshot). settings request images for /status, (start/stop/etc). none of them produce images.

here's the relevant debug info for the /status request:
(odd that there's a with_image=True, and a snapshot url followed by a Sending without image):

2016-09-25 07:14:33,698 - octoprint.plugins.telegram.listener - INFO - Got a command: '/help' with parameter: '' in chat 295263708
2016-09-25 07:14:40,625 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:15:08,029 - octoprint.plugins.telegram.listener - INFO - Got a command: '/list' with parameter: '' in chat 295263708
2016-09-25 07:16:16,278 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:17:28,620 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:17:55,001 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:24:37,374 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:33:29,551 - octoprint.filemanager.analysis - INFO - Starting analysis of local:testblock.gcode
2016-09-25 07:38:37,489 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:44:39,310 - octoprint.plugins.telegram.listener - DEBUG - MESSAGE: {u'message': {u'from': {u'first_name': u'Jim', u'last_name': u'Gale', u'id': 295263708}, u'text': u'/status', u'entities': [{u'length': 7, u'type': u'bot_command', u'offset': 0}], u'chat': {u'first_name': u'Jim', u'last_name': u'Gale', u'type': u'private', u'id': 295263708}, u'date': 1474789479, u'message_id': 21}, u'update_id': 785575775}
2016-09-25 07:44:39,312 - octoprint.plugins.telegram.listener - INFO - Got a command: '/status' with parameter: '' in chat 295263708
2016-09-25 07:44:39,314 - octoprint.plugins.telegram - DEBUG - Got an event: StatusNotPrinting Payload: {}
2016-09-25 07:44:39,319 - octoprint.plugins.telegram.TMSG - DEBUG - Printer Status{'progress': {'completion': 100, 'printTime': 273, 'filepos': 7856L, 'printTimeLeft': 0}, 'state': {'text': 'Operational', 'flags': {'operational': True, 'paused': False, 'printing': False, 'sdReady': False, 'error': False, 'ready': True, 'closedOrError': False}}, 'offsets': {}, 'job': {'estimatedPrintTime': 32.14438007491633, 'filament': {'tool0': {'volume': 0.0, 'length': 1.5529000000000004}}, 'averagePrintTime': 273.83736085891724, 'file': {'origin': 'local', 'date': 1474788809, 'name': u'testblock.gcode', 'size': 7856L}, 'lastPrintTime': 273.83736085891724}, 'currentZ': 10.0}
2016-09-25 07:44:39,320 - octoprint.plugins.telegram.TMSG - DEBUG - TEMPS - {'bed': {'actual': 41.2, 'target': 0.0, 'offset': 0}, 'tool2': {'actual': 58.5, 'target': 0.0, 'offset': 0}, 'tool1': {'actual': 50.9, 'target': 0.0, 'offset': 0}, 'tool0': {'actual': 84.7, 'target': 0.0, 'offset': 0}}
2016-09-25 07:44:39,322 - octoprint.plugins.telegram.TMSG - DEBUG - Sending Notification: Not printing.
Bed 41.2/0.0, Extruder 84.7/0.0.
2016-09-25 07:44:39,324 - octoprint.plugins.telegram - DEBUG - Sending a message: Not printing.\nBed 41.2/0.0, Extruder 84.7/0.0. with_image=True chatID= 295263708
2016-09-25 07:44:39,326 - octoprint.plugins.telegram - DEBUG - Snapshot URL: /webcam/?action=snapshot
2016-09-25 07:44:39,331 - octoprint.plugins.telegram - DEBUG - data so far: {'disable_web_page_preview': True, 'reply_markup': '{"hide_keyboard": true}'}
2016-09-25 07:44:39,332 - octoprint.plugins.telegram - DEBUG - Sending without image.. 295263708
2016-09-25 07:44:40,346 - octoprint.plugins.telegram - DEBUG - Sending finished. 200
2016-09-25 07:44:40,352 - octoprint.plugins.telegram.listener - DEBUG - listener: sending request with offset 785575776...
2016-09-25 07:44:51,850 - octoprint.plugins.telegram - DEBUG - Testing token 111111111:AAAa1aAAAaA1AA-AAaAAaAAAaA1aAAAA1A1
2016-09-25 07:45:11,217 - octoprint.plugins.telegram.listener - DEBUG - listener: sending request with offset 785575776...
2016-09-25 07:45:42,125 - octoprint.plugins.telegram.listener - DEBUG - listener: sending request with offset 785575776...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.