Gasmeter_with_reed icon indicating copy to clipboard operation
Gasmeter_with_reed copied to clipboard

Code suggestions

Open samuelchiang opened this issue 4 years ago • 0 comments

I like your project. Some suggestions for you:

  1. You can try https://github.com/thomasfredericks/Bounce2 library for debounce.
  2. Don't use delay in loop. You may lose WiFi connections. Use while in loop is also dangeous, you may trapped in dead lock. Instead, you can use millis() and state machine.

For more detail, you can reference my ESP32 projects.

samuelchiang avatar Dec 02 '21 05:12 samuelchiang

I plan to do this in a few months after upgrading OTRS. A bug in the OTRS SOAP interface prevented me from even fetching a config item.

mjducharme avatar Mar 21 '17 13:03 mjducharme

We are not using this functionality in our OTRS (actually, I more or less only use this library to create example soap requests ;), yet I'd be happy to merge.

@mjducharme it seems you are doing more of the work than I am, if you want to become owner of this project, that's fine with me (you should have an invite now as a collaborator)

ewsterrenburg avatar Mar 21 '17 17:03 ewsterrenburg

To explain this perhaps again more precisely =) I would like to query a CI from the OTRS CMDB from the outside. As a return I would like to have the CI information as well as the tickets with which the CI is linked. Do you have an idea?

Modius22 avatar Jun 04 '17 16:06 Modius22

Yes, please give me another week and I should have this functionality developed.

mjducharme avatar Jun 06 '17 03:06 mjducharme

I have made progress but this is still not done. The main challenge is that the XML data for the CI objects has a very dynamic tree structure, so I need to create classes on-the-fly instead of using statically defined classes. This requires some changes to the core code.

mjducharme avatar Jun 14 '17 16:06 mjducharme

I got the dynamic classes working, but decided it was not the best UI experience for the CIXMLData structure. Since that data structure can have multiple levels of children and is very flexible, I am using a dict for that, and created new functions to recursively create a dict from xml or xml from dict. It is about 80% complete. I have to fix the Attachments feature because for some reason in Config Items the attachment is under the "ConfigItem" structure inside Data instead of in the Data structure, so it doesn't correspond precisely with the way the ticket functions and FAQ functions use the attachments. I need to do a few more fixes to get the attachments to work properly.

mjducharme avatar Jun 22 '17 14:06 mjducharme

HI @mjducharme !

Great job you is doing.

edgarcsilva avatar Aug 05 '17 16:08 edgarcsilva

@mjducharme This all sounds great! But you didn't push your work, did you? It would be extremely helpful for me right now. Or at least branching it. I don't even need the attachment feature.

JulianDeal avatar Feb 12 '18 09:02 JulianDeal

@mjducharme Have you looked into this in the mean time?

ewsterrenburg avatar Jan 20 '20 12:01 ewsterrenburg