Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual devices & signalr #78

Closed
grahamehorner opened this issue Dec 5, 2018 · 10 comments
Closed

Virtual devices & signalr #78

grahamehorner opened this issue Dec 5, 2018 · 10 comments
Labels
area-tests Everything related to the testing of our library enhancement New feature or request up-for-grabs Good issue for external contributors to iot

Comments

@grahamehorner
Copy link

Please consider creating a set of virtual devices that simulate the physically state/operations of the hardware, and can be used without the need of the developer to have access to actual hardware.

E.g.. the device driver for a virtual SPI interface could make use of Signalr to send (almost realtime) state updates and/or operations to a web, windows, mobile ux.
using a similar concept to device twins.

IMHO this would help developers and improve testibility and reduce the developer inner loop when creating driver/controllers.

@joperezr joperezr added the enhancement New feature or request label Dec 5, 2018
@joperezr
Copy link
Member

joperezr commented Dec 5, 2018

I agree that having this would be great. TBH I'm not super familiar with SignalR so I don't know how costing would look like to have this, but it would definitely help inner-loop and validation since you would be able to have tests without relying on the hardware.

@grahamehorner
Copy link
Author

@joperezr I'd be happy to do a proof of concept for a virtual GPIO based around signalr/websockets; to see if this is possible and/or is a good fit for the developer inner loop/testing without the need for hardware.

@joperezr
Copy link
Member

joperezr commented Dec 5, 2018

That would be great! 😄

@joperezr joperezr added the up-for-grabs Good issue for external contributors to iot label Dec 6, 2018
@grahamehorner
Copy link
Author

@joperezr I've start looking into this and I'm building up a set of IObservable and IObserver classes that will represent the physical components within a circuit and the voltage/current etc.

FYI, I'm looking to have a basic ADC virtual circuit working by mid/end of next week; I'm dug out an olde copy of a book I had used many year ago Electronic Circuit & System Simulation Methods (SRE) by Lawrence Pillage

joperezr pushed a commit to joperezr/iot that referenced this issue Feb 19, 2019
@krwq krwq added this to the Future milestone Feb 22, 2019
@shaggygi
Copy link
Contributor

@krwq @joperezr I've started playing with this repo (Project TIOT). It's basically a dumping ground for me trying to learn about related topics. However, it might help with this issue. It is still "very" early, but looks promising. I was already able to perform many of the GPIO-related features and was successful communicating with I2C (but is far as I got for now). There is a basic example using with a WPF app, as well.

If it gains traction/support, it might be a good idea to move over to the tools section.

Again, this is nothing more than a playground for myself learning topics and repo could be removed at some point. Just thought you might be interested.

Much more to do as time allows. 🎉

@krwq
Copy link
Member

krwq commented Mar 18, 2019

@shaggygi perhaps you could use Firmata to do stuff remotely: #262 - I bet same stuff will work for Pi and Arduino.

For many scenarios TCP connection will do but in some cases you might have to send a program which executes remotely (I don't know if firmata has capabilities like that but might be worth taking a look since it seems it has similar goals in mind)

@shaggygi
Copy link
Contributor

@krwq Thanks for the link. I had not come across that one yet. It seems this is the same concept I'm trying to do with TIOT, except Firmata appears to use serial/USB (which is still a good idea) instead of gRPC & Ethernet. I'll try to read over the content/topic. Thx

@krwq
Copy link
Member

krwq commented Mar 18, 2019

@shaggygi if we decide to implement it, might be worth to just depend on Stream and then you can either pass a serial stream or tcp/other stream depending on what you need (perhaps we can have an overload which uses serial by default as well but stream should be main API).

I haven't looked into Firmata yet though to give you any opinions on the subject (it was somewhere on my todo list but probably won't have time for that for a while)

@krwq
Copy link
Member

krwq commented Jan 7, 2021

[Triage] How should do APIs look like for this?

@Ellerbach
Copy link
Member

[Triage] We now have multiple way of doing this:
-Arduino with Firmata support

  • FT4222 thru USB
  • For tests, we have multiple example of mocking up SPI, I2C devices.

Question is: is this issue still valid?

@ghost ghost locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tests Everything related to the testing of our library enhancement New feature or request up-for-grabs Good issue for external contributors to iot
Projects
None yet
Development

No branches or pull requests

5 participants