Page 1 of 1

Tool to generate data on Unix port?

Posted: 07 Feb 2018, 17:36
by AndrewJ
Hi, all,
I'm finding that I'd like to have some data to send through my embryo OpenHAB MQTT module (running on the Unix port of micropython on my Linux PC).
That way I could check and quickly adjust the format of the messages being sent.
I haven't found an easy way to produce such data from the unix port, since the normal plugins (such as BME) have no hardware and produce no data values. So the MQTT is not trying to send anything for me to look at, even in the debug log.
Before I spend time producing something, has anyone already found a good solution? Perhaps a number-generating "plugin" independent of hardware? ;)

Andrew.

Re: Tool to generate data on Unix port?

Posted: 07 Feb 2018, 19:31
by Edu.Uy
I actually have it working and sending messages to MQTT Domoticz, but with real pin sensing... of course you now that I'm testing ePyEasy for Raspy... :D

I Did not try to use a fake device. But I think I have seen a test one on the code... maybe you can tray cloning the switch device and make a fake pin.py on machine that could read from other directory than the gpio one....I could help you with that next week... but first wait for Lisa response, she may have something already done.

Edu.

Re: Tool to generate data on Unix port?

Posted: 07 Feb 2018, 19:36
by AndrewJ
Hi Edu,
Thanks, yes that is one benefit of using the Raspberry Pi! I might have a go on mine.... ;)
I'll wait and see what Lisa says, and contact you next week if I'm still looking for something.

Regards
Andrew

Re: Tool to generate data on Unix port? [SOLVED]

Posted: 04 Mar 2018, 11:53
by AndrewJ
Coming back belatedly on this, I did find that there is a plugin named test.py in the plugins folder, which provides a (constant) value for testing purposes. I only noticed it later, but worth recording in case it helps someone else.
Andrew