Tool to generate data on Unix port?

Moderators: Voyager, BertB, grovkillen, Stuntteam, LisaM

Post Reply
Message
Author
AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Tool to generate data on Unix port?

#1 Post by AndrewJ » 07 Feb 2018, 17:36

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.

Edu.Uy
New user
Posts: 8
Joined: 04 Feb 2018, 20:42

Re: Tool to generate data on Unix port?

#2 Post by Edu.Uy » 07 Feb 2018, 19:31

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.

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: Tool to generate data on Unix port?

#3 Post by AndrewJ » 07 Feb 2018, 19:36

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

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

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

#4 Post by AndrewJ » 04 Mar 2018, 11:53

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

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests